[ Index ]

PHP Cross Reference of MyBB 1.8.40

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


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