mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 01:06:48 +02:00
[ticket/13807] Allow filtering events by phpBB version
PHPBB3-13807
This commit is contained in:
@@ -18,6 +18,7 @@ if (php_sapi_name() != 'cli')
|
||||
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
$phpbb_root_path = __DIR__ . '/../';
|
||||
define('IN_PHPBB', true);
|
||||
|
||||
function usage()
|
||||
{
|
||||
@@ -54,9 +55,11 @@ function validate_argument_count($arguments, $count)
|
||||
validate_argument_count($argc, 1);
|
||||
|
||||
$action = $argv[1];
|
||||
$extension = isset($argv[2]) ? $argv[2] : null;
|
||||
$extension = isset($argv[2]) && $argv[2] !== 'null' ? $argv[2] : null;
|
||||
$min_version = isset($argv[3]) ? $argv[3] : null;
|
||||
require __DIR__ . '/../phpbb/event/php_exporter.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/event/md_exporter.' . $phpEx;
|
||||
require __DIR__ . '/../includes/functions.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/event/recursive_event_filter_iterator.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/recursive_dot_prefix_filter_iterator.' . $phpEx;
|
||||
|
||||
@@ -66,7 +69,7 @@ switch ($action)
|
||||
echo '__FORCETOC__' . "\n";
|
||||
|
||||
case 'php':
|
||||
$exporter = new \phpbb\event\php_exporter($phpbb_root_path, $extension);
|
||||
$exporter = new \phpbb\event\php_exporter($phpbb_root_path, $extension, $min_version);
|
||||
$exporter->crawl_phpbb_directory_php();
|
||||
echo $exporter->export_events_for_wiki();
|
||||
|
||||
|
Reference in New Issue
Block a user