mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77020 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4ded1f4930
commit
161e7a35c7
@ -886,7 +886,8 @@ class Requirements_Backend {
|
||||
$fileContent = JSMin::minify($fileContent);
|
||||
}
|
||||
// write a header comment for each file for easier identification and debugging
|
||||
$combinedData .= "/****** FILE: $file *****/\n" . $fileContent . "\n\n";
|
||||
// also the semicolon between each file is required for jQuery to be combinable properly
|
||||
$combinedData .= "/****** FILE: $file *****/\n" . $fileContent . "\n;\n";
|
||||
}
|
||||
if(!file_exists(dirname($base . $combinedFile))) {
|
||||
Filesystem::makeFolder(dirname($base . $combinedFile));
|
||||
|
@ -2156,7 +2156,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
* @return boolean
|
||||
*/
|
||||
public function canCreate($member = null) {
|
||||
return Permission::check('ADMIN', 'any', $member);;
|
||||
return Permission::check('ADMIN', 'any', $member);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -136,8 +136,8 @@ class Hierarchy extends DataObjectDecorator {
|
||||
} else {
|
||||
return ($node->$parameterName == $this->markingFilter['value']);
|
||||
}
|
||||
} else if ($funcName = $this->markingFilter['func']) {
|
||||
return $funcName($node);
|
||||
} else if ($func = $this->markingFilter['func']) {
|
||||
return call_user_func($func, $node);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1127,6 +1127,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
if($this->ID && is_numeric($this->ID)) {
|
||||
$linkedPages = DataObject::get("VirtualPage", "\"CopyContentFromID\" = $this->ID");
|
||||
}
|
||||
|
||||
$parentPageLinks = array();
|
||||
|
||||
if(isset($linkedPages)) {
|
||||
foreach($linkedPages as $linkedPage) {
|
||||
|
@ -244,7 +244,12 @@ class Translatable extends DataObjectDecorator {
|
||||
* @param $locale String
|
||||
*/
|
||||
static function set_default_locale($locale) {
|
||||
self::$default_locale = $locale;
|
||||
$localeList = i18n::get_locale_list();
|
||||
if(isset($localeList[$locale])) {
|
||||
self::$default_locale = $locale;
|
||||
} else {
|
||||
user_error("Translatable::set_default_locale(): '$locale' is not a valid locale.", E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user