"Fossies" - the Fresh Open Source Software Archive  

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

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

upgrade17.php  (mybb_1819):upgrade17.php  (mybb_1820)
skipping to change at line 39 skipping to change at line 39
echo "<p>Performing necessary upgrade queries..</p>"; echo "<p>Performing necessary upgrade queries..</p>";
echo "<p>Adding index to private messages table ... "; echo "<p>Adding index to private messages table ... ";
flush(); flush();
if($db->type == "mysql" || $db->type == "mysqli") if($db->type == "mysql" || $db->type == "mysqli")
{ {
$db->write_query("ALTER TABLE ".TABLE_PREFIX."privatemessages ADD INDEX ( `toid` )"); $db->write_query("ALTER TABLE ".TABLE_PREFIX."privatemessages ADD INDEX ( `toid` )");
} }
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>";
$contents .= "Click next to continue with the upgrade process.</p>"; $contents .= "Click next to continue with the upgrade process.</p>";
$output->print_contents($contents); $output->print_contents($contents);
$output->print_footer("17_dbchanges2"); $output->print_footer("17_dbchanges2");
} }
function upgrade17_dbchanges2() function upgrade17_dbchanges2()
{ {
global $db, $output, $mybb, $cache; global $db, $output, $mybb, $cache;
skipping to change at line 165 skipping to change at line 165
$db->add_column("promotions", "referralstype", "varchar(2 ) NOT NULL default '' AFTER referrals"); $db->add_column("promotions", "referralstype", "varchar(2 ) NOT NULL default '' AFTER referrals");
$db->add_column("reputation", "pid", "int unsigned NOT NU LL default '0'"); $db->add_column("reputation", "pid", "int unsigned NOT NU LL default '0'");
$db->add_column("calendars", "allowvideocode", "int(1) NO T NULL default '0' AFTER allowimgcode"); $db->add_column("calendars", "allowvideocode", "int(1) NO T NULL default '0' AFTER allowimgcode");
$db->add_column("forums", "allowvideocode", "int(1) NOT N ULL default '0' AFTER allowimgcode"); $db->add_column("forums", "allowvideocode", "int(1) NOT N ULL default '0' AFTER allowimgcode");
} }
$db->update_query("forums", array('allowvideocode' => '1')); $db->update_query("forums", array('allowvideocode' => '1'));
$db->update_query("calendars", array('allowvideocode' => '1')); $db->update_query("calendars", array('allowvideocode' => '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>";
$contents .= "Click next to continue with the upgrade process.</p>"; $contents .= "Click next to continue with the upgrade process.</p>";
$output->print_contents($contents); $output->print_contents($contents);
$output->print_footer("17_dbchanges3"); $output->print_footer("17_dbchanges3");
} }
function upgrade17_dbchanges3() function upgrade17_dbchanges3()
{ {
global $db, $output, $mybb; global $db, $output, $mybb;
skipping to change at line 274 skipping to change at line 274
$db->add_column("users", "loginattempts", "tinyint(2) NOT NULL default '1'"); $db->add_column("users", "loginattempts", "tinyint(2) NOT NULL default '1'");
$db->add_column("users", "failedlogin", "bigint(30) NOT N ULL default '0'"); $db->add_column("users", "failedlogin", "bigint(30) NOT N ULL default '0'");
$db->add_column("users", "usernotes", "text NOT NULL"); $db->add_column("users", "usernotes", "text NOT NULL");
$db->add_column("users", "referrals", "int unsigned NOT N ULL default '0' AFTER referrer"); $db->add_column("users", "referrals", "int unsigned NOT N ULL default '0' AFTER referrer");
} }
$contents .= "Click next to continue with the upgrade process.</p>"; $contents .= "Click next to continue with the upgrade process.</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("17_dbchanges4"); $output->print_footer("17_dbchanges4");
} }
function upgrade17_dbchanges4() function upgrade17_dbchanges4()
{ {
global $db, $output, $mybb; global $db, $output, $mybb;
$output->print_header("Performing Queries"); $output->print_header("Performing Queries");
skipping to change at line 394 skipping to change at line 394
} }
$added_tasks = sync_tasks(); $added_tasks = sync_tasks();
echo "<p>Added {$added_tasks} new tasks.</p>"; echo "<p>Added {$added_tasks} new tasks.</p>";
$contents .= "Click next to continue with the upgrade process.</p>"; $contents .= "Click next to continue with the upgrade process.</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("17_dbchanges5"); $output->print_footer("17_dbchanges5");
} }
function upgrade17_dbchanges5() function upgrade17_dbchanges5()
{ {
global $db, $output, $mybb, $cache; global $db, $output, $mybb, $cache;
if(file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php") ) if(file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php") )
{ {
skipping to change at line 464 skipping to change at line 464
// Add permissions for all of our new ACP pages // Add permissions for all of our new ACP pages
change_admin_permission('config', 'thread_prefixes'); change_admin_permission('config', 'thread_prefixes');
change_admin_permission('tools', 'file_verification'); change_admin_permission('tools', 'file_verification');
change_admin_permission('tools', 'statistics'); change_admin_permission('tools', 'statistics');
$contents .= "Click next to continue with the upgrade process.</p>"; $contents .= "Click next to continue with the upgrade process.</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("17_dbchanges6"); $output->print_footer("17_dbchanges6");
} }
function upgrade17_dbchanges6() function upgrade17_dbchanges6()
{ {
global $db, $output; global $db, $output;
$output->print_header("Post IP Repair Conversion"); $output->print_header("Post IP Repair Conversion");
skipping to change at line 532 skipping to change at line 532
$contents = "<p><input type=\"hidden\" name=\"ipspage\" value=\"$ ipp\" /><input type=\"hidden\" name=\"ipstart\" value=\"$startat\" />Done. Click Next to move on to the next set of post ips.</p>"; $contents = "<p><input type=\"hidden\" name=\"ipspage\" value=\"$ ipp\" /><input type=\"hidden\" name=\"ipstart\" value=\"$startat\" />Done. Click Next to move on to the next set of post ips.</p>";
} }
else else
{ {
$nextact = "17_dbchanges7"; $nextact = "17_dbchanges7";
$contents = "<p>Done</p><p>All post ips have been successfully re paired. Click next to continue.</p>"; $contents = "<p>Done</p><p>All post ips have been successfully re paired. 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 upgrade17_dbchanges7() function upgrade17_dbchanges7()
{ {
global $db, $output; global $db, $output;
$output->print_header("User IP Repair Conversion"); $output->print_header("User IP Repair Conversion");
skipping to change at line 607 skipping to change at line 607
$contents .= "<p><input type=\"hidden\" name=\"ipspage\" value=\" $ipp\" /><input type=\"hidden\" name=\"ipstart\" value=\"$startat\" />Done. Clic k Next to move on to the next set of user ips.</p>"; $contents .= "<p><input type=\"hidden\" name=\"ipspage\" value=\" $ipp\" /><input type=\"hidden\" name=\"ipstart\" value=\"$startat\" />Done. Clic k Next to move on to the next set of user ips.</p>";
} }
else else
{ {
$nextact = "17_redoconfig"; $nextact = "17_redoconfig";
$contents .= "<p>Done</p><p>All user ips have been successfully r epaired. Click next to continue.</p>"; $contents .= "<p>Done</p><p>All user ips have been successfully r epaired. 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 upgrade17_redoconfig() function upgrade17_redoconfig()
{ {
global $db, $output, $orig_config, $mybb; global $db, $output, $orig_config, $mybb;
$config = $orig_config; $config = $orig_config;
skipping to change at line 809 skipping to change at line 809
); );
?".">"; ?".">";
fwrite($fh, $configdata); fwrite($fh, $configdata);
fclose($fh); fclose($fh);
} }
echo "<p>The configuration file has been successfully rewritten.</p>"; echo "<p>The configuration file has been successfully rewritten.</p>";
echo "<p>Click next to continue with the upgrade process.</p>"; echo "<p>Click next to continue with the upgrade process.</p>";
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("17_updatecss"); $output->print_footer("17_updatecss");
} }
function upgrade17_updatecss() function upgrade17_updatecss()
{ {
global $db, $output, $orig_config, $mybb; global $db, $output, $orig_config, $mybb;
if(file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions_theme s.php")) if(file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions_theme s.php"))
{ {
require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions _themes.php"; require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions _themes.php";
skipping to change at line 857 skipping to change at line 857
"stylesheet" => $db->escape_string($theme['stylesheet']), "stylesheet" => $db->escape_string($theme['stylesheet']),
"lastmodified" => TIME_NOW "lastmodified" => TIME_NOW
); );
$db->update_query("themestylesheets", $update_stylesheet, "sid='{ $theme['sid']}'"); $db->update_query("themestylesheets", $update_stylesheet, "sid='{ $theme['sid']}'");
} }
echo "<p>The CSS has been successfully updated.</p>"; echo "<p>The CSS has been successfully updated.</p>";
echo "<p>Click next to continue with the upgrade process.</p>"; echo "<p>Click next to continue with the upgrade process.</p>";
global $footer_extra; global $footer_extra;
//$footer_extra = "<script type=\"text/javascript\">$(document).ready(fun ction() { var button = $('.submit_button'); if(button) { button.val('Automatical ly Redirecting...'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('border-color', '#aaa'); document.forms[0].submit(); } });</script>" ; //$footer_extra = "<script type=\"text/javascript\">$(function() { var bu tton = $('.submit_button'); if(button) { button.val('Automatically Redirecting.. .'); button.prop('disabled', true); button.css('color', '#aaa'); button.css('bor der-color', '#aaa'); document.forms[0].submit(); } });</script>";
$output->print_footer("17_done"); $output->print_footer("17_done");
} }
function upgrade_css_140_to_160($name, $css) function upgrade_css_140_to_160($name, $css)
{ {
// Update our CSS to the new stuff in 1.6 // Update our CSS to the new stuff in 1.6
$parsed_css = css_to_array($css); $parsed_css = css_to_array($css);
if($name == "global.css") if($name == "global.css")
 End of changes. 9 change blocks. 
9 lines changed or deleted 9 lines changed or added

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