[ Index ] |
PHP Cross Reference of MyBB |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * MyBB 1.6 4 * Copyright 2010 MyBB Group, All Rights Reserved 5 * 6 * Website: http://www.mybboard.com 7 * License: http://mybb.com/about/license 8 * 9 * $Id$ 10 */ 11 12 /** 13 * Upgrade Script: 1.6.6 14 */ 15 16 17 $upgrade_detail = array( 18 "revert_all_templates" => 0, 19 "revert_all_themes" => 0, 20 "revert_all_settings" => 0 21 ); 22 23 @set_time_limit(0); 24 25 function upgrade23_dbchanges() 26 { 27 global $db, $output; 28 29 $output->print_header("Updating Database"); 30 echo "<p>Performing necessary upgrade queries...</p>"; 31 32 if($db->field_exists('canusecustomtools', 'moderators')) 33 { 34 $db->drop_column('moderators', 'canusecustomtools'); 35 } 36 37 if($db->field_exists('cansendemailoverride', 'usergroups')) 38 { 39 $db->drop_column('usergroups', 'cansendemailoverride'); 40 } 41 42 switch($db->type) 43 { 44 case "pgsql": 45 case "sqlite": 46 $db->add_column('moderators', 'canusecustomtools', "int NOT NULL default '0'"); 47 $db->add_column('usergroups', 'cansendemailoverride', "int NOT NULL default '0'"); 48 break; 49 default: 50 $db->add_column('moderators', 'canusecustomtools', "int(1) NOT NULL default '0'"); 51 $db->add_column('usergroups', 'cansendemailoverride', "int(1) NOT NULL default '0'"); 52 break; 53 } 54 55 $db->update_query('moderators', array('canusecustomtools' => 1), "canmanagethreads = '1'"); 56 57 $output->print_contents("<p>Click next to continue with the upgrade process.</p>"); 58 $output->print_footer("23_done"); 59 } 60 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Oct 8 19:19:50 2013 | Cross-referenced by PHPXref 0.7.1 |