Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationMain
    • NavigationTop
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cUpgradeJob_0001
  • cUpgradeJob_0002
  • cUpgradeJob_0003
  • cUpgradeJob_0004
  • cUpgradeJob_0005
  • cUpgradeJob_0006
  • cUpgradeJob_0007
  • cUpgradeJob_0008
  • cUpgradeJob_0009
  • cUpgradeJob_0010
  • cUpgradeJob_0011
  • cUpgradeJob_0012
  • cUpgradeJobAbstract
  • cUpgradeJobMain
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: /**
 3:  * This file contains the upgrade job 8.
 4:  *
 5:  * @package    Setup
 6:  * @subpackage UpgradeJob
 7:  * @version    SVN Revision $Rev:$
 8:  *
 9:  * @author     Simon Sprankel
10:  * @copyright  four for business AG <www.4fb.de>
11:  * @license    http://www.contenido.org/license/LIZENZ.txt
12:  * @link       http://www.4fb.de
13:  * @link       http://www.contenido.org
14:  */
15: 
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17: 
18: /**
19:  * Upgrade job 8.
20:  * Copies the content of the con_plugins."path" column to the "folder" column
21:  * and deletes the "path" column afterwards.
22:  *
23:  * @package Setup
24:  * @subpackage UpgradeJob
25:  */
26: class cUpgradeJob_0008 extends cUpgradeJobAbstract {
27: 
28:     public $maxVersion = "4.9.0-beta1";
29: 
30:     public function _execute() {
31:         global $cfg, $db;
32: 
33:         if ($this->_setupType == 'upgrade') {
34:             // check if the column "path" still exists
35:             $columns = array();
36:             $sql = 'SHOW COLUMNS FROM ' . $cfg['tab']['plugins'];
37:             $db->query($sql);
38:             while ($db->nextRecord()) {
39:                 $columns[] = $db->f('Field');
40:             }
41: 
42:             if (in_array('path', $columns)) {
43:                 // copy path to folder
44:                 $sql = 'UPDATE con_plugins SET folder=path';
45:                 $db->query($sql);
46: 
47:                 // drop column "path"
48:                 $sql = 'ALTER TABLE `' . $cfg['tab']['plugins'] . '` DROP `path`';
49:                 $db->query($sql);
50:             }
51:         }
52:     }
53: 
54: }
55: 
CMS CONTENIDO 4.9.0 API documentation generated by ApiGen 2.8.0