aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/develop
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-04-28 21:04:36 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-04-28 21:04:36 +0200
commit2928effb3cd10114b71305e5c07f6c03584a4fe1 (patch)
treeaf2ee29836dc608d2cab6b24157fe6a2102efd8d /phpBB/develop
parented669982c2a8225e262d57b60f5654658799becd (diff)
downloadforums-2928effb3cd10114b71305e5c07f6c03584a4fe1.tar
forums-2928effb3cd10114b71305e5c07f6c03584a4fe1.tar.gz
forums-2928effb3cd10114b71305e5c07f6c03584a4fe1.tar.bz2
forums-2928effb3cd10114b71305e5c07f6c03584a4fe1.tar.xz
forums-2928effb3cd10114b71305e5c07f6c03584a4fe1.zip
[ticket/12273] Update exporter to allow specifying an extension
PHPBB3-12273
Diffstat (limited to 'phpBB/develop')
-rw-r--r--phpBB/develop/export_events_for_wiki.php30
1 files changed, 18 insertions, 12 deletions
diff --git a/phpBB/develop/export_events_for_wiki.php b/phpBB/develop/export_events_for_wiki.php
index 2a8e4533e5..61d02059fd 100644
--- a/phpBB/develop/export_events_for_wiki.php
+++ b/phpBB/develop/export_events_for_wiki.php
@@ -16,19 +16,24 @@ $phpbb_root_path = __DIR__ . '/../';
function usage()
{
- echo "Usage: export_events_for_wiki.php COMMAND\n";
+ echo "Usage: export_events_for_wiki.php COMMAND [EXTENSION]\n";
echo "\n";
- echo "all:\n";
- echo " Generate the complete wikipage for https://wiki.phpbb.com/Event_List\n";
+ echo "COMMAND:\n";
+ echo " all:\n";
+ echo " Generate the complete wikipage for https://wiki.phpbb.com/Event_List\n";
echo "\n";
- echo "php:\n";
- echo " Generate the PHP event section of Event_List\n";
+ echo " php:\n";
+ echo " Generate the PHP event section of Event_List\n";
echo "\n";
- echo "adm:\n";
- echo " Generate the ACP Template event section of Event_List\n";
+ echo " adm:\n";
+ echo " Generate the ACP Template event section of Event_List\n";
echo "\n";
- echo "styles:\n";
- echo " Generate the Styles Template event section of Event_List\n";
+ echo " styles:\n";
+ echo " Generate the Styles Template event section of Event_List\n";
+ echo "\n";
+ echo "EXTENSION (Optional):\n";
+ echo " If not given, only core events will be exported.\n";
+ echo " Otherwise only events from the extension will be exported.\n";
echo "\n";
exit(2);
}
@@ -44,6 +49,7 @@ function validate_argument_count($arguments, $count)
validate_argument_count($argc, 1);
$action = $argv[1];
+$extension = isset($argv[2]) ? $argv[2] : null;
require __DIR__ . '/../phpbb/event/php_exporter.' . $phpEx;
require __DIR__ . '/../phpbb/event/md_exporter.' . $phpEx;
require __DIR__ . '/../phpbb/event/recursive_event_filter_iterator.' . $phpEx;
@@ -56,7 +62,7 @@ switch ($action)
case 'php':
$exporter = new \phpbb\event\php_exporter($phpbb_root_path);
- $exporter->crawl_phpbb_directory_php();
+ $exporter->crawl_phpbb_directory_php($extension);
echo $exporter->export_events_for_wiki();
if ($action === 'php')
@@ -68,7 +74,7 @@ switch ($action)
case 'styles':
$exporter = new \phpbb\event\md_exporter($phpbb_root_path);
- $exporter->crawl_phpbb_directory_styles('docs/events.md');
+ $exporter->crawl_phpbb_directory_styles('docs/events.md', $extension);
echo $exporter->export_events_for_wiki();
if ($action === 'styles')
@@ -80,7 +86,7 @@ switch ($action)
case 'adm':
$exporter = new \phpbb\event\md_exporter($phpbb_root_path);
- $exporter->crawl_phpbb_directory_adm('docs/events.md');
+ $exporter->crawl_phpbb_directory_adm('docs/events.md', $extension);
echo $exporter->export_events_for_wiki();
if ($action === 'all')