From 9f23c252a09aa178141bbe92838b59d08b381a07 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 26 Jul 2011 17:58:20 +0200 Subject: [PATCH] Fixed the installation of cronjobs --- XSD/cronjobs.xsd | 2 +- com.woltlab.wcf/cronjobs.xml | 10 +++++----- .../files/lib/acp/page/CronjobListPage.class.php | 8 ++++---- .../plugin/CronjobsPackageInstallationPlugin.class.php | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/XSD/cronjobs.xsd b/XSD/cronjobs.xsd index eafaa6f8ef..da1c83945a 100644 --- a/XSD/cronjobs.xsd +++ b/XSD/cronjobs.xsd @@ -32,7 +32,7 @@ - + diff --git a/com.woltlab.wcf/cronjobs.xml b/com.woltlab.wcf/cronjobs.xml index 6894f4710c..5aa1896402 100644 --- a/com.woltlab.wcf/cronjobs.xml +++ b/com.woltlab.wcf/cronjobs.xml @@ -2,7 +2,7 @@ - lib/system/cronjob/GetUpdateInfoCronjob.class.php + wcf\system\cronjob\GetUpdateInfoCronjob Gets update package information 0 2 @@ -15,7 +15,7 @@ - lib/system/cronjob/RefreshSearchRobotsCronjob.class.php + wcf\system\cronjob\RefreshSearchRobotsCronjob Refreshes list of search robots 0 3 @@ -28,7 +28,7 @@ - lib/system/cronjob/CleanUpCronjobLogCronjob.class.php + wcf\system\cronjob\CleanUpCronjobLogCronjob Deletes old entries from cronjob log. 0 12 @@ -41,7 +41,7 @@ - lib/system/cronjob/CleanUpSessionLogCronjob.class.php + wcf\system\cronjob\CleanUpSessionLogCronjob Deletes old entries from session log. 0 10 @@ -54,7 +54,7 @@ - lib/system/cronjob/CleanupListenerCronjob.class.php + wcf\system\cronjob\CleanupListenerCronjob Executes cleanup system. 5,20,35,50 * diff --git a/wcfsetup/install/files/lib/acp/page/CronjobListPage.class.php b/wcfsetup/install/files/lib/acp/page/CronjobListPage.class.php index 198b03937f..18072b5984 100755 --- a/wcfsetup/install/files/lib/acp/page/CronjobListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/CronjobListPage.class.php @@ -37,13 +37,13 @@ class CronjobListPage extends SortablePage { public $objectListClassName = 'wcf\data\cronjob\CronjobList'; /** - * @see wcf\page\MultipleLinkPage::readObjects() + * @see wcf\page\MultipleLinkPage::initObjectList() */ - public function readObjects() { + public function initObjectList() { + parent::initObjectList(); + $this->objectList->getConditionBuilder()->add("cronjob.packageID IN (?)", array(PackageDependencyHandler::getDependencies())); $this->sqlOrderBy = "cronjob.".$this->sortField." ".$this->sortOrder; - - parent::readObjects(); } /** diff --git a/wcfsetup/install/files/lib/system/package/plugin/CronjobsPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/CronjobsPackageInstallationPlugin.class.php index e6c6469775..92c7f58942 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/CronjobsPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/CronjobsPackageInstallationPlugin.class.php @@ -27,19 +27,19 @@ class CronjobsPackageInstallationPlugin extends AbstractXMLPackageInstallationPl /** * @see wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::$tagName */ - public $tagName = 'cronjobs'; + public $tagName = 'cronjob'; /** * @see wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::handleDelete() */ protected function handleDelete(array $items) { $sql = "DELETE FROM wcf".WCF_N."_".$this->tableName." - WHERE classPath = ? + WHERE className = ? AND packageID = ?"; $statement = WCF::getDB()->prepareStatement($sql); foreach ($items as $item) { $statement->execute(array( - $item['attributes']['classpath'], + $item['attributes']['classname'], $this->installation->getPackageID() )); } @@ -67,7 +67,7 @@ class CronjobsPackageInstallationPlugin extends AbstractXMLPackageInstallationPl * @see wcf\system\package\plugin\AbstractXMLPackageInstallationPlugin::validateImport() */ protected function validateImport(array $data) { - CronjobUtil::validate($startMinute, $startHour, $startDom, $startMonth, $startDow); + CronjobUtil::validate($data['startMinute'], $data['startHour'], $data['startDom'], $data['startMonth'], $data['startDow']); } /** -- 2.20.1