[ Index ]

PHP Cross Reference of MyBB 1.8.40

title

Body

[close]

/install/resources/ -> upgrade18.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.6.0
  13   */
  14  
  15  $upgrade_detail = array(
  16      "revert_all_templates" => 0,
  17      "revert_all_themes" => 0,
  18      "revert_all_settings" => 0
  19  );
  20  
  21  function upgrade18_dbchanges()
  22  {
  23      global $db, $output, $mybb;
  24  
  25      $output->print_header("Performing Queries");
  26  
  27      echo "<p>Performing necessary upgrade queries...</p>";
  28  
  29      // Update the usergroup sequence for pgSQL - #1094
  30      if($mybb->config['database']['type'] == "pgsql")
  31      {
  32          $query = $db->simple_select("usergroups", "COUNT(gid) AS group_count");
  33          $group_count = $db->fetch_field($query, "group_count");
  34  
  35          ++$group_count;
  36          $db->query("ALTER SEQUENCE ".$mybb->config['database']['table_prefix']."usergroups_gid_seq RESTART WITH ".$group_count."");
  37      }
  38  
  39      $output->print_contents("<p>Click next to continue with the upgrade process.</p>");
  40      $output->print_footer("18_updatecache");
  41  }
  42  
  43  function upgrade18_updatecache()
  44  {
  45      global $cache, $output;
  46  
  47      $output->print_header("Updating Cache");
  48  
  49      echo "<p>Updating cache...</p>";
  50  
  51      // Update the Moderator cache - #1200
  52      $cache->update_moderators();
  53  
  54      $output->print_contents("<p>Click next to continue with the upgrade process.</p>");
  55       $output->print_footer("18_done");
  56  }


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