Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • 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
  • cUpgradeJob_0013
  • cUpgradeJob_0014
  • cUpgradeJob_0015
  • cUpgradeJob_0016
  • cUpgradeJob_0017
  • cUpgradeJob_0018
  • cUpgradeJobAbstract
  • cUpgradeJobMain
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: /**
 3:  * This file contains the upgrade job 7.
 4:  *
 5:  * @package    Setup
 6:  * @subpackage UpgradeJob
 7:  * @author     Simon Sprankel
 8:  * @copyright  four for business AG <www.4fb.de>
 9:  * @license    http://www.contenido.org/license/LIZENZ.txt
10:  * @link       http://www.4fb.de
11:  * @link       http://www.contenido.org
12:  */
13: 
14: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
15: 
16: /**
17:  * Upgrade job 7.
18:  * Copies the content of the con_plugins."path" column to the "folder" column
19:  * and deletes the "path" column afterwards.
20:  *
21:  * @package Setup
22:  * @subpackage UpgradeJob
23:  */
24: class cUpgradeJob_0007 extends cUpgradeJobAbstract {
25: 
26:     public $maxVersion = "4.9.0-beta1";
27: 
28:     public function _execute() {
29:         global $cfg, $db;
30: 
31:         if ($this->_setupType == 'upgrade') {
32:             // check if the column "path" still exists
33:             $db->query('SHOW COLUMNS FROM `%s`;', $cfg['tab']['plugins']);
34: 
35:             $columns = array();
36:             while ($db->nextRecord()) {
37:                 $columns[] = $db->f('Field');
38:             }
39: 
40:             if (in_array('path', $columns)) {
41:                 // copy path to folder
42:                 $db->query('UPDATE `%s` SET folder = path;', $cfg['tab']['plugins']);
43:                 // drop column "path"
44:                 $db->query('ALTER TABLE `%s` DROP path;', $cfg['tab']['plugins']);
45:             }
46:         }
47:     }
48: 
49: }
50: 
CMS CONTENIDO 4.10.0 API documentation generated by ApiGen 2.8.0