[ Index ]

PHP Cross Reference of phpBB-3.2.0-deutsch

title

Body

[close]

/install/ -> phpbbcli.php (source)

   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  define('IN_INSTALL', true);
  25  define('PHPBB_ENVIRONMENT', 'production');
  26  define('PHPBB_VERSION', '3.2.0');
  27  $phpbb_root_path = __DIR__ . '/../';
  28  $phpEx = substr(strrchr(__FILE__, '.'), 1);
  29  
  30  //
  31  // Let's do the common.php logic
  32  //
  33  $startup_new_path = $phpbb_root_path . 'install/update/update/new/install/startup.' . $phpEx;
  34  $startup_path = (file_exists($startup_new_path)) ? $startup_new_path : $phpbb_root_path . 'install/startup.' . $phpEx;
  35  require($startup_path);
  36  
  37  $input = new ArgvInput();
  38  
  39  // Enable superglobals for cli support
  40  $phpbb_installer_container->get('request')->enable_super_globals();
  41  
  42  /** @var \phpbb\filesystem\filesystem $phpbb_filesystem */
  43  $phpbb_filesystem = $phpbb_installer_container->get('filesystem');
  44  
  45  /** @var \phpbb\language\language $language */
  46  $language = $phpbb_installer_container->get('language');
  47  $language->add_lang(array('common', 'acp/common', 'acp/board', 'install', 'posting', 'cli'));
  48  
  49  $application = new \phpbb\console\application('phpBB Installer', PHPBB_VERSION, $language);
  50  $application->setDispatcher($phpbb_installer_container->get('dispatcher'));
  51  $application->register_container_commands($phpbb_installer_container->get('console.installer.command_collection'));
  52  $application->run($input);


Generated: Sun Feb 19 19:47:08 2017 Cross-referenced by PHPXref 0.7.1