function marketUpdates() { //Update the database changes try { //update module name \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "modules` SET `name` = 'Market' WHERE `id` = 33"); //update navigation url \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Market' WHERE `area_id` = 98"); //Insert component entry \Cx\Lib\UpdateUtil::sql("INSERT INTO `" . DBPREFIX . "component` (`id`, `name`, `type`) VALUES ('33', 'Market', 'module')"); //update module name for frontend pages \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "content_page` SET `module` = 'Market' WHERE `module` = 'market'"); } catch (\Cx\Lib\UpdateException $e) { return "Error: {$e->sql}"; } //Update script for moving the folder $marketMediaPath = ASCMS_DOCUMENT_ROOT . '/media'; try { if (file_exists($marketMediaPath . '/market') && !file_exists($marketMediaPath . '/Market')) { \Cx\Lib\FileSystem\FileSystem::makeWritable($marketMediaPath . '/market'); if (!\Cx\Lib\FileSystem\FileSystem::move($marketMediaPath . '/market', $marketMediaPath . '/Market')) { return 'Failed to move the folder from ' . $marketMediaPath . '/market to ' . $marketMediaPath . '/Market.'; } } } catch (\Cx\Lib\FileSystem\FileSystemException $e) { return $e->getMessage(); } return 'Market updated successfully.'; }
function calendarUpdate() { try { //update module name \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "modules` SET `name` = 'Calendar' WHERE `id` = 21"); //update navigation url \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Calendar' WHERE `area_id` = 16"); //Insert component entry \Cx\Lib\UpdateUtil::sql("INSERT INTO `" . DBPREFIX . "component` (`id`, `name`, `type`) VALUES ('21', 'Calendar', 'module')"); //update module name for frontend pages \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "content_page` SET `module` = 'Calendar' WHERE `module` = 'calendar'"); //following queries for changing the path from images/calendar into images/Calendar \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_calendar_event` SET `pic` = REPLACE(`pic`, 'images/calendar', 'images/Calendar'),\n `attach` = REPLACE(`attach`, 'images/calendar', 'images/Calendar'),\n `place_map` = REPLACE(`place_map`, 'images/calendar', 'images/Calendar')\n WHERE `pic` LIKE ('" . ASCMS_PATH_OFFSET . "/images/calendar%') "); } catch (\Cx\Lib\UpdateException $e) { return "Error: {$e->sql}"; } $sourcePath = ASCMS_DOCUMENT_ROOT . '/images/calendar'; $targetPath = ASCMS_DOCUMENT_ROOT . '/images/Calendar'; try { if (file_exists($sourcePath) && !file_exists($targetPath)) { \Cx\Lib\FileSystem\FileSystem::makeWritable($sourcePath); if (!\Cx\Lib\FileSystem\FileSystem::move($sourcePath, $targetPath)) { return 'Failed to Moved the files from ' . $sourcePath . ' to ' . $targetPath . '.<br>'; } } } catch (\Cx\Lib\FileSystem\FileSystemException $e) { return $e->getMessage(); } return 'Calendar Component Updated Successfully'; }
function galleryUpdate() { try { //update module name \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "modules` SET `name` = 'Gallery' WHERE `id` = 3"); //update navigation url \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Gallery' WHERE `area_id` = 12"); //Insert component entry \Cx\Lib\UpdateUtil::sql("INSERT INTO `" . DBPREFIX . "component` (`id`, `name`, `type`) VALUES ('3', 'Gallery', 'module')"); //update module name for frontend pages \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "content_page` SET `module` = 'Gallery' WHERE `module` = 'gallery'"); } catch (\Cx\Lib\UpdateException $e) { return "Error: {$e->sql}"; } $sourcePath = ASCMS_DOCUMENT_ROOT . '/images/gallery'; $targetPath = ASCMS_DOCUMENT_ROOT . '/images/Gallery'; try { if (file_exists($sourcePath) && !file_exists($targetPath)) { \Cx\Lib\FileSystem\FileSystem::makeWritable($sourcePath); if (!\Cx\Lib\FileSystem\FileSystem::move($sourcePath, $targetPath)) { return 'Failed to Moved the files from ' . $sourcePath . ' to ' . $targetPath . '.<br>'; } } } catch (\Cx\Lib\FileSystem\FileSystemException $e) { return $e->getMessage(); } return 'Gallery Component Updated Successfully'; }
function _podcastUpdate() { global $objDatabase, $_ARRAYLANG, $objUpdate, $_CONFIG; //move podcast images directory $path = ASCMS_DOCUMENT_ROOT . '/images'; $oldImagesPath = '/content/podcast'; $newImagesPath = '/podcast'; if ($objUpdate->_isNewerVersion($_CONFIG['coreCmsVersion'], '1.2.1')) { if (!file_exists($path . $newImagesPath) && file_exists($path . $oldImagesPath)) { \Cx\Lib\FileSystem\FileSystem::makeWritable($path . $oldImagesPath); if (!\Cx\Lib\FileSystem\FileSystem::copy_folder($path . $oldImagesPath, $path . $newImagesPath)) { setUpdateMsg(sprintf($_ARRAYLANG['TXT_UNABLE_TO_MOVE_DIRECTORY'], $path . $oldImagesPath, $path . $newImagesPath)); return false; } } \Cx\Lib\FileSystem\FileSystem::makeWritable($path . $newImagesPath); \Cx\Lib\FileSystem\FileSystem::makeWritable($path . $newImagesPath . '/youtube_thumbnails'); //change thumbnail paths $query = "UPDATE `" . DBPREFIX . "module_podcast_medium` SET `thumbnail` = REPLACE(`thumbnail`, '/images/content/podcast/', '/images/podcast/')"; if ($objDatabase->Execute($query) === false) { return _databaseError($query, $objDatabase->ErrorMsg()); } } //set new default settings $query = "UPDATE `" . DBPREFIX . "module_podcast_settings` SET `setvalue` = '50' WHERE `setname` = 'thumb_max_size' AND `setvalue` = ''"; if ($objDatabase->Execute($query) === false) { return _databaseError($query, $objDatabase->ErrorMsg()); } $query = "UPDATE `" . DBPREFIX . "module_podcast_settings` SET `setvalue` = '85' WHERE `setname` = 'thumb_max_size_homecontent' AND `setvalue` = ''"; if ($objDatabase->Execute($query) === false) { return _databaseError($query, $objDatabase->ErrorMsg()); } // only update if installed version is at least a version 2.0.0 // older versions < 2.0 have a complete other structure of the content page and must therefore completely be reinstalled if (!$objUpdate->_isNewerVersion($_CONFIG['coreCmsVersion'], '2.0.0')) { try { // migrate content page to version 3.0.1 $search = array('/(.*)/ms'); $callback = function ($matches) { $content = $matches[1]; if (empty($content)) { return $content; } // add missing placeholder {PODCAST_JAVASCRIPT} if (strpos($content, '{PODCAST_JAVASCRIPT}') === false) { $content .= "\n{PODCAST_JAVASCRIPT}"; } // add missing placeholder {PODCAST_PAGING} if (strpos($content, '{PODCAST_PAGING}') === false) { $content = preg_replace('/(\\s+)(<!--\\s+END\\s+podcast_media\\s+-->)/ms', '$1$2$1<div class="noMedium">$1 {PODCAST_PAGING}$1</div>', $content); } return $content; }; \Cx\Lib\UpdateUtil::migrateContentPageUsingRegexCallback(array('module' => 'podcast'), $search, $callback, array('content'), '3.0.1'); } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } } return true; }
/** * Cloudrexx * * @link http://www.cloudrexx.com * @copyright Cloudrexx AG 2007-2015 * * According to our dual licensing model, this program can be used either * under the terms of the GNU Affero General Public License, version 3, * or under a proprietary license. * * The texts of the GNU Affero General Public License with an additional * permission and of our proprietary license can be found at and * in the LICENSE file you have received along with this program. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * "Cloudrexx" is a registered trademark of Cloudrexx AG. * The licensing of the program under the AGPLv3 does not imply a * trademark license. Therefore any rights, title and interest in * our trademarks remain entirely with us. */ function _loginUpdate() { global $objUpdate, $_CONFIG; // only update if installed version is at least a version 2.0.0 // older versions < 2.0 have a complete other structure of the content page and must therefore completely be reinstalled if (!$objUpdate->_isNewerVersion($_CONFIG['coreCmsVersion'], '2.0.0')) { try { // migrate content page to version 3.0.1 $search = array('/(.*)/ms'); $callback = function ($matches) { $content = $matches[1]; if (empty($content)) { return null; } // add missing captcha template block if (!preg_match('/<!--\\s+BEGIN\\s+captcha\\s+-->.*<!--\\s+END\\s+captcha\\s+-->/ms', $content)) { $content = preg_replace('/(<input[^>]+name\\s*=\\s*[\'"]PASSWORD[\'"][^>]*>.*?<\\/p>)(\\s+)/ms', '$1$2<!-- BEGIN captcha -->$2<p><label for="coreCaptchaCode">{TXT_CORE_CAPTCHA}</label>{CAPTCHA_CODE}</p>$2<!-- END captcha -->', $content); } return $content; }; \Cx\Lib\UpdateUtil::migrateContentPageUsingRegexCallback(array('module' => 'login', 'cmd' => ''), $search, $callback, array('content'), '3.0.1'); } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } } return true; }
function accessUpdates() { //Update the database changes try { //update module name \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "modules` SET `name` = 'Access' WHERE `id` = 23"); //update navigation url \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Access', `module_id` = '23' WHERE `area_id` = 18"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Access' WHERE `area_id` = 208"); //Insert component entry \Cx\Lib\UpdateUtil::sql("INSERT INTO `" . DBPREFIX . "component` (`id`, `name`, `type`) VALUES ('23', 'Access', 'core_module')"); //update module name for frontend pages \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "content_page` SET `module` = 'Access' WHERE `module` = 'access'"); //update module name for crm core settings \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "core_setting` SET `section` = 'Access' WHERE `section` = 'access' AND `name` = 'providers' AND `group` = 'sociallogin'"); } catch (\Cx\Lib\UpdateException $e) { return "Error: {$e->sql}"; } //Update script for moving the folder $accessImgPath = ASCMS_DOCUMENT_ROOT . '/images'; try { if (file_exists($accessImgPath . '/access') && !file_exists($accessImgPath . '/Access')) { \Cx\Lib\FileSystem\FileSystem::makeWritable($accessImgPath . '/access'); if (!\Cx\Lib\FileSystem\FileSystem::move($accessImgPath . '/access', $accessImgPath . '/Access')) { return 'Failed to move the folder from ' . $accessImgPath . '/access to ' . $accessImgPath . '/Access.'; } } } catch (\Cx\Lib\FileSystem\FileSystemException $e) { return $e->getMessage(); } return 'Access updated successfully.'; }
function _recommendUpdate() { global $objDatabase; /******************************** * EXTENSION: Captcha * * ADDED: Contrexx v3.0.0 * ********************************/ try { // migrate content page to version 3.0.1 $search = array('/(.*)/ms'); $callback = function ($matches) { $content = $matches[1]; if (empty($content)) { return $content; } if (!preg_match('/<!--\\s+BEGIN\\s+recommend_captcha\\s+-->.*<!--\\s+END\\s+recommend_captcha\\s+-->/ms', $content)) { // migrate captcha stuff $content = preg_replace('/<img[^>]+\\{RECOM_CAPTCHA_URL\\}.*\\{RECOM_CAPTCHA_OFFSET\\}[^>]+>/ms', '{RECOM_CAPTCHA_CODE}', $content); // migration for very old versions $content = preg_replace('/(.*)(<tr[^>]*>.*?<td[^>]*>.*?\\{RECOM_CAPTCHA_CODE\\}.*?<\\/td>.*?<\\/tr>)/ms', '$1<!-- BEGIN recommend_captcha -->$2<!-- END recommend_captcha -->', $content, -1, $count); // migration for newer versions if (!$count) { $content = preg_replace('/(.*)(<p[^>]*>.*?\\{RECOM_CAPTCHA_.*?\\}.*?<\\/p>)/ms', '$1<!-- BEGIN recommend_captcha -->$2<!-- END recommend_captcha -->', $content); } $content = preg_replace('/(.*)(<p[^>]*><label.*<\\/label>)(.*?\\{RECOM_CAPTCHA_.*?\\}.*?)(<\\/p>)/ms', '$1$2{RECOM_CAPTCHA_CODE}$4', $content); } return $content; }; \Cx\Lib\UpdateUtil::migrateContentPageUsingRegexCallback(array('module' => 'recommend'), $search, $callback, array('content'), '3.0.1'); } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } return true; }
function downloadsUpdate() { try { //update module name \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "modules` SET `name` = 'Downloads' WHERE `id` = 53"); //update navigation url \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Downloads' WHERE `area_id` = 132"); //Insert component entry \Cx\Lib\UpdateUtil::sql("INSERT INTO `" . DBPREFIX . "component` (`id`, `name`, `type`) VALUES ('53', 'Downloads', 'module')"); //update module name for frontend pages \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "content_page` SET `module` = 'Downloads' WHERE `module` = 'downloads'"); //following queries for changing the path from images/downloads into images/Downloads \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_downloads_download`\n SET `image` = REPLACE(`image`, 'images/downloads', 'images/Downloads')\n WHERE `image` LIKE ('" . ASCMS_PATH_OFFSET . "/images/downloads%')"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_downloads_category`\n SET `image` = REPLACE(`image`, 'images/downloads', 'images/Downloads')\n WHERE `image` LIKE ('" . ASCMS_PATH_OFFSET . "/images/downloads%')"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_downloads_download_locale`\n SET `source` = REPLACE(`source`, 'images/downloads', 'images/Downloads')\n WHERE `source` LIKE ('" . ASCMS_PATH_OFFSET . "/images/downloads%')"); } catch (\Cx\Lib\UpdateException $e) { return "Error: {$e->sql}"; } $sourcePath = ASCMS_DOCUMENT_ROOT . '/images/downloads'; $targetPath = ASCMS_DOCUMENT_ROOT . '/images/Downloads'; try { if (file_exists($sourcePath) && !file_exists($targetPath)) { \Cx\Lib\FileSystem\FileSystem::makeWritable($sourcePath); if (!\Cx\Lib\FileSystem\FileSystem::move($sourcePath, $targetPath)) { return 'Failed to Moved the files from ' . $sourcePath . ' to ' . $targetPath . '.<br>'; } } } catch (\Cx\Lib\FileSystem\FileSystemException $e) { return $e->getMessage(); } return 'Downloads Updated successfully'; }
function forumUpdates() { //Update the database changes try { //update module name \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "modules` SET `name` = 'Forum' WHERE `id` = 20"); //update navigation url \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Forum' WHERE `area_id` = 106"); //Insert component entry \Cx\Lib\UpdateUtil::sql("INSERT INTO `" . DBPREFIX . "component` (`id`, `name`, `type`) VALUES ('20', 'Forum', 'module')"); //update module name for frontend pages \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "content_page` SET `module` = 'Forum' WHERE `module` = 'forum'"); } catch (\Cx\Lib\UpdateException $e) { return "Error: {$e->sql}"; } //Update script for moving the folder $sourcePath = ASCMS_DOCUMENT_ROOT . '/media/forum'; $destinationPath = ASCMS_DOCUMENT_ROOT . '/media/Forum'; try { if (file_exists($sourcePath) && !file_exists($destinationPath)) { \Cx\Lib\FileSystem\FileSystem::makeWritable($sourcePath); if (!\Cx\Lib\FileSystem\FileSystem::move($sourcePath, $destinationPath)) { return 'Failed to move the folder from ' . $sourcePath . ' to ' . $destinationPath . '.'; } } } catch (\Cx\Lib\FileSystem\FileSystemException $e) { return $e->getMessage(); } return 'Forum updated successfully.'; }
function fileSharingUpdate() { try { //update module name \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "modules` SET `name` = 'FileSharing' WHERE `id` = 68"); //update navigation url \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=media&archive=FileSharing' WHERE `area_id` = 187"); //Insert component entry \Cx\Lib\UpdateUtil::sql("INSERT INTO `" . DBPREFIX . "component` (`id`, `name`, `type`) VALUES ('68', 'FileSharing', 'module')"); //update module name for frontend pages \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "content_page` SET `module` = 'FileSharing' WHERE `module` = 'filesharing'"); //update section \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "core_setting` SET `section` = 'FileSharing',`value` = 'on' WHERE\n `section` = 'filesharing' AND `name` = 'permission' AND `group` = 'config'"); } catch (\Cx\Lib\UpdateException $e) { return "Error: {$e->sql}"; } $sourcePath = ASCMS_DOCUMENT_ROOT . '/media/filesharing'; $targetPath = ASCMS_DOCUMENT_ROOT . '/media/FileSharing'; try { if (file_exists($sourcePath) && !file_exists($targetPath)) { \Cx\Lib\FileSystem\FileSystem::makeWritable($sourcePath); if (!\Cx\Lib\FileSystem\FileSystem::move($sourcePath, $targetPath)) { return 'Failed to Moved the files from ' . $sourcePath . ' to ' . $targetPath . '.<br>'; } } } catch (\Cx\Lib\FileSystem\FileSystemException $e) { return $e->getMessage(); } return 'FileSharing updated successfully'; }
/** * Cloudrexx * * @link http://www.cloudrexx.com * @copyright Cloudrexx AG 2007-2015 * * According to our dual licensing model, this program can be used either * under the terms of the GNU Affero General Public License, version 3, * or under a proprietary license. * * The texts of the GNU Affero General Public License with an additional * permission and of our proprietary license can be found at and * in the LICENSE file you have received along with this program. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * "Cloudrexx" is a registered trademark of Cloudrexx AG. * The licensing of the program under the AGPLv3 does not imply a * trademark license. Therefore any rights, title and interest in * our trademarks remain entirely with us. */ function _marketUpdate() { global $objDatabase, $_ARRAYLANG; $query = "SELECT id FROM " . DBPREFIX . "module_market_settings WHERE name='codeMode'"; $objCheck = $objDatabase->SelectLimit($query, 1); if ($objCheck !== false) { if ($objCheck->RecordCount() == 0) { $query = "INSERT INTO `" . DBPREFIX . "module_market_settings` ( `id` , `name` , `value` , `description` , `type` )\n VALUES ( NULL , 'codeMode', '1', 'TXT_MARKET_SET_CODE_MODE', '2')"; if ($objDatabase->Execute($query) === false) { return _databaseError($query, $objDatabase->ErrorMsg()); } } } else { return _databaseError($query, $objDatabase->ErrorMsg()); } $arrColumns = $objDatabase->MetaColumns(DBPREFIX . 'module_market_mail'); if ($arrColumns === false) { setUpdateMsg(sprintf($_ARRAYLANG['TXT_UNABLE_GETTING_DATABASE_TABLE_STRUCTURE'], DBPREFIX . 'module_market_mail')); return false; } if (!isset($arrColumns['MAILTO'])) { $query = "ALTER TABLE `" . DBPREFIX . "module_market_mail` ADD `mailto` VARCHAR( 10 ) NOT NULL AFTER `content`"; if ($objDatabase->Execute($query) === false) { return _databaseError($query, $objDatabase->ErrorMsg()); } } /***************************************************************** * EXTENSION: New attributes 'color' and 'sort_id' for entries * * ADDED: Contrexx v2.1.0 * *****************************************************************/ $arrColumns = $objDatabase->MetaColumns(DBPREFIX . 'module_market'); if ($arrColumns === false) { setUpdateMsg(sprintf($_ARRAYLANG['TXT_UNABLE_GETTING_DATABASE_TABLE_STRUCTURE'], DBPREFIX . 'module_market')); return false; } if (!isset($arrColumns['SORT_ID'])) { $query = "ALTER TABLE `" . DBPREFIX . "module_market` ADD `sort_id` INT( 4 ) NOT NULL DEFAULT '0' AFTER `paypal`"; if ($objDatabase->Execute($query) === false) { return _databaseError($query, $objDatabase->ErrorMsg()); } } if (!isset($arrColumns['COLOR'])) { $query = "ALTER TABLE `" . DBPREFIX . "module_market` ADD `color` VARCHAR(50) NOT NULL DEFAULT '' AFTER `description`"; if ($objDatabase->Execute($query) === false) { return _databaseError($query, $objDatabase->ErrorMsg()); } } try { // delete obsolete table contrexx_module_market_access \Cx\Lib\UpdateUtil::drop_table(DBPREFIX . 'module_market_access'); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_market_spez_fields', array('id' => array('type' => 'INT(5)', 'notnull' => true, 'auto_increment' => true, 'primary' => true), 'name' => array('type' => 'VARCHAR(100)'), 'value' => array('type' => 'VARCHAR(100)'), 'type' => array('type' => 'INT(1)', 'notnull' => true, 'default' => '1'), 'lang_id' => array('type' => 'INT(2)', 'notnull' => true, 'default' => '0'), 'active' => array('type' => 'INT(1)', 'notnull' => true, 'default' => '0'))); } catch (\Cx\Lib\UpdateException $e) { DBG::trace(); return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } return true; }
function _dataUpdate() { global $objDatabase; $arrTables = $objDatabase->MetaTables('TABLES'); if (!sizeof($arrTables)) { return _databaseError("MetaTables('TABLES')", 'Could not read Table metadata'); } // Create neccessary tables if not present $tables = array('module_data_categories' => "CREATE TABLE `" . DBPREFIX . "module_data_categories` (\n `category_id` int(4) unsigned NOT NULL default '0',\n `lang_id` int(2) unsigned NOT NULL default '0',\n `is_active` enum('0','1') NOT NULL default '1',\n `parent_id` int(10) unsigned NOT NULL default '0',\n `name` varchar(100) NOT NULL default '',\n `active` enum('0','1') NOT NULL default '1',\n `cmd` int(10) unsigned NOT NULL default '1',\n `action` enum('content','overlaybox','subcategories') NOT NULL default 'content',\n `sort` int(10) unsigned NOT NULL default '1',\n `box_height` int(10) unsigned NOT NULL default '500',\n `box_width` int(11) NOT NULL default '350',\n `template` text NOT NULL,\n PRIMARY KEY (`category_id`,`lang_id`)\n ) ENGINE=InnoDB", 'module_data_message_to_category' => "CREATE TABLE `" . DBPREFIX . "module_data_message_to_category` (\n `message_id` int(6) unsigned NOT NULL default '0',\n `category_id` int(4) unsigned NOT NULL default '0',\n `lang_id` int(2) unsigned NOT NULL default '0',\n PRIMARY KEY (`message_id`,`category_id`,`lang_id`),\n KEY `category_id` (`category_id`)\n ) ENGINE=InnoDB", 'module_data_messages' => "CREATE TABLE `" . DBPREFIX . "module_data_messages` (\n `message_id` int(6) unsigned NOT NULL auto_increment,\n `user_id` int(5) unsigned NOT NULL default '0',\n `time_created` int(14) unsigned NOT NULL default '0',\n `time_edited` int(14) unsigned NOT NULL default '0',\n `hits` int(7) unsigned NOT NULL default '0',\n `active` enum('0','1') NOT NULL default '1',\n `sort` int(10) unsigned NOT NULL default '1',\n `mode` set('normal','forward') NOT NULL default 'normal',\n `release_time` int(15) NOT NULL default '0',\n `release_time_end` int(15) NOT NULL default '0',\n PRIMARY KEY (`message_id`)\n ) ENGINE=InnoDB", 'module_data_settings' => "CREATE TABLE `" . DBPREFIX . "module_data_settings` (\n `name` varchar(50) NOT NULL default '',\n `value` text NOT NULL,\n PRIMARY KEY (`name`)\n ) ENGINE=InnoDB"); /////////////////////////////////////////////////////////////////// // Create tables // /////////////////////////////////////////////////////////////////// foreach ($tables as $name => $query) { if (in_array(DBPREFIX . $name, $arrTables)) { continue; } if (!$objDatabase->Execute($query)) { return _databaseError($query, $objDatabase->ErrorMsg()); } // TODO: Unused // $installed[] = $name; } try { \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_data_placeholders', array('id' => array('type' => 'INT(10)', 'unsigned' => true, 'notnull' => true, 'auto_increment' => true, 'primary' => true), 'type' => array('type' => 'SET(\'cat\',\'entry\')', 'notnull' => true, 'default' => ''), 'ref_id' => array('type' => 'INT(11)', 'notnull' => true, 'default' => '0'), 'placeholder' => array('type' => 'VARCHAR(255)', 'notnull' => true, 'default' => '')), array('placeholder' => array('fields' => array('placeholder'), 'type' => 'UNIQUE'), 'type' => array('fields' => array('type', 'ref_id'), 'type' => 'UNIQUE'))); } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } $settings_query = "\nINSERT INTO `" . DBPREFIX . "module_data_settings` (`name`, `value`) VALUES\n('data_block_activated', '0'),\n('data_block_messages', '3'),\n('data_comments_activated', '1'),\n('data_comments_anonymous', '1'),\n('data_comments_autoactivate', '1'),\n('data_comments_editor', 'wysiwyg'),\n('data_comments_notification', '1'),\n('data_comments_timeout', '30'),\n('data_entry_action', 'overlaybox'),\n('data_general_introduction', '150'),\n('data_rss_activated', '0'),\n('data_rss_comments', '10'),\n('data_rss_messages', '5'),\n('data_tags_hitlist', '5'),\n('data_target_cmd', '1'),\n('data_template_category',\n'<!-- BEGIN datalist_category -->\n<!-- this displays the category and the subcategories -->\n<div class=\\\"datalist_block\\\">\n<dl>\n <!-- BEGIN category -->\n <dt class=\\\"cattitle\\\"><div class=\\\"bg\\\"><h4>[[CATTITLE]]</h4></div></dt>\n <dd class=\\\"catcontent\\\">\n <dl>\n <!-- BEGIN entry -->\n <dt>[[TITLE]]</dt>\n <dd>\n [[IMAGE]] [[CONTENT]] <a href=\\\"[[HREF]]\\\" [[CLASS]] [[TARGET]]>[[TXT_MORE]]</a>\n <br style=\\\"clear: both;\\\" />\n </dd>\n <!-- END entry -->\n </dl>\n </dd>\n <!-- END category -->\n</dl>\n</div>\n<!-- END datalist_category -->\n<!-- BEGIN datalist_single_category-->\n<!-- this displays just the entries of the category -->\n<div class=\\\"datalist_block\\\">\n<dl>\n <!-- BEGIN single_entry -->\n <dt class=\\\"cattitle\\\"><div class=\\\"bg\\\"><h4>[[TITLE]]</h4></div></dt>\n <dd class=\\\"catcontent2\\\">\n [[IMAGE]] <p>[[CONTENT]] <a href=\\\"[[HREF]]\\\" [[CLASS]] [[TARGET]]>[[TXT_MORE]]</a></p>\n <div style=\\\"clear: both;\\\" />\n </dd>\n <!-- END single_entry -->\n</dl>\n</div>\n<!-- END datalist_single_category -->\n'),\n('data_template_entry',\n'<!-- BEGIN datalist_entry-->\n<div class=\\\"datalist_block\\\">\n<dl>\n <dt>[[TITLE]]</dt>\n <dd>\n [[IMAGE]] [[CONTENT]] <a href=\\\"[[HREF]]\\\" [[CLASS]]>[[TXT_MORE]]</a>\n <br style=\\\"clear: both;\\\" />\n </dd>\n</dl>\n</div>\n<!-- END datalist_entry -->\n '),\n('data_template_thickbox',\n'<!-- BEGIN thickbox -->\n<dl class=\\\"data_module\\\">\n <dt><h6 style=\\\"margin-bottom:10px;\\\">[[TITLE]]</h6></dt>\n <dd style=\\\"clear:left;\\\">\n <!-- BEGIN image -->\n <img src=\\\"[[PICTURE]]\\\" style=\\\"float: left; margin-right: 5px;\\\" />\n <!-- END image -->\n [[CONTENT]]\n <!-- BEGIN attachment -->\n <img src=\\\"/themes/default/images/arrow.gif\\\" width=\\\"16\\\" height=\\\"8\\\" />\n <a href=\\\"javascript:void(0);\\\" onclick=\\\"window.open(\\'[[HREF]]\\', \\'attachment\\');\\\">[[TXT_DOWNLOAD]]</a>\n <!-- END attachment -->\n </dd>\n</dl>\n<!--<br /><img src=\\\"/themes/default/images/arrow.gif\\\" width=\\\"16\\\" height=\\\"8\\\" /><a onclick=\\\"Javascript:window.print();\\\" style=\\\"cursor:pointer;\\\">Drucken</a>-->\n<!-- END thickbox -->\n'),\n('data_thickbox_height', '450'),\n('data_thickbox_width', '400'),\n('data_voting_activated', '0');\n"; /////////////////////////////////////////////////////////////////// // data module settings // /////////////////////////////////////////////////////////////////// $query = "SELECT COUNT(*) AS recordcount FROM `" . DBPREFIX . "module_data_settings`"; $objResult = $objDatabase->Execute($query); if ($objResult === false) { return _databaseError($query, $objDatabase->ErrorMsg()); } if ($objResult->fields['recordcount'] == 0) { // module_data_settings table is empty. Fill it with default data. if (!$objDatabase->Execute($settings_query)) { return _databaseError($settings_query, $objDatabase->ErrorMsg()); } } /********************************************************* * EXTENSION: Thunbmail Image & Attachment description * * ADDED: Contrexx v2.1.0 * *********************************************************/ try { \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_data_messages_lang', array('message_id' => array('type' => 'INT(6)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'primary' => true), 'lang_id' => array('type' => 'INT(2)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'primary' => true), 'is_active' => array('type' => 'ENUM(\'0\',\'1\')', 'default' => '1'), 'subject' => array('type' => 'VARCHAR(250)', 'default' => ''), 'content' => array('type' => 'text'), 'tags' => array('type' => 'VARCHAR(250)', 'default' => ''), 'image' => array('type' => 'VARCHAR(250)', 'default' => ''), 'thumbnail' => array('type' => 'VARCHAR(250)'), 'thumbnail_type' => array('type' => 'ENUM(\'original\',\'thumbnail\')', 'default' => 'original', 'after' => 'thumbnail'), 'thumbnail_width' => array('type' => 'TINYINT(3)', 'unsigned' => true, 'notnull' => true, 'default' => '0'), 'thumbnail_height' => array('type' => 'TINYINT(3)', 'unsigned' => true, 'notnull' => true, 'default' => '0'), 'attachment' => array('type' => 'VARCHAR(255)', 'default' => ''), 'attachment_description' => array('type' => 'VARCHAR(255)', 'default' => ''), 'mode' => array('type' => 'SET(\'normal\',\'forward\')', 'default' => 'normal'), 'forward_url' => array('type' => 'VARCHAR(255)', 'default' => ''), 'forward_target' => array('type' => 'VARCHAR(40)', 'notnull' => false)), array(), 'InnoDB'); } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } return true; }
/** * Cloudrexx * * @link http://www.cloudrexx.com * @copyright Cloudrexx AG 2007-2015 * * According to our dual licensing model, this program can be used either * under the terms of the GNU Affero General Public License, version 3, * or under a proprietary license. * * The texts of the GNU Affero General Public License with an additional * permission and of our proprietary license can be found at and * in the LICENSE file you have received along with this program. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * "Cloudrexx" is a registered trademark of Cloudrexx AG. * The licensing of the program under the AGPLv3 does not imply a * trademark license. Therefore any rights, title and interest in * our trademarks remain entirely with us. */ function _votingUpdate() { try { \Cx\Lib\UpdateUtil::table(DBPREFIX . 'voting_system', array('id' => array('type' => 'INT', 'notnull' => true, 'primary' => true, 'auto_increment' => true), 'date' => array('type' => 'TIMESTAMP', 'notnull' => true, 'default_expr' => 'CURRENT_TIMESTAMP'), 'title' => array('type' => 'VARCHAR(60)', 'notnull' => true, 'default' => '', 'renamefrom' => 'name'), 'question' => array('type' => 'TEXT', 'notnull' => false), 'status' => array('type' => 'TINYINT(1)', 'notnull' => false, 'default' => 1), 'votes' => array('type' => 'INT(11)', 'notnull' => false, 'default' => 0), 'submit_check' => array('type' => "ENUM('cookie','email')", 'notnull' => true, 'default' => 'cookie'), 'additional_nickname' => array('type' => 'TINYINT(1)', 'notnull' => true, 'default' => 0), 'additional_forename' => array('type' => 'TINYINT(1)', 'notnull' => true, 'default' => 0), 'additional_surname' => array('type' => 'TINYINT(1)', 'notnull' => true, 'default' => 0), 'additional_phone' => array('type' => 'TINYINT(1)', 'notnull' => true, 'default' => 0), 'additional_street' => array('type' => 'TINYINT(1)', 'notnull' => true, 'default' => 0), 'additional_zip' => array('type' => 'TINYINT(1)', 'notnull' => true, 'default' => 0), 'additional_email' => array('type' => 'TINYINT(1)', 'notnull' => true, 'default' => 0), 'additional_city' => array('type' => 'TINYINT(1)', 'notnull' => true, 'default' => 0), 'additional_comment' => array('type' => 'TINYINT(1)', 'notnull' => true, 'default' => 0))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'voting_additionaldata', array('id' => array('type' => 'INT(11)', 'notnull' => true, 'auto_increment' => true, 'primary' => true), 'nickname' => array('type' => 'VARCHAR(80)', 'notnull' => true, 'default' => '', 'renamefrom' => 'name'), 'surname' => array('type' => 'VARCHAR(80)', 'notnull' => true, 'default' => ''), 'phone' => array('type' => 'VARCHAR(80)', 'notnull' => true, 'default' => ''), 'street' => array('type' => 'VARCHAR(80)', 'notnull' => true, 'default' => ''), 'zip' => array('type' => 'VARCHAR(30)', 'notnull' => true, 'default' => ''), 'city' => array('type' => 'VARCHAR(80)', 'notnull' => true, 'default' => ''), 'email' => array('type' => 'VARCHAR(80)', 'notnull' => true, 'default' => ''), 'comment' => array('type' => 'TEXT', 'after' => 'email'), 'voting_system_id' => array('type' => 'INT(11)', 'notnull' => true, 'default' => '0', 'renamefrom' => 'voting_sytem_id'), 'date_entered' => array('type' => 'TIMESTAMP', 'notnull' => true, 'default_expr' => 'CURRENT_TIMESTAMP', 'on_update' => 'CURRENT_TIMESTAMP'), 'forename' => array('type' => 'VARCHAR(80)', 'notnull' => true, 'default' => '')), array('voting_system_id' => array('fields' => array('voting_system_id')))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'voting_email', array('id' => array('type' => 'INT(10)', 'unsigned' => true, 'notnull' => true, 'auto_increment' => true, 'primary' => true), 'email' => array('type' => 'VARCHAR(255)'), 'valid' => array('type' => 'ENUM(\'0\',\'1\')', 'notnull' => true, 'default' => '0')), array('email' => array('fields' => array('email'), 'type' => 'UNIQUE'))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'voting_rel_email_system', array('email_id' => array('type' => 'INT(10)', 'unsigned' => true, 'notnull' => true, 'default' => '0'), 'system_id' => array('type' => 'INT(10)', 'unsigned' => true, 'notnull' => true, 'default' => '0'), 'voting_id' => array('type' => 'INT(10)', 'unsigned' => true, 'notnull' => true, 'default' => '0'), 'valid' => array('type' => 'ENUM(\'0\',\'1\')', 'notnull' => true, 'default' => '0')), array('email_id' => array('fields' => array('email_id', 'system_id'), 'type' => 'UNIQUE'))); } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } return true; }
/** * Cloudrexx * * @link http://www.cloudrexx.com * @copyright Cloudrexx AG 2007-2015 * * According to our dual licensing model, this program can be used either * under the terms of the GNU Affero General Public License, version 3, * or under a proprietary license. * * The texts of the GNU Affero General Public License with an additional * permission and of our proprietary license can be found at and * in the LICENSE file you have received along with this program. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * "Cloudrexx" is a registered trademark of Cloudrexx AG. * The licensing of the program under the AGPLv3 does not imply a * trademark license. Therefore any rights, title and interest in * our trademarks remain entirely with us. */ function _auctionUpdate() { try { // delete obsolete table contrexx_module_auction_access \Cx\Lib\UpdateUtil::drop_table(DBPREFIX . 'module_auction_access'); } catch (\Cx\Lib\UpdateException $e) { // we COULD do something else here.. DBG::trace(); return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } return true; }
/** * Cloudrexx * * @link http://www.cloudrexx.com * @copyright Cloudrexx AG 2007-2015 * * According to our dual licensing model, this program can be used either * under the terms of the GNU Affero General Public License, version 3, * or under a proprietary license. * * The texts of the GNU Affero General Public License with an additional * permission and of our proprietary license can be found at and * in the LICENSE file you have received along with this program. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * "Cloudrexx" is a registered trademark of Cloudrexx AG. * The licensing of the program under the AGPLv3 does not imply a * trademark license. Therefore any rights, title and interest in * our trademarks remain entirely with us. */ function _searchUpdate() { /********************************************************* * EXTENSION: Change name of HTML_Template_Sigma block * * ADDED: Contrexx v3.0.0 * *********************************************************/ try { \Cx\Lib\UpdateUtil::migrateContentPage('search', null, 'searchrow', 'search_result', '3.0.0'); } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } }
/** * Cloudrexx * * @link http://www.cloudrexx.com * @copyright Cloudrexx AG 2007-2015 * * According to our dual licensing model, this program can be used either * under the terms of the GNU Affero General Public License, version 3, * or under a proprietary license. * * The texts of the GNU Affero General Public License with an additional * permission and of our proprietary license can be found at and * in the LICENSE file you have received along with this program. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * "Cloudrexx" is a registered trademark of Cloudrexx AG. * The licensing of the program under the AGPLv3 does not imply a * trademark license. Therefore any rights, title and interest in * our trademarks remain entirely with us. */ function _downloadsUpdate() { global $objDatabase, $_ARRAYLANG, $_CORELANG; try { \Cx\Lib\UpdateUtil::sql("UPDATE " . DBPREFIX . "module_downloads_download_locale l SET\n l.source = (SELECT source FROM " . DBPREFIX . "module_downloads_download d WHERE d.id = l.download_id),\n l.source_name = (SELECT source_name FROM " . DBPREFIX . "module_downloads_download d WHERE d.id = l.download_id);"); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_downloads_download', array('id' => array('type' => 'INT(10)', 'unsigned' => true, 'notnull' => true, 'auto_increment' => true), 'type' => array('type' => 'ENUM(\'file\',\'url\')', 'notnull' => true, 'default' => 'file', 'after' => 'id'), 'mime_type' => array('type' => 'ENUM(\'image\',\'document\',\'pdf\',\'media\',\'archive\',\'application\',\'link\')', 'notnull' => true, 'default' => 'image', 'after' => 'type'), 'icon' => array('type' => 'ENUM(\'_blank\',\'avi\',\'bmp\',\'css\',\'doc\',\'dot\',\'exe\',\'fla\',\'gif\',\'htm\',\'html\',\'inc\',\'jpg\',\'js\',\'mp3\',\'nfo\',\'pdf\',\'php\',\'png\',\'pps\',\'ppt\',\'rar\',\'swf\',\'txt\',\'wma\',\'xls\',\'zip\')', 'notnull' => true, 'default' => '_blank', 'after' => 'source_name'), 'size' => array('type' => 'INT(10)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'after' => 'icon'), 'image' => array('type' => 'VARCHAR(255)', 'notnull' => true, 'default' => '', 'after' => 'size'), 'owner_id' => array('type' => 'INT(5)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'after' => 'image'), 'access_id' => array('type' => 'INT(10)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'after' => 'owner_id'), 'license' => array('type' => 'VARCHAR(255)', 'notnull' => true, 'default' => '', 'after' => 'access_id'), 'version' => array('type' => 'VARCHAR(10)', 'notnull' => true, 'default' => '', 'after' => 'license'), 'author' => array('type' => 'VARCHAR(100)', 'notnull' => true, 'default' => '', 'after' => 'version'), 'website' => array('type' => 'VARCHAR(255)', 'notnull' => true, 'default' => '', 'after' => 'author'), 'ctime' => array('type' => 'INT(14)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'after' => 'website'), 'mtime' => array('type' => 'INT(14)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'after' => 'ctime'), 'is_active' => array('type' => 'TINYINT(3)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'after' => 'mtime'), 'visibility' => array('type' => 'TINYINT(1)', 'unsigned' => true, 'notnull' => true, 'default' => '1', 'after' => 'is_active'), 'order' => array('type' => 'INT(3)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'after' => 'visibility'), 'views' => array('type' => 'INT(10)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'after' => 'order'), 'download_count' => array('type' => 'INT(10)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'after' => 'views'), 'expiration' => array('type' => 'INT(14)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'after' => 'download_count'), 'validity' => array('type' => 'INT(10)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'after' => 'expiration')), array('is_active' => array('fields' => array('is_active')), 'visibility' => array('fields' => array('visibility')))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_downloads_download_locale', array('lang_id' => array('type' => 'INT(11)', 'unsigned' => true, 'notnull' => true, 'default' => '0'), 'download_id' => array('type' => 'INT(11)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'after' => 'lang_id'), 'name' => array('type' => 'VARCHAR(255)', 'notnull' => true, 'default' => '', 'after' => 'download_id'), 'source' => array('type' => 'VARCHAR(255)', 'after' => 'name'), 'source_name' => array('type' => 'VARCHAR(255)', 'after' => 'source'), 'description' => array('type' => 'text', 'after' => 'source_name')), array('name' => array('fields' => array('name'), 'type' => 'FULLTEXT'), 'description' => array('fields' => array('description'), 'type' => 'FULLTEXT'))); } catch (\Cx\Lib\UpdateException $e) { // we COULD do something else here.. return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } return true; }
function _galleryUpdate() { global $objDatabase, $_ARRAYLANG; try { \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_gallery_categories', array('id' => array('type' => 'INT(11)', 'notnull' => true, 'auto_increment' => true, 'primary' => true), 'pid' => array('type' => 'INT(11)', 'notnull' => true, 'default' => '0'), 'sorting' => array('type' => 'INT(6)', 'notnull' => true, 'default' => '0'), 'status' => array('type' => 'SET(\'0\',\'1\')', 'notnull' => true, 'default' => '1'), 'comment' => array('type' => 'SET(\'0\',\'1\')', 'notnull' => true, 'default' => '0'), 'voting' => array('type' => 'SET(\'0\',\'1\')', 'notnull' => true, 'default' => '0'), 'backendProtected' => array('type' => 'INT(11)', 'notnull' => true, 'default' => '0'), 'backend_access_id' => array('type' => 'INT(11)', 'notnull' => true, 'default' => '0'), 'frontendProtected' => array('type' => 'INT(11)', 'notnull' => true, 'default' => '0'), 'frontend_access_id' => array('type' => 'INT(11)', 'notnull' => true, 'default' => '0'))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_gallery_pictures', array('id' => array('type' => 'INT(11)', 'notnull' => true, 'auto_increment' => true, 'primary' => true), 'catid' => array('type' => 'INT(11)', 'notnull' => true, 'default' => '0'), 'validated' => array('type' => 'SET(\'0\',\'1\')', 'notnull' => true, 'default' => '0'), 'status' => array('type' => 'SET(\'0\',\'1\')', 'notnull' => true, 'default' => '1'), 'catimg' => array('type' => 'SET(\'0\',\'1\')', 'notnull' => true, 'default' => '0'), 'sorting' => array('type' => 'INT(6) UNSIGNED', 'notnull' => true, 'default' => '999'), 'size_show' => array('type' => 'SET(\'0\',\'1\')', 'notnull' => true, 'default' => '1'), 'path' => array('type' => 'TEXT', 'notnull' => true), 'link' => array('type' => 'TEXT', 'notnull' => true), 'lastedit' => array('type' => 'INT(14)', 'notnull' => true, 'default' => '0'), 'size_type' => array('type' => "SET('abs', 'proz')", 'notnull' => true, 'default' => 'proz'), 'size_proz' => array('type' => "INT(3)", 'notnull' => true, 'default' => '0'), 'size_abs_h' => array('type' => 'INT(11)', 'notnull' => true, 'default' => '0'), 'size_abs_w' => array('type' => 'INT(11)', 'notnull' => true, 'default' => '0'), 'quality' => array('type' => 'TINYINT(3)', 'notnull' => true, 'default' => '0')), array('galleryPicturesIndex' => array('type' => 'FULLTEXT', 'fields' => array('path')))); } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } $arrSettings = array('1' => array('name' => 'max_images_upload', 'value' => '10'), '2' => array('name' => 'standard_quality', 'value' => '95'), '3' => array('name' => 'standard_size_proz', 'value' => '25'), '4' => array('name' => 'standard_width_abs', 'value' => '140'), '6' => array('name' => 'standard_height_abs', 'value' => '0'), '7' => array('name' => 'standard_size_type', 'value' => 'abs'), '8' => array('name' => 'validation_show_limit', 'value' => '10'), '9' => array('name' => 'validation_standard_type', 'value' => 'all'), '11' => array('name' => 'show_names', 'value' => 'off'), '12' => array('name' => 'quality', 'value' => '95'), '13' => array('name' => 'show_comments', 'value' => 'off'), '14' => array('name' => 'show_voting', 'value' => 'off'), '15' => array('name' => 'enable_popups', 'value' => 'on'), '16' => array('name' => 'image_width', 'value' => '1200'), '17' => array('name' => 'paging', 'value' => '30'), '18' => array('name' => 'show_latest', 'value' => 'on'), '19' => array('name' => 'show_random', 'value' => 'on'), '20' => array('name' => 'header_type', 'value' => 'hierarchy'), '21' => array('name' => 'show_ext', 'value' => 'off'), '22' => array('name' => 'show_file_name', 'value' => 'on'), '23' => array('name' => 'slide_show', 'value' => 'slideshow'), '24' => array('name' => 'slide_show_seconds', 'value' => '3')); foreach ($arrSettings as $id => $arrSetting) { $query = "SELECT 1 FROM `" . DBPREFIX . "module_gallery_settings` WHERE `name`= '" . $arrSetting['name'] . "'"; if (($objRS = $objDatabase->Execute($query)) === false) { return _databaseError($query, $objDatabase->ErrorMsg()); } if ($objRS->RecordCount() == 0) { $query = "\n INSERT INTO `" . DBPREFIX . "module_gallery_settings` (`id`, `name`, `value`)\n VALUES (" . $id . ", '" . $arrSetting['name'] . "', '" . $arrSetting['value'] . "')\n ON DUPLICATE KEY UPDATE `id` = `id`\n "; if ($objDatabase->Execute($query) === false) { return _databaseError($query, $objDatabase->ErrorMsg()); } } } /************************************************************************** * EXTENSION: cleanup: delete translations, comments and * * votes of inexisting pictures * * ADDED: Contrexx v3.0.1 * **************************************************************************/ try { \Cx\Lib\UpdateUtil::sql(' DELETE `language_pics` FROM `' . DBPREFIX . 'module_gallery_language_pics` as `language_pics` LEFT JOIN `' . DBPREFIX . 'module_gallery_pictures` as `pictures` ON `pictures`.`id` = `language_pics`.`picture_id` WHERE `pictures`.`id` IS NULL '); \Cx\Lib\UpdateUtil::sql(' DELETE `comments` FROM `' . DBPREFIX . 'module_gallery_comments` as `comments` LEFT JOIN `' . DBPREFIX . 'module_gallery_pictures` as `pictures` ON `pictures`.`id` = `comments`.`picid` WHERE `pictures`.`id` IS NULL '); \Cx\Lib\UpdateUtil::sql(' DELETE `votes` FROM `' . DBPREFIX . 'module_gallery_votes` as `votes` LEFT JOIN `' . DBPREFIX . 'module_gallery_pictures` as `pictures` ON `pictures`.`id` = `votes`.`picid` WHERE `pictures`.`id` IS NULL '); } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } // remove the script tag at the beginning of the gallery page \Cx\Lib\UpdateUtil::migrateContentPageUsingRegex(array('module' => 'gallery'), '/^\\s*(<script[^>]+>.+?Shadowbox.+?<\\/script>)+/sm', '', array('content'), '3.0.3'); return true; }
function ecardUpdates() { //Update database changes try { //update module name \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "modules` SET `name` = 'Ecard' WHERE `id` = 49"); //update navigation url \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Ecard' WHERE `area_id` = 130"); //Insert component entry \Cx\Lib\UpdateUtil::sql("INSERT INTO `" . DBPREFIX . "component` (`id`, `name`, `type`) VALUES ('49', 'Ecard', 'module')"); //update module name for frontend pages \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "content_page` SET `module` = 'Ecard' WHERE `module` = 'ecard'"); } catch (\Cx\Lib\UpdateException $e) { return "Error: {$e->sql}"; } //Update script for moving the folders $imgModulesfolderPath = ASCMS_DOCUMENT_ROOT . '/images/modules/ecard'; $mediafolderPath = ASCMS_DOCUMENT_ROOT . '/media/Ecard'; try { if (!file_exists($mediafolderPath)) { \Cx\Lib\FileSystem\FileSystem::make_folder($mediafolderPath); \Cx\Lib\FileSystem\FileSystem::makeWritable($mediafolderPath); } //move the folder from '/images/modules/ecard/ecards_optimized' to '/media/Ecard/ecards_optimized' if (file_exists($imgModulesfolderPath . '/ecards_optimized') && !file_exists($mediafolderPath . '/ecards_optimized')) { \Cx\Lib\FileSystem\FileSystem::makeWritable($imgModulesfolderPath . '/ecards_optimized'); if (!\Cx\Lib\FileSystem\FileSystem::move($imgModulesfolderPath . '/ecards_optimized', $mediafolderPath . '/ecards_optimized')) { return 'Failed to Move the folders from ' . $imgModulesfolderPath . '/ecards_optimized to ' . $mediafolderPath . '/ecards_optimized.'; } } //move the folder from '/images/modules/ecard/send_ecards' to '/media/Ecard/send_ecards' if (file_exists($imgModulesfolderPath . '/send_ecards') && !file_exists($mediafolderPath . '/send_ecards')) { \Cx\Lib\FileSystem\FileSystem::makeWritable($imgModulesfolderPath . '/send_ecards'); if (!\Cx\Lib\FileSystem\FileSystem::move($imgModulesfolderPath . '/send_ecards', $mediafolderPath . '/send_ecards')) { return 'Failed to Move the folders from ' . $imgModulesfolderPath . '/send_ecards to ' . $mediafolderPath . '/send_ecards.'; } } //move the folder from '/images/modules/ecard/thumbnails' to '/media/Ecard/thumbnails' if (file_exists($imgModulesfolderPath . '/thumbnails') && !file_exists($mediafolderPath . '/thumbnails')) { \Cx\Lib\FileSystem\FileSystem::makeWritable($imgModulesfolderPath . '/thumbnails'); if (!\Cx\Lib\FileSystem\FileSystem::move($imgModulesfolderPath . '/thumbnails', $mediafolderPath . '/thumbnails')) { return 'Failed to Move the folders from ' . $imgModulesfolderPath . '/thumbnails to ' . $mediafolderPath . '/thumbnails.'; } } return 'Successfully updated.'; } catch (\Cx\Lib\FileSystem\FileSystemException $e) { return $e->getMessage(); } }
/** * Cloudrexx * * @link http://www.cloudrexx.com * @copyright Cloudrexx AG 2007-2015 * * According to our dual licensing model, this program can be used either * under the terms of the GNU Affero General Public License, version 3, * or under a proprietary license. * * The texts of the GNU Affero General Public License with an additional * permission and of our proprietary license can be found at and * in the LICENSE file you have received along with this program. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * "Cloudrexx" is a registered trademark of Cloudrexx AG. * The licensing of the program under the AGPLv3 does not imply a * trademark license. Therefore any rights, title and interest in * our trademarks remain entirely with us. */ function _updateModules() { global $objDatabase; $arrModules = getModules(); try { \Cx\Lib\UpdateUtil::sql('TRUNCATE TABLE `' . DBPREFIX . 'modules`'); // NOTE: scheme migration is done in core/core.php // add modules foreach ($arrModules as $arrModule) { \Cx\Lib\UpdateUtil::sql("INSERT INTO " . DBPREFIX . "modules ( `id` , `name` , `description_variable` , `status` , `is_required` , `is_core` , `is_active`, `distributor` ) VALUES ( " . $arrModule['id'] . " , '" . $arrModule['name'] . "', '" . $arrModule['description_variable'] . "', '" . $arrModule['status'] . "', '" . $arrModule['is_required'] . "', '" . $arrModule['is_core'] . "', " . $arrModule['is_active'] . ", 'Comvation AG') ON DUPLICATE KEY UPDATE `id` = `id`"); } } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } return true; }
function _updateBackendAreas() { global $objDatabase, $objUpdate, $_CONFIG; $arrBackendAreas = array(array('area_id' => 1, 'parent_area_id' => 0, 'type' => 'group', 'scope' => 'backend', 'area_name' => 'TXT_CONTENT_MANAGEMENT', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 2, 'access_id' => 1), array('area_id' => 2, 'parent_area_id' => 0, 'type' => 'group', 'scope' => 'backend', 'area_name' => 'TXT_MODULE', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 6, 'access_id' => 2), array('area_id' => 3, 'parent_area_id' => 0, 'type' => 'group', 'scope' => 'backend', 'area_name' => 'TXT_ADMINISTRATION', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 8, 'access_id' => 3), array('area_id' => 8, 'parent_area_id' => 0, 'type' => 'group', 'scope' => 'backend', 'area_name' => 'TXT_CORE_ECOMMERCE', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 4, 'access_id' => 4), array('area_id' => 15, 'parent_area_id' => 0, 'type' => 'group', 'scope' => 'backend', 'area_name' => 'TXT_CORE_MEDIA', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 3, 'access_id' => 162), array('area_id' => 28, 'parent_area_id' => 0, 'type' => 'group', 'scope' => 'backend', 'area_name' => 'TXT_CORE_STATS', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 7, 'access_id' => 163), array('area_id' => 29, 'parent_area_id' => 0, 'type' => 'group', 'scope' => 'backend', 'area_name' => 'TXT_CORE_EMAIL_MARKETING', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 5, 'access_id' => 152), array('area_id' => 188, 'parent_area_id' => 0, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'Nettools', 'is_active' => 1, 'uri' => 'index.php?cmd=nettools', 'target' => '_self', 'module_id' => 32, 'order_id' => 0, 'access_id' => 0), array('area_id' => 177, 'parent_area_id' => 0, 'type' => 'function', 'scope' => 'global', 'area_name' => 'Json Adapter', 'is_active' => 1, 'uri' => 'index.php?cmd=jsondata', 'target' => '_self', 'module_id' => 63, 'order_id' => 0, 'access_id' => 0), array('area_id' => 178, 'parent_area_id' => 0, 'type' => 'function', 'scope' => 'global', 'area_name' => 'File Browser', 'is_active' => 1, 'uri' => 'index.php?cmd=fileBrowser', 'target' => '_self', 'module_id' => 26, 'order_id' => 0, 'access_id' => 0), array('area_id' => 180, 'parent_area_id' => 0, 'type' => 'function', 'scope' => 'global', 'area_name' => 'TXT_SEARCH', 'is_active' => 1, 'uri' => 'index.php?cmd=search', 'target' => '_self', 'module_id' => 5, 'order_id' => 0, 'access_id' => 0), array('area_id' => 181, 'parent_area_id' => 0, 'type' => 'function', 'scope' => 'global', 'area_name' => 'TXT_UPLOAD', 'is_active' => 1, 'uri' => 'index.php?cmd=upload', 'target' => '_self', 'module_id' => 52, 'order_id' => 0, 'access_id' => 0), array('area_id' => 183, 'parent_area_id' => 0, 'type' => 'function', 'scope' => 'global', 'area_name' => 'TXT_LOGOUT', 'is_active' => 1, 'uri' => 'index.php?cmd=logout', 'target' => '_self', 'module_id' => 67, 'order_id' => 0, 'access_id' => 0), array('area_id' => 184, 'parent_area_id' => 0, 'type' => 'group', 'scope' => 'backend', 'area_name' => 'TXT_HOME', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 1, 'order_id' => 1, 'access_id' => 0), array('area_id' => 5, 'parent_area_id' => 1, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_NEW_PAGE', 'is_active' => 1, 'uri' => 'index.php?cmd=content&act=new', 'target' => '_self', 'module_id' => 1, 'order_id' => 1, 'access_id' => 5), array('area_id' => 6, 'parent_area_id' => 1, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_CONTENT_MANAGER', 'is_active' => 1, 'uri' => 'index.php?cmd=content', 'target' => '_self', 'module_id' => 1, 'order_id' => 2, 'access_id' => 6), array('area_id' => 10, 'parent_area_id' => 1, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_NEWS_MANAGER', 'is_active' => 1, 'uri' => 'index.php?cmd=news', 'target' => '_self', 'module_id' => 8, 'order_id' => 4, 'access_id' => 10), array('area_id' => 75, 'parent_area_id' => 1, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_CONTENT_HISTORY', 'is_active' => 1, 'uri' => 'index.php?cmd=workflow', 'target' => '_self', 'module_id' => 1, 'order_id' => 3, 'access_id' => 75), array('area_id' => 76, 'parent_area_id' => 1, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_BLOCK_SYSTEM', 'is_active' => 1, 'uri' => 'index.php?cmd=block', 'target' => '_self', 'module_id' => 7, 'order_id' => 7, 'access_id' => 76), array('area_id' => 90, 'parent_area_id' => 1, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_CONTACTS', 'is_active' => 1, 'uri' => 'index.php?cmd=contact', 'target' => '_self', 'module_id' => 6, 'order_id' => 5, 'access_id' => 84), array('area_id' => 9, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_GUESTBOOK', 'is_active' => 1, 'uri' => 'index.php?cmd=guestbook', 'target' => '_self', 'module_id' => 10, 'order_id' => 0, 'access_id' => 9), array('area_id' => 11, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_DOC_SYS_MANAGER', 'is_active' => 1, 'uri' => 'index.php?cmd=docsys', 'target' => '_self', 'module_id' => 19, 'order_id' => 0, 'access_id' => 11), array('area_id' => 12, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_THUMBNAIL_GALLERY', 'is_active' => 1, 'uri' => 'index.php?cmd=gallery', 'target' => '_self', 'module_id' => 3, 'order_id' => 0, 'access_id' => 12), array('area_id' => 14, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_VOTING', 'is_active' => 1, 'uri' => 'index.php?cmd=voting', 'target' => '_self', 'module_id' => 17, 'order_id' => 0, 'access_id' => 14), array('area_id' => 16, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_CALENDAR', 'is_active' => 1, 'uri' => 'index.php?cmd=calendar', 'target' => '_self', 'module_id' => 21, 'order_id' => 0, 'access_id' => 16), array('area_id' => 27, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_NEWS_SYNDICATION', 'is_active' => 1, 'uri' => 'index.php?cmd=feed', 'target' => '_self', 'module_id' => 22, 'order_id' => 0, 'access_id' => 27), array('area_id' => 59, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_LINKS_MODULE_DESCRIPTION', 'is_active' => 1, 'uri' => 'index.php?cmd=directory', 'target' => '_self', 'module_id' => 12, 'order_id' => 0, 'access_id' => 59), array('area_id' => 64, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_RECOMMEND', 'is_active' => 1, 'uri' => 'index.php?cmd=recommend', 'target' => '_self', 'module_id' => 27, 'order_id' => 0, 'access_id' => 64), array('area_id' => 82, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_LIVECAM', 'is_active' => 1, 'uri' => 'index.php?cmd=livecam', 'target' => '_self', 'module_id' => 30, 'order_id' => 0, 'access_id' => 82), array('area_id' => 89, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_MEMBERDIR', 'is_active' => 1, 'uri' => 'index.php?cmd=memberdir', 'target' => '_self', 'module_id' => 31, 'order_id' => 0, 'access_id' => 83), array('area_id' => 93, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_PODCAST', 'is_active' => 1, 'uri' => 'index.php?cmd=podcast', 'target' => '_self', 'module_id' => 35, 'order_id' => 0, 'access_id' => 87), array('area_id' => 98, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_MARKET_MODULE_DESCRIPTION', 'is_active' => 1, 'uri' => 'index.php?cmd=market', 'target' => '_self', 'module_id' => 33, 'order_id' => 0, 'access_id' => 98), array('area_id' => 106, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_FORUM', 'is_active' => 1, 'uri' => 'index.php?cmd=forum', 'target' => '_self', 'module_id' => 20, 'order_id' => 0, 'access_id' => 106), array('area_id' => 109, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_EGOVERNMENT', 'is_active' => 1, 'uri' => 'index.php?cmd=egov', 'target' => '_self', 'module_id' => 38, 'order_id' => 0, 'access_id' => 109), array('area_id' => 119, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_BLOG_MODULE', 'is_active' => 1, 'uri' => 'index.php?cmd=blog', 'target' => '_self', 'module_id' => 47, 'order_id' => 0, 'access_id' => 119), array('area_id' => 128, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_DATA_MODULE', 'is_active' => 1, 'uri' => 'index.php?cmd=data', 'target' => '_self', 'module_id' => 48, 'order_id' => 0, 'access_id' => 146), array('area_id' => 130, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_ECARD', 'is_active' => 1, 'uri' => 'index.php?cmd=ecard', 'target' => '_self', 'module_id' => 49, 'order_id' => 0, 'access_id' => 151), array('area_id' => 134, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_U2U_MODULE', 'is_active' => 1, 'uri' => 'index.php?cmd=u2u', 'target' => '_self', 'module_id' => 54, 'order_id' => 0, 'access_id' => 149), array('area_id' => 135, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_KNOWLEDGE', 'is_active' => 1, 'uri' => 'index.php?cmd=knowledge', 'target' => '_self', 'module_id' => 56, 'order_id' => 0, 'access_id' => 129), array('area_id' => 141, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_JOBS_MODULE', 'is_active' => 1, 'uri' => 'index.php?cmd=jobs', 'target' => '_self', 'module_id' => 57, 'order_id' => 0, 'access_id' => 148), array('area_id' => 153, 'parent_area_id' => 2, 'type' => 'navigation', 'scope' => 'global', 'area_name' => 'TXT_MEDIADIR_MODULE', 'is_active' => 1, 'uri' => 'index.php?cmd=mediadir', 'target' => '_self', 'module_id' => 60, 'order_id' => 0, 'access_id' => 153), array('area_id' => 163, 'parent_area_id' => 3, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_SYSTEM_LOGS', 'is_active' => 1, 'uri' => 'index.php?cmd=log', 'target' => '_self', 'module_id' => 1, 'order_id' => 10, 'access_id' => 55), array('area_id' => 17, 'parent_area_id' => 3, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_SYSTEM_SETTINGS', 'is_active' => 1, 'uri' => 'index.php?cmd=settings', 'target' => '_self', 'module_id' => 1, 'order_id' => 1, 'access_id' => 17), array('area_id' => 18, 'parent_area_id' => 3, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_USER_ADMINISTRATION', 'is_active' => 1, 'uri' => 'index.php?cmd=access', 'target' => '_self', 'module_id' => 1, 'order_id' => 3, 'access_id' => 18), array('area_id' => 20, 'parent_area_id' => 3, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_DATABASE_MANAGER', 'is_active' => 1, 'uri' => 'index.php?cmd=dbm', 'target' => '_self', 'module_id' => 1, 'order_id' => 8, 'access_id' => 20), array('area_id' => 21, 'parent_area_id' => 3, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_DESIGN_MANAGEMENT', 'is_active' => 1, 'uri' => 'index.php?cmd=skins', 'target' => '_self', 'module_id' => 1, 'order_id' => 4, 'access_id' => 21), array('area_id' => 22, 'parent_area_id' => 3, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_LANGUAGE_SETTINGS', 'is_active' => 1, 'uri' => 'index.php?cmd=language', 'target' => '_self', 'module_id' => 64, 'order_id' => 5, 'access_id' => 22), array('area_id' => 23, 'parent_area_id' => 3, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_MODULE_MANAGER', 'is_active' => 1, 'uri' => 'index.php?cmd=modulemanager', 'target' => '_self', 'module_id' => 1, 'order_id' => 6, 'access_id' => 23), array('area_id' => 24, 'parent_area_id' => 3, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_SERVER_INFO', 'is_active' => 1, 'uri' => 'index.php?cmd=server', 'target' => '_self', 'module_id' => 1, 'order_id' => 9, 'access_id' => 24), array('area_id' => 110, 'parent_area_id' => 3, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_ALIAS_ADMINISTRATION', 'is_active' => 1, 'uri' => 'index.php?cmd=alias', 'target' => '_self', 'module_id' => 41, 'order_id' => 7, 'access_id' => 115), array('area_id' => 182, 'parent_area_id' => 3, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_LICENSE', 'is_active' => 1, 'uri' => 'index.php?cmd=license', 'target' => '_self', 'module_id' => 66, 'order_id' => 2, 'access_id' => 0), array('area_id' => 127, 'parent_area_id' => 5, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_NEW_PAGE_ON_FIRST_LEVEL', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 1, 'order_id' => 1, 'access_id' => 127), array('area_id' => 26, 'parent_area_id' => 6, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_DELETE_PAGES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 26), array('area_id' => 35, 'parent_area_id' => 6, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_EDIT_PAGES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 35), array('area_id' => 36, 'parent_area_id' => 6, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_ACCESS_CONTROL', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 36), array('area_id' => 53, 'parent_area_id' => 6, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_COPY_DELETE_SITES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 53), array('area_id' => 161, 'parent_area_id' => 6, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_MOVE_NODE', 'is_active' => 1, 'uri' => 'index.php?cmd=content', 'target' => '_self', 'module_id' => 1, 'order_id' => 8, 'access_id' => 160), array('area_id' => 38, 'parent_area_id' => 7, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_MODIFY_MEDIA_FILES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 38), array('area_id' => 39, 'parent_area_id' => 7, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_UPLOAD_MEDIA_FILES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 39), array('area_id' => 13, 'parent_area_id' => 8, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_SHOP', 'is_active' => 1, 'uri' => 'index.php?cmd=shop', 'target' => '_self', 'module_id' => 16, 'order_id' => 1, 'access_id' => 13), array('area_id' => 162, 'parent_area_id' => 8, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_CHECKOUT_MODULE', 'is_active' => 1, 'uri' => 'index.php?cmd=checkout', 'target' => '_self', 'module_id' => 62, 'order_id' => 2, 'access_id' => 161), array('area_id' => 152, 'parent_area_id' => 10, 'type' => 'function', 'scope' => 'frontend', 'area_name' => 'TXT_SUBMIT_NEWS', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 8, 'order_id' => 0, 'access_id' => 61), array('area_id' => 65, 'parent_area_id' => 12, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_GALLERY_MENU_OVERVIEW', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 3, 'order_id' => 1, 'access_id' => 65), array('area_id' => 66, 'parent_area_id' => 12, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_GALLERY_MENU_NEW_CATEGORY', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 3, 'order_id' => 2, 'access_id' => 66), array('area_id' => 67, 'parent_area_id' => 12, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_GALLERY_MENU_UPLOAD', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 3, 'order_id' => 3, 'access_id' => 67), array('area_id' => 68, 'parent_area_id' => 12, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_GALLERY_MENU_IMPORT', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 3, 'order_id' => 4, 'access_id' => 68), array('area_id' => 69, 'parent_area_id' => 12, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_GALLERY_MENU_VALIDATE', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 3, 'order_id' => 5, 'access_id' => 69), array('area_id' => 70, 'parent_area_id' => 12, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_GALLERY_MENU_SETTINGS', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 3, 'order_id' => 6, 'access_id' => 70), array('area_id' => 7, 'parent_area_id' => 15, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_MEDIA_MANAGER', 'is_active' => 1, 'uri' => 'index.php?cmd=media&archive=archive1', 'target' => '_self', 'module_id' => 1, 'order_id' => 2, 'access_id' => 7), array('area_id' => 32, 'parent_area_id' => 15, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_IMAGE_ADMINISTRATION', 'is_active' => 1, 'uri' => 'index.php?cmd=media&archive=content', 'target' => '_self', 'module_id' => 1, 'order_id' => 1, 'access_id' => 32), array('area_id' => 132, 'parent_area_id' => 15, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_DOWNLOADS', 'is_active' => 1, 'uri' => 'index.php?cmd=downloads', 'target' => '_self', 'module_id' => 53, 'order_id' => 4, 'access_id' => 141), array('area_id' => 187, 'parent_area_id' => 15, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_FILESHARING_MODULE', 'is_active' => 1, 'uri' => 'index.php?cmd=media&archive=filesharing', 'target' => '_self', 'module_id' => 68, 'order_id' => 3, 'access_id' => 8), array('area_id' => 144, 'parent_area_id' => 16, 'type' => 'function', 'scope' => 'frontend', 'area_name' => 'TXT_ACCESS_COMMUNITY_EVENTS', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 21, 'order_id' => 0, 'access_id' => 145), array('area_id' => 31, 'parent_area_id' => 18, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_EDIT_USERINFOS', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 31), array('area_id' => 40, 'parent_area_id' => 19, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_SETTINGS', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 40), array('area_id' => 41, 'parent_area_id' => 20, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_DBM_MAINTENANCE_TITLE', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 41), array('area_id' => 46, 'parent_area_id' => 21, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_ACTIVATE_SKINS', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 46), array('area_id' => 47, 'parent_area_id' => 21, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_EDIT_SKINS', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 47), array('area_id' => 92, 'parent_area_id' => 21, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_THEME_IMPORT_EXPORT', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 102), array('area_id' => 48, 'parent_area_id' => 22, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_EDIT_LANGUAGE_SETTINGS', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 48), array('area_id' => 49, 'parent_area_id' => 22, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_DELETE_LANGUAGES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 49), array('area_id' => 50, 'parent_area_id' => 22, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_LANGUAGE_SETTINGS', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 50), array('area_id' => 51, 'parent_area_id' => 23, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_REGISTER_MODULES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 51), array('area_id' => 52, 'parent_area_id' => 23, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_INST_REMO_MODULES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 0, 'access_id' => 52), array('area_id' => 166, 'parent_area_id' => 28, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_CORE_VISITOR_DETAILS', 'is_active' => 1, 'uri' => 'index.php?cmd=stats&stat=visitors', 'target' => '_self', 'module_id' => 1, 'order_id' => 1, 'access_id' => 166), array('area_id' => 164, 'parent_area_id' => 28, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_CORE_VISITORS_AND_PAGE_VIEWS', 'is_active' => 1, 'uri' => 'index.php?cmd=stats&stat=requests', 'target' => '_self', 'module_id' => 1, 'order_id' => 2, 'access_id' => 164), array('area_id' => 167, 'parent_area_id' => 28, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_CORE_REFERER', 'is_active' => 1, 'uri' => 'index.php?cmd=stats&stat=referer', 'target' => '_self', 'module_id' => 1, 'order_id' => 3, 'access_id' => 167), array('area_id' => 168, 'parent_area_id' => 28, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_CORE_SEARCH_ENGINES', 'is_active' => 1, 'uri' => 'index.php?cmd=stats&stat=spiders', 'target' => '_self', 'module_id' => 1, 'order_id' => 4, 'access_id' => 168), array('area_id' => 169, 'parent_area_id' => 28, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_CORE_SEARCH_TERMS', 'is_active' => 1, 'uri' => 'index.php?cmd=stats&stat=search', 'target' => '_self', 'module_id' => 1, 'order_id' => 5, 'access_id' => 169), array('area_id' => 170, 'parent_area_id' => 28, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_SETTINGS', 'is_active' => 1, 'uri' => 'index.php?cmd=stats&stat=settings', 'target' => '_self', 'module_id' => 1, 'order_id' => 6, 'access_id' => 170), array('area_id' => 172, 'parent_area_id' => 29, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_CORE_LISTS', 'is_active' => 1, 'uri' => 'index.php?cmd=newsletter&act=lists', 'target' => '_self', 'module_id' => 4, 'order_id' => 2, 'access_id' => 172), array('area_id' => 171, 'parent_area_id' => 29, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_CORE_EMAIL_CAMPAIGNS', 'is_active' => 1, 'uri' => 'index.php?cmd=newsletter&act=mails', 'target' => '_self', 'module_id' => 4, 'order_id' => 1, 'access_id' => 171), array('area_id' => 174, 'parent_area_id' => 29, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_CORE_RECIPIENTS', 'is_active' => 1, 'uri' => 'index.php?cmd=newsletter&act=users', 'target' => '_self', 'module_id' => 4, 'order_id' => 4, 'access_id' => 174), array('area_id' => 175, 'parent_area_id' => 29, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_CORE_NEWS', 'is_active' => 1, 'uri' => 'index.php?cmd=newsletter&act=news', 'target' => '_self', 'module_id' => 4, 'order_id' => 5, 'access_id' => 175), array('area_id' => 176, 'parent_area_id' => 29, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_SETTINGS', 'is_active' => 1, 'uri' => 'index.php?cmd=newsletter&act=dispatch', 'target' => '_self', 'module_id' => 4, 'order_id' => 6, 'access_id' => 176), array('area_id' => 145, 'parent_area_id' => 59, 'type' => 'function', 'scope' => 'global', 'area_name' => 'TXT_ADD_FILES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 12, 'order_id' => 0, 'access_id' => 96), array('area_id' => 146, 'parent_area_id' => 59, 'type' => 'function', 'scope' => 'global', 'area_name' => 'TXT_MANAGE_FILES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 12, 'order_id' => 1, 'access_id' => 94), array('area_id' => 147, 'parent_area_id' => 59, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_MANAGE_CONFIGURATION', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 12, 'order_id' => 2, 'access_id' => 92), array('area_id' => 148, 'parent_area_id' => 59, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_CATEGORY_AND_LEVEL_MANAGEMENT', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 12, 'order_id' => 3, 'access_id' => 97), array('area_id' => 77, 'parent_area_id' => 75, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_DELETED_RESTORE', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 1, 'access_id' => 77), array('area_id' => 78, 'parent_area_id' => 75, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_WORKFLOW_VALIDATE', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 0, 'order_id' => 1, 'access_id' => 78), array('area_id' => 91, 'parent_area_id' => 90, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_CONTACT_SETTINGS', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 6, 'order_id' => 0, 'access_id' => 85), array('area_id' => 149, 'parent_area_id' => 98, 'type' => 'function', 'scope' => 'frontend', 'area_name' => 'TXT_ADD_ADVERTISEMENT', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 33, 'order_id' => 0, 'access_id' => 99), array('area_id' => 150, 'parent_area_id' => 98, 'type' => 'function', 'scope' => 'frontend', 'area_name' => 'TXT_MODIFY_ADVERTISEMENT', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 33, 'order_id' => 1, 'access_id' => 100), array('area_id' => 151, 'parent_area_id' => 98, 'type' => 'function', 'scope' => 'frontend', 'area_name' => 'TXT_DELETE_ADVERTISEMENT', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 33, 'order_id' => 2, 'access_id' => 101), array('area_id' => 107, 'parent_area_id' => 106, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_FORUM_MENU_CATEGORIES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 20, 'order_id' => 1, 'access_id' => 107), array('area_id' => 108, 'parent_area_id' => 106, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_FORUM_MENU_SETTINGS', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 20, 'order_id' => 2, 'access_id' => 108), array('area_id' => 120, 'parent_area_id' => 119, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_BLOG_ENTRY_MANAGE_TITLE', 'is_active' => 1, 'uri' => 'index.php?cmd=blog&act=manageEntry', 'target' => '_self', 'module_id' => 47, 'order_id' => 1, 'access_id' => 120), array('area_id' => 121, 'parent_area_id' => 119, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_BLOG_ENTRY_ADD_TITLE', 'is_active' => 1, 'uri' => 'index.php?cmd=blog&act=addEntry', 'target' => '_self', 'module_id' => 47, 'order_id' => 2, 'access_id' => 121), array('area_id' => 122, 'parent_area_id' => 119, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_BLOG_CATEGORY_MANAGE_TITLE', 'is_active' => 1, 'uri' => 'index.php?cmd=blog&act=manageCategory', 'target' => '_self', 'module_id' => 47, 'order_id' => 3, 'access_id' => 122), array('area_id' => 123, 'parent_area_id' => 119, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_BLOG_CATEGORY_ADD_TITLE', 'is_active' => 1, 'uri' => 'index.php?cmd=blog&act=addCategory', 'target' => '_self', 'module_id' => 47, 'order_id' => 4, 'access_id' => 123), array('area_id' => 124, 'parent_area_id' => 119, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_BLOG_SETTINGS_TITLE', 'is_active' => 1, 'uri' => 'index.php?cmd=blog&act=settings', 'target' => '_self', 'module_id' => 47, 'order_id' => 6, 'access_id' => 124), array('area_id' => 125, 'parent_area_id' => 119, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_BLOG_NETWORKS_TITLE', 'is_active' => 1, 'uri' => 'index.php?cmd=blog&act=networks', 'target' => '_self', 'module_id' => 47, 'order_id' => 5, 'access_id' => 125), array('area_id' => 129, 'parent_area_id' => 128, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_DATA_ENTRY_MANAGE_TITLE', 'is_active' => 1, 'uri' => 'index.php?cmd=data&act=manageEntry', 'target' => '_self', 'module_id' => 48, 'order_id' => 1, 'access_id' => 147), array('area_id' => 133, 'parent_area_id' => 132, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_DOWNLOADS_ADMINISTER', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 53, 'order_id' => 1, 'access_id' => 142), array('area_id' => 136, 'parent_area_id' => 135, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_KNOWLEDGE_ACCESS_OVERVIEW', 'is_active' => 1, 'uri' => 'index.php?cmd=knowledge§ion=articles', 'target' => '_self', 'module_id' => 56, 'order_id' => 1, 'access_id' => 130), array('area_id' => 137, 'parent_area_id' => 135, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_KNOWLEDGE_ACCESS_EDIT_ARTICLES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 56, 'order_id' => 2, 'access_id' => 131), array('area_id' => 138, 'parent_area_id' => 135, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_KNOWLEDGE_ACCESS_CATEGORIES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 56, 'order_id' => 3, 'access_id' => 132), array('area_id' => 139, 'parent_area_id' => 135, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_KNOWLEDGE_ACCESS_EDIT_CATEGORIES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 56, 'order_id' => 4, 'access_id' => 133), array('area_id' => 140, 'parent_area_id' => 135, 'type' => 'function', 'scope' => 'backend', 'area_name' => 'TXT_KNOWLEDGE_ACCESS_SETTINGS', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 56, 'order_id' => 5, 'access_id' => 134), array('area_id' => 154, 'parent_area_id' => 153, 'type' => 'function', 'scope' => 'global', 'area_name' => 'TXT_MEDIADIR_ADD_ENTRY', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 60, 'order_id' => 0, 'access_id' => 154), array('area_id' => 155, 'parent_area_id' => 153, 'type' => 'function', 'scope' => 'global', 'area_name' => 'TXT_MEDIADIR_MODIFY_ENTRY', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 60, 'order_id' => 0, 'access_id' => 155), array('area_id' => 156, 'parent_area_id' => 153, 'type' => 'function', 'scope' => 'global', 'area_name' => 'TXT_MEDIADIR_MANAGE_LEVELS', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 60, 'order_id' => 0, 'access_id' => 156), array('area_id' => 157, 'parent_area_id' => 153, 'type' => 'function', 'scope' => 'global', 'area_name' => 'TXT_MEDIADIR_MANAGE_CATEGORIES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 60, 'order_id' => 0, 'access_id' => 157), array('area_id' => 158, 'parent_area_id' => 153, 'type' => 'function', 'scope' => 'global', 'area_name' => 'TXT_MEDIADIR_INTERFACES', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 60, 'order_id' => 0, 'access_id' => 158), array('area_id' => 160, 'parent_area_id' => 153, 'type' => 'function', 'scope' => 'global', 'area_name' => 'TXT_MEDIADIR_SETTINGS', 'is_active' => 1, 'uri' => '', 'target' => '_self', 'module_id' => 60, 'order_id' => 0, 'access_id' => 159), array('area_id' => 185, 'parent_area_id' => 184, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_DASHBOARD', 'is_active' => 1, 'uri' => 'index.php', 'target' => '_self', 'module_id' => 1, 'order_id' => 1, 'access_id' => 0), array('area_id' => 186, 'parent_area_id' => 184, 'type' => 'navigation', 'scope' => 'backend', 'area_name' => 'TXT_FRONTEND', 'is_active' => 1, 'uri' => '../index.php', 'target' => '_blank', 'module_id' => 1, 'order_id' => 2, 'access_id' => 0)); $objDatabase->Execute("TRUNCATE TABLE " . DBPREFIX . "backend_areas"); // add backend areas foreach ($arrBackendAreas as $arrBackendArea) { $query = "INSERT INTO " . DBPREFIX . "backend_areas (`area_id`, `parent_area_id` , `type` , `scope`, `area_name` , `is_active` , `uri` , `target` , `module_id` , `order_id` , `access_id`\n\t\t\t) VALUES (\n\t\t\t" . $arrBackendArea['area_id'] . ", '" . $arrBackendArea['parent_area_id'] . "', '" . $arrBackendArea['type'] . "', '" . $arrBackendArea['scope'] . "', '" . $arrBackendArea['area_name'] . "', '" . $arrBackendArea['is_active'] . "', '" . $arrBackendArea['uri'] . "', '" . $arrBackendArea['target'] . "', '" . $arrBackendArea['module_id'] . "', '" . $arrBackendArea['order_id'] . "', '" . $arrBackendArea['access_id'] . "')"; if ($objDatabase->Execute($query) === false) { return _databaseError($query, $objDatabase->ErrorMsg()); } } // add permission to stats settings if the user had permission to stats if ($objUpdate->_isNewerVersion($_CONFIG['coreCmsVersion'], '3.1.0')) { try { $result = \Cx\Lib\UpdateUtil::sql("SELECT `group_id` FROM `" . DBPREFIX . "access_group_static_ids` WHERE access_id = 163 GROUP BY `group_id`"); if ($result !== false) { while (!$result->EOF) { \Cx\Lib\UpdateUtil::sql("INSERT IGNORE INTO `" . DBPREFIX . "access_group_static_ids` (`access_id`, `group_id`)\n VALUES (170, " . intval($result->fields['group_id']) . ")"); $result->MoveNext(); } } } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } } /*************************************************** * BUGFIX: Clean up duplicate usage of access ids * ***************************************************/ if ($objUpdate->_isNewerVersion($_CONFIG['coreCmsVersion'], '2.0.2')) { $arrAccessIds = array(116 => 145, 122 => 146, 123 => 147, 140 => 148, 141 => 149); $query = 'SELECT `group_id`, `access_id` FROM `' . DBPREFIX . 'access_group_static_ids` WHERE `access_id` IN (' . implode(',', array_keys($arrAccessIds)) . ')'; $objResult = $objDatabase->Execute($query); if ($objResult) { while (!$objResult->EOF) { $query = 'INSERT IGNORE INTO `' . DBPREFIX . 'access_group_static_ids` (`access_id`, `group_id`) VALUES (' . $arrAccessIds[$objResult->fields['access_id']] . ', ' . $objResult->fields['group_id'] . ')'; if ($objDatabase->Execute($query) === false) { return _databaseError($query, $objDatabase->ErrorMsg()); } $objResult->MoveNext(); } } else { return _databaseError($query, $objDatabase->ErrorMsg()); } } return true; }
function _u2uUpdate() { global $objDatabase; try { \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_u2u_address_list', array('id' => array('type' => 'INT(11)', 'notnull' => true, 'auto_increment' => true, 'primary' => true), 'user_id' => array('type' => 'INT(11)', 'notnull' => true, 'default' => '0'), 'buddies_id' => array('type' => 'INT(11)', 'notnull' => true, 'default' => '0')), array(), 'InnoDB'); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_u2u_message_log', array('message_id' => array('type' => 'INT(11) UNSIGNED', 'notnull' => true, 'primary' => true, 'auto_increment' => true), 'message_text' => array('type' => 'TEXT', 'notnull' => true), 'message_title' => array('type' => 'TEXT', 'notnull' => true)), array(), 'InnoDB'); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_u2u_sent_messages', array('id' => array('type' => 'INT(11)', 'unsigned' => true, 'notnull' => true, 'auto_increment' => true, 'primary' => true), 'userid' => array('type' => 'INT(11)', 'unsigned' => true, 'notnull' => true, 'default' => '0'), 'message_id' => array('type' => 'INT(11)', 'unsigned' => true, 'notnull' => true, 'default' => '0'), 'receiver_id' => array('type' => 'INT(11)', 'unsigned' => true, 'notnull' => true, 'default' => '0'), 'mesage_open_status' => array('type' => 'ENUM(\'0\',\'1\')', 'notnull' => true, 'default' => '0'), 'date_time' => array('type' => 'DATETIME', 'notnull' => true, 'default' => '0000-00-00 00:00:00')), array(), 'InnoDB'); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_u2u_settings', array('id' => array('type' => 'INT(11)', 'unsigned' => true, 'notnull' => true, 'auto_increment' => true, 'primary' => true), 'name' => array('type' => 'VARCHAR(50)'), 'value' => array('type' => 'TEXT')), array(), 'InnoDB'); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_u2u_settings', array('id' => array('type' => 'INT(11) UNSIGNED', 'notnull' => true, 'primary' => true, 'auto_increment' => true), 'name' => array('type' => 'VARCHAR(50)', 'notnull' => true), 'value' => array('type' => 'TEXT', 'notnull' => true)), array(), 'InnoDB'); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_u2u_user_log', array('id' => array('type' => 'INT(11)', 'unsigned' => true, 'notnull' => true, 'auto_increment' => true, 'primary' => true), 'userid' => array('type' => 'INT(11)', 'unsigned' => true, 'notnull' => true, 'default' => '0'), 'user_sent_items' => array('type' => 'INT(11)', 'unsigned' => true, 'notnull' => true, 'default' => '0'), 'user_unread_items' => array('type' => 'INT(11)', 'unsigned' => true, 'notnull' => true, 'default' => '0'), 'user_status' => array('type' => 'ENUM(\'0\',\'1\')', 'notnull' => true, 'default' => '1')), array(), 'InnoDB'); } catch (\Cx\Lib\UpdateException $e) { // we COULD do something else here.. return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } /****************************************************** * EXTENSION: Initial adding of the settings values * * ADDED: Contrexx v2.1.2 * *******************************************************/ $arrSettings = array('max_posting_size' => '2000', 'max_posting_chars' => '2000', 'wysiwyg_editor' => '1', 'subject' => 'Eine neue Nachricht von [senderName]', 'from' => 'Contrexx U2U Nachrichtensystem', 'email_message' => 'Hallo <strong>[receiverName]</strong>,<br />\\r\\n<br />\\r\\n<strong>[senderName]</strong> hat Ihnen eine private Nachricht gesendet. Um die Nachricht zu lesen, folgen Sie bitte folgendem Link:<br />\\r\\n<br />\\r\\nhttp://[domainName]/index.php?section=u2u&cmd=notification<br />\\r\\n <br />\\r\\n<br />'); foreach ($arrSettings as $name => $value) { $query = "SELECT 1 FROM `" . DBPREFIX . "module_u2u_settings` WHERE `name` = '" . $name . "'"; $objResult = $objDatabase->SelectLimit($query, 1); if ($objResult) { if ($objResult->RecordCount() == 0) { $query = "INSERT INTO `" . DBPREFIX . "module_u2u_settings` (`name`, `value`) VALUES ('" . $name . "', '" . $value . "')"; if ($objDatabase->Execute($query) === false) { return _databaseError($query, $objDatabase->ErrorMsg()); } } } else { return _databaseError($query, $objDatabase->ErrorMsg()); } } /******************************** * EXTENSION: Timezone * * ADDED: Contrexx v3.0.0 * ********************************/ try { \Cx\Lib\UpdateUtil::sql('ALTER TABLE `' . DBPREFIX . 'module_u2u_sent_messages` CHANGE `date_time` `date_time` TIMESTAMP NOT NULL DEFAULT "0000-00-00 00:00:00"'); } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } return true; }
/** * Cloudrexx * * @link http://www.cloudrexx.com * @copyright Cloudrexx AG 2007-2015 * * According to our dual licensing model, this program can be used either * under the terms of the GNU Affero General Public License, version 3, * or under a proprietary license. * * The texts of the GNU Affero General Public License with an additional * permission and of our proprietary license can be found at and * in the LICENSE file you have received along with this program. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * "Cloudrexx" is a registered trademark of Cloudrexx AG. * The licensing of the program under the AGPLv3 does not imply a * trademark license. Therefore any rights, title and interest in * our trademarks remain entirely with us. */ function _jobsUpdate() { global $objDatabase; try { \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_jobs', array('id' => array('type' => 'INT(6)', 'notnull' => true, 'primary' => true, 'auto_increment' => true, 'unsigned' => true), 'date' => array('type' => 'INT(14)', 'notnull' => false), 'title' => array('type' => 'VARCHAR(250)', 'notnull' => true, 'default' => ''), 'author' => array('type' => 'VARCHAR(150)', 'notnull' => true, 'default' => ''), 'text' => array('type' => 'MEDIUMTEXT'), 'workloc' => array('type' => 'VARCHAR(250)', 'notnull' => true, 'default' => ''), 'workload' => array('type' => 'VARCHAR(250)', 'notnull' => true, 'default' => ''), 'work_start' => array('type' => 'INT(14)', 'notnull' => true, 'default' => 0), 'catid' => array('type' => 'INT(2)', 'notnull' => true, 'default' => 0, 'unsigned' => true), 'lang' => array('type' => 'INT(2)', 'notnull' => true, 'default' => 0, 'unsigned' => true), 'userid' => array('type' => 'INT(6)', 'notnull' => true, 'default' => 0, 'unsigned' => true), 'startdate' => array('type' => 'DATE', 'notnull' => true, 'default' => '0000-00-00'), 'enddate' => array('type' => 'DATE', 'notnull' => true, 'default' => '0000-00-00'), 'status' => array('type' => 'TINYINT(4)', 'notnull' => true, 'default' => 1), 'changelog' => array('type' => 'INT(14)', 'notnull' => true, 'default' => 0)), array('newsindex' => array('fields' => array('title', 'text'), 'type' => 'fulltext'))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_jobs_categories', array('catid' => array('type' => 'INT(2)', 'primary' => true, 'auto_increment' => true, 'unsigned' => true), 'name' => array('type' => 'VARCHAR(100)', 'default' => ''), 'lang' => array('type' => 'INT(2)', 'default' => 1, 'unsigned' => true), 'sort_style' => array('type' => "ENUM('alpha', 'date', 'date_alpha')", 'default' => 'alpha'))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_jobs_location', array('id' => array('type' => 'INT(10)', 'primary' => true, 'auto_increment' => true, 'unsigned' => true), 'name' => array('type' => 'VARCHAR(100)', 'default' => ''))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_jobs_rel_loc_jobs', array('job' => array('type' => 'INT(10)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'primary' => true), 'location' => array('type' => 'INT(10)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'primary' => true))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_jobs_settings', array('id' => array('type' => 'INT(10)', 'primary' => true, 'auto_increment' => true, 'unsigned' => true), 'name' => array('type' => 'VARCHAR(250)', 'default' => ''), 'value' => array('type' => 'TEXT', 'default' => ''))); } catch (\Cx\Lib\UpdateException $e) { // we COULD do something else here.. return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } $arrSettings = array(array('name' => 'footnote', 'value' => 'Hat Ihnen diese Bewerbung zugesagt? \\r\\nDann können Sie sich sogleich telefonisch, per E-mail oder Web Formular bewerben.'), array('name' => 'link', 'value' => 'Online für diese Stelle bewerben.'), array('name' => 'url', 'value' => 'index.php?section=contact&cmd=5&44=%URL%&43=%TITLE%'), array('name' => 'show_location_fe', 'value' => '1')); foreach ($arrSettings as $arrSetting) { $query = "SELECT 1 FROM `" . DBPREFIX . "module_jobs_settings` WHERE `name` = '" . $arrSetting['name'] . "'"; $objResult = $objDatabase->SelectLimit($query, 1); if ($objResult !== false) { if ($objResult->RecordCount() == 0) { $query = "INSERT INTO `" . DBPREFIX . "module_jobs_settings` (`name`, `value`) VALUES ('" . $arrSetting['name'] . "', '" . $arrSetting['value'] . "')"; if ($objDatabase->Execute($query) === false) { return _databaseError($query, $objDatabase->ErrorMsg()); } } } else { return _databaseError($query, $objDatabase->ErrorMsg()); } } /******************************** * EXTENSION: Timezone * * ADDED: Contrexx v3.0.0 * ********************************/ try { \Cx\Lib\UpdateUtil::sql(' ALTER TABLE `' . DBPREFIX . 'module_jobs` CHANGE `startdate` `startdate` TIMESTAMP NOT NULL DEFAULT "0000-00-00 00:00:00", CHANGE `enddate` `enddate` TIMESTAMP NOT NULL DEFAULT "0000-00-00 00:00:00" '); } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } return true; }
function _ecardUpdate() { global $objDatabase, $_ARRAYLANG, $_CORELANG; try { \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_ecard_ecards', array('code' => array('type' => 'VARCHAR(35)', 'notnull' => true, 'default' => '', 'primary' => true), 'date' => array('type' => 'INT(10)', 'notnull' => true, 'default' => 0, 'unsigned' => true), 'TTL' => array('type' => 'INT(10)', 'notnull' => true, 'default' => 0, 'unsigned' => true), 'salutation' => array('type' => 'VARCHAR(100)', 'notnull' => true, 'default' => ''), 'senderName' => array('type' => 'VARCHAR(100)', 'notnull' => true, 'default' => ''), 'senderEmail' => array('type' => 'VARCHAR(100)', 'notnull' => true, 'default' => ''), 'recipientName' => array('type' => 'VARCHAR(100)', 'notnull' => true, 'default' => ''), 'recipientEmail' => array('type' => 'VARCHAR(100)', 'notnull' => true, 'default' => ''), 'message' => array('type' => 'TEXT', 'notnull' => true))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_ecard_settings', array('setting_name' => array('type' => 'VARCHAR(100)', 'notnull' => true, 'default' => '', 'primary' => true), 'setting_value' => array('type' => 'TEXT', 'notnull' => true, 'default' => 0))); } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } $ins_tpl = "\n INSERT INTO " . DBPREFIX . "module_ecard_settings (setting_name, setting_value)\n VALUES ('%s', '%s')\n ON DUPLICATE KEY UPDATE `setting_name` = `setting_name`\n "; $insert_values = array(array('maxCharacters', '100'), array('maxLines', '50'), array('motive_0', 'Bild_001.jpg'), array('motive_1', 'Bild_002.jpg'), array('motive_2', ''), array('motive_3', ''), array('motive_4', ''), array('motive_5', ''), array('motive_6', ''), array('motive_7', ''), array('motive_8', ''), array('maxHeight', '300'), array('validdays', '30'), array('maxWidth', '300'), array('maxHeightThumb', '80'), array('maxWidthThumb', '80'), array('subject', 'Sie haben eine E-Card erhalten!'), array('emailText', "[[ECARD_SENDER_NAME]] hat Ihnen eine E-Card geschickt.<br />\n Sie können diese während den nächsten [[ECARD_VALID_DAYS]] Tagen unter [[ECARD_URL]] abrufen.")); foreach ($insert_values as $setting) { $query = sprintf($ins_tpl, addslashes($setting[0]), addslashes($setting[1])); if (!$objDatabase->Execute($query)) { return _databaseError($query, $objDatabase->ErrorMsg()); } } /* * ********************************************** * BUGFIX: Set write access to the image dir * * ********************************************** */ $arrImagePaths = array(array(ASCMS_DOCUMENT_ROOT . '/images/modules/ecard', ASCMS_PATH_OFFSET . '/images/modules/ecard'), array(ASCMS_ECARD_OPTIMIZED_PATH, ASCMS_ECARD_OPTIMIZED_WEB_PATH), array(ASCMS_ECARD_SEND_ECARDS_PATH, ASCMS_ECARD_SEND_ECARDS_WEB_PATH), array(ASCMS_ECARD_THUMBNAIL_PATH, ASCMS_ECARD_THUMBNAIL_WEB_PATH)); foreach ($arrImagePaths as $arrImagePath) { if (\Cx\Lib\FileSystem\FileSystem::makeWritable($arrImagePath[0])) { if ($mediaDir = @opendir($arrImagePath[0])) { while ($file = readdir($mediaDir)) { if ($file != '.' && $file != '..') { if (!\Cx\Lib\FileSystem\FileSystem::makeWritable($arrImagePath[0] . '/' . $file)) { setUpdateMsg(sprintf($_ARRAYLANG['TXT_SET_WRITE_PERMISSON_TO_FILE'], $arrImagePath[0] . '/' . $file, $_CORELANG['TXT_UPDATE_TRY_AGAIN']), 'msg'); return false; } } } } else { setUpdateMsg(sprintf($_ARRAYLANG['TXT_SET_WRITE_PERMISSON_TO_DIR_AND_CONTENT'], $arrImagePath[0] . '/', $_CORELANG['TXT_UPDATE_TRY_AGAIN']), 'msg'); return false; } } else { setUpdateMsg(sprintf($_ARRAYLANG['TXT_SET_WRITE_PERMISSON_TO_DIR_AND_CONTENT'], $arrImagePath[0] . '/', $_CORELANG['TXT_UPDATE_TRY_AGAIN']), 'msg'); return false; } } return true; }
function _knowledgeUpdate() { global $objDatabase; try { \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_knowledge_article_content', array('id' => array('type' => 'INT(10)', 'notnull' => true, 'primary' => true, 'auto_increment' => true, 'unsigned' => true), 'article' => array('type' => 'INT(10)', 'notnull' => true, 'default' => 0, 'unsigned' => true), 'lang' => array('type' => 'INT(10)', 'notnull' => true, 'default' => 0, 'unsigned' => true), 'question' => array('type' => 'TEXT', 'notnull' => true, 'default' => 0), 'answer' => array('type' => 'TEXT', 'notnull' => true, 'default' => 0)), array('module_knowledge_article_content_lang' => array('fields' => array('lang')), 'module_knowledge_article_content_article' => array('fields' => array('article')))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_knowledge_articles', array('id' => array('type' => 'INT(10)', 'notnull' => true, 'primary' => true, 'auto_increment' => true, 'unsigned' => true), 'category' => array('type' => 'INT(10)', 'notnull' => true, 'default' => 0, 'unsigned' => true), 'active' => array('type' => 'TINYINT(1)', 'notnull' => true, 'default' => 1), 'hits' => array('type' => 'INT', 'notnull' => true, 'default' => 0), 'votes' => array('type' => 'INT', 'notnull' => true, 'default' => 0), 'votevalue' => array('type' => 'INT', 'notnull' => true, 'default' => 0), 'sort' => array('type' => 'INT', 'notnull' => true, 'default' => 0), 'date_created' => array('type' => 'INT(14)', 'notnull' => true, 'default' => 0), 'date_updated' => array('type' => 'INT(14)', 'notnull' => true, 'default' => 0))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_knowledge_categories', array('id' => array('type' => 'INT(10)', 'notnull' => true, 'primary' => true, 'auto_increment' => true, 'unsigned' => true), 'active' => array('type' => 'TINYINT(1)', 'notnull' => true, 'default' => 1, 'unsigned' => true), 'parent' => array('type' => 'INT(10)', 'notnull' => true, 'default' => 0, 'unsigned' => true), 'sort' => array('type' => 'INT(10)', 'notnull' => true, 'default' => 1, 'unsigned' => true)), array('module_knowledge_categories_sort' => array('fields' => array('sort')), 'module_knowledge_categories_parent' => array('fields' => array('parent')))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_knowledge_categories_content', array('id' => array('type' => 'INT(10)', 'notnull' => true, 'primary' => true, 'auto_increment' => true, 'unsigned' => true), 'category' => array('type' => 'INT(10)', 'notnull' => true, 'default' => 0, 'unsigned' => true), 'name' => array('type' => 'VARCHAR(255)', 'notnull' => true, 'default' => ''), 'lang' => array('type' => 'INT(11)', 'notnull' => true, 'default' => 1))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_knowledge_settings', array('id' => array('type' => 'INT(10)', 'notnull' => true, 'primary' => true, 'auto_increment' => true, 'unsigned' => true), 'name' => array('type' => 'VARCHAR(255)', 'notnull' => true, 'default' => ''), 'value' => array('type' => 'TEXT', 'notnull' => true, 'default' => 0)), array('module_knowledge_settings_name' => array('fields' => array('name')))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_knowledge_tags', array('id' => array('type' => 'INT(10)', 'notnull' => true, 'primary' => true, 'auto_increment' => true, 'unsigned' => true), 'name' => array('type' => 'VARCHAR(255)', 'notnull' => true, 'default' => ''), 'lang' => array('type' => 'INT(10)', 'notnull' => true, 'default' => 1, 'unsigned' => true)), array('module_knowledge_tags_name' => array('fields' => array('name')))); if (strpos(\Cx\Lib\UpdateUtil::sql('SHOW CREATE TABLE `' . DBPREFIX . 'module_knowledge_tags_articles`')->fields['Create Table'], 'UNIQUE KEY') === false) { \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_knowledge_tags_articles', array('id' => array('type' => 'INT(10)', 'notnull' => true, 'primary' => true, 'auto_increment' => true, 'unsigned' => true), 'article' => array('type' => 'INT(10)', 'notnull' => true, 'default' => 0, 'unsigned' => true), 'tag' => array('type' => 'INT(10)', 'notnull' => true, 'default' => 0, 'unsigned' => true)), array('module_knowledge_tags_articles_tag' => array('fields' => array('tag')), 'module_knowledge_tags_articles_article' => array('fields' => array('article')))); } } catch (\Cx\Lib\UpdateException $e) { // we COULD do something else here.. return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } $arrSettings = array(array('name' => 'max_subcategories', 'value' => '5'), array('name' => 'column_number', 'value' => '2'), array('name' => 'max_rating', 'value' => '8'), array('name' => 'best_rated_sidebar_template', 'value' => '<h2>Bestbewertete Artikel</h2>\\r\\n<div class="clearfix">\\r\\n<ul class="knowledge_sidebar">\\r\\n<!-- BEGIN article -->\\r\\n<li><a href="[[URL]]">[[ARTICLE]]</a></li>\\r\\n<!-- END article -->\\r\\n</ul>\\r\\n</div>'), array('name' => 'best_rated_sidebar_length', 'value' => '82'), array('name' => 'best_rated_sidebar_amount', 'value' => '5'), array('name' => 'tag_cloud_sidebar_template', 'value' => '[[CLOUD]] <br style="clear: both;" />'), array('name' => 'most_read_sidebar_template', 'value' => '<h2>Bestbewertete Artikel 2</h2>\\r\\n<div class="clearfix">\\r\\n<ul class="knowledge_sidebar">\\r\\n<!-- BEGIN article -->\\r\\n<li><a href="[[URL]]">[[ARTICLE]]</a></li>\\r\\n<!-- END article -->\\r\\n</ul>\\r\\n</div>'), array('name' => 'most_read_sidebar_length', 'value' => '79'), array('name' => 'most_read_sidebar_amount', 'value' => '5'), array('name' => 'best_rated_siderbar_template', 'value' => ''), array('name' => 'most_read_amount', 'value' => '5'), array('name' => 'best_rated_amount', 'value' => '5')); foreach ($arrSettings as $arrSetting) { $query = "SELECT 1 FROM `" . DBPREFIX . "module_knowledge_settings` WHERE `name` = '" . $arrSetting['name'] . "'"; $objResult = $objDatabase->SelectLimit($query, 1); if ($objResult !== false) { if ($objResult->RecordCount() == 0) { $query = "INSERT INTO `" . DBPREFIX . "module_knowledge_settings` (`name`, `value`) VALUES ('" . $arrSetting['name'] . "', '" . $arrSetting['value'] . "')"; if ($objDatabase->Execute($query) === false) { return _databaseError($query, $objDatabase->ErrorMsg()); } } } else { return _databaseError($query, $objDatabase->ErrorMsg()); } } /******************************************* * EXTENSION: Duplicate entries clean up * * ADDED: Contrexx v3.0.2 * *******************************************/ try { \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_knowledge_tags_articles', array('article' => array('type' => 'INT(10)', 'unsigned' => true, 'notnull' => true, 'default' => '0'), 'tag' => array('type' => 'INT(10)', 'unsigned' => true, 'notnull' => true, 'default' => '0', 'after' => 'article')), array('article' => array('fields' => array('article', 'tag'), 'type' => 'UNIQUE', 'force' => true)), 'MyISAM'); } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } return true; }
function crmUpdates() { //Update the database changes try { //update module name \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "modules` SET `name` = 'Crm' WHERE `id` = 69"); //update navigation url \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Crm&act=customers' WHERE `area_id` = 191"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Crm&act=task' WHERE `area_id` = 192"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Crm&act=deals' WHERE `area_id` = 193"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Crm&act=settings' WHERE `area_id` = 195"); //Insert component entry \Cx\Lib\UpdateUtil::sql("INSERT INTO `" . DBPREFIX . "component` (`id`, `name`, `type`) VALUES ('69', 'Crm', 'module')"); //update module name for email templates \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "core_mail_template` SET `section` = 'Crm' WHERE `section` = 'crm'"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "core_text` SET `section` = 'Crm' WHERE `section` = 'crm'"); //update module name for crm core settings \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "core_setting` SET `section` = 'Crm' WHERE `section` = 'crm'"); } catch (\Cx\Lib\UpdateException $e) { return "Error: {$e->sql}"; } //Update script for moving the folder $crmImgPath = ASCMS_DOCUMENT_ROOT . '/images'; $crmMediaPath = ASCMS_DOCUMENT_ROOT . '/media'; try { if (file_exists($crmImgPath . '/crm') && !file_exists($crmImgPath . '/Crm')) { \Cx\Lib\FileSystem\FileSystem::makeWritable($crmImgPath . '/crm'); if (!\Cx\Lib\FileSystem\FileSystem::move($crmImgPath . '/crm', $crmImgPath . '/Crm')) { return 'Failed to move the folder from ' . $crmImgPath . '/crm to ' . $crmImgPath . '/Crm.'; } } if (file_exists($crmMediaPath . '/crm') && !file_exists($crmMediaPath . '/Crm')) { \Cx\Lib\FileSystem\FileSystem::makeWritable($crmMediaPath . '/crm'); if (!\Cx\Lib\FileSystem\FileSystem::move($crmMediaPath . '/crm', $crmMediaPath . '/Crm')) { return 'Failed to move the folder from ' . $crmMediaPath . '/crm to ' . $crmMediaPath . '/Crm.'; } } } catch (\Cx\Lib\FileSystem\FileSystemException $e) { return $e->getMessage(); } return 'Crm updated successfully.'; }
function shopUpdates() { //Update the database changes try { //update module name \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "modules` SET `name` = 'Shop' WHERE `id` = 16"); //update navigation url \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Shop' WHERE `area_id` = 13"); //Insert component entry \Cx\Lib\UpdateUtil::sql("INSERT INTO `" . DBPREFIX . "component` (`id`, `name`, `type`) VALUES ('16', 'Shop', 'module')"); //update module name for frontend pages \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "content_page` SET `module` = 'Shop' WHERE `module` = 'shop'"); //update module name for crm core settings \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "core_setting` SET `section` = 'Shop' WHERE `section` = 'shop'"); //update module name for email templates \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "core_mail_template` SET `section` = 'Shop' WHERE `section` = 'shop'"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "core_text` SET `section` = 'Shop' WHERE `section` = 'shop'"); } catch (\Cx\Lib\UpdateException $e) { return "Error: {$e->sql}"; } //Update script for moving the folder $shopImgPath = ASCMS_DOCUMENT_ROOT . '/images'; $shopMediaPath = ASCMS_DOCUMENT_ROOT . '/media'; try { if (file_exists($shopImgPath . '/shop') && !file_exists($shopImgPath . '/Shop')) { \Cx\Lib\FileSystem\FileSystem::makeWritable($shopImgPath . '/shop'); if (!\Cx\Lib\FileSystem\FileSystem::move($shopImgPath . '/shop', $shopImgPath . '/Shop')) { return 'Failed to move the folder from ' . $shopImgPath . '/shop to ' . $shopImgPath . '/Shop.'; } } if (file_exists($shopMediaPath . '/shop') && !file_exists($shopMediaPath . '/Shop')) { \Cx\Lib\FileSystem\FileSystem::makeWritable($shopMediaPath . '/shop'); if (!\Cx\Lib\FileSystem\FileSystem::move($shopMediaPath . '/shop', $shopMediaPath . '/Shop')) { return 'Failed to move the folder from ' . $shopMediaPath . '/shop to ' . $shopMediaPath . '/Shop.'; } } } catch (\Cx\Lib\FileSystem\FileSystemException $e) { return $e->getMessage(); } return 'Shop updated successfully.'; }
function mediaDirUpdate() { try { //update module name \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "modules` SET `name` = 'MediaDir' WHERE `id` = 60"); //update navigation url \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=MediaDir' WHERE `area_id` = 153"); //Insert component entry \Cx\Lib\UpdateUtil::sql("INSERT INTO `" . DBPREFIX . "component` (`id`, `name`, `type`) VALUES ('60', 'MediaDir', 'module')"); //update module name for frontend pages \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "content_page` SET `module` = 'MediaDir' WHERE `module` = 'mediadir'"); //update class name \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_mediadir_inputfield_types` SET `name` = 'linkGroup' WHERE `name` = 'link_group'"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_mediadir_inputfield_types` SET `name` = 'googleMap' WHERE `name` = 'google_map'"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_mediadir_inputfield_types` SET `name` = 'addStep' WHERE `name` = 'add_step'"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_mediadir_inputfield_types` SET `name` = 'fieldGroup' WHERE `name` = 'field_group'"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_mediadir_inputfield_types` SET `name` = 'productAttributes' WHERE `name` = 'product_attributes'"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_mediadir_inputfield_types` SET `name` = 'googleWeather' WHERE `name` = 'google_weather'"); //following queries for changing the path from images/mediadir into images/MediaDir \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_mediadir_categories` \n SET `picture` = REPLACE(`picture`, 'images/mediadir', 'images/MediaDir')\n WHERE `picture` LIKE ('" . ASCMS_PATH_OFFSET . "/images/mediadir%')"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_mediadir_forms` \n SET `picture` = REPLACE(`picture`, 'images/mediadir', 'images/MediaDir')\n WHERE `picture` LIKE ('" . ASCMS_PATH_OFFSET . "/images/mediadir%')"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_mediadir_levels` \n SET `picture` = REPLACE(`picture`, 'images/mediadir', 'images/MediaDir')\n WHERE `picture` LIKE ('" . ASCMS_PATH_OFFSET . "/images/mediadir%')"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_mediadir_rel_entry_inputfields` \n SET `value` = REPLACE(`value`, 'images/mediadir', 'images/MediaDir')\n WHERE `value` LIKE ('" . ASCMS_PATH_OFFSET . "/images/mediadir%')"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_mediadir_rel_entry_inputfields_clean1` \n SET `value` = REPLACE(`value`, 'images/mediadir', 'images/MediaDir')\n WHERE `value` LIKE ('" . ASCMS_PATH_OFFSET . "/images/mediadir%')"); } catch (\Cx\Lib\UpdateException $e) { return "Error: {$e->sql}"; } $sourcePath = ASCMS_DOCUMENT_ROOT . '/images/mediadir'; $targetPath = ASCMS_DOCUMENT_ROOT . '/images/MediaDir'; try { if (file_exists($sourcePath) && !file_exists($targetPath)) { \Cx\Lib\FileSystem\FileSystem::makeWritable($sourcePath); if (!\Cx\Lib\FileSystem\FileSystem::move($sourcePath, $targetPath)) { return 'Failed to Moved the files from ' . $sourcePath . ' to ' . $targetPath . '.<br>'; } } } catch (\Cx\Lib\FileSystem\FileSystemException $e) { return $e->getMessage(); } return 'Media Directory Updated Successfully'; }
/** * Cloudrexx * * @link http://www.cloudrexx.com * @copyright Cloudrexx AG 2007-2015 * * According to our dual licensing model, this program can be used either * under the terms of the GNU Affero General Public License, version 3, * or under a proprietary license. * * The texts of the GNU Affero General Public License with an additional * permission and of our proprietary license can be found at and * in the LICENSE file you have received along with this program. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * "Cloudrexx" is a registered trademark of Cloudrexx AG. * The licensing of the program under the AGPLv3 does not imply a * trademark license. Therefore any rights, title and interest in * our trademarks remain entirely with us. */ function _media1Update() { global $_ARRAYLANG, $_CORELANG; /* require_once ASCMS_FRAMEWORK_PATH.'/File.class.php'; $objFile = new File(); $paths = glob(ASCMS_DOCUMENT_ROOT.'/media/archive*'); foreach ($paths as $path) { $path = "$path/"; $web_path = preg_replace("#".ASCMS_DOCUMENT_ROOT."/media/#", ASCMS_PATH_OFFSET . '/media/', $path); $status = $objFile->delFile($path, $web_path, '.htaccess'); if ($status == 'error') { setUpdateMsg(sprintf($_ARRAYLANG['TXT_SET_WRITE_PERMISSON_TO_DIR_AND_CONTENT'], "<pre>$web_path</pre>", $_CORELANG['TXT_UPDATE_TRY_AGAIN'])); return false; } }*/ try { \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_media_settings', array('name' => array('type' => 'VARCHAR(50)'), 'value' => array('type' => 'VARCHAR(250)', 'after' => 'name')), array('name' => array('fields' => array('name'))), 'InnoDB'); $arrValues = array(array("media1_frontend_changable", "off"), array("media2_frontend_changable", "off"), array("media3_frontend_changable", "off"), array("media4_frontend_changable", "off"), array("media1_frontend_managable", "off"), array("media2_frontend_managable", "off"), array("media3_frontend_managable", "off"), array("media4_frontend_managable", "off")); for ($i = 0; $i < count($arrValues); $i++) { $rs = \Cx\Lib\UpdateUtil::sql('SELECT 1 FROM ' . DBPREFIX . 'module_media_settings WHERE name="' . $arrValues[$i][0] . '";'); if ($rs->EOF) { \Cx\Lib\UpdateUtil::sql('INSERT INTO ' . DBPREFIX . 'module_media_settings VALUES ("' . $arrValues[$i][0] . '","' . $arrValues[$i][1] . '")'); } } } catch (\Cx\Lib\UpdateException $e) { // we COULD do something else here.. return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } $arrContentSites = array('media1', 'media2', 'media3', 'media4'); // replace source url to image foreach ($arrContentSites as $module) { try { \Cx\Lib\UpdateUtil::migrateContentPage($module, '', 'images/modules/media/_base.gif', 'core_modules/media/View/Media/_base.gif', '3.1.2'); } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } } return true; }
function _filesharingUpdate() { try { /********************************* * EXTENSION: Initial creation * * ADDED: Contrexx v3.0.0 * *********************************/ \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_filesharing', array('id' => array('type' => 'INT(10)', 'notnull' => true, 'auto_increment' => true, 'primary' => true), 'file' => array('type' => 'VARCHAR(250)', 'notnull' => true, 'after' => 'id'), 'source' => array('type' => 'VARCHAR(250)', 'notnull' => true, 'after' => 'file'), 'cmd' => array('type' => 'VARCHAR(50)', 'notnull' => true, 'after' => 'source'), 'hash' => array('type' => 'VARCHAR(50)', 'notnull' => true, 'after' => 'cmd'), 'check' => array('type' => 'VARCHAR(50)', 'notnull' => true, 'after' => 'hash'), 'expiration_date' => array('type' => 'TIMESTAMP', 'notnull' => false, 'default' => NULL, 'after' => 'check'), 'upload_id' => array('type' => 'INT(10)', 'notnull' => false, 'default' => NULL, 'after' => 'expiration_date'))); \Cx\Lib\UpdateUtil::table(DBPREFIX . 'module_filesharing_mail_template', array('id' => array('type' => 'INT(10)', 'notnull' => true, 'auto_increment' => true, 'primary' => true), 'lang_id' => array('type' => 'INT(1)', 'notnull' => true, 'after' => 'id'), 'subject' => array('type' => 'VARCHAR(250)', 'notnull' => true, 'after' => 'lang_id'), 'content' => array('type' => 'TEXT', 'notnull' => true, 'after' => 'subject'))); \Cx\Lib\UpdateUtil::sql(' INSERT INTO `' . DBPREFIX . 'module_filesharing_mail_template` (`id`, `lang_id`, `subject`, `content`) VALUES (1, 1, "Jemand teilt eine Datei mit Ihnen", "Guten Tag,\\r\\n\\r\\nJemand hat auf [[DOMAIN]] eine Datei mit Ihnen geteilt.\\r\\n\\r\\n<!-- BEGIN filesharing_file -->\\r\\nDownload-Link: [[FILE_DOWNLOAD]]\\r\\n<!-- END filesharing_file -->\\r\\n\\r\\nDie Person hat eine Nachricht hinterlassen:\\r\\n[[MESSAGE]]\\r\\n\\r\\nFreundliche Grüsse"), (2, 2, "Somebody is sharing a file with you", "Hi,\\r\\n\\r\\nSomebody shared a file with you on [[DOMAIN]].\\r\\n\\r\\n<!-- BEGIN filesharing_file -->\\r\\nDownload link: [[FILE_DOWNLOAD]]\\r\\n<!-- END filesharing_file -->\\r\\n\\r\\nThe person has left a message for you:\\r\\n[[MESSAGE]]\\r\\n\\r\\nBest regards") ON DUPLICATE KEY UPDATE `id` = `id` '); \Cx\Lib\UpdateUtil::sql('INSERT IGNORE INTO `' . DBPREFIX . 'core_setting` (`section`, `name`, `group`, `type`, `value`, `values`, `ord`) VALUES (\'filesharing\',\'permission\',\'config\',\'text\',\'off\',\'\',0)'); } catch (\Cx\Lib\UpdateException $e) { return \Cx\Lib\UpdateUtil::DefaultActionHandler($e); } }
function blogUpdates() { //Update the database changes try { //update module name \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "modules` SET `name` = 'Blog' WHERE `id` = 47"); //update navigation url \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Blog' WHERE `area_id` = 119"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Blog&act=manageEntry' WHERE `area_id` = 120"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Blog&act=addEntry' WHERE `area_id` = 121"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Blog&act=manageCategory' WHERE `area_id` = 122"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Blog&act=addCategory' WHERE `area_id` = 123"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Blog&act=settings' WHERE `area_id` = 124"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "backend_areas` SET `uri` = 'index.php?cmd=Blog&act=networks' WHERE `area_id` = 125"); //Insert component entry \Cx\Lib\UpdateUtil::sql("INSERT INTO `" . DBPREFIX . "component` (`id`, `name`, `type`) VALUES ('47', 'Blog', 'module')"); //update module name for frontend pages \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "content_page` SET `module` = 'Blog' WHERE `module` = 'blog'"); //following queries for changing the path from images/blog into images/Blog \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_blog_messages_lang` \n SET `image` = REPLACE(`image`, 'images/blog', 'images/Blog')\n WHERE `image` LIKE ('" . ASCMS_PATH_OFFSET . "/images/blog%')"); \Cx\Lib\UpdateUtil::sql("UPDATE `" . DBPREFIX . "module_blog_networks` \n SET `icon` = REPLACE(`icon`, 'images/blog', 'images/Blog')\n WHERE `icon` LIKE ('" . ASCMS_PATH_OFFSET . "/images/blog%')"); } catch (\Cx\Lib\UpdateException $e) { return "Error: {$e->sql}"; } //Update script for moving the folder $blogImgPath = ASCMS_DOCUMENT_ROOT . '/images'; try { if (file_exists($blogImgPath . '/blog') && !file_exists($blogImgPath . '/Blog')) { \Cx\Lib\FileSystem\FileSystem::makeWritable($blogImgPath . '/blog'); if (!\Cx\Lib\FileSystem\FileSystem::move($blogImgPath . '/blog', $blogImgPath . '/Blog')) { return 'Failed to move the folder from ' . $blogImgPath . '/blog to ' . $blogImgPath . '/Blog.'; } } } catch (\Cx\Lib\FileSystem\FileSystemException $e) { return $e->getMessage(); } return 'Blog updated successfully.'; }