* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Update extension's record
if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) {
// Update also CSS column when extensions sql_patches is newer or exact v0.0.6
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_has_css`='%s', `ext_active`='%s' WHERE `id`=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_has_css`='%s',`ext_active`='%s' WHERE `id`=%s LIMIT 1",
array(postRequestElement('css', $ext_id), $active, $ext_id), __FILE__, __LINE__);
} else {
// When extension is older than v0.0.6 there is no column for the CSS information
break;
case 'register': // Register new extension
- // Do we have some tasks?
+ // 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 (!isExtensionDeprecated()) {
// ... so we can finally register and load it in registration mode
if (registerExtension($ext_name, $taskId)) {
+ // Do we need to update cache file?
+ // @TODO Rewrite this to a filter
+ 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
+ } // END - foreach
+ } // END - if
+
// Errors?
if (!ifFatalErrorsDetected()) {
// Extension was found and successfully registered
// Errors detected!
displayMessage('{%message,ADMIN_EXTENSION_NOT_REGISTERED=' . $ext_name . '%}');
}
-
- // Do we need to update cache file?
- // @TODO Rewrite this to a filter
- if (isExtensionActive('cache')) {
- // Remove cache file (will be auto-created again!)
- if ($GLOBALS['cache_instance']->loadCacheFile('config')) $GLOBALS['cache_instance']->removeCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile('extension')) $GLOBALS['cache_instance']->removeCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile('filter')) $GLOBALS['cache_instance']->removeCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile('modules')) $GLOBALS['cache_instance']->removeCacheFile();
- } // END - if
} elseif (isExtensionInstalled($ext_name)) {
// Notify the admin that we have a problem here...
displayMessage('{--ADMIN_EXTENSION_REGISTRATION_FAILED_ALREADY--}');