Zeile 47 | Zeile 47 |
---|
// Include the files necessary for installation require_once MYBB_ROOT."inc/class_timers.php";
|
// Include the files necessary for installation require_once MYBB_ROOT."inc/class_timers.php";
|
require_once MYBB_ROOT."inc/class_xml.php";
| |
require_once MYBB_ROOT.'inc/class_language.php';
$lang = new MyLanguage();
| require_once MYBB_ROOT.'inc/class_language.php';
$lang = new MyLanguage();
|
Zeile 62 | Zeile 61 |
---|
// Load DB interface require_once MYBB_ROOT."inc/db_base.php";
|
// Load DB interface require_once MYBB_ROOT."inc/db_base.php";
|
| require_once MYBB_ROOT . 'inc/AbstractPdoDbDriver.php';
|
require_once MYBB_ROOT."inc/db_{$config['database']['type']}.php"; switch($config['database']['type'])
| require_once MYBB_ROOT."inc/db_{$config['database']['type']}.php"; switch($config['database']['type'])
|
Zeile 71 | Zeile 71 |
---|
break; case "pgsql": $db = new DB_PgSQL;
|
break; case "pgsql": $db = new DB_PgSQL;
|
| break; case "pgsql_pdo": $db = new PostgresPdoDbDriver();
|
break; case "mysqli": $db = new DB_MySQLi;
|
break; case "mysqli": $db = new DB_MySQLi;
|
| break; case "mysql_pdo": $db = new MysqlPdoDbDriver();
|
break; default: $db = new DB_MySQL;
| break; default: $db = new DB_MySQL;
|
Zeile 87 | Zeile 93 |
---|
// Load Settings if(file_exists(MYBB_ROOT."inc/settings.php"))
|
// Load Settings if(file_exists(MYBB_ROOT."inc/settings.php"))
|
{
| {
|
require_once MYBB_ROOT."inc/settings.php"; }
| require_once MYBB_ROOT."inc/settings.php"; }
|
Zeile 102 | Zeile 108 |
---|
$options = array( "order_by" => "title", "order_dir" => "ASC"
|
$options = array( "order_by" => "title", "order_dir" => "ASC"
|
);
| );
|
$query = $db->simple_select("settings", "value, name", "", $options);
| $query = $db->simple_select("settings", "value, name", "", $options);
|
Zeile 194 | Zeile 200 |
---|
); $user = get_user_by_username($mybb->get_input('username'), $options);
|
); $user = get_user_by_username($mybb->get_input('username'), $options);
|
if(!$user['uid'])
| if(!$user)
|
{ $output->print_error("The username you have entered appears to be invalid."); } else { $user = validate_password_from_uid($user['uid'], $mybb->get_input('password'), $user);
|
{ $output->print_error("The username you have entered appears to be invalid."); } else { $user = validate_password_from_uid($user['uid'], $mybb->get_input('password'), $user);
|
if(!$user['uid'])
| if(!$user)
|
{ $output->print_error("The password you entered is incorrect. If you have forgotten your password, click <a href=\"../member.php?action=lostpw\">here</a>. Otherwise, go back and try again."); }
| { $output->print_error("The password you entered is incorrect. If you have forgotten your password, click <a href=\"../member.php?action=lostpw\">here</a>. Otherwise, go back and try again."); }
|
Zeile 225 | Zeile 231 |
---|
<thead> <tr> <th colspan="2" class="first last">'.$lang->login.'</th>
|
<thead> <tr> <th colspan="2" class="first last">'.$lang->login.'</th>
|
</tr>
| </tr>
|
</thead> <tbody> <tr class="first">
| </thead> <tbody> <tr class="first">
|
Zeile 261 | Zeile 267 |
---|
{ $db->drop_table("upgrade_data"); }
|
{ $db->drop_table("upgrade_data"); }
|
| $collation = $db->build_create_table_collation(); $engine = ''; if($db->type == "mysql" || $db->type == "mysqli") { $engine = 'ENGINE=MyISAM'; }
|
$db->write_query("CREATE TABLE ".TABLE_PREFIX."upgrade_data ( title varchar(30) NOT NULL, contents text NOT NULL, UNIQUE (title)
|
$db->write_query("CREATE TABLE ".TABLE_PREFIX."upgrade_data ( title varchar(30) NOT NULL, contents text NOT NULL, UNIQUE (title)
|
);");
| ) {$engine}{$collation};");
|
$dh = opendir(INSTALL_ROOT."resources");
| $dh = opendir(INSTALL_ROOT."resources");
|
Zeile 317 | Zeile 332 |
---|
unset($upgradescripts); unset($upgradescript);
|
unset($upgradescripts); unset($upgradescript);
|
$output->print_contents($lang->sprintf($lang->upgrade_welcome, $mybb->version)."<p><select name=\"from\">$vers</select>".$lang->upgrade_send_stats); $output->print_footer("doupgrade");
| if(end($version_history) == reset($key_order) && empty($mybb->input['force'])) { $output->print_contents($lang->upgrade_not_needed); $output->print_footer("finished"); } else { $output->print_contents($lang->sprintf($lang->upgrade_welcome, $mybb->version)."<p><select name=\"from\">$vers</select>".$lang->upgrade_send_stats); $output->print_footer("doupgrade"); }
|
} elseif($mybb->input['action'] == "doupgrade") { add_upgrade_store("allow_anonymous_info", $mybb->get_input('allow_anonymous_info', MyBB::INPUT_INT)); require_once INSTALL_ROOT."resources/upgrade".$mybb->get_input('from', MyBB::INPUT_INT).".php";
|
} elseif($mybb->input['action'] == "doupgrade") { add_upgrade_store("allow_anonymous_info", $mybb->get_input('allow_anonymous_info', MyBB::INPUT_INT)); require_once INSTALL_ROOT."resources/upgrade".$mybb->get_input('from', MyBB::INPUT_INT).".php";
|
if($db->table_exists("datacache") && $upgrade_detail['requires_deactivated_plugins'] == 1 && $mybb->get_input('donewarning') != "true")
| if($db->table_exists("datacache") && !empty($upgrade_detail['requires_deactivated_plugins']) && $mybb->get_input('donewarning') != "true")
|
{ $plugins = $cache->read('plugins', true); if(!empty($plugins['active']))
| { $plugins = $cache->read('plugins', true); if(!empty($plugins['active']))
|
Zeile 368 | Zeile 391 |
---|
else // Busy running modules, come back later { $bits = explode("_", $mybb->input['action'], 2);
|
else // Busy running modules, come back later { $bits = explode("_", $mybb->input['action'], 2);
|
if($bits[1]) // We're still running a module
| if(!empty($bits[1])) // We're still running a module
|
{ $from = $bits[0]; $runfunction = next_function($bits[0], $bits[1]);
| { $from = $bits[0]; $runfunction = next_function($bits[0], $bits[1]);
|
Zeile 491 | Zeile 514 |
---|
// Now deal with the master templates $contents = @file_get_contents(INSTALL_ROOT.'resources/mybb_theme.xml');
|
// Now deal with the master templates $contents = @file_get_contents(INSTALL_ROOT.'resources/mybb_theme.xml');
|
$parser = new XMLParser($contents);
| $parser = create_xml_parser($contents);
|
$tree = $parser->get_tree();
$theme = $tree['theme'];
| $tree = $parser->get_tree();
$theme = $tree['theme'];
|
Zeile 507 | Zeile 530 |
---|
$time = TIME_NOW; $query = $db->simple_select("templates", "tid", "sid='-2' AND title='".$db->escape_string($templatename)."'"); $oldtemp = $db->fetch_array($query);
|
$time = TIME_NOW; $query = $db->simple_select("templates", "tid", "sid='-2' AND title='".$db->escape_string($templatename)."'"); $oldtemp = $db->fetch_array($query);
|
if($oldtemp['tid'])
| if($oldtemp)
|
{ $update_array = array( 'template' => $templatevalue,
| { $update_array = array( 'template' => $templatevalue,
|
Zeile 566 | Zeile 589 |
---|
$output->print_header($lang->upgrade_datacache_building);
|
$output->print_header($lang->upgrade_datacache_building);
|
$contents .= $lang->upgrade_building_datacache;
| $contents = $lang->upgrade_building_datacache;
|
$cache->update_version(); $cache->update_attachtypes();
| $cache->update_version(); $cache->update_attachtypes();
|
Zeile 727 | Zeile 750 |
---|
} }
|
} }
|
if(!$function)
| if(empty($function))
|
{ $function = "whatsnext"; }
| { $function = "whatsnext"; }
|
Zeile 746 | Zeile 769 |
---|
{ foreach($upgrade_detail as $key => $val) {
|
{ foreach($upgrade_detail as $key => $val) {
|
if(!$system_upgrade_detail[$key] || $val > $system_upgrade_detail[$key])
| if(empty($system_upgrade_detail[$key]) || $val > $system_upgrade_detail[$key])
|
{ $system_upgrade_detail[$key] = $val; }
| { $system_upgrade_detail[$key] = $val; }
|
Zeile 910 | Zeile 933 |
---|
} } $settings_xml = file_get_contents(INSTALL_ROOT."resources/settings.xml");
|
} } $settings_xml = file_get_contents(INSTALL_ROOT."resources/settings.xml");
|
$parser = new XMLParser($settings_xml);
| $parser = create_xml_parser($settings_xml);
|
$parser->collapse_dups = 0; $tree = $parser->get_tree(); $settinggroupnames = array();
| $parser->collapse_dups = 0; $tree = $parser->get_tree(); $settinggroupnames = array();
|
Zeile 979 | Zeile 1002 |
---|
} } unset($settings);
|
} } unset($settings);
|
| $settings = '';
|
$query = $db->simple_select("settings", "*", "", array('order_by' => 'title')); while($setting = $db->fetch_array($query)) {
| $query = $db->simple_select("settings", "*", "", array('order_by' => 'title')); while($setting = $db->fetch_array($query)) {
|
Zeile 1078 | Zeile 1102 |
---|
require_once MYBB_ROOT."inc/functions_task.php"; $task_file = file_get_contents(INSTALL_ROOT.'resources/tasks.xml');
|
require_once MYBB_ROOT."inc/functions_task.php"; $task_file = file_get_contents(INSTALL_ROOT.'resources/tasks.xml');
|
$parser = new XMLParser($task_file);
| $parser = create_xml_parser($task_file);
|
$parser->collapse_dups = 0; $tree = $parser->get_tree();
| $parser->collapse_dups = 0; $tree = $parser->get_tree();
|