* $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
* $Author:: $ *
- * Needs to be in all Files and every File needs "svn propset *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009, 2010 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
} // END - if
// Add description as navigation point
-addMenuDescription('admin', __FILE__);
+addYouAreHereLink('admin', __FILE__);
// Normally we want the overview of all registered extensions
$do = 'overview';
// Shall we keep the extension always active?
if ((isset($GLOBALS['cache_array']['always_active'][getExtensionName($ext_id)])) && ($GLOBALS['cache_array']['always_active'][getExtensionName($ext_id)] == 'Y') && ($ext_active == 'Y')) {
// Keep this extension active!
- loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_ALWAYS_ACTIVE', getExtensionName($ext_id)));
+ displayMessage(getMaskedMessage('ADMIN_EXTENSION_ALWAYS_ACTIVE', getExtensionName($ext_id)));
} else {
// Deactivation is default
$active = 'N';
switch ($active) {
case 'Y': setExtensionMode('activate'); break;
case 'N': setExtensionMode('deactivate'); break;
- } // END - if
+ } // END - switch
// Run embeded SQL commands
doExtensionSqls($ext_id, getExtensionMode());
// Load required data
if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) {
- $result = SQL_QUERY_ESC("SELECT ext_has_css, ext_active FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `id`=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `ext_has_css`, `ext_active` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `id`=%s LIMIT 1",
array(bigintval($ext_id)), __FILE__, __LINE__);
list($css, $active) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
} else {
- $result = SQL_QUERY_ESC("SELECT ext_active FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `id`=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `ext_active` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `id`=%s LIMIT 1",
array(bigintval($ext_id)), __FILE__, __LINE__);
list($active) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Listing of SQLs enabled?
if (isVerboseSqlEnabled()) {
// Load SQL commands in remove mode
- if (loadExtension($ext_name, 'remove', '', true)) {
+ if (loadExtension($ext_name, 'remove', '0.0', true)) {
// Generate extra table with loaded SQL commands
$VERBOSE_OUT = addExtensionVerboseSqlTable();
} // END - if
$content = array(
'id' => $ext_id,
'ext_name' => $ext_name,
- 'ext_ver' => getExtensionVersion($ext_name),
'verbose' => $VERBOSE_OUT
);
$do = 'demo';
} elseif (isGetRequestParameterSet('registered')) {
// Extensions changed
- loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_REGISTERED', getExtensionName(getRequestParameter('registered'))));
+ displayMessage(getMaskedMessage('ADMIN_EXTENSION_REGISTERED', getExtensionName(getRequestParameter('registered'))));
// Show next link
if (isExtensionActive('task')) {
}
} elseif (isGetRequestParameterSet('changed')) {
// Extensions changed
- loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_CHANGED', bigintval(getRequestParameter('changed'))));
+ displayMessage(getMaskedMessage('ADMIN_EXTENSION_CHANGED', bigintval(getRequestParameter('changed'))));
} elseif (isGetRequestParameterSet('edited')) {
// Extensions changed
- loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_EDITED', bigintval(getRequestParameter('edited'))));
+ displayMessage(getMaskedMessage('ADMIN_EXTENSION_EDITED', bigintval(getRequestParameter('edited'))));
} elseif (isGetRequestParameterSet('removed')) {
// Extensions changed
- loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSIONS_REMOVED', bigintval(getRequestParameter('removed'))));
+ displayMessage(getMaskedMessage('ADMIN_EXTENSIONS_REMOVED', bigintval(getRequestParameter('removed'))));
}
// Shall we display active/inactive extensions?
while ($content = SQL_FETCHARRAY($result)) {
// Prepare CSS selection output
$cssSelection = '---';
- if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) $cssSelection = translateYesNo($content['ext_css']);
+ if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) {
+ $cssSelection = translateYesNo($content['ext_css']);
+ } // END - if
// Prepare data for the row template
$content['ext_css'] = $cssSelection;
loadTemplate('admin_extensions', false, $OUT);
} else {
// No extensions are registered
- loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_EXTENSION_REGISTERED--}');
+ displayMessage('{--ADMIN_NO_EXTENSION_REGISTERED--}');
}
break;
redirectToUrl('modules.php?module=admin&what=extensions&registered=' . getExtensionId($ext_name));
} else {
// Errors detected!
- loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_NOT_REGISTERED', $ext_name));
+ displayMessage(getMaskedMessage('ADMIN_EXTENSION_NOT_REGISTERED', $ext_name));
}
// Do we need to update cache file?
} // END - if
} elseif (isExtensionInstalled($ext_name)) {
// Notify the admin that we have a problem here...
- loadTemplate('admin_settings_saved', false, '{--ADMIN_EXTENSION_REGISTRATION_FAILED_ALREADY--}');
+ displayMessage('{--ADMIN_EXTENSION_REGISTRATION_FAILED_ALREADY--}');
} else {
// Notify the admin that we have a problem here...
- loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_REGISTRATION_FAILED_404', $ext_name));
+ displayMessage(getMaskedMessage('ADMIN_EXTENSION_REGISTRATION_FAILED_404', $ext_name));
}
} else {
// Motify the admin that we have a problem here...
- loadTemplate('admin_settings_saved', false, '{--ADMIN_EXTENSION_REGISTRATION_FAILED_DEPRECATED--}');
+ displayMessage('{--ADMIN_EXTENSION_REGISTRATION_FAILED_DEPRECATED--}');
}
} else {
// Extension was not found in task management
- loadTemplate('admin_settings_saved', false, '{--ADMIN_EXTENSION_REGISTRATION_FAILED_ID_404--}');
+ displayMessage('{--ADMIN_EXTENSION_REGISTRATION_FAILED_ID_404--}');
}
} elseif ($numTasks == '0') {
// No longer assigned or old task
- loadTemplate('admin_settings_saved', false, '{--ADMIN_EXTENSION_REGISTRATION_FAILED_ASSIGED--}');
+ displayMessage('{--ADMIN_EXTENSION_REGISTRATION_FAILED_ASSIGED--}');
} else {
// id is invalid
- loadTemplate('admin_settings_saved', false, '{--ADMIN_EXTENSION_REGISTRATION_FAILED_INVALID--}');
+ displayMessage('{--ADMIN_EXTENSION_REGISTRATION_FAILED_INVALID--}');
}
break;
case 'demo':
- loadTemplate('admin_settings_saved', false, '{--SETTINGS_NOT_SAVED--}');
+ displayMessage('{--SETTINGS_NOT_SAVED--}');
break;
} // END - switch