[ Index ]

PHP Cross Reference of MyBB 1.8.40

title

Body

[close]

/install/resources/ -> upgrade42.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.8.13 or 1.8.14
  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 upgrade42_dbchanges()
  22  {
  23      global $db, $output;
  24  
  25      $output->print_header("Updating Database");
  26  
  27      echo "<p>Performing necessary upgrade queries...</p>";
  28      flush();
  29  
  30      if($db->field_exists('ipaddress', 'pollvotes'))
  31      {
  32          $db->drop_column('pollvotes', 'ipaddress');
  33      }
  34  
  35      switch($db->type)
  36      {
  37          case "pgsql":
  38              $db->add_column("pollvotes", "ipaddress", "bytea NOT NULL default ''");
  39              break;
  40          case "sqlite":
  41              $db->add_column("pollvotes", "ipaddress", "blob(16) NOT NULL default ''");
  42              break;
  43          default:
  44              $db->add_column("pollvotes", "ipaddress", "varbinary(16) NOT NULL default ''");
  45              break;
  46      }
  47  
  48      $output->print_contents("<p>Click next to continue with the upgrade process.</p>");
  49      $output->print_footer("42_done");
  50  }


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