[ Index ]

PHP Cross Reference of MyBB 1.8.38

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


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