aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2013-11-03 02:49:50 +0100
committerAndreas Fischer <bantu@phpbb.com>2013-11-03 02:49:50 +0100
commitaec5b9d156436d7dd7ebdbd7f76e79c3eb13f51c (patch)
treef87ad036f9e10b0deea30f48fcf2c1c3eac865ff
parentedfc48a71ca7128f2c24bedcd2cfe0eb8f7066b9 (diff)
downloadforums-aec5b9d156436d7dd7ebdbd7f76e79c3eb13f51c.tar
forums-aec5b9d156436d7dd7ebdbd7f76e79c3eb13f51c.tar.gz
forums-aec5b9d156436d7dd7ebdbd7f76e79c3eb13f51c.tar.bz2
forums-aec5b9d156436d7dd7ebdbd7f76e79c3eb13f51c.tar.xz
forums-aec5b9d156436d7dd7ebdbd7f76e79c3eb13f51c.zip
[ticket/11998] Basic console application script.
PHPBB3-11998
-rw-r--r--phpBB/console.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/phpBB/console.php b/phpBB/console.php
new file mode 100644
index 0000000000..8699ea7b57
--- /dev/null
+++ b/phpBB/console.php
@@ -0,0 +1,34 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+use Symfony\Component\Console\Application;
+
+if (php_sapi_name() != 'cli')
+{
+ echo 'This program must be run from the command line.' . PHP_EOL;
+ exit(1);
+}
+
+define('IN_PHPBB', true);
+$phpbb_root_path = __DIR__ . '/';
+$phpEx = substr(strrchr(__FILE__, '.'), 1);
+require($phpbb_root_path . 'includes/startup.' . $phpEx);
+require($phpbb_root_path . 'config.' . $phpEx);
+require($phpbb_root_path . 'includes/constants.' . $phpEx);
+require($phpbb_root_path . 'includes/functions.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
+require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
+
+$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
+$phpbb_class_loader->register();
+
+$application = new Application('phpBB Console', PHPBB_VERSION);
+$application->addCommands(array(
+));
+$application->run();