]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-extensions.php
Some language strings fixed, renamed. Copyright notice updated
[mailer.git] / inc / modules / admin / what-extensions.php
index 0e130785efd3b65dea30979f9401d048c5420b39..bfba5b7929f53cbb62a641a71ff760bdbf21f25c 100644 (file)
  * $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 *
@@ -43,7 +41,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 } // END - if
 
 // Add description as navigation point
-addMenuDescription('admin', __FILE__);
+addYouAreHereLink('admin', __FILE__);
 
 // Normally we want the overview of all registered extensions
 $do = 'overview';
@@ -190,7 +188,7 @@ if (isGetRequestParameterSet('reg_ext')) {
                        // 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
@@ -326,15 +324,11 @@ ORDER BY
                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__);
@@ -389,7 +383,7 @@ ORDER BY
                                // 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 {