[ Index ]

PHP Cross Reference of MyBB

title

Body

[close]

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

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


Generated: Tue Oct 8 19:19:50 2013 Cross-referenced by PHPXref 0.7.1