diff --git a/core/Object.php b/core/Object.php old mode 100755 new mode 100644 index 2e49fbd76..24efb1c9b --- a/core/Object.php +++ b/core/Object.php @@ -513,7 +513,7 @@ abstract class Object { user_error(sprintf('Object::add_extension() - Can\'t find extension class for "%s"', $extensionClass), E_USER_ERROR); } - if(!ClassInfo::is_subclass_of($extensionClass, 'Extension')) { + if(!is_subclass_of($extensionClass, 'Extension')) { user_error(sprintf('Object::add_extension() - Extension "%s" is not a subclass of Extension', $extensionClass), E_USER_ERROR); } @@ -537,7 +537,7 @@ abstract class Object { self::set_static($class, 'extensions', $extensions); // load statics now for DataObject classes - if(ClassInfo::is_subclass_of($class, 'DataObject')) { + if(is_subclass_of($class, 'DataObject')) { if(is_subclass_of($extensionClass, 'DataObjectDecorator')) { DataObjectDecorator::load_extra_statics($class, $extension); } diff --git a/core/control/ContentController.php b/core/control/ContentController.php old mode 100755 new mode 100644 index a2d14f7bd..afa1de841 --- a/core/control/ContentController.php +++ b/core/control/ContentController.php @@ -230,7 +230,7 @@ class ContentController extends Controller { $hasOnes = $this->dataRecord->has_one(); if(!$hasOnes) return false; foreach($hasOnes as $hasOneName => $hasOneClass) { - if($hasOneClass == 'WidgetArea' || ClassInfo::is_subclass_of($hasOneClass, 'WidgetArea')) { + if($hasOneClass == 'WidgetArea' || is_subclass_of($hasOneClass, 'WidgetArea')) { $widgetAreaRelations[] = $hasOneName; } } diff --git a/core/control/HTTPRequest.php b/core/control/HTTPRequest.php old mode 100755 new mode 100644 index 6756709f0..c82043ab3 --- a/core/control/HTTPRequest.php +++ b/core/control/HTTPRequest.php @@ -348,7 +348,7 @@ class SS_HTTPRequest implements ArrayAccess { if($varRequired && !isset($this->dirParts[$i])) return false; $arguments[$varName] = isset($this->dirParts[$i]) ? $this->dirParts[$i] : null; - if($part == '$Controller' && (!ClassInfo::exists($arguments['Controller']) || !ClassInfo::is_subclass_of($arguments['Controller'], 'Controller'))) { + if($part == '$Controller' && (!ClassInfo::exists($arguments['Controller']) || !is_subclass_of($arguments['Controller'], 'Controller'))) { return false; } diff --git a/core/model/Versioned.php b/core/model/Versioned.php old mode 100755 new mode 100644 index e1d47c242..f564f4a50 --- a/core/model/Versioned.php +++ b/core/model/Versioned.php @@ -479,7 +479,7 @@ class Versioned extends DataObjectDecorator { */ function canBeVersioned($table) { return ClassInfo::exists($table) - && ClassInfo::is_subclass_of($table, 'DataObject') + && is_subclass_of($table, 'DataObject') && DataObject::has_own_table($table); }