[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * This file is part of the phpBB Forum Software package. 5 * 6 * @copyright (c) phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 8 * 9 * For full copyright and license information, please see 10 * the docs/CREDITS.txt file. 11 * 12 */ 13 14 /** @ignore */ 15 if (!defined('IN_PHPBB') || !defined('IN_INSTALL')) 16 { 17 exit; 18 } 19 20 function phpbb_require_updated($path, $phpbb_root_path, $optional = false) 21 { 22 $new_path = $phpbb_root_path . 'install/update/new/' . $path; 23 $old_path = $phpbb_root_path . $path; 24 25 if (file_exists($new_path)) 26 { 27 require($new_path); 28 } 29 else if (!$optional || file_exists($old_path)) 30 { 31 require($old_path); 32 } 33 } 34 35 function phpbb_include_updated($path, $phpbb_root_path, $optional = false) 36 { 37 $new_path = $phpbb_root_path . 'install/update/new/' . $path; 38 $old_path = $phpbb_root_path . $path; 39 40 if (file_exists($new_path)) 41 { 42 include($new_path); 43 } 44 else if (!$optional || file_exists($old_path)) 45 { 46 include($old_path); 47 } 48 } 49 50 function installer_msg_handler($errno, $msg_text, $errfile, $errline) 51 { 52 global $phpbb_installer_container; 53 54 if (error_reporting() == 0) 55 { 56 return true; 57 } 58 59 switch ($errno) 60 { 61 case E_NOTICE: 62 case E_WARNING: 63 case E_USER_WARNING: 64 case E_USER_NOTICE: 65 $msg = '[phpBB Debug] "' . $msg_text . '" in file ' . $errfile . ' on line ' . $errline; 66 67 if (!empty($phpbb_installer_container)) 68 { 69 try 70 { 71 /** @var \phpbb\install\helper\iohandler\iohandler_interface $iohandler */ 72 $iohandler = $phpbb_installer_container->get('installer.helper.iohandler'); 73 $iohandler->add_warning_message($msg); 74 } 75 catch (\phpbb\install\helper\iohandler\exception\iohandler_not_implemented_exception $e) 76 { 77 print($msg); 78 } 79 } 80 else 81 { 82 print($msg); 83 } 84 85 return; 86 break; 87 case E_USER_ERROR: 88 $msg = '<b>General Error:</b><br />' . $msg_text . '<br /> in file ' . $errfile . ' on line ' . $errline; 89 90 $backtrace = get_backtrace(); 91 if ($backtrace) 92 { 93 $msg .= '<br /><br />BACKTRACE<br />' . $backtrace; 94 } 95 96 throw new \phpbb\exception\runtime_exception($msg); 97 break; 98 case E_DEPRECATED: 99 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();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |