[ Index ]

PHP Cross Reference of MyBB 1.8.38

title

Body

[close]

/install/resources/ -> upgrade37.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.8.8
  13   */
  14  
  15  $upgrade_detail = array(
  16      "revert_all_templates" => 0,
  17      "revert_all_themes" => 0,
  18      "revert_all_settings" => 0
  19  );
  20  
  21  @set_time_limit(0);
  22  
  23  function upgrade37_dbchanges()
  24  {
  25      global $db, $output;
  26  
  27      $output->print_header("Updating Database");
  28      echo "<p>Performing necessary upgrade queries...</p>";
  29      flush();
  30  
  31      if($db->field_exists('canviewdeletionnotice', 'usergroups'))
  32      {
  33          $db->drop_column("usergroups", "canviewdeletionnotice");
  34      }
  35  
  36      if($db->field_exists('canviewdeletionnotice', 'forumpermissions'))
  37      {
  38          $db->drop_column("forumpermissions", "canviewdeletionnotice");
  39      }
  40  
  41      switch($db->type)
  42      {
  43          case "pgsql":
  44              $db->add_column("forumpermissions", "canviewdeletionnotice", "smallint NOT NULL default '0' AFTER caneditattachments");
  45              $db->add_column("usergroups", "canviewdeletionnotice", "smallint NOT NULL default '0' AFTER caneditattachments");
  46              break;
  47          default:
  48              $db->add_column("forumpermissions", "canviewdeletionnotice", "tinyint(1) NOT NULL default '0' AFTER caneditattachments");
  49              $db->add_column("usergroups", "canviewdeletionnotice", "tinyint(1) NOT NULL default '0' AFTER caneditattachments");
  50              break;
  51      }
  52  
  53      $output->print_contents("<p>Click next to continue with the upgrade process.</p>");
  54      $output->print_footer("37_done");
  55  }


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