Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

Commit db03364

Browse files
author
Georg Ringer
committed
Improve EM update task
1 parent cc32ead commit db03364

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

Classes/Command/ExtensionApiCommandController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ public function listInstalledCommand($type = '') {
6060
* @return void
6161
*/
6262
public function updateListCommand() {
63-
/** @var $emTask tx_em_Tasks_UpdateExtensionList */
64-
$emTask = $this->objectManager->get('tx_em_Tasks_UpdateExtensionList');
65-
$emTask->execute();
63+
/** @var $service Tx_Coreapi_Service_ExtensionApiService */
64+
$service = $this->objectManager->get('Tx_Coreapi_Service_ExtensionApiService');
65+
$service->updateMirrors();
6666

6767
$this->outputLine('Extension list has been updated.');
6868
}

Classes/Service/ExtensionApiService.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@ public function getInstalledExtensions($type = '') {
5757

5858
return $list;
5959
}
60+
61+
/**
62+
* Update the mirrors, using the scheduler task of EXT:em
63+
*
64+
* @return void
65+
* @see tx_em_Tasks_UpdateExtensionList
66+
*/
67+
public function updateMirrors() {
68+
/** @var $emTask tx_em_Tasks_UpdateExtensionList */
69+
$emTask = t3lib_div::makeInstance('tx_em_Tasks_UpdateExtensionList');
70+
$emTask->execute();
71+
}
6072
}
6173

6274
?>

0 commit comments

Comments
 (0)