[ Index ]

PHP Cross Reference of MyBB 1.8.38

title

Body

[close]

/install/resources/ -> upgrade8.php (source)

   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: 1.2.2
  13   */
  14  
  15  
  16  $upgrade_detail = array(
  17      "revert_all_templates" => 0,
  18      "revert_all_themes" => 0,
  19      "revert_all_settings" => 0,
  20      "requires_deactivated_plugins" => 0,
  21  );
  22  
  23  @set_time_limit(0);
  24  
  25  function upgrade8_dbchanges()
  26  {
  27      global $db, $output, $mybb;
  28  
  29      $output->print_header("Performing Queries");
  30  
  31      echo "<p>Performing necessary upgrade queries..</p>";
  32  
  33      if($db->field_exists('oldadditionalgroups', "banned"))
  34      {
  35          $db->write_query("ALTER TABLE ".TABLE_PREFIX."banned DROP oldadditionalgroups;");
  36      }
  37      $db->write_query("ALTER TABLE ".TABLE_PREFIX."banned ADD oldadditionalgroups TEXT NOT NULL AFTER oldgroup");
  38  
  39  
  40      if($db->field_exists('olddisplaygroup', "banned"))
  41      {
  42          $db->write_query("ALTER TABLE ".TABLE_PREFIX."banned DROP olddisplaygroup;");
  43      }
  44      $db->write_query("ALTER TABLE ".TABLE_PREFIX."banned ADD olddisplaygroup int NOT NULL default '0' AFTER oldadditionalgroups");
  45  
  46      $contents .= "Click next to continue with the upgrade process.</p>";
  47      $output->print_contents($contents);
  48      $output->print_footer("8_done");
  49  }
  50  


2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup Cross-referenced by PHPXref