Zeile 1063 | Zeile 1063 |
---|
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions ADD defaultviews TEXT NOT NULL"); $db->update_query("adminoptions", array('defaultviews' => my_serialize(array('user' => 1))));
|
$db->write_query("ALTER TABLE ".TABLE_PREFIX."adminoptions ADD defaultviews TEXT NOT NULL"); $db->update_query("adminoptions", array('defaultviews' => my_serialize(array('user' => 1))));
|
require_once MYBB_ROOT."inc/functions_rebuild.php"; rebuild_stats();
| $query = $db->simple_select("forums", "SUM(threads) AS numthreads, SUM(posts) AS numposts, SUM(unapprovedthreads) AS numunapprovedthreads, SUM(unapprovedposts) AS numunapprovedposts"); $stats = $db->fetch_array($query);
$query = $db->simple_select("users", "COUNT(uid) AS users"); $stats['numusers'] = $db->fetch_field($query, 'users');
update_stats($stats, true);
|
$contents = "Done</p>"; $contents .= "<p>Click next to continue with the upgrade process.</p>"; $output->print_contents($contents);
|
$contents = "Done</p>"; $contents .= "<p>Click next to continue with the upgrade process.</p>"; $output->print_contents($contents);
|
|
|
global $footer_extra; $footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";
|
global $footer_extra; $footer_extra = "<script type=\"text/javascript\">$(document).ready(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>";
|
|
|
$output->print_footer("12_dbchanges5"); }
function upgrade12_dbchanges5() { global $db, $output, $mybb;
|
$output->print_footer("12_dbchanges5"); }
function upgrade12_dbchanges5() { global $db, $output, $mybb;
|
|
|
$output->print_header("Performing Queries");
echo "<p>Performing necessary upgrade queries..</p>";
| $output->print_header("Performing Queries");
echo "<p>Performing necessary upgrade queries..</p>";
|
Zeile 1092 | Zeile 1097 |
---|
title varchar(100) NOT NULL default '', PRIMARY KEY (gid) ) ENGINE=MyISAM{$collation};");
|
title varchar(100) NOT NULL default '', PRIMARY KEY (gid) ) ENGINE=MyISAM{$collation};");
|
|
|
$db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('1','calendar','<lang:group_calendar>');"); $db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('2','editpost','<lang:group_editpost>');"); $db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('3','forumbit','<lang:group_forumbit>');");
| $db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('1','calendar','<lang:group_calendar>');"); $db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('2','editpost','<lang:group_editpost>');"); $db->write_query("INSERT INTO ".TABLE_PREFIX."templategroups (gid,prefix,title) VALUES ('3','forumbit','<lang:group_forumbit>');");
|
Zeile 1274 | Zeile 1279 |
---|
$db->insert_query("adminviews", $new_view); $view_count++; }
|
$db->insert_query("adminviews", $new_view); $view_count++; }
|
$avatardimensions = str_replace('x', '|', my_strtolower($mybb->settings['postmaxavatarsize']));
| |
$db->simple_select("users", "uid", "avatar != '' AND avatardimensions = ''"); while($user = $db->fetch_array($query))
| $db->simple_select("users", "uid", "avatar != '' AND avatardimensions = ''"); while($user = $db->fetch_array($query))
|
Zeile 1342 | Zeile 1345 |
---|
* * Please see the MyBB Docs for advanced * database configuration for larger installations
|
* * Please see the MyBB Docs for advanced * database configuration for larger installations
|
* http://docs.mybb.com/
| * https://docs.mybb.com/
|
*/
\$config['database']['type'] = '{$config['dbtype']}';
| */
\$config['database']['type'] = '{$config['dbtype']}';
|
Zeile 1460 | Zeile 1463 |
---|
} else {
|
} else {
|
$ipp = $_POST['ipspage'];
| $ipp = (int)$_POST['ipspage'];
|
}
if($_POST['ipstart']) {
|
}
if($_POST['ipstart']) {
|
$startat = $_POST['ipstart'];
| $startat = (int)$_POST['ipstart'];
|
$upper = $startat+$ipp; $lower = $startat; }
| $upper = $startat+$ipp; $lower = $startat; }
|
Zeile 1532 | Zeile 1535 |
---|
} else {
|
} else {
|
$ipp = $_POST['ipspage'];
| $ipp = (int)$_POST['ipspage'];
|
}
if($_POST['ipstart']) {
|
}
if($_POST['ipstart']) {
|
$startat = $_POST['ipstart'];
| $startat = (int)$_POST['ipstart'];
|
$upper = $startat+$ipp; $lower = $startat; }
| $upper = $startat+$ipp; $lower = $startat; }
|
Zeile 1616 | Zeile 1619 |
---|
} else {
|
} else {
|
$epp = $_POST['eventspage'];
| $epp = (int)$_POST['eventspage'];
|
}
if($_POST['eventstart']) {
|
}
if($_POST['eventstart']) {
|
$startat = $_POST['eventstart'];
| $startat = (int)$_POST['eventstart'];
|
$upper = $startat+$epp; $lower = $startat; }
| $upper = $startat+$epp; $lower = $startat; }
|