[ Index ]

PHP Cross Reference of MyBB

title

Body

[close]

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


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