* $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';
// 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
break;
case 'register': // Register new extension
- $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `assigned_admin`=%s AND `task_type`='EXTENSION' LIMIT 1",
- array(getCurrentAdminId()), __FILE__, __LINE__);
- $task_found = SQL_NUMROWS($result);
-
- // Free result
- SQL_FREERESULT($result);
+ // Do we have 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) && ($task_found == 1)) {
+ if (($taskId > 0) && ($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__);
// Extension was not found in task management
loadTemplate('admin_settings_saved', false, '{--ADMIN_EXTENSION_REGISTRATION_FAILED_ID_404--}');
}
- } elseif ($task_found == '0') {
+ } elseif ($numTasks == '0') {
// No longer assigned or old task
loadTemplate('admin_settings_saved', false, '{--ADMIN_EXTENSION_REGISTRATION_FAILED_ASSIGED--}');
} else {