diff --git a/modules/system/system.updater.inc b/modules/system/system.updater.inc index 0df1ad9..18bf62c 100644 --- a/modules/system/system.updater.inc +++ b/modules/system/system.updater.inc @@ -144,3 +144,48 @@ class ThemeUpdater extends Updater implements DrupalUpdaterInterface { ); } } + +/** + * Class for updating the core using FileTransfer classes via authorize.php. + */ +class CoreUpdater extends Updater implements DrupalUpdaterInterface { + + public function getInstallDirectory() { + + return DRUPAL_ROOT; + } + + public function isInstalled() { + //Of course! + return TRUE; + } + + public static function canUpdateDirectory($directory) { + + if($directory == DRUPAL_ROOT) { + return TRUE; + } + return FALSE; + } + + public static function canUpdate($project_name) { + + if($project_name == 'drupal') { + return TRUE; + } + return FALSE; + } + + public function postInstall() { + + cache_clear_all(); + + } + + public function postInstallTasks() { + return array( + l(t('Administration pages'), 'admin'), + ); + } + +}