[ Index ] |
PHP Cross Reference of phpBB-3.1.12-deutsch |
[Summary view] [Print] [Text view]
1 #!/usr/bin/env php 2 <?php 3 /** 4 * 5 * This file is part of the phpBB Forum Software package. 6 * 7 * @copyright (c) phpBB Limited <https://www.phpbb.com> 8 * @license GNU General Public License, version 2 (GPL-2.0) 9 * 10 * For full copyright and license information, please see 11 * the docs/CREDITS.txt file. 12 * 13 */ 14 15 use Symfony\Component\Console\Input\ArgvInput; 16 17 if (php_sapi_name() != 'cli') 18 { 19 echo 'This program must be run from the command line.' . PHP_EOL; 20 exit(1); 21 } 22 23 define('IN_PHPBB', true); 24 $phpbb_root_path = __DIR__ . '/../'; 25 $phpEx = substr(strrchr(__FILE__, '.'), 1); 26 require($phpbb_root_path . 'includes/startup.' . $phpEx); 27 require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx); 28 29 $phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx); 30 $phpbb_class_loader->register(); 31 32 $phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $phpEx); 33 extract($phpbb_config_php_file->get_all()); 34 35 require($phpbb_root_path . 'includes/constants.' . $phpEx); 36 require($phpbb_root_path . 'includes/functions.' . $phpEx); 37 require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); 38 require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); 39 40 $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx); 41 $phpbb_container_builder->set_dump_container(false); 42 43 $input = new ArgvInput(); 44 45 if ($input->hasParameterOption(array('--safe-mode'))) 46 { 47 $phpbb_container_builder->set_use_extensions(false); 48 $phpbb_container_builder->set_dump_container(false); 49 } 50 else 51 { 52 $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); 53 $phpbb_class_loader_ext->register(); 54 phpbb_load_extensions_autoloaders($phpbb_root_path); 55 } 56 57 $phpbb_container = $phpbb_container_builder->get_container(); 58 $phpbb_container->get('request')->enable_super_globals(); 59 require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx); 60 61 $user = $phpbb_container->get('user'); 62 $user->data['user_id'] = ANONYMOUS; 63 $user->ip = '127.0.0.1'; 64 $user->add_lang('acp/common'); 65 $user->add_lang('cli'); 66 67 $application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION, $user); 68 $application->register_container_commands($phpbb_container->get('console.command_collection')); 69 $application->run($input);
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |