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

Commit 027d6c5

Browse files
committed
Merge pull request #40 from madsbrunn/master
Refactor dispatcher
2 parents cf1e11a + c5bde46 commit 027d6c5

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

Classes/Cli/Dispatcher.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -632,11 +632,4 @@ protected function getSiteApiService() {
632632
}
633633
}
634634

635-
if ((TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI) && basename(PATH_thisScript) == 'cli_dispatch.phpsh') {
636-
$dispatcher = t3lib_div::makeInstance('Tx_Coreapi_Cli_Dispatcher');
637-
$dispatcher->start();
638-
} else {
639-
die('This script must be included by the "CLI module dispatcher"');
640-
}
641-
642635
?>

Scripts/Cli.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
if ((TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI) && basename(PATH_thisScript) == 'cli_dispatch.phpsh') {
4+
$dispatcher = t3lib_div::makeInstance('Tx_Coreapi_Cli_Dispatcher');
5+
$dispatcher->start();
6+
} else {
7+
die('This script must be included by the "CLI module dispatcher"');
8+
}
9+
10+
?>

ext_localconf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
// Register the CLI dispatcher
1313
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = array(
14-
'EXT:' . $_EXTKEY . '/Classes/Cli/Dispatcher.php', '_CLI_lowlevel'
14+
'EXT:' . $_EXTKEY . '/Scripts/Cli.php', '_CLI_lowlevel'
1515
);
1616

1717
?>

0 commit comments

Comments
 (0)