diff --git a/core/Requirements.php b/core/Requirements.php index 14019f93c..e3b749809 100644 --- a/core/Requirements.php +++ b/core/Requirements.php @@ -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)); diff --git a/core/model/DataObject.php b/core/model/DataObject.php index f345821f9..55617d586 100644 --- a/core/model/DataObject.php +++ b/core/model/DataObject.php @@ -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); } /** diff --git a/core/model/Hierarchy.php b/core/model/Hierarchy.php index 4b8d59854..03f70b72f 100644 --- a/core/model/Hierarchy.php +++ b/core/model/Hierarchy.php @@ -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); } } diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 6700e8d11..69130e0e1 100644 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -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) { diff --git a/core/model/Translatable.php b/core/model/Translatable.php index 0f62157db..a14465b33 100755 --- a/core/model/Translatable.php +++ b/core/model/Translatable.php @@ -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); + } } /**