]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_task.php
Performance hacks, encapsulation and more EL code usage:
[mailer.git] / inc / modules / admin / what-list_task.php
index f9884af24a42155d0a85ae2c0a1c706e147b864b..c8c6b831aefefec154c2e0c05fb4d425915772e4 100644 (file)
@@ -14,8 +14,6 @@
  * $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                    *
@@ -43,7 +41,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 } // END - if
 
 // Add description as navigation point
-addMenuDescription('admin', __FILE__);
+addYouAreHereLink('admin', __FILE__);
 
 if (!isExtensionActive('task')) {
        loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('task'));
@@ -55,7 +53,7 @@ if (!isGetRequestParameterSet('type')) setGetRequestParameter('type', 'your');
 
 switch (getRequestParameter('type')) {
        case 'your': // List only your own open (new) tasks
-               $whereStatement = "`assigned_admin`='".getCurrentAdminId()."' AND `status`='NEW' AND `task_type` != 'EXTENSION_UPDATE'";
+               $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='NEW' AND `task_type` != 'EXTENSION_UPDATE'";
                break;
 
        case 'updates': // List only updates assigned to you
@@ -112,7 +110,7 @@ ORDER BY
                                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=0 WHERE `id`=%s AND `assigned_admin`=%s LIMIT 1",
                                                array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
                                } // END - foreach
-                       } elseif (isFormSent('del')) {
+                       } elseif (isFormSent('delete')) {
                                // Delete tasks
                                foreach (postRequestParameter('sel') as $id => $sel) {
                                        if (getRequestParameter('type') == 'deleted') {
@@ -176,7 +174,7 @@ ORDER BY
                        ));
 
                        // Do we have an extension task?
-                       if (($content['task_type'] == 'EXTENSION') && (isExtensionNameValid($content['infos'])) && (!isExtensionInstalled($content['infos']))) {
+                       if (isExtensionTask($content)) {
                                // Load extension row template
                                $OUT .= loadTemplate('admin_list_task_ext_rows', true, $content);
                        } else {