[ Index ]

PHP Cross Reference of MyBB 1.8.37

title

Body

[close]

/install/resources/ -> upgrade26.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.9
  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 upgrade26_dbchanges()
  24  {
  25      global $db, $output;
  26  
  27      $output->print_header("Updating Database");
  28      echo "<p>Performing necessary upgrade queries...</p>";
  29  
  30      $db->update_query("helpdocs", array('usetranslation' => 1));
  31      $db->update_query("helpsections", array('usetranslation' => 1));
  32  
  33      if($db->type == 'pgsql')
  34      {
  35          $db->modify_column("polls", "numvotes", "text", "set");
  36      }
  37      else
  38      {
  39          $db->modify_column("polls", "numvotes", "text NOT NULL");
  40      }
  41  
  42      if($db->field_exists('failedlogin', 'users'))
  43      {
  44          $db->drop_column("users", "failedlogin");
  45      }
  46  
  47      // We don't need the posthash after the post is inserted into the database
  48      $db->update_query('attachments', "posthash=''", 'pid!=0');
  49  
  50      // Column will be dropped in MyBB 1.8
  51      $db->update_query('posts', "posthash=''");
  52  
  53      $output->print_contents("<p>Click next to continue with the upgrade process.</p>");
  54      $output->print_footer("26_done");
  55  }


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