| [ Index ] |
PHP Cross Reference of MyBB 1.8.40 |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * MyBB 1.8 4 * Copyright 2014 MyBB Group, All Rights Reserved 5 * 6 * Website: http://www.mybb.com 7 * License: http://www.mybb.com/about/license 8 * 9 */ 10 11 /** 12 * Upgrade Script: Preview Release 2 13 */ 14 15 $upgrade_detail = array( 16 "revert_all_templates" => 0, 17 "revert_all_themes" => 0, 18 "revert_all_settings" => 1, 19 "requires_deactivated_plugins" => 1, 20 ); 21 22 function upgrade4_dbchanges() 23 { 24 global $db, $output; 25 26 $output->print_header("Performing Queries"); 27 28 echo "<p>Performing necessary upgrade queries..</p>"; 29 30 $db->write_query("UPDATE ".TABLE_PREFIX."users SET style='0' WHERE style='-1';"); 31 $db->write_query("UPDATE ".TABLE_PREFIX."users SET displaygroup='0' WHERE displaygroup='-1';"); 32 $db->write_query("UPDATE ".TABLE_PREFIX."forums SET style='0' WHERE style='-1';"); 33 $query = $db->simple_select("adminoptions", "uid='0'"); 34 $test = $db->fetch_array($query); 35 if(!isset($test['uid'])) 36 { 37 $db->write_query("UPDATE ".TABLE_PREFIX."adminoptions SET uid='0' WHERE uid='-1';"); 38 } 39 40 if($db->field_exists('messageindex', "threads")) 41 { 42 $db->write_query("ALTER TABLE ".TABLE_PREFIX."threads DROP messageindex;"); 43 } 44 if($db->field_exists('subjectindex', "threads")) 45 { 46 $db->write_query("ALTER TABLE ".TABLE_PREFIX."threads DROP subjectindex;"); 47 } 48 if($db->field_exists('moderators', "forums")) 49 { 50 $db->write_query("ALTER TABLE ".TABLE_PREFIX."forums DROP moderators;"); 51 } 52 53 if($db->field_exists('version', "templates")) 54 { 55 $db->write_query("ALTER TABLE ".TABLE_PREFIX."templates DROP version;"); 56 } 57 $db->write_query("ALTER TABLE ".TABLE_PREFIX."templates ADD version varchar(20) NOT NULL default '0';"); 58 59 if($db->field_exists('status', "templates")) 60 { 61 $db->write_query("ALTER TABLE ".TABLE_PREFIX."templates DROP status;"); 62 } 63 $db->write_query("ALTER TABLE ".TABLE_PREFIX."templates ADD status varchar(10) NOT NULL default '';"); 64 65 if($db->field_exists('dateline', "templates")) 66 { 67 $db->write_query("ALTER TABLE ".TABLE_PREFIX."templates DROP dateline;"); 68 } 69 $db->write_query("ALTER TABLE ".TABLE_PREFIX."templates ADD dateline int(10) NOT NULL default '0';"); 70 71 $db->write_query("UPDATE ".TABLE_PREFIX."templates SET version='100.06' WHERE sid>0"); 72 73 echo "Done</p>"; 74 75 $contents .= "Click next to continue with the upgrade process.</p>"; 76 $output->print_contents($contents); 77 $output->print_footer("4_done"); 78 } 79
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| 2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup | Cross-referenced by PHPXref |