* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
if (isGetRequestElementSet('register_ext')) {
// We are about to register a new extension
- $do = 'register';
+ $do = 'setup';
$taskId = determineExtensionTaskId(getRequestElement('register_ext'));
// The id comes from task management and it is - of course - *not* the extension's name!
// Redirect to prevent missing cache in js.php
redirectToUrl('modules.php?module=admin&what=extensions&changed=' . countPostSelection());
-} elseif (((isFormSent('edit')) || (isPostRequestElementSet('modify'))) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
+} elseif (((isFormSent('edit')) || (isPostRequestElementSet('do_edit'))) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
// Change settings like CSS file load
- if (isPostRequestElementSet('modify')) {
+ if (isPostRequestElementSet('do_edit')) {
// Change entries
$cache_update = '0';
foreach (postRequestElement('sel') as $ext_id => $sel) {
}
break;
- case 'register': // Register new extension
+ case 'setup': // Setup new extension
// Are there some tasks?
$numTasks = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', TRUE, "AND `task_type`='EXTENSION'");
// Is the id number valid and the task was found?
- if (($taskId > 0) && ($numTasks > 0)) {
+ if ((isValidId($taskId)) && ($numTasks > 0)) {
// id is valid so begin with registration, we first want to it's real name from task management (subject column)
$result = SQL_QUERY_ESC("SELECT `subject` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s LIMIT 1",
array(bigintval($taskId)), __FILE__, __LINE__);
if (isExtensionActive('cache')) {
// Remove cache file (will be auto-created again!)
foreach (array('config', 'extension', 'filter', 'modules') as $cache) {
- // Is the cache file there?
- if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
- // Remove cache file
- $GLOBALS['cache_instance']->removeCacheFile();
- } // END - if
+ // Rebuild cache file
+ rebuildCache($cache);
} // END - foreach
} // END - if