Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

startup.php

Zuletzt modifiziert: 09.10.2024, 12:51 - Dateigröße: 4.23 KiB


 001  <?php
 002  /**
 003   *
 004   * This file is part of the phpBB Forum Software package.
 005   *
 006   * @copyright (c) phpBB Limited <https://www.phpbb.com>
 007   * @license GNU General Public License, version 2 (GPL-2.0)
 008   *
 009   * For full copyright and license information, please see
 010   * the docs/CREDITS.txt file.
 011   *
 012   */
 013   
 014  /** @ignore */
 015  if (!defined('IN_PHPBB') || !defined('IN_INSTALL'))
 016  {
 017      exit;
 018  }
 019   
 020  function phpbb_require_updated($path, $phpbb_root_path, $optional = false)
 021  {
 022      $new_path = $phpbb_root_path . 'install/update/new/' . $path;
 023      $old_path = $phpbb_root_path . $path;
 024   
 025      if (file_exists($new_path))
 026      {
 027          require($new_path);
 028      }
 029      else if (!$optional || file_exists($old_path))
 030      {
 031          require($old_path);
 032      }
 033  }
 034   
 035  function phpbb_include_updated($path, $phpbb_root_path, $optional = false)
 036  {
 037      $new_path = $phpbb_root_path . 'install/update/new/' . $path;
 038      $old_path = $phpbb_root_path . $path;
 039   
 040      if (file_exists($new_path))
 041      {
 042          include($new_path);
 043      }
 044      else if (!$optional || file_exists($old_path))
 045      {
 046          include($old_path);
 047      }
 048  }
 049   
 050  function installer_msg_handler($errno, $msg_text, $errfile, $errline)
 051  {
 052      global $phpbb_installer_container;
 053   
 054      if (error_reporting() == 0)
 055      {
 056          return true;
 057      }
 058   
 059      switch ($errno)
 060      {
 061          case E_NOTICE:
 062          case E_WARNING:
 063          case E_USER_WARNING:
 064          case E_USER_NOTICE:
 065              $msg = '[phpBB Debug] "' . $msg_text . '" in file ' . $errfile . ' on line ' . $errline;
 066   
 067              if (!empty($phpbb_installer_container))
 068              {
 069                  try
 070                  {
 071                      /** @var \phpbb\install\helper\iohandler\iohandler_interface $iohandler */
 072                      $iohandler = $phpbb_installer_container->get('installer.helper.iohandler');
 073                      $iohandler->add_warning_message($msg);
 074                  }
 075                  catch (\phpbb\install\helper\iohandler\exception\iohandler_not_implemented_exception $e)
 076                  {
 077                      print($msg);
 078                  }
 079              }
 080              else
 081              {
 082                  print($msg);
 083              }
 084   
 085              return;
 086          break;
 087          case E_USER_ERROR:
 088              $msg = '<b>General Error:</b><br />' . $msg_text . '<br /> in file ' . $errfile . ' on line ' . $errline;
 089   
 090              $backtrace = get_backtrace();
 091              if ($backtrace)
 092              {
 093                  $msg .= '<br /><br />BACKTRACE<br />' . $backtrace;
 094              }
 095   
 096              throw new \phpbb\exception\runtime_exception($msg);
 097          break;
 098          case E_DEPRECATED:
 099              return true;
 100          break;
 101      }
 102   
 103      return false;
 104  }
 105   
 106  phpbb_require_updated('includes/startup.' . $phpEx, $phpbb_root_path);
 107  phpbb_require_updated('phpbb/class_loader.' . $phpEx, $phpbb_root_path);
 108   
 109  $phpbb_class_loader_new = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}install/update/new/phpbb/", $phpEx);
 110  $phpbb_class_loader_new->register();
 111  $phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
 112  $phpbb_class_loader->register();
 113  $phpbb_class_loader = new \phpbb\class_loader('phpbb\\convert\\', "{$phpbb_root_path}install/convert/", $phpEx);
 114  $phpbb_class_loader->register();
 115  $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);
 116  $phpbb_class_loader_ext->register();
 117   
 118  // In case $phpbb_adm_relative_path is not set (in case of an update), use the default.
 119  $phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relative_path : 'adm/';
 120  $phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
 121   
 122  // Include files
 123  phpbb_require_updated('includes/functions.' . $phpEx, $phpbb_root_path);
 124  phpbb_require_updated('includes/functions_content.' . $phpEx, $phpbb_root_path);
 125  phpbb_include_updated('includes/functions_compatibility.' . $phpEx, $phpbb_root_path);
 126  phpbb_require_updated('includes/functions_user.' . $phpEx, $phpbb_root_path);
 127  phpbb_require_updated('includes/utf/utf_tools.' . $phpEx, $phpbb_root_path);
 128   
 129  // Set PHP error handler to ours
 130  set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'installer_msg_handler');
 131   
 132  $phpbb_installer_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx);
 133  $phpbb_installer_container_builder
 134      ->with_environment('installer')
 135      ->without_extensions();
 136   
 137  $other_config_path = $phpbb_root_path . 'install/update/new/config';
 138  $config_path = (file_exists($other_config_path . '/installer/config.yml')) ? $other_config_path : $phpbb_root_path . 'config';
 139   
 140  $phpbb_installer_container = $phpbb_installer_container_builder
 141      ->with_config_path($config_path)
 142      ->with_custom_parameters(array('cache.driver.class' => 'phpbb\cache\driver\file'))
 143      ->get_container();
 144