[ Index ]

PHP Cross Reference of phpwcms V1.5.0 _r431 (28.01.12)

title

Body

[close]

/include/inc_lib/revision/ -> r414.php (source)

   1  <?php
   2  /*************************************************************************************
   3     Copyright notice
   4  
   5     (c) 2002-2012 Oliver Georgi <oliver@phpwcms.de> // All rights reserved.
   6  
   7     This script is part of PHPWCMS. The PHPWCMS web content management system is
   8     free software; you can redistribute it and/or modify it under the terms of
   9     the GNU General Public License as published by the Free Software Foundation;
  10     either version 2 of the License, or (at your option) any later version.
  11  
  12     The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
  13     A copy is found in the textfile GPL.txt and important notices to the license
  14     from the author is found in LICENSE.txt distributed with these scripts.
  15  
  16     This script is distributed in the hope that it will be useful, but WITHOUT ANY
  17     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  18     PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  19  
  20     This copyright notice MUST APPEAR in all copies of the script!
  21  *************************************************************************************/
  22  
  23  
  24  // Revision 414 Update Check
  25  function phpwcms_revision_r414() {
  26          
  27      $status = true;
  28      
  29      // Test against new shopping module fields
  30      $result = _dbQuery("SHOW TABLES LIKE '".DB_PREPEND."phpwcms_shop_products'");
  31      
  32      if(!empty($result)) {
  33      
  34          $result = _dbQuery("SHOW COLUMNS FROM ".DB_PREPEND."phpwcms_shop_products LIKE 'shopprod_special_price'");
  35          if(empty($result)) {
  36              $result = _dbQuery("ALTER TABLE ".DB_PREPEND."phpwcms_shop_products ADD shopprod_special_price TEXT NOT NULL", 'ALTER');
  37          }
  38          
  39          $result = _dbQuery("SHOW COLUMNS FROM ".DB_PREPEND."phpwcms_shop_products LIKE 'shopprod_track_view'");
  40          if(empty($result)) {
  41              $result = _dbQuery("ALTER TABLE ".DB_PREPEND."phpwcms_shop_products ADD shopprod_track_view INT(11) NOT NULL DEFAULT '0'", 'ALTER');
  42              $result = _dbQuery("ALTER TABLE ".DB_PREPEND."phpwcms_shop_products ADD INDEX (shopprod_track_view)", 'ALTER');
  43          }
  44          
  45          $result = _dbQuery("SHOW COLUMNS FROM ".DB_PREPEND."phpwcms_shop_products LIKE 'shopprod_lang'");
  46          if(empty($result)) {
  47              $result = _dbQuery("ALTER TABLE ".DB_PREPEND."phpwcms_shop_products ADD shopprod_lang VARCHAR(255) NOT NULL DEFAULT ''", 'ALTER');
  48              $result = _dbQuery("ALTER TABLE ".DB_PREPEND."phpwcms_shop_products ADD INDEX (shopprod_lang)", 'ALTER');
  49          }
  50          
  51      }
  52  
  53      // do former revision check
  54      // r407 - 413 required no action, so fallback to r406
  55      $r406 = '406';
  56      if(phpwcms_revision_check_temp($r406) !== true) {
  57          $status = phpwcms_revision_check($r406);
  58      }
  59  
  60      return $status;
  61  
  62  }
  63  
  64  ?>


Generated: Sun Jan 29 16:31:14 2012 Cross-referenced by PHPXref 0.7.1