mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
reverting changes to the installer
do not introduce a function we never call outside of common.php git-svn-id: file:///svn/phpbb/trunk@5859 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
7bc05c5e24
commit
859902ea24
8 changed files with 367 additions and 389 deletions
|
@ -23,15 +23,23 @@ if (!defined('IN_PHPBB'))
|
||||||
$starttime = explode(' ', microtime());
|
$starttime = explode(' ', microtime());
|
||||||
$starttime = $starttime[1] + $starttime[0];
|
$starttime = $starttime[1] + $starttime[0];
|
||||||
|
|
||||||
//error_reporting(E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
|
error_reporting(E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
|
||||||
error_reporting(E_ALL);
|
//error_reporting(E_ALL);
|
||||||
|
|
||||||
/**
|
// If we are on PHP >= 6.0.0 we do not need some code
|
||||||
* Remove variables created by register_globals from the global scope
|
if (version_compare(phpversion(), '6.0.0-dev', '>='))
|
||||||
* Thanks to Matt Kavanagh
|
|
||||||
*/
|
|
||||||
function deregister_globals()
|
|
||||||
{
|
{
|
||||||
|
define('STRIP', false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
set_magic_quotes_runtime(0);
|
||||||
|
|
||||||
|
// Be paranoid with passed vars
|
||||||
|
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
|
||||||
|
{
|
||||||
|
// Remove variables created by register_globals from the global scope
|
||||||
|
// Thanks to Matt Kavanagh
|
||||||
$not_unset = array(
|
$not_unset = array(
|
||||||
'GLOBALS' => true,
|
'GLOBALS' => true,
|
||||||
'_GET' => true,
|
'_GET' => true,
|
||||||
|
@ -43,7 +51,8 @@ function deregister_globals()
|
||||||
'_ENV' => true,
|
'_ENV' => true,
|
||||||
'_FILES' => true,
|
'_FILES' => true,
|
||||||
'phpEx' => true,
|
'phpEx' => true,
|
||||||
'phpbb_root_path' => true);
|
'phpbb_root_path' => true
|
||||||
|
);
|
||||||
|
|
||||||
// Not only will array_merge and array_keys give a warning if
|
// Not only will array_merge and array_keys give a warning if
|
||||||
// a parameter is not an array, array_merge will actually fail.
|
// a parameter is not an array, array_merge will actually fail.
|
||||||
|
@ -79,21 +88,6 @@ function deregister_globals()
|
||||||
unset($input);
|
unset($input);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are on PHP >= 6.0.0 we do not need some code
|
|
||||||
if (version_compare(phpversion(), '6.0.0-dev', '>='))
|
|
||||||
{
|
|
||||||
define('STRIP', false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
set_magic_quotes_runtime(0);
|
|
||||||
|
|
||||||
// Be paranoid with passed vars
|
|
||||||
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
|
|
||||||
{
|
|
||||||
deregister_globals();
|
|
||||||
}
|
|
||||||
|
|
||||||
define('STRIP', (get_magic_quotes_gpc()) ? true : false);
|
define('STRIP', (get_magic_quotes_gpc()) ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,9 +97,6 @@ if (defined('IN_CRON'))
|
||||||
$phpbb_root_path = getcwd() . '/';
|
$phpbb_root_path = getcwd() . '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run the following code if not currently installing
|
|
||||||
if (!defined('IN_INSTALL'))
|
|
||||||
{
|
|
||||||
require($phpbb_root_path . 'config.'.$phpEx);
|
require($phpbb_root_path . 'config.'.$phpEx);
|
||||||
|
|
||||||
if (!defined('PHPBB_INSTALLED'))
|
if (!defined('PHPBB_INSTALLED'))
|
||||||
|
@ -133,11 +124,6 @@ if (!defined('IN_INSTALL'))
|
||||||
@dl(trim($extension));
|
@dl(trim($extension));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$acm_type = 'file';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Include files
|
// Include files
|
||||||
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
|
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
|
||||||
|
@ -147,6 +133,7 @@ require($phpbb_root_path . 'includes/session.' . $phpEx);
|
||||||
require($phpbb_root_path . 'includes/auth.' . $phpEx);
|
require($phpbb_root_path . 'includes/auth.' . $phpEx);
|
||||||
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||||
require($phpbb_root_path . 'includes/constants.' . $phpEx);
|
require($phpbb_root_path . 'includes/constants.' . $phpEx);
|
||||||
|
require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
|
||||||
|
|
||||||
// Set PHP error handler to ours
|
// Set PHP error handler to ours
|
||||||
set_error_handler('msg_handler');
|
set_error_handler('msg_handler');
|
||||||
|
@ -156,11 +143,6 @@ $user = new user();
|
||||||
$auth = new auth();
|
$auth = new auth();
|
||||||
$template = new template();
|
$template = new template();
|
||||||
$cache = new cache();
|
$cache = new cache();
|
||||||
|
|
||||||
// Initiate DBAL if not installing
|
|
||||||
if (!defined('IN_INSTALL'))
|
|
||||||
{
|
|
||||||
require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
|
|
||||||
$db = new $sql_db();
|
$db = new $sql_db();
|
||||||
|
|
||||||
// Connect to DB
|
// Connect to DB
|
||||||
|
@ -178,6 +160,5 @@ if (!defined('IN_INSTALL'))
|
||||||
{
|
{
|
||||||
// trigger_error('REMOVE_INSTALL');
|
// trigger_error('REMOVE_INSTALL');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -132,9 +132,6 @@ define('FIELD_DATE', 6);
|
||||||
// Additional constants
|
// Additional constants
|
||||||
|
|
||||||
|
|
||||||
// Table names - only set if not in installation
|
|
||||||
if (!defined('IN_INSTALL'))
|
|
||||||
{
|
|
||||||
// Table names
|
// Table names
|
||||||
define('ACL_GROUPS_TABLE', $table_prefix . 'auth_groups');
|
define('ACL_GROUPS_TABLE', $table_prefix . 'auth_groups');
|
||||||
define('ACL_OPTIONS_TABLE', $table_prefix . 'auth_options');
|
define('ACL_OPTIONS_TABLE', $table_prefix . 'auth_options');
|
||||||
|
@ -204,7 +201,4 @@ if (!defined('IN_INSTALL'))
|
||||||
// Additional tables
|
// Additional tables
|
||||||
|
|
||||||
|
|
||||||
// Additional tables end
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -912,7 +912,10 @@ class smtp_class
|
||||||
// Log into server and get possible auth codes if neccessary
|
// Log into server and get possible auth codes if neccessary
|
||||||
function log_into_server($hostname, $username, $password, $default_auth_method)
|
function log_into_server($hostname, $username, $password, $default_auth_method)
|
||||||
{
|
{
|
||||||
|
global $user;
|
||||||
|
|
||||||
$err_msg = '';
|
$err_msg = '';
|
||||||
|
$local_host = (empty($user->page)) ? 'localhost' : $user->host;
|
||||||
|
|
||||||
// If we are authenticating through pop-before-smtp, we
|
// If we are authenticating through pop-before-smtp, we
|
||||||
// have to login ones before we get authenticated
|
// have to login ones before we get authenticated
|
||||||
|
@ -923,7 +926,7 @@ class smtp_class
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try EHLO first
|
// Try EHLO first
|
||||||
$this->server_send("EHLO [$hostname]");
|
$this->server_send("EHLO [{$local_host}]");
|
||||||
if ($err_msg = $this->server_parse('250', __LINE__))
|
if ($err_msg = $this->server_parse('250', __LINE__))
|
||||||
{
|
{
|
||||||
// a 503 response code means that we're already authenticated
|
// a 503 response code means that we're already authenticated
|
||||||
|
@ -933,7 +936,7 @@ class smtp_class
|
||||||
}
|
}
|
||||||
|
|
||||||
// If EHLO fails, we try HELO
|
// If EHLO fails, we try HELO
|
||||||
$this->server_send("HELO [$hostname]");
|
$this->server_send("HELO [{$local_host}]");
|
||||||
if ($err_msg = $this->server_parse('250', __LINE__))
|
if ($err_msg = $this->server_parse('250', __LINE__))
|
||||||
{
|
{
|
||||||
return ($this->numeric_response_code == 503) ? false : $err_msg;
|
return ($this->numeric_response_code == 503) ? false : $err_msg;
|
||||||
|
|
|
@ -17,6 +17,7 @@ class session
|
||||||
var $session_id = '';
|
var $session_id = '';
|
||||||
var $cookie_data = array();
|
var $cookie_data = array();
|
||||||
var $browser = '';
|
var $browser = '';
|
||||||
|
var $host = '';
|
||||||
var $ip = '';
|
var $ip = '';
|
||||||
var $page = array();
|
var $page = array();
|
||||||
var $current_page_filename = '';
|
var $current_page_filename = '';
|
||||||
|
@ -112,6 +113,7 @@ class session
|
||||||
$this->time_now = time();
|
$this->time_now = time();
|
||||||
|
|
||||||
$this->browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : '';
|
$this->browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : '';
|
||||||
|
$this->host = (!empty($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : 'localhost';
|
||||||
|
|
||||||
$this->page = $this->extract_current_page($phpbb_root_path);
|
$this->page = $this->extract_current_page($phpbb_root_path);
|
||||||
$this->page['page'] .= (isset($_POST['f'])) ? ((strpos($this->page['page'], '?') !== false) ? '&' : '?') . 'f=' . intval($_POST['f']) : '';
|
$this->page['page'] .= (isset($_POST['f'])) ? ((strpos($this->page['page'], '?') !== false) ? '&' : '?') . 'f=' . intval($_POST['f']) : '';
|
||||||
|
@ -373,10 +375,6 @@ class session
|
||||||
$this->data = $db->sql_fetchrow($result);
|
$this->data = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
}
|
}
|
||||||
/* echo "<br />$sql";
|
|
||||||
echo "<br />$user_id :: " . sizeof($this->data) . " :: " . (int) is_array($this->data) . " :: " . $db->sql_numrows();
|
|
||||||
print_r($this->cookie_data);
|
|
||||||
print_r($this->data);*/
|
|
||||||
|
|
||||||
// If no data was returned one or more of the following occured:
|
// If no data was returned one or more of the following occured:
|
||||||
// Key didn't match one in the DB
|
// Key didn't match one in the DB
|
||||||
|
@ -397,34 +395,6 @@ class session
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* echo "<br />$sql";
|
|
||||||
echo "<br />$user_id :: " . sizeof($this->data) . " :: " . (int) is_array($this->data) . " :: " . $db->sql_numrows();
|
|
||||||
print_r($this->cookie_data);
|
|
||||||
print_r($this->data);
|
|
||||||
|
|
||||||
if ($this->data['user_id'] != ANONYMOUS)
|
|
||||||
{
|
|
||||||
$sql = 'SELECT session_time, session_id
|
|
||||||
FROM ' . SESSIONS_TABLE . '
|
|
||||||
WHERE session_user_id = ' . (int) $this->data['user_id'] . '
|
|
||||||
ORDER BY session_time DESC';
|
|
||||||
$result = $db->sql_query_limit($sql, 1);
|
|
||||||
|
|
||||||
if ($sdata = $db->sql_fetchrow($result))
|
|
||||||
{
|
|
||||||
$this->data = array_merge($sdata, $this->data);
|
|
||||||
unset($sdata);
|
|
||||||
$this->session_id = $this->data['session_id'];
|
|
||||||
}
|
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
$this->data['session_last_visit'] = (isset($this->data['session_time']) && $this->data['session_time']) ? $this->data['session_time'] : (($this->data['user_lastvisit']) ? $this->data['user_lastvisit'] : time());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->data['session_last_visit'] = time();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if ($this->data['user_id'] != ANONYMOUS)
|
if ($this->data['user_id'] != ANONYMOUS)
|
||||||
{
|
{
|
||||||
$this->data['session_last_visit'] = (isset($this->data['session_time']) && $this->data['session_time']) ? $this->data['session_time'] : (($this->data['user_lastvisit']) ? $this->data['user_lastvisit'] : time());
|
$this->data['session_last_visit'] = (isset($this->data['session_time']) && $this->data['session_time']) ? $this->data['session_time'] : (($this->data['user_lastvisit']) ? $this->data['user_lastvisit'] : time());
|
||||||
|
|
|
@ -15,10 +15,72 @@ define('IN_INSTALL', true);
|
||||||
|
|
||||||
$phpbb_root_path = './../';
|
$phpbb_root_path = './../';
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
include($phpbb_root_path . 'common.' . $phpEx);
|
|
||||||
|
// Error reporting level and runtime escaping
|
||||||
|
//error_reporting(E_ERROR | E_WARNING | E_PARSE);
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
|
||||||
|
// If we are on PHP >= 6.0.0 we do not need some code
|
||||||
|
if (version_compare(phpversion(), '6.0.0', '>='))
|
||||||
|
{
|
||||||
|
define('STRIP', false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
set_magic_quotes_runtime(0);
|
||||||
|
|
||||||
|
// Protect against GLOBALS tricks
|
||||||
|
if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS']))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Protect against _SESSION tricks
|
||||||
|
if (isset($_SESSION) && !is_array($_SESSION))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Be paranoid with passed vars
|
||||||
|
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
|
||||||
|
{
|
||||||
|
$not_unset = array('_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_SESSION', '_ENV', '_FILES', 'phpEx', 'phpbb_root_path');
|
||||||
|
|
||||||
|
// Not only will array_merge give a warning if a parameter
|
||||||
|
// is not an array, it will actually fail. So we check if
|
||||||
|
// _SESSION has been initialised.
|
||||||
|
if (!isset($_SESSION) || !is_array($_SESSION))
|
||||||
|
{
|
||||||
|
$_SESSION = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Merge all into one extremely huge array; unset
|
||||||
|
// this later
|
||||||
|
$input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_SESSION, $_ENV, $_FILES);
|
||||||
|
|
||||||
|
foreach ($input as $varname => $void)
|
||||||
|
{
|
||||||
|
if (!in_array($varname, $not_unset))
|
||||||
|
{
|
||||||
|
unset(${$varname});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($input);
|
||||||
|
}
|
||||||
|
|
||||||
|
define('STRIP', (get_magic_quotes_gpc()) ? true : false);
|
||||||
|
}
|
||||||
|
|
||||||
@set_time_limit(120);
|
@set_time_limit(120);
|
||||||
|
|
||||||
|
// Include essential scripts
|
||||||
|
require($phpbb_root_path . 'includes/functions.'.$phpEx);
|
||||||
|
include($phpbb_root_path . 'includes/auth.' . $phpEx);
|
||||||
|
include($phpbb_root_path . 'includes/session.'.$phpEx);
|
||||||
|
include($phpbb_root_path . 'includes/template.'.$phpEx);
|
||||||
|
include($phpbb_root_path . 'includes/acm/acm_file.'.$phpEx);
|
||||||
|
include($phpbb_root_path . 'includes/acm/acm_main.'.$phpEx);
|
||||||
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
||||||
|
|
||||||
// Try and load an appropriate language if required
|
// Try and load an appropriate language if required
|
||||||
|
@ -67,14 +129,26 @@ if (!$language)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$user->lang_path = $phpbb_root_path . 'language/' . $language . '/';
|
// And finally, load the relevant language files
|
||||||
$user->add_lang(array('common', 'acp/common', 'acp/board', 'install', 'posting'));
|
include($phpbb_root_path . 'language/' . $language . '/common.'.$phpEx);
|
||||||
|
include($phpbb_root_path . 'language/' . $language . '/acp/common.'.$phpEx);
|
||||||
|
include($phpbb_root_path . 'language/' . $language . '/acp/board.'.$phpEx);
|
||||||
|
include($phpbb_root_path . 'language/' . $language . '/install.'.$phpEx);
|
||||||
|
include($phpbb_root_path . 'language/' . $language . '/posting.'.$phpEx);
|
||||||
|
|
||||||
$mode = request_var('mode', 'overview');
|
$mode = request_var('mode', 'overview');
|
||||||
$sub = request_var('sub', '');
|
$sub = request_var('sub', '');
|
||||||
|
|
||||||
$template->set_custom_template($phpbb_root_path . 'adm/style', 'admin');
|
// Set PHP error handler to ours
|
||||||
$template->assign_var('T_TEMPLATE_PATH', $phpbb_root_path . 'adm/style');
|
set_error_handler('msg_handler');
|
||||||
|
|
||||||
|
$user = new user();
|
||||||
|
$auth = new auth();
|
||||||
|
$cache = new cache();
|
||||||
|
$template = new Template();
|
||||||
|
|
||||||
|
$template->set_custom_template('../adm/style', 'admin');
|
||||||
|
$template->assign_var('T_TEMPLATE_PATH', '../adm/style');
|
||||||
|
|
||||||
$install = new module();
|
$install = new module();
|
||||||
|
|
||||||
|
@ -195,26 +269,26 @@ class module
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
define('HEADER_INC', true);
|
|
||||||
|
|
||||||
global $template, $user, $stage;
|
define('HEADER_INC', true);
|
||||||
|
global $template, $lang, $stage;
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'L_INSTALL_PANEL' => $user->lang['INSTALL_PANEL'],
|
'L_INSTALL_PANEL' => $lang['INSTALL_PANEL'],
|
||||||
'PAGE_TITLE' => $this->get_page_title(),
|
'PAGE_TITLE' => $this->get_page_title(),
|
||||||
|
|
||||||
'META' => $this->get_meta(),
|
'META' => $this->get_meta(),
|
||||||
|
|
||||||
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
|
||||||
'S_CONTENT_ENCODING' => $user->lang['ENCODING'],
|
'S_CONTENT_ENCODING' => $lang['ENCODING'],
|
||||||
'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'],
|
'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
|
||||||
'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'],
|
'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!empty($user->lang['ENCODING']))
|
if (!empty($lang['ENCODING']))
|
||||||
{
|
{
|
||||||
header('Content-type: text/html; charset: ' . $user->lang['ENCODING']);
|
header('Content-type: text/html; charset: ' . $lang['ENCODING']);
|
||||||
}
|
}
|
||||||
header('Cache-Control: private, no-cache="set-cookie", pre-check=0, post-check=0');
|
header('Cache-Control: private, no-cache="set-cookie", pre-check=0, post-check=0');
|
||||||
header('Expires: 0');
|
header('Expires: 0');
|
||||||
|
@ -254,14 +328,14 @@ class module
|
||||||
*/
|
*/
|
||||||
function get_page_title()
|
function get_page_title()
|
||||||
{
|
{
|
||||||
global $user;
|
global $lang;
|
||||||
|
|
||||||
if (!isset($this->module->page_title))
|
if (!isset($this->module->page_title))
|
||||||
{
|
{
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return (isset($user->lang[$this->module->page_title])) ? $user->lang[$this->module->page_title] : $this->module->page_title;
|
return (isset($lang[$this->module->page_title])) ? $lang[$this->module->page_title] : $this->module->page_title;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -277,7 +351,7 @@ class module
|
||||||
*/
|
*/
|
||||||
function generate_navigation()
|
function generate_navigation()
|
||||||
{
|
{
|
||||||
global $user, $template, $phpEx;
|
global $lang, $template, $phpEx;
|
||||||
|
|
||||||
if (is_array($this->module_ary))
|
if (is_array($this->module_ary))
|
||||||
{
|
{
|
||||||
|
@ -285,7 +359,7 @@ class module
|
||||||
foreach ($this->module_ary as $cat_ary)
|
foreach ($this->module_ary as $cat_ary)
|
||||||
{
|
{
|
||||||
$cat = $cat_ary['name'];
|
$cat = $cat_ary['name'];
|
||||||
$l_cat = (!empty($user->lang['CAT_' . $cat])) ? $user->lang['CAT_' . $cat] : preg_replace('#_#', ' ', $cat);
|
$l_cat = (!empty($lang['CAT_' . $cat])) ? $lang['CAT_' . $cat] : preg_replace('#_#', ' ', $cat);
|
||||||
$cat = strtolower($cat);
|
$cat = strtolower($cat);
|
||||||
$url = $this->module_url . '?mode=' . $cat;
|
$url = $this->module_url . '?mode=' . $cat;
|
||||||
|
|
||||||
|
@ -302,7 +376,7 @@ class module
|
||||||
$subs = $this->module_ary[$this->id]['subs'];
|
$subs = $this->module_ary[$this->id]['subs'];
|
||||||
foreach ($subs as $option)
|
foreach ($subs as $option)
|
||||||
{
|
{
|
||||||
$l_option = (!empty($user->lang['SUB_' . $option])) ? $user->lang['SUB_' . $option] : preg_replace('#_#', ' ', $option);
|
$l_option = (!empty($lang['SUB_' . $option])) ? $lang['SUB_' . $option] : preg_replace('#_#', ' ', $option);
|
||||||
$option = strtolower($option);
|
$option = strtolower($option);
|
||||||
$url = $this->module_url . '?mode=' . $this->mode . '&sub=' . $option;
|
$url = $this->module_url . '?mode=' . $this->mode . '&sub=' . $option;
|
||||||
|
|
||||||
|
@ -320,7 +394,7 @@ class module
|
||||||
$matched = false;
|
$matched = false;
|
||||||
foreach ($subs as $option)
|
foreach ($subs as $option)
|
||||||
{
|
{
|
||||||
$l_option = (!empty($user->lang['STAGE_' . $option])) ? $user->lang['STAGE_' . $option] : preg_replace('#_#', ' ', $option);
|
$l_option = (!empty($lang['STAGE_' . $option])) ? $lang['STAGE_' . $option] : preg_replace('#_#', ' ', $option);
|
||||||
$option = strtolower($option);
|
$option = strtolower($option);
|
||||||
$matched = ($this->sub == $option) ? true : $matched;
|
$matched = ($this->sub == $option) ? true : $matched;
|
||||||
|
|
||||||
|
@ -351,7 +425,7 @@ class module
|
||||||
*/
|
*/
|
||||||
function error($error, $line, $file, $skip = false)
|
function error($error, $line, $file, $skip = false)
|
||||||
{
|
{
|
||||||
global $user, $db;
|
global $lang, $db;
|
||||||
|
|
||||||
if (!$skip)
|
if (!$skip)
|
||||||
{
|
{
|
||||||
|
@ -359,7 +433,7 @@ class module
|
||||||
echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">';
|
echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">';
|
||||||
echo '<head>';
|
echo '<head>';
|
||||||
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
|
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
|
||||||
echo '<title>' . $user->lang['INST_ERR_FATAL'] . '</title>';
|
echo '<title>' . $lang['INST_ERR_FATAL'] . '</title>';
|
||||||
echo '<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />';
|
echo '<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />';
|
||||||
echo '</head>';
|
echo '</head>';
|
||||||
echo '<body id="errorpage">';
|
echo '<body id="errorpage">';
|
||||||
|
@ -370,10 +444,10 @@ class module
|
||||||
echo ' <div class="panel">';
|
echo ' <div class="panel">';
|
||||||
echo ' <span class="corners-top"><span></span></span>';
|
echo ' <span class="corners-top"><span></span></span>';
|
||||||
echo ' <div id="content">';
|
echo ' <div id="content">';
|
||||||
echo ' <h1>' . $user->lang['INST_ERR_FATAL'] . '</h1>';
|
echo ' <h1>' . $lang['INST_ERR_FATAL'] . '</h1>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo ' <p>' . $user->lang['INST_ERR_FATAL'] . "</p>\n";
|
echo ' <p>' . $lang['INST_ERR_FATAL'] . "</p>\n";
|
||||||
echo ' <p>' . basename($file) . ' [ ' . $line . " ]</p>\n";
|
echo ' <p>' . basename($file) . ' [ ' . $line . " ]</p>\n";
|
||||||
echo ' <p><b>' . $error . "</b></p>\n";
|
echo ' <p><b>' . $error . "</b></p>\n";
|
||||||
|
|
||||||
|
@ -407,12 +481,12 @@ class module
|
||||||
*/
|
*/
|
||||||
function db_error($error, $sql, $line, $file, $skip = false)
|
function db_error($error, $sql, $line, $file, $skip = false)
|
||||||
{
|
{
|
||||||
global $user, $db;
|
global $lang, $db;
|
||||||
|
|
||||||
$this->page_header();
|
$this->page_header();
|
||||||
|
|
||||||
echo ' <h2 style="color:red;text-align:center">' . $user->lang['INST_ERR_FATAL'] . "</h2>\n";
|
echo ' <h2 style="color:red;text-align:center">' . $lang['INST_ERR_FATAL'] . "</h2>\n";
|
||||||
echo ' <p>' . $user->lang['INST_ERR_FATAL_DB'] . "</p>\n";
|
echo ' <p>' . $lang['INST_ERR_FATAL_DB'] . "</p>\n";
|
||||||
echo ' <p>' . basename($file) . ' [ ' . $line . " ]</p>\n";
|
echo ' <p>' . basename($file) . ' [ ' . $line . " ]</p>\n";
|
||||||
echo ' <p>SQL : ' . $sql . "</p>\n";
|
echo ' <p>SQL : ' . $sql . "</p>\n";
|
||||||
echo ' <p><b>' . $error . "</b></p>\n";
|
echo ' <p><b>' . $error . "</b></p>\n";
|
||||||
|
@ -432,7 +506,7 @@ class module
|
||||||
*/
|
*/
|
||||||
function input_field($name, $type, $value='', $options='')
|
function input_field($name, $type, $value='', $options='')
|
||||||
{
|
{
|
||||||
global $user;
|
global $lang;
|
||||||
$tpl_type = explode(':', $type);
|
$tpl_type = explode(':', $type);
|
||||||
$tpl = '';
|
$tpl = '';
|
||||||
|
|
||||||
|
@ -460,8 +534,8 @@ class module
|
||||||
$tpl_type_cond = explode('_', $tpl_type[1]);
|
$tpl_type_cond = explode('_', $tpl_type[1]);
|
||||||
$type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true;
|
$type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true;
|
||||||
|
|
||||||
$tpl_no = '<input type="radio" name="' . $name . '" value="0"' . $key_no . ' class="radio" /> ' . (($type_no) ? $user->lang['NO'] : $user->lang['DISABLED']);
|
$tpl_no = '<input type="radio" name="' . $name . '" value="0"' . $key_no . ' class="radio" /> ' . (($type_no) ? $lang['NO'] : $lang['DISABLED']);
|
||||||
$tpl_yes = '<input type="radio" name="' . $name . '" value="1"' . $key_yes . ' class="radio" /> ' . (($type_no) ? $user->lang['YES'] : $user->lang['ENABLED']);
|
$tpl_yes = '<input type="radio" name="' . $name . '" value="1"' . $key_yes . ' class="radio" /> ' . (($type_no) ? $lang['YES'] : $lang['ENABLED']);
|
||||||
|
|
||||||
$tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . ' ' . $tpl_no : $tpl_no . ' ' . $tpl_yes;
|
$tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . ' ' . $tpl_no : $tpl_no . ' ' . $tpl_yes;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -33,17 +33,17 @@ class install_install extends module
|
||||||
|
|
||||||
function main($mode, $sub)
|
function main($mode, $sub)
|
||||||
{
|
{
|
||||||
global $user, $template;
|
global $lang, $template;
|
||||||
|
|
||||||
switch ($sub)
|
switch ($sub)
|
||||||
{
|
{
|
||||||
case 'intro' :
|
case 'intro' :
|
||||||
$this->page_title = $user->lang['SUB_INTRO'];
|
$this->page_title = $lang['SUB_INTRO'];
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'TITLE' => $user->lang['INSTALL_INTRO'],
|
'TITLE' => $lang['INSTALL_INTRO'],
|
||||||
'BODY' => $user->lang['INSTALL_INTRO_BODY'],
|
'BODY' => $lang['INSTALL_INTRO_BODY'],
|
||||||
'L_SUBMIT' => $user->lang['NEXT'],
|
'L_SUBMIT' => $lang['NEXT'],
|
||||||
'U_ACTION' => $this->p_master->module_url . "?mode=$mode&sub=requirements",
|
'U_ACTION' => $this->p_master->module_url . "?mode=$mode&sub=requirements",
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -89,13 +89,13 @@ class install_install extends module
|
||||||
*/
|
*/
|
||||||
function check_server_requirements($mode, $sub)
|
function check_server_requirements($mode, $sub)
|
||||||
{
|
{
|
||||||
global $user, $template, $phpbb_root_path, $phpEx;
|
global $lang, $template, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
$this->page_title = $user->lang['STAGE_REQUIREMENTS'];
|
$this->page_title = $lang['STAGE_REQUIREMENTS'];
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'TITLE' => $user->lang['REQUIREMENTS_TITLE'],
|
'TITLE' => $lang['REQUIREMENTS_TITLE'],
|
||||||
'BODY' => $user->lang['REQUIREMENTS_EXPLAIN'],
|
'BODY' => $lang['REQUIREMENTS_EXPLAIN'],
|
||||||
));
|
));
|
||||||
|
|
||||||
$passed = array('php' => false, 'db' => false, 'files' => false);
|
$passed = array('php' => false, 'db' => false, 'files' => false);
|
||||||
|
@ -104,8 +104,8 @@ class install_install extends module
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'S_LEGEND' => true,
|
'S_LEGEND' => true,
|
||||||
'S_FIRST_ROW' => true,
|
'S_FIRST_ROW' => true,
|
||||||
'LEGEND' => $user->lang['PHP_SETTINGS'],
|
'LEGEND' => $lang['PHP_SETTINGS'],
|
||||||
'LEGEND_EXPLAIN' => $user->lang['PHP_SETTINGS_EXPLAIN'],
|
'LEGEND_EXPLAIN' => $lang['PHP_SETTINGS_EXPLAIN'],
|
||||||
));
|
));
|
||||||
|
|
||||||
// Test the minimum PHP version
|
// Test the minimum PHP version
|
||||||
|
@ -113,21 +113,21 @@ class install_install extends module
|
||||||
|
|
||||||
if (version_compare($php_version, '4.3.3') < 0)
|
if (version_compare($php_version, '4.3.3') < 0)
|
||||||
{
|
{
|
||||||
$result = '<b style="color:red">' . $user->lang['NO'] . '</b>';
|
$result = '<b style="color:red">' . $lang['NO'] . '</b>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$passed['php'] = true;
|
$passed['php'] = true;
|
||||||
// We also give feedback on whether we're running in safe mode
|
// We also give feedback on whether we're running in safe mode
|
||||||
$result = '<b style="color:green">' . $user->lang['YES'];
|
$result = '<b style="color:green">' . $lang['YES'];
|
||||||
if (@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'on')
|
if (@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'on')
|
||||||
{
|
{
|
||||||
$result .= ', ' . $user->lang['PHP_SAFE_MODE'];
|
$result .= ', ' . $lang['PHP_SAFE_MODE'];
|
||||||
}
|
}
|
||||||
$result .= '</b>';
|
$result .= '</b>';
|
||||||
}
|
}
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'TITLE' => $user->lang['PHP_VERSION_REQD'],
|
'TITLE' => $lang['PHP_VERSION_REQD'],
|
||||||
'RESULT' => $result,
|
'RESULT' => $result,
|
||||||
|
|
||||||
'S_EXPLAIN' => false,
|
'S_EXPLAIN' => false,
|
||||||
|
@ -137,16 +137,16 @@ class install_install extends module
|
||||||
// Check for register_globals being enabled
|
// Check for register_globals being enabled
|
||||||
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
|
if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on')
|
||||||
{
|
{
|
||||||
$result = '<b style="color:red">' . $user->lang['NO'] . '</b>';
|
$result = '<b style="color:red">' . $lang['NO'] . '</b>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result = '<b style="color:green">' . $user->lang['YES'] . '</b>';
|
$result = '<b style="color:green">' . $lang['YES'] . '</b>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'TITLE' => $user->lang['PHP_REGISTER_GLOBALS'],
|
'TITLE' => $lang['PHP_REGISTER_GLOBALS'],
|
||||||
'TITLE_EXPLAIN' => $user->lang['PHP_REGISTER_GLOBALS_EXPLAIN'],
|
'TITLE_EXPLAIN' => $lang['PHP_REGISTER_GLOBALS_EXPLAIN'],
|
||||||
'RESULT' => $result,
|
'RESULT' => $result,
|
||||||
|
|
||||||
'S_EXPLAIN' => true,
|
'S_EXPLAIN' => true,
|
||||||
|
@ -157,8 +157,8 @@ class install_install extends module
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'S_LEGEND' => true,
|
'S_LEGEND' => true,
|
||||||
'S_FIRST_ROW' => false,
|
'S_FIRST_ROW' => false,
|
||||||
'LEGEND' => $user->lang['PHP_SUPPORTED_DB'],
|
'LEGEND' => $lang['PHP_SUPPORTED_DB'],
|
||||||
'LEGEND_EXPLAIN' => $user->lang['PHP_SUPPORTED_DB_EXPLAIN'],
|
'LEGEND_EXPLAIN' => $lang['PHP_SUPPORTED_DB_EXPLAIN'],
|
||||||
));
|
));
|
||||||
|
|
||||||
$dlls_db = array();
|
$dlls_db = array();
|
||||||
|
@ -172,8 +172,8 @@ class install_install extends module
|
||||||
if (!$this->can_load_dll($dll))
|
if (!$this->can_load_dll($dll))
|
||||||
{
|
{
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'TITLE' => $user->lang['DLL_' . strtoupper($db_name)],
|
'TITLE' => $lang['DLL_' . strtoupper($db_name)],
|
||||||
'RESULT' => '<b style="color:red">' . $user->lang['UNAVAILABLE'] . '</b>',
|
'RESULT' => '<b style="color:red">' . $lang['UNAVAILABLE'] . '</b>',
|
||||||
|
|
||||||
'S_EXPLAIN' => false,
|
'S_EXPLAIN' => false,
|
||||||
'S_LEGEND' => false,
|
'S_LEGEND' => false,
|
||||||
|
@ -183,8 +183,8 @@ class install_install extends module
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'TITLE' => $user->lang['DLL_' . strtoupper($db_name)],
|
'TITLE' => $lang['DLL_' . strtoupper($db_name)],
|
||||||
'RESULT' => '<b style="color:green">' . $user->lang['AVAILABLE'] . '</b>',
|
'RESULT' => '<b style="color:green">' . $lang['AVAILABLE'] . '</b>',
|
||||||
|
|
||||||
'S_EXPLAIN' => false,
|
'S_EXPLAIN' => false,
|
||||||
'S_LEGEND' => false,
|
'S_LEGEND' => false,
|
||||||
|
@ -196,8 +196,8 @@ class install_install extends module
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'S_LEGEND' => true,
|
'S_LEGEND' => true,
|
||||||
'S_FIRST_ROW' => false,
|
'S_FIRST_ROW' => false,
|
||||||
'LEGEND' => $user->lang['PHP_OPTIONAL_MODULE'],
|
'LEGEND' => $lang['PHP_OPTIONAL_MODULE'],
|
||||||
'LEGEND_EXPLAIN' => $user->lang['PHP_OPTIONAL_MODULE_EXPLAIN'],
|
'LEGEND_EXPLAIN' => $lang['PHP_OPTIONAL_MODULE_EXPLAIN'],
|
||||||
));
|
));
|
||||||
|
|
||||||
foreach ($this->php_dlls_other as $dll)
|
foreach ($this->php_dlls_other as $dll)
|
||||||
|
@ -207,8 +207,8 @@ class install_install extends module
|
||||||
if (!$this->can_load_dll($dll))
|
if (!$this->can_load_dll($dll))
|
||||||
{
|
{
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'TITLE' => $user->lang['DLL_' . strtoupper($dll)],
|
'TITLE' => $lang['DLL_' . strtoupper($dll)],
|
||||||
'RESULT' => '<b style="color:red">' . $user->lang['UNAVAILABLE'] . '</b>',
|
'RESULT' => '<b style="color:red">' . $lang['UNAVAILABLE'] . '</b>',
|
||||||
|
|
||||||
'S_EXPLAIN' => false,
|
'S_EXPLAIN' => false,
|
||||||
'S_LEGEND' => false,
|
'S_LEGEND' => false,
|
||||||
|
@ -217,8 +217,8 @@ class install_install extends module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'TITLE' => $user->lang['DLL_' . strtoupper($dll)],
|
'TITLE' => $lang['DLL_' . strtoupper($dll)],
|
||||||
'RESULT' => '<b style="color:green">' . $user->lang['AVAILABLE'] . '</b>',
|
'RESULT' => '<b style="color:green">' . $lang['AVAILABLE'] . '</b>',
|
||||||
|
|
||||||
'S_EXPLAIN' => false,
|
'S_EXPLAIN' => false,
|
||||||
'S_LEGEND' => false,
|
'S_LEGEND' => false,
|
||||||
|
@ -257,8 +257,8 @@ class install_install extends module
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'TITLE' => $user->lang['APP_MAGICK'],
|
'TITLE' => $lang['APP_MAGICK'],
|
||||||
'RESULT' => ($img_imagick) ? '<b style="color:green">' . $user->lang['AVAILABLE'] . ', ' . $img_imagick . '</b>' : '<b style="color:blue">' . $user->lang['NO_LOCATION'] . '</b>',
|
'RESULT' => ($img_imagick) ? '<b style="color:green">' . $lang['AVAILABLE'] . ', ' . $img_imagick . '</b>' : '<b style="color:blue">' . $lang['NO_LOCATION'] . '</b>',
|
||||||
|
|
||||||
'S_EXPLAIN' => false,
|
'S_EXPLAIN' => false,
|
||||||
'S_LEGEND' => false,
|
'S_LEGEND' => false,
|
||||||
|
@ -268,8 +268,8 @@ class install_install extends module
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'S_LEGEND' => true,
|
'S_LEGEND' => true,
|
||||||
'S_FIRST_ROW' => false,
|
'S_FIRST_ROW' => false,
|
||||||
'LEGEND' => $user->lang['FILES_REQUIRED'],
|
'LEGEND' => $lang['FILES_REQUIRED'],
|
||||||
'LEGEND_EXPLAIN' => $user->lang['FILES_REQUIRED_EXPLAIN'],
|
'LEGEND_EXPLAIN' => $lang['FILES_REQUIRED_EXPLAIN'],
|
||||||
));
|
));
|
||||||
|
|
||||||
$directories = array('cache/', 'files/', 'store/');
|
$directories = array('cache/', 'files/', 'store/');
|
||||||
|
@ -294,8 +294,8 @@ class install_install extends module
|
||||||
|
|
||||||
$passed['files'] = ($exists && $write && $passed['files']) ? true : false;
|
$passed['files'] = ($exists && $write && $passed['files']) ? true : false;
|
||||||
|
|
||||||
$exists = ($exists) ? '<b style="color:green">' . $user->lang['FILE_FOUND'] . '</b>' : '<b style="color:red">' . $user->lang['FILE_NOT_FOUND'] . '</b>';
|
$exists = ($exists) ? '<b style="color:green">' . $lang['FILE_FOUND'] . '</b>' : '<b style="color:red">' . $lang['FILE_NOT_FOUND'] . '</b>';
|
||||||
$write = ($write) ? ', <b style="color:green">' . $user->lang['FILE_WRITEABLE'] . '</b>' : (($exists) ? ', <b style="color:red">' . $user->lang['FILE_UNWRITEABLE'] . '</b>' : '');
|
$write = ($write) ? ', <b style="color:green">' . $lang['FILE_WRITEABLE'] . '</b>' : (($exists) ? ', <b style="color:red">' . $lang['FILE_UNWRITEABLE'] . '</b>' : '');
|
||||||
|
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'TITLE' => $dir,
|
'TITLE' => $dir,
|
||||||
|
@ -310,8 +310,8 @@ class install_install extends module
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'S_LEGEND' => true,
|
'S_LEGEND' => true,
|
||||||
'S_FIRST_ROW' => false,
|
'S_FIRST_ROW' => false,
|
||||||
'LEGEND' => $user->lang['FILES_OPTIONAL'],
|
'LEGEND' => $lang['FILES_OPTIONAL'],
|
||||||
'LEGEND_EXPLAIN' => $user->lang['FILES_OPTIONAL_EXPLAIN'],
|
'LEGEND_EXPLAIN' => $lang['FILES_OPTIONAL_EXPLAIN'],
|
||||||
));
|
));
|
||||||
|
|
||||||
// config.php ... let's just warn the user it's not writeable
|
// config.php ... let's just warn the user it's not writeable
|
||||||
|
@ -329,8 +329,8 @@ class install_install extends module
|
||||||
$write = $exists = false;
|
$write = $exists = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$exists_str = ($exists) ? '<b style="color:green">' . $user->lang['FILE_FOUND'] . '</b>' : '<b style="color:red">' . $user->lang['FILE_NOT_FOUND'] . '</b>';
|
$exists_str = ($exists) ? '<b style="color:green">' . $lang['FILE_FOUND'] . '</b>' : '<b style="color:red">' . $lang['FILE_NOT_FOUND'] . '</b>';
|
||||||
$write_str = ($write) ? ', <b style="color:green">' . $user->lang['FILE_WRITEABLE'] . '</b>' : (($exists) ? ', <b style="color:red">' . $user->lang['FILE_UNWRITEABLE'] . '</b>' : '');
|
$write_str = ($write) ? ', <b style="color:green">' . $lang['FILE_WRITEABLE'] . '</b>' : (($exists) ? ', <b style="color:red">' . $lang['FILE_UNWRITEABLE'] . '</b>' : '');
|
||||||
|
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'TITLE' => $dir,
|
'TITLE' => $dir,
|
||||||
|
@ -344,7 +344,7 @@ class install_install extends module
|
||||||
$s_hidden_fields = ($img_imagick) ? '<input type="hidden" name="img_imagick" value="' . addslashes($img_imagick) . '" />' : '';
|
$s_hidden_fields = ($img_imagick) ? '<input type="hidden" name="img_imagick" value="' . addslashes($img_imagick) . '" />' : '';
|
||||||
|
|
||||||
$url = ($passed['php'] && $passed['db'] && $passed['files']) ? $this->p_master->module_url . "?mode=$mode&sub=database" : $this->p_master->module_url . "?mode=$mode&sub=requirements";
|
$url = ($passed['php'] && $passed['db'] && $passed['files']) ? $this->p_master->module_url . "?mode=$mode&sub=database" : $this->p_master->module_url . "?mode=$mode&sub=requirements";
|
||||||
$submit = ($passed['php'] && $passed['db'] && $passed['files']) ? $user->lang['INSTALL_START'] : $user->lang['INSTALL_TEST'];
|
$submit = ($passed['php'] && $passed['db'] && $passed['files']) ? $lang['INSTALL_START'] : $lang['INSTALL_TEST'];
|
||||||
|
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
|
@ -359,9 +359,9 @@ class install_install extends module
|
||||||
*/
|
*/
|
||||||
function obtain_database_settings($mode, $sub)
|
function obtain_database_settings($mode, $sub)
|
||||||
{
|
{
|
||||||
global $user, $template, $phpEx;
|
global $lang, $template, $phpEx;
|
||||||
|
|
||||||
$this->page_title = $user->lang['STAGE_DATABASE'];
|
$this->page_title = $lang['STAGE_DATABASE'];
|
||||||
|
|
||||||
// Obtain any submitted data
|
// Obtain any submitted data
|
||||||
foreach ($this->request_vars as $var)
|
foreach ($this->request_vars as $var)
|
||||||
|
@ -379,7 +379,7 @@ class install_install extends module
|
||||||
{
|
{
|
||||||
if (!$this->can_load_dll($this->available_dbms[$dbms]['MODULE']))
|
if (!$this->can_load_dll($this->available_dbms[$dbms]['MODULE']))
|
||||||
{
|
{
|
||||||
$error['db'][] = $user->lang['INST_ERR_NO_DB'];;
|
$error['db'][] = $lang['INST_ERR_NO_DB'];;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -388,15 +388,15 @@ class install_install extends module
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'S_LEGEND' => true,
|
'S_LEGEND' => true,
|
||||||
'S_FIRST_ROW' => true,
|
'S_FIRST_ROW' => true,
|
||||||
'LEGEND' => $user->lang['DB_CONNECTION'],
|
'LEGEND' => $lang['DB_CONNECTION'],
|
||||||
'LEGEND_EXPLAIN' => false,
|
'LEGEND_EXPLAIN' => false,
|
||||||
));
|
));
|
||||||
|
|
||||||
if ($connect_test)
|
if ($connect_test)
|
||||||
{
|
{
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'TITLE' => $user->lang['DB_TEST'],
|
'TITLE' => $lang['DB_TEST'],
|
||||||
'RESULT' => '<b style="color:green">' . $user->lang['SUCCESSFUL_CONNECT'] . '</b>',
|
'RESULT' => '<b style="color:green">' . $lang['SUCCESSFUL_CONNECT'] . '</b>',
|
||||||
|
|
||||||
'S_EXPLAIN' => false,
|
'S_EXPLAIN' => false,
|
||||||
'S_LEGEND' => false,
|
'S_LEGEND' => false,
|
||||||
|
@ -405,7 +405,7 @@ class install_install extends module
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'TITLE' => $user->lang['DB_TEST'],
|
'TITLE' => $lang['DB_TEST'],
|
||||||
'RESULT' => '<b style="color:red">' . implode('<br />', $error) . '</b>',
|
'RESULT' => '<b style="color:red">' . implode('<br />', $error) . '</b>',
|
||||||
|
|
||||||
'S_EXPLAIN' => false,
|
'S_EXPLAIN' => false,
|
||||||
|
@ -447,7 +447,7 @@ class install_install extends module
|
||||||
{
|
{
|
||||||
$template->assign_block_vars('options', array(
|
$template->assign_block_vars('options', array(
|
||||||
'S_LEGEND' => true,
|
'S_LEGEND' => true,
|
||||||
'LEGEND' => $user->lang[$vars])
|
'LEGEND' => $lang[$vars])
|
||||||
);
|
);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
@ -457,10 +457,10 @@ class install_install extends module
|
||||||
|
|
||||||
$template->assign_block_vars('options', array(
|
$template->assign_block_vars('options', array(
|
||||||
'KEY' => $config_key,
|
'KEY' => $config_key,
|
||||||
'TITLE' => $user->lang[$vars['lang']],
|
'TITLE' => $lang[$vars['lang']],
|
||||||
'S_EXPLAIN' => $vars['explain'],
|
'S_EXPLAIN' => $vars['explain'],
|
||||||
'S_LEGEND' => false,
|
'S_LEGEND' => false,
|
||||||
'TITLE_EXPLAIN' => ($vars['explain']) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '',
|
'TITLE_EXPLAIN' => ($vars['explain']) ? $lang[$vars['lang'] . '_EXPLAIN'] : '',
|
||||||
'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $$config_key, $options),
|
'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $$config_key, $options),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -486,7 +486,7 @@ class install_install extends module
|
||||||
$s_hidden_fields .= ($connect_test) ? '' : '<input type="hidden" name="testdb" value="true" />';
|
$s_hidden_fields .= ($connect_test) ? '' : '<input type="hidden" name="testdb" value="true" />';
|
||||||
// $url = ($connect_test) ? "install.$phpEx?stage=1" : $this->p_master->module_url . "?mode=$mode&sub=database";
|
// $url = ($connect_test) ? "install.$phpEx?stage=1" : $this->p_master->module_url . "?mode=$mode&sub=database";
|
||||||
|
|
||||||
$submit = $user->lang['NEXT_STEP'];
|
$submit = $lang['NEXT_STEP'];
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'L_SUBMIT' => $submit,
|
'L_SUBMIT' => $submit,
|
||||||
|
@ -500,9 +500,9 @@ class install_install extends module
|
||||||
*/
|
*/
|
||||||
function obtain_admin_settings($mode, $sub)
|
function obtain_admin_settings($mode, $sub)
|
||||||
{
|
{
|
||||||
global $user, $template, $phpEx;
|
global $lang, $template, $phpEx;
|
||||||
|
|
||||||
$this->page_title = $user->lang['STAGE_ADMINISTRATOR'];
|
$this->page_title = $lang['STAGE_ADMINISTRATOR'];
|
||||||
|
|
||||||
// Obtain any submitted data
|
// Obtain any submitted data
|
||||||
foreach ($this->request_vars as $var)
|
foreach ($this->request_vars as $var)
|
||||||
|
@ -520,39 +520,39 @@ class install_install extends module
|
||||||
// Check the entered email address and password
|
// Check the entered email address and password
|
||||||
if ($admin_name == '' || $admin_pass1 == '' || $admin_pass2 == '' || $board_email1 == '' || $board_email2 =='')
|
if ($admin_name == '' || $admin_pass1 == '' || $admin_pass2 == '' || $board_email1 == '' || $board_email2 =='')
|
||||||
{
|
{
|
||||||
$error[] = $user->lang['INST_ERR_MISSING_DATA'];
|
$error[] = $lang['INST_ERR_MISSING_DATA'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($admin_pass1 != $admin_pass2 && $admin_pass1 != '')
|
if ($admin_pass1 != $admin_pass2 && $admin_pass1 != '')
|
||||||
{
|
{
|
||||||
$error[] = $user->lang['INST_ERR_PASSWORD_MISMATCH'];
|
$error[] = $lang['INST_ERR_PASSWORD_MISMATCH'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test against the default password rules
|
// Test against the default password rules
|
||||||
if ($admin_pass1 != '' && strlen($admin_pass1) < 6)
|
if ($admin_pass1 != '' && strlen($admin_pass1) < 6)
|
||||||
{
|
{
|
||||||
$error[] = $user->lang['INST_ERR_PASSWORD_TOO_SHORT'];
|
$error[] = $lang['INST_ERR_PASSWORD_TOO_SHORT'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($admin_pass1 != '' && strlen($admin_pass1) > 30)
|
if ($admin_pass1 != '' && strlen($admin_pass1) > 30)
|
||||||
{
|
{
|
||||||
$error[] = $user->lang['INST_ERR_PASSWORD_TOO_LONG'];
|
$error[] = $lang['INST_ERR_PASSWORD_TOO_LONG'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($board_email1 != $board_email2 && $board_email1 != '')
|
if ($board_email1 != $board_email2 && $board_email1 != '')
|
||||||
{
|
{
|
||||||
$error[] = $user->lang['INST_ERR_EMAIL_MISMATCH'];
|
$error[] = $lang['INST_ERR_EMAIL_MISMATCH'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($board_email1 != '' && !preg_match('#^[a-z0-9\.\-_\+]+?@(.*?\.)*?[a-z0-9\-_]+?\.[a-z]{2,4}$#i', $board_email1))
|
if ($board_email1 != '' && !preg_match('#^[a-z0-9\.\-_\+]+?@(.*?\.)*?[a-z0-9\-_]+?\.[a-z]{2,4}$#i', $board_email1))
|
||||||
{
|
{
|
||||||
$error[] = $user->lang['INST_ERR_EMAIL_INVALID'];
|
$error[] = $lang['INST_ERR_EMAIL_INVALID'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'S_LEGEND' => true,
|
'S_LEGEND' => true,
|
||||||
'S_FIRST_ROW' => true,
|
'S_FIRST_ROW' => true,
|
||||||
'LEGEND' => $user->lang['STAGE_ADMINISTRATOR'],
|
'LEGEND' => $lang['STAGE_ADMINISTRATOR'],
|
||||||
'LEGEND_EXPLAIN' => false,
|
'LEGEND_EXPLAIN' => false,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -560,8 +560,8 @@ class install_install extends module
|
||||||
{
|
{
|
||||||
$passed = true;
|
$passed = true;
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'TITLE' => $user->lang['ADMIN_TEST'],
|
'TITLE' => $lang['ADMIN_TEST'],
|
||||||
'RESULT' => '<b style="color:green">' . $user->lang['TESTS_PASSED'] . '</b>',
|
'RESULT' => '<b style="color:green">' . $lang['TESTS_PASSED'] . '</b>',
|
||||||
|
|
||||||
'S_EXPLAIN' => false,
|
'S_EXPLAIN' => false,
|
||||||
'S_LEGEND' => false,
|
'S_LEGEND' => false,
|
||||||
|
@ -570,7 +570,7 @@ class install_install extends module
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$template->assign_block_vars('checks', array(
|
$template->assign_block_vars('checks', array(
|
||||||
'TITLE' => $user->lang['ADMIN_TEST'],
|
'TITLE' => $lang['ADMIN_TEST'],
|
||||||
'RESULT' => '<b style="color:red">' . implode('<br />', $error) . '</b>',
|
'RESULT' => '<b style="color:red">' . implode('<br />', $error) . '</b>',
|
||||||
|
|
||||||
'S_EXPLAIN' => false,
|
'S_EXPLAIN' => false,
|
||||||
|
@ -592,7 +592,7 @@ class install_install extends module
|
||||||
{
|
{
|
||||||
$template->assign_block_vars('options', array(
|
$template->assign_block_vars('options', array(
|
||||||
'S_LEGEND' => true,
|
'S_LEGEND' => true,
|
||||||
'LEGEND' => $user->lang[$vars])
|
'LEGEND' => $lang[$vars])
|
||||||
);
|
);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
@ -602,10 +602,10 @@ class install_install extends module
|
||||||
|
|
||||||
$template->assign_block_vars('options', array(
|
$template->assign_block_vars('options', array(
|
||||||
'KEY' => $config_key,
|
'KEY' => $config_key,
|
||||||
'TITLE' => $user->lang[$vars['lang']],
|
'TITLE' => $lang[$vars['lang']],
|
||||||
'S_EXPLAIN' => $vars['explain'],
|
'S_EXPLAIN' => $vars['explain'],
|
||||||
'S_LEGEND' => false,
|
'S_LEGEND' => false,
|
||||||
'TITLE_EXPLAIN' => ($vars['explain']) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '',
|
'TITLE_EXPLAIN' => ($vars['explain']) ? $lang[$vars['lang'] . '_EXPLAIN'] : '',
|
||||||
'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $$config_key, $options),
|
'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $$config_key, $options),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -634,7 +634,7 @@ class install_install extends module
|
||||||
$s_hidden_fields .= '<input type="hidden" name="' . $config_key . '" value="' . $$config_key . '" />';
|
$s_hidden_fields .= '<input type="hidden" name="' . $config_key . '" value="' . $$config_key . '" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
$submit = $user->lang['NEXT_STEP'];
|
$submit = $lang['NEXT_STEP'];
|
||||||
|
|
||||||
$url = ($passed) ? $this->p_master->module_url . "?mode=$mode&sub=config_file" : $this->p_master->module_url . "?mode=$mode&sub=administrator";
|
$url = ($passed) ? $this->p_master->module_url . "?mode=$mode&sub=config_file" : $this->p_master->module_url . "?mode=$mode&sub=administrator";
|
||||||
$s_hidden_fields .= ($passed) ? '' : '<input type="hidden" name="check" value="true" />';
|
$s_hidden_fields .= ($passed) ? '' : '<input type="hidden" name="check" value="true" />';
|
||||||
|
@ -651,9 +651,9 @@ class install_install extends module
|
||||||
*/
|
*/
|
||||||
function create_config_file($mode, $sub)
|
function create_config_file($mode, $sub)
|
||||||
{
|
{
|
||||||
global $user, $template, $phpbb_root_path, $phpEx;
|
global $lang, $template, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
$this->page_title = $user->lang['STAGE_CONFIG_FILE'];
|
$this->page_title = $lang['STAGE_CONFIG_FILE'];
|
||||||
|
|
||||||
// Obtain any submitted data
|
// Obtain any submitted data
|
||||||
foreach ($this->request_vars as $var)
|
foreach ($this->request_vars as $var)
|
||||||
|
@ -758,11 +758,11 @@ class install_install extends module
|
||||||
|
|
||||||
// The option to download the config file is always available, so output it here
|
// The option to download the config file is always available, so output it here
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'BODY' => $user->lang['CONFIG_FILE_UNABLE_WRITE'],
|
'BODY' => $lang['CONFIG_FILE_UNABLE_WRITE'],
|
||||||
'L_DL_CONFIG' => $user->lang['DL_CONFIG'],
|
'L_DL_CONFIG' => $lang['DL_CONFIG'],
|
||||||
'L_DL_CONFIG_EXPLAIN' => $user->lang['DL_CONFIG_EXPLAIN'],
|
'L_DL_CONFIG_EXPLAIN' => $lang['DL_CONFIG_EXPLAIN'],
|
||||||
'L_DL_DONE' => $user->lang['DL_DONE'],
|
'L_DL_DONE' => $lang['DL_DONE'],
|
||||||
'L_DL_DOWNLOAD' => $user->lang['DL_DOWNLOAD'],
|
'L_DL_DOWNLOAD' => $lang['DL_DOWNLOAD'],
|
||||||
'S_HIDDEN' => $s_hidden_fields,
|
'S_HIDDEN' => $s_hidden_fields,
|
||||||
'S_SHOW_DOWNLOAD' => true,
|
'S_SHOW_DOWNLOAD' => true,
|
||||||
'U_ACTION' => $this->p_master->module_url . "?mode=$mode&sub=config_file",
|
'U_ACTION' => $this->p_master->module_url . "?mode=$mode&sub=config_file",
|
||||||
|
@ -772,8 +772,8 @@ class install_install extends module
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'BODY' => $user->lang['CONFIG_FILE_WRITTEN'],
|
'BODY' => $lang['CONFIG_FILE_WRITTEN'],
|
||||||
'L_SUBMIT' => $user->lang['NEXT_STEP'],
|
'L_SUBMIT' => $lang['NEXT_STEP'],
|
||||||
'S_HIDDEN' => $s_hidden_fields,
|
'S_HIDDEN' => $s_hidden_fields,
|
||||||
'U_ACTION' => $this->p_master->module_url . "?mode=$mode&sub=advanced",
|
'U_ACTION' => $this->p_master->module_url . "?mode=$mode&sub=advanced",
|
||||||
));
|
));
|
||||||
|
@ -787,9 +787,9 @@ class install_install extends module
|
||||||
*/
|
*/
|
||||||
function obtain_advanced_settings($mode, $sub)
|
function obtain_advanced_settings($mode, $sub)
|
||||||
{
|
{
|
||||||
global $user, $template, $phpEx;
|
global $lang, $template, $phpEx;
|
||||||
|
|
||||||
$this->page_title = $user->lang['STAGE_ADVANCED'];
|
$this->page_title = $lang['STAGE_ADVANCED'];
|
||||||
|
|
||||||
// Obtain any submitted data
|
// Obtain any submitted data
|
||||||
foreach ($this->request_vars as $var)
|
foreach ($this->request_vars as $var)
|
||||||
|
@ -814,7 +814,7 @@ class install_install extends module
|
||||||
{
|
{
|
||||||
$template->assign_block_vars('options', array(
|
$template->assign_block_vars('options', array(
|
||||||
'S_LEGEND' => true,
|
'S_LEGEND' => true,
|
||||||
'LEGEND' => $user->lang[$vars])
|
'LEGEND' => $lang[$vars])
|
||||||
);
|
);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
@ -824,10 +824,10 @@ class install_install extends module
|
||||||
|
|
||||||
$template->assign_block_vars('options', array(
|
$template->assign_block_vars('options', array(
|
||||||
'KEY' => $config_key,
|
'KEY' => $config_key,
|
||||||
'TITLE' => $user->lang[$vars['lang']],
|
'TITLE' => $lang[$vars['lang']],
|
||||||
'S_EXPLAIN' => $vars['explain'],
|
'S_EXPLAIN' => $vars['explain'],
|
||||||
'S_LEGEND' => false,
|
'S_LEGEND' => false,
|
||||||
'TITLE_EXPLAIN' => ($vars['explain']) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '',
|
'TITLE_EXPLAIN' => ($vars['explain']) ? $lang[$vars['lang'] . '_EXPLAIN'] : '',
|
||||||
'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $$config_key, $options),
|
'CONTENT' => $this->p_master->input_field($config_key, $vars['type'], $$config_key, $options),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -844,14 +844,14 @@ class install_install extends module
|
||||||
$s_hidden_fields .= '<input type="hidden" name="' . $config_key . '" value="' . $$config_key . '" />';
|
$s_hidden_fields .= '<input type="hidden" name="' . $config_key . '" value="' . $$config_key . '" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
$submit = $user->lang['NEXT_STEP'];
|
$submit = $lang['NEXT_STEP'];
|
||||||
|
|
||||||
// $url = ($passed) ? $this->p_master->module_url . "?mode=$mode&sub=final" : $this->p_master->module_url . "?mode=$mode&sub=advanced";
|
// $url = ($passed) ? $this->p_master->module_url . "?mode=$mode&sub=final" : $this->p_master->module_url . "?mode=$mode&sub=advanced";
|
||||||
// $s_hidden_fields .= ($passed) ? '' : '<input type="hidden" name="check" value="true" />';
|
// $s_hidden_fields .= ($passed) ? '' : '<input type="hidden" name="check" value="true" />';
|
||||||
$url = $this->p_master->module_url . "?mode=$mode&sub=final";
|
$url = $this->p_master->module_url . "?mode=$mode&sub=final";
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'BODY' => $user->lang['STAGE_ADVANCED_EXPLAIN'],
|
'BODY' => $lang['STAGE_ADVANCED_EXPLAIN'],
|
||||||
'L_SUBMIT' => $submit,
|
'L_SUBMIT' => $submit,
|
||||||
'S_HIDDEN' => $s_hidden_fields,
|
'S_HIDDEN' => $s_hidden_fields,
|
||||||
'U_ACTION' => $url,
|
'U_ACTION' => $url,
|
||||||
|
@ -863,7 +863,7 @@ class install_install extends module
|
||||||
*/
|
*/
|
||||||
function load_schema($mode, $sub)
|
function load_schema($mode, $sub)
|
||||||
{
|
{
|
||||||
global $db, $user, $template, $phpbb_root_path, $phpEx;
|
global $db, $lang, $template, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
// Obtain any submitted data
|
// Obtain any submitted data
|
||||||
foreach ($this->request_vars as $var)
|
foreach ($this->request_vars as $var)
|
||||||
|
@ -1091,9 +1091,9 @@ class install_install extends module
|
||||||
*/
|
*/
|
||||||
function email_admin($mode, $sub)
|
function email_admin($mode, $sub)
|
||||||
{
|
{
|
||||||
global $auth, $config, $db, $user, $template, $user, $SID, $phpbb_root_path, $phpEx;
|
global $auth, $config, $db, $lang, $template, $user, $SID, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
$this->page_title = $user->lang['STAGE_FINAL'];
|
$this->page_title = $lang['STAGE_FINAL'];
|
||||||
|
|
||||||
// Obtain any submitted data
|
// Obtain any submitted data
|
||||||
foreach ($this->request_vars as $var)
|
foreach ($this->request_vars as $var)
|
||||||
|
@ -1153,9 +1153,9 @@ class install_install extends module
|
||||||
add_log('admin', 'LOG_INSTALL_INSTALLED', $config['version']);
|
add_log('admin', 'LOG_INSTALL_INSTALLED', $config['version']);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'TITLE' => $user->lang['INSTALL_CONGRATS'],
|
'TITLE' => $lang['INSTALL_CONGRATS'],
|
||||||
'BODY' => sprintf($user->lang['INSTALL_CONGRATS_EXPLAIN'], '<a href="../docs/README.html" target="_blank">', '</a>'),
|
'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], '<a href="../docs/README.html" target="_blank">', '</a>'),
|
||||||
'L_SUBMIT' => $user->lang['INSTALL_LOGIN'],
|
'L_SUBMIT' => $lang['INSTALL_LOGIN'],
|
||||||
'U_ACTION' => $phpbb_root_path . 'adm/index.' . $phpEx . $SID,
|
'U_ACTION' => $phpbb_root_path . 'adm/index.' . $phpEx . $SID,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -1176,7 +1176,7 @@ class install_install extends module
|
||||||
*/
|
*/
|
||||||
function connect_check_db($error_connect, &$error, $dbms, $table_prefix, $dbhost, $dbuser, $dbpasswd, $dbname, $dbport)
|
function connect_check_db($error_connect, &$error, $dbms, $table_prefix, $dbhost, $dbuser, $dbpasswd, $dbname, $dbport)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx, $config, $user;
|
global $phpbb_root_path, $phpEx, $config, $lang;
|
||||||
|
|
||||||
// Include the DB layer
|
// Include the DB layer
|
||||||
include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
|
include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
|
||||||
|
@ -1190,7 +1190,7 @@ class install_install extends module
|
||||||
if (is_array($db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false)))
|
if (is_array($db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false)))
|
||||||
{
|
{
|
||||||
$db_error = $db->sql_error();
|
$db_error = $db->sql_error();
|
||||||
$error[] = $user->lang['INST_ERR_DB_CONNECT'] . '<br />' . (($db_error['message']) ? $db_error['message'] : $user->lang['INST_ERR_DB_NO_ERROR']);
|
$error[] = $lang['INST_ERR_DB_CONNECT'] . '<br />' . (($db_error['message']) ? $db_error['message'] : $lang['INST_ERR_DB_NO_ERROR']);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1246,7 +1246,7 @@ class install_install extends module
|
||||||
// work
|
// work
|
||||||
if (in_array(strtolower($row[$field]), $table_ary))
|
if (in_array(strtolower($row[$field]), $table_ary))
|
||||||
{
|
{
|
||||||
$error[] = $user->lang['INST_ERR_PREFIX'];
|
$error[] = $lang['INST_ERR_PREFIX'];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1322,14 +1322,14 @@ class install_install extends module
|
||||||
*/
|
*/
|
||||||
function mail_auth_select($selected_method)
|
function mail_auth_select($selected_method)
|
||||||
{
|
{
|
||||||
global $user;
|
global $lang;
|
||||||
|
|
||||||
$auth_methods = array('PLAIN', 'LOGIN', 'CRAM-MD5', 'DIGEST-MD5', 'POP-BEFORE-SMTP');
|
$auth_methods = array('PLAIN', 'LOGIN', 'CRAM-MD5', 'DIGEST-MD5', 'POP-BEFORE-SMTP');
|
||||||
$s_smtp_auth_options = '';
|
$s_smtp_auth_options = '';
|
||||||
|
|
||||||
foreach ($auth_methods as $method)
|
foreach ($auth_methods as $method)
|
||||||
{
|
{
|
||||||
$s_smtp_auth_options .= '<option value="' . $method . '"' . (($selected_method == $method) ? ' selected="selected"' : '') . '>' . $user->lang['SMTP_' . str_replace('-', '_', $method)] . '</option>';
|
$s_smtp_auth_options .= '<option value="' . $method . '"' . (($selected_method == $method) ? ' selected="selected"' : '') . '>' . $lang['SMTP_' . str_replace('-', '_', $method)] . '</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $s_smtp_auth_options;
|
return $s_smtp_auth_options;
|
||||||
|
|
|
@ -33,21 +33,21 @@ class install_main extends module
|
||||||
|
|
||||||
function main($mode, $sub)
|
function main($mode, $sub)
|
||||||
{
|
{
|
||||||
global $user, $template;
|
global $lang, $template;
|
||||||
|
|
||||||
switch ($sub)
|
switch ($sub)
|
||||||
{
|
{
|
||||||
case 'intro' :
|
case 'intro' :
|
||||||
$title = $user->lang['SUB_INTRO'];
|
$title = $lang['SUB_INTRO'];
|
||||||
$body = $user->lang['OVERVIEW_BODY'];
|
$body = $lang['OVERVIEW_BODY'];
|
||||||
break;
|
break;
|
||||||
case 'license' :
|
case 'license' :
|
||||||
$title = $user->lang['GPL'];
|
$title = $lang['GPL'];
|
||||||
$body = implode("<br/>\n", file('../docs/COPYING'));
|
$body = implode("<br/>\n", file('../docs/COPYING'));
|
||||||
break;
|
break;
|
||||||
case 'support' :
|
case 'support' :
|
||||||
$title = $user->lang['SUB_SUPPORT'];
|
$title = $lang['SUB_SUPPORT'];
|
||||||
$body = $user->lang['SUPPORT_BODY'];
|
$body = $lang['SUPPORT_BODY'];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,48 +60,4 @@ class install_main extends module
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Add default modules
|
|
||||||
function add_default_modules()
|
|
||||||
{
|
|
||||||
global $db, $phpbb_root_path, $phpEx;
|
|
||||||
|
|
||||||
include_once($phpbb_root_path . 'includes/acp_modules.' . $phpEx);
|
|
||||||
$module_class = 'acp';
|
|
||||||
|
|
||||||
$_module = &new acp_modules();
|
|
||||||
|
|
||||||
// Get the modules we want to add...
|
|
||||||
$module_info = $_module->get_module_infos('', $module_class);
|
|
||||||
|
|
||||||
foreach ($module_info as $module_name => $fileinfo)
|
|
||||||
{
|
|
||||||
foreach ($fileinfo['modes'] as $module_mode => $row)
|
|
||||||
{
|
|
||||||
$module_data = array(
|
|
||||||
'module_name' => $module_name,
|
|
||||||
'module_enabled' => 1,
|
|
||||||
'module_display' => (isset($row['display'])) ? $row['display'] : 1,
|
|
||||||
'parent_id' => $row['parent_id'],
|
|
||||||
'module_class' => $module_class,
|
|
||||||
'module_langname' => $row['title'],
|
|
||||||
'module_mode' => $module_mode,
|
|
||||||
'module_auth' => $row['auth'],
|
|
||||||
);
|
|
||||||
|
|
||||||
$_module->>update_module_data($module_data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// recalculate binary tree
|
|
||||||
if (!function_exists('recalc_btree'))
|
|
||||||
{
|
|
||||||
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
|
||||||
}
|
|
||||||
|
|
||||||
recalc_btree('module_id', MODULES_TABLE, $module_class);
|
|
||||||
$_module->remove_cache_file();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
?>
|
?>
|
|
@ -39,7 +39,7 @@ $lang = array_merge($lang, array(
|
||||||
'ATTACH_SIG' => 'Attach a signature (signatures can be altered via the UCP)',
|
'ATTACH_SIG' => 'Attach a signature (signatures can be altered via the UCP)',
|
||||||
|
|
||||||
'BBCODE_A_HELP' => 'Close all open bbCode tags',
|
'BBCODE_A_HELP' => 'Close all open bbCode tags',
|
||||||
'BBCODE_B_HELP' => 'Bold text: [b]text[/b] \' (alt+b)',
|
'BBCODE_B_HELP' => 'Bold text: [b]text[/b] (alt+b)',
|
||||||
'BBCODE_C_HELP' => 'Code display: [code]code[/code] (alt+c)',
|
'BBCODE_C_HELP' => 'Code display: [code]code[/code] (alt+c)',
|
||||||
'BBCODE_E_HELP' => 'List: Add list element',
|
'BBCODE_E_HELP' => 'List: Add list element',
|
||||||
'BBCODE_F_HELP' => 'Font size: [size=x-small]small text[/size]',
|
'BBCODE_F_HELP' => 'Font size: [size=x-small]small text[/size]',
|
||||||
|
|
Loading…
Add table
Reference in a new issue