"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/install/resources/upgrade30.php" between
mybb_1819.zip and mybb_1820.zip

About: MyBB is a multilingual, standards-compliant and free forum (discussion board) software.

upgrade30.php  (mybb_1819):upgrade30.php  (mybb_1820)
skipping to change at line 333 skipping to change at line 333
$db->add_column("promotions", "onlinetype", "varchar(20) NOT NULL default '' AFTER online"); $db->add_column("promotions", "onlinetype", "varchar(20) NOT NULL default '' AFTER online");
$db->add_column("adminsessions", "useragent", "varchar(10 0) NOT NULL default ''"); $db->add_column("adminsessions", "useragent", "varchar(10 0) NOT NULL default ''");
$db->add_column("forums", "deletedthreads", "int(10) NOT NULL default '0' AFTER unapprovedposts"); $db->add_column("forums", "deletedthreads", "int(10) NOT NULL default '0' AFTER unapprovedposts");
$db->add_column("forums", "deletedposts", "int(10) NOT NU LL default '0' AFTER deletedthreads"); $db->add_column("forums", "deletedposts", "int(10) NOT NU LL default '0' AFTER deletedthreads");
break; break;
} }
$db->update_query('profilefields', array('viewableby' => '-1', 'editableb y' => '-1')); $db->update_query('profilefields', array('viewableby' => '-1', 'editableb y' => '-1'));
global $footer_extra; global $footer_extra;
$footer_extra = "<script type=\"text/javascript\">$(document).ready(funct ion() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); b utton.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>"; $footer_extra = "<script type=\"text/javascript\">$(function() { var butt on = $('.submit_button'); if(button) { button.val('Automatically Redirecting...' ); button.prop('disabled', true); button.css('color', '#aaa'); button.css('borde r-color', '#aaa'); document.forms[0].submit(); } });</script>";
$output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>"); $output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>");
$output->print_footer("30_dbchanges2"); $output->print_footer("30_dbchanges2");
} }
function upgrade30_dbchanges2() function upgrade30_dbchanges2()
{ {
global $cache, $output, $mybb, $db; global $cache, $output, $mybb, $db;
$output->print_header("Updating Database"); $output->print_header("Updating Database");
skipping to change at line 483 skipping to change at line 483
$db->add_column("posts", "editreason", "varchar(150) NOT NULL default '' AFTER edittime"); $db->add_column("posts", "editreason", "varchar(150) NOT NULL default '' AFTER edittime");
$db->add_column("forums", "usethreadcounts", "tinyint(1) NOT NULL default '0' AFTER usepostcounts"); $db->add_column("forums", "usethreadcounts", "tinyint(1) NOT NULL default '0' AFTER usepostcounts");
$db->add_column("forums", "requireprefix", "tinyint(1) NO T NULL default '0' AFTER usethreadcounts"); $db->add_column("forums", "requireprefix", "tinyint(1) NO T NULL default '0' AFTER usethreadcounts");
$db->add_column("users", "threadnum", "int(10) NOT NULL d efault '0' AFTER postnum"); $db->add_column("users", "threadnum", "int(10) NOT NULL d efault '0' AFTER postnum");
break; break;
} }
$db->update_query('forums', array('usethreadcounts' => 1), 'usepostcounts = 1'); $db->update_query('forums', array('usethreadcounts' => 1), 'usepostcounts = 1');
global $footer_extra; global $footer_extra;
$footer_extra = "<script type=\"text/javascript\">$(document).ready(funct ion() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); b utton.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>"; $footer_extra = "<script type=\"text/javascript\">$(function() { var butt on = $('.submit_button'); if(button) { button.val('Automatically Redirecting...' ); button.prop('disabled', true); button.css('color', '#aaa'); button.css('borde r-color', '#aaa'); document.forms[0].submit(); } });</script>";
$output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>"); $output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>");
$output->print_footer("30_dbchanges3"); $output->print_footer("30_dbchanges3");
} }
function upgrade30_dbchanges3() function upgrade30_dbchanges3()
{ {
global $cache, $output, $mybb, $db; global $cache, $output, $mybb, $db;
$output->print_header("Updating Database"); $output->print_header("Updating Database");
skipping to change at line 619 skipping to change at line 619
$db->add_column("moderators", "canapproveunapproveattachs ", "tinyint(1) NOT NULL default '0' AFTER canapproveunapproveposts"); $db->add_column("moderators", "canapproveunapproveattachs ", "tinyint(1) NOT NULL default '0' AFTER canapproveunapproveposts");
$db->add_column("moderators", "canmanagepolls", "tinyint( 1) NOT NULL default '0' AFTER canmanagethreads"); $db->add_column("moderators", "canmanagepolls", "tinyint( 1) NOT NULL default '0' AFTER canmanagethreads");
$db->add_column("moderators", "canpostclosedthreads", "ti nyint(1) NOT NULL default '0' AFTER canmanagepolls"); $db->add_column("moderators", "canpostclosedthreads", "ti nyint(1) NOT NULL default '0' AFTER canmanagepolls");
$db->add_column("moderators", "canmanageannouncements", " tinyint(1) NOT NULL default '0' AFTER canusecustomtools"); $db->add_column("moderators", "canmanageannouncements", " tinyint(1) NOT NULL default '0' AFTER canusecustomtools");
$db->add_column("moderators", "canmanagereportedposts", " tinyint(1) NOT NULL default '0' AFTER canmanageannouncements"); $db->add_column("moderators", "canmanagereportedposts", " tinyint(1) NOT NULL default '0' AFTER canmanageannouncements");
$db->add_column("moderators", "canviewmodlog", "tinyint(1 ) NOT NULL default '0' AFTER canmanagereportedposts"); $db->add_column("moderators", "canviewmodlog", "tinyint(1 ) NOT NULL default '0' AFTER canmanagereportedposts");
break; break;
} }
global $footer_extra; global $footer_extra;
$footer_extra = "<script type=\"text/javascript\">$(document).ready(funct ion() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); b utton.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>"; $footer_extra = "<script type=\"text/javascript\">$(function() { var butt on = $('.submit_button'); if(button) { button.val('Automatically Redirecting...' ); button.prop('disabled', true); button.css('color', '#aaa'); button.css('borde r-color', '#aaa'); document.forms[0].submit(); } });</script>";
$output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>"); $output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>");
$output->print_footer("30_dbchanges4"); $output->print_footer("30_dbchanges4");
} }
function upgrade30_dbchanges4() function upgrade30_dbchanges4()
{ {
global $cache, $output, $mybb, $db; global $cache, $output, $mybb, $db;
$output->print_header("Updating Database"); $output->print_header("Updating Database");
skipping to change at line 750 skipping to change at line 750
"type" => 1 "type" => 1
); );
$db->update_query("maillogs", $update_array, "tid= '0'"); $db->update_query("maillogs", $update_array, "tid= '0'");
$update_array = array( $update_array = array(
"type" => 2 "type" => 2
); );
$db->update_query("maillogs", $update_array, "tid > '0'"); $db->update_query("maillogs", $update_array, "tid > '0'");
global $footer_extra; global $footer_extra;
$footer_extra = "<script type=\"text/javascript\">$(document).ready(funct ion() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); b utton.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>"; $footer_extra = "<script type=\"text/javascript\">$(function() { var butt on = $('.submit_button'); if(button) { button.val('Automatically Redirecting...' ); button.prop('disabled', true); button.css('color', '#aaa'); button.css('borde r-color', '#aaa'); document.forms[0].submit(); } });</script>";
$output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>"); $output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>");
$output->print_footer("30_dbchanges5"); $output->print_footer("30_dbchanges5");
} }
function upgrade30_dbchanges5() function upgrade30_dbchanges5()
{ {
global $cache, $output, $mybb, $db; global $cache, $output, $mybb, $db;
$output->print_header("Updating Database"); $output->print_header("Updating Database");
skipping to change at line 864 skipping to change at line 864
username varchar(120) NOT NULL DEFAULT '', username varchar(120) NOT NULL DEFAULT '',
email varchar(220) NOT NULL DEFAULT '', email varchar(220) NOT NULL DEFAULT '',
ipaddress varbinary(16) NOT NULL default '', ipaddress varbinary(16) NOT NULL default '',
dateline int unsigned NOT NULL default '0', dateline int unsigned NOT NULL default '0',
data text NOT NULL, data text NOT NULL,
PRIMARY KEY (sid) PRIMARY KEY (sid)
) ENGINE=MyISAM{$collation}"); ) ENGINE=MyISAM{$collation}");
} }
global $footer_extra; global $footer_extra;
$footer_extra = "<script type=\"text/javascript\">$(document).ready(funct ion() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); b utton.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>"; $footer_extra = "<script type=\"text/javascript\">$(function() { var butt on = $('.submit_button'); if(button) { button.val('Automatically Redirecting...' ); button.prop('disabled', true); button.css('color', '#aaa'); button.css('borde r-color', '#aaa'); document.forms[0].submit(); } });</script>";
$output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>"); $output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>");
$output->print_footer("30_dbchanges6"); $output->print_footer("30_dbchanges6");
} }
function upgrade30_dbchanges6() function upgrade30_dbchanges6()
{ {
global $cache, $output, $mybb, $db; global $cache, $output, $mybb, $db;
$output->print_header("Updating Database"); $output->print_header("Updating Database");
skipping to change at line 1307 skipping to change at line 1307
$contents = "<p><input type=\"hidden\" name=\"theadspage\" value= \"$threads\" /><input type=\"hidden\" name=\"threadstart\" value=\"$startat\" /> Done. Click Next to move on to the next set of thread counts.</p>"; $contents = "<p><input type=\"hidden\" name=\"theadspage\" value= \"$threads\" /><input type=\"hidden\" name=\"threadstart\" value=\"$startat\" /> Done. Click Next to move on to the next set of thread counts.</p>";
} }
else else
{ {
$nextact = "30_dbchanges_optimize1"; $nextact = "30_dbchanges_optimize1";
$contents = "<p>Done</p><p>All users have had their thread count counted. Click next to continue.</p>"; $contents = "<p>Done</p><p>All users have had their thread count counted. Click next to continue.</p>";
} }
$output->print_contents($contents); $output->print_contents($contents);
global $footer_extra; global $footer_extra;
$footer_extra = "<script type=\"text/javascript\">$(document).ready(funct ion() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); b utton.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>"; $footer_extra = "<script type=\"text/javascript\">$(function() { var butt on = $('.submit_button'); if(button) { button.val('Automatically Redirecting...' ); button.prop('disabled', true); button.css('color', '#aaa'); button.css('borde r-color', '#aaa'); document.forms[0].submit(); } });</script>";
$output->print_footer($nextact); $output->print_footer($nextact);
} }
function upgrade30_dbchanges_optimize1() function upgrade30_dbchanges_optimize1()
{ {
global $output, $mybb, $db; global $output, $mybb, $db;
$output->print_header("Optimizing Database"); $output->print_header("Optimizing Database");
skipping to change at line 1411 skipping to change at line 1411
$db->modify_column("themestylesheets", "stylesheet", "lon gtext NOT NULL default ''"); $db->modify_column("themestylesheets", "stylesheet", "lon gtext NOT NULL default ''");
} }
else else
{ {
// ...while MySQL hates text columns with a default value // ...while MySQL hates text columns with a default value
$db->modify_column("themestylesheets", "stylesheet", "lon gtext NOT NULL"); $db->modify_column("themestylesheets", "stylesheet", "lon gtext NOT NULL");
} }
} }
global $footer_extra; global $footer_extra;
$footer_extra = "<script type=\"text/javascript\">$(document).ready(funct ion() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); b utton.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>"; $footer_extra = "<script type=\"text/javascript\">$(function() { var butt on = $('.submit_button'); if(button) { button.val('Automatically Redirecting...' ); button.prop('disabled', true); button.css('color', '#aaa'); button.css('borde r-color', '#aaa'); document.forms[0].submit(); } });</script>";
$output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>"); $output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>");
$output->print_footer("30_dbchanges_optimize2"); $output->print_footer("30_dbchanges_optimize2");
} }
function upgrade30_dbchanges_optimize2() function upgrade30_dbchanges_optimize2()
{ {
global $output, $mybb, $db; global $output, $mybb, $db;
$output->print_header("Optimizing Database"); $output->print_header("Optimizing Database");
skipping to change at line 1510 skipping to change at line 1510
{ {
$db->drop_index('reputation', 'dateline'); $db->drop_index('reputation', 'dateline');
} }
if($db->index_exists('users', 'birthday')) if($db->index_exists('users', 'birthday'))
{ {
$db->drop_index('users', 'birthday'); $db->drop_index('users', 'birthday');
} }
global $footer_extra; global $footer_extra;
$footer_extra = "<script type=\"text/javascript\">$(document).ready(funct ion() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); b utton.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>"; $footer_extra = "<script type=\"text/javascript\">$(function() { var butt on = $('.submit_button'); if(button) { button.val('Automatically Redirecting...' ); button.prop('disabled', true); button.css('color', '#aaa'); button.css('borde r-color', '#aaa'); document.forms[0].submit(); } });</script>";
$output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>"); $output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>");
$output->print_footer("30_dbchanges_optimize3"); $output->print_footer("30_dbchanges_optimize3");
} }
function upgrade30_dbchanges_optimize3() function upgrade30_dbchanges_optimize3()
{ {
global $cache, $output, $mybb, $db; global $cache, $output, $mybb, $db;
$output->print_header("Optimizing Database"); $output->print_header("Optimizing Database");
skipping to change at line 1585 skipping to change at line 1585
$change_column[] = "MODIFY {$column} tinyint(1) N OT NULL default '0'"; $change_column[] = "MODIFY {$column} tinyint(1) N OT NULL default '0'";
} }
} }
if($db->type != "pgsql") if($db->type != "pgsql")
{ {
$db->write_query("ALTER TABLE ".TABLE_PREFIX."{$table} ". implode(", ", $change_column)); $db->write_query("ALTER TABLE ".TABLE_PREFIX."{$table} ". implode(", ", $change_column));
} }
} }
global $footer_extra; global $footer_extra;
$footer_extra = "<script type=\"text/javascript\">$(document).ready(funct ion() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); b utton.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>"; $footer_extra = "<script type=\"text/javascript\">$(function() { var butt on = $('.submit_button'); if(button) { button.val('Automatically Redirecting...' ); button.prop('disabled', true); button.css('color', '#aaa'); button.css('borde r-color', '#aaa'); document.forms[0].submit(); } });</script>";
$output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>"); $output->print_contents("<p>Click next to continue with the upgrade proce ss.</p>");
$output->print_footer("30_dbchanges_optimize4"); $output->print_footer("30_dbchanges_optimize4");
} }
function upgrade30_dbchanges_optimize4() function upgrade30_dbchanges_optimize4()
{ {
global $cache, $output, $mybb, $db; global $cache, $output, $mybb, $db;
$output->print_header("Optimizing Database"); $output->print_header("Optimizing Database");
skipping to change at line 2130 skipping to change at line 2130
if($next_task == 9) if($next_task == 9)
{ {
$contents = "<p>Click next to continue with the upgrade process.< /p>"; $contents = "<p>Click next to continue with the upgrade process.< /p>";
$nextact = "30_updatetheme"; $nextact = "30_updatetheme";
} }
else else
{ {
$contents = "<p><input type=\"hidden\" name=\"iptask\" value=\"{$ next_task}\" />{$iptable}{$ipstart}Done. Click Next to continue the IP conversio n.</p>"; $contents = "<p><input type=\"hidden\" name=\"iptask\" value=\"{$ next_task}\" />{$iptable}{$ipstart}Done. Click Next to continue the IP conversio n.</p>";
global $footer_extra; global $footer_extra;
$footer_extra = "<script type=\"text/javascript\">$(document).rea dy(function() { var button = $('.submit_button'); if(button) { button.val('Autom atically Redirecting...'); button.prop('disabled', true); button.css('color', '# aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</sc ript>"; $footer_extra = "<script type=\"text/javascript\">$(function() { var button = $('.submit_button'); if(button) { button.val('Automatically Redirec ting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.cs s('border-color', '#aaa'); document.forms[0].submit(); } });</script>";
$nextact = "30_dbchanges_ip"; $nextact = "30_dbchanges_ip";
} }
$output->print_contents($contents); $output->print_contents($contents);
$output->print_footer($nextact); $output->print_footer($nextact);
} }
function upgrade30_updatetheme() function upgrade30_updatetheme()
{ {
 End of changes. 10 change blocks. 
10 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)