]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/task_functions.php
Added new pre-registration filter for WDS66-based registration (unfinished).
[mailer.git] / inc / libs / task_functions.php
index d01582467be2939738018496214062c640b5e080..87e765626d81b20e838907460998483b66b3db8f 100644 (file)
@@ -88,25 +88,28 @@ function outputAdvancedOverview (&$result_main) {
                $content['update_tasks'] = '<a href="{%url=modules.php?module=admin&amp;what=list_task&amp;type=updates%}">' . $value . '</a>';
        } // END - if
 
-       //
-       // First check for all account status seperately
-       //
-       // Confirmed accounts
-       $value = getTotalConfirmedUser();
-       if ($value > 0) {
-               $content['confirmed_members'] = '<a href="{%url=modules.php?module=admin&amp;what=list_user&amp;status=confirmed%}">' . $value . '</a>';
-       } // END - if
+       // Do this only if ext-user is installed
+       if (isExtensionInstalled('user')) {
+               //
+               // First check for all account status seperately
+               //
+               // Confirmed accounts
+               $value = getTotalConfirmedUser();
+               if ($value > 0) {
+                       $content['confirmed_members'] = '<a href="{%url=modules.php?module=admin&amp;what=list_user&amp;status=confirmed%}">' . $value . '</a>';
+               } // END - if
 
-       // Unconfirmed accounts
-       $value = getTotalUnconfirmedUser();
-       if ($value > 0) {
-               $content['unconfirmed_members'] = '<a href="{%url=modules.php?module=admin&amp;what=list_user&amp;status=unconfirmed%}">' . $value . '</a>';
-       } // END - if
+               // Unconfirmed accounts
+               $value = getTotalUnconfirmedUser();
+               if ($value > 0) {
+                       $content['unconfirmed_members'] = '<a href="{%url=modules.php?module=admin&amp;what=list_user&amp;status=unconfirmed%}">' . $value . '</a>';
+               } // END - if
 
-       // Locked accounts
-       $value = getTotalLockedUser();
-       if ($value > 0) {
-               $content['locked_members'] = '<a href="{%url=modules.php?module=admin&amp;what=list_user&amp;status=locked%}">' . $value . '</a>';
+               // Locked accounts
+               $value = getTotalLockedUser();
+               if ($value > 0) {
+                       $content['locked_members'] = '<a href="{%url=modules.php?module=admin&amp;what=list_user&amp;status=locked%}">' . $value . '</a>';
+               } // END - if
        } // END - if
 
        if (isExtensionInstalledAndNewer('user', '0.3.4')) {
@@ -254,13 +257,6 @@ function outputAdvancedOverview (&$result_main) {
                        $userExclusionSql .= ' AND `d`.`userid` NOT IN (' . implode(', ', $excludedUserids) . ')';
                } // END - if
 
-               // Check for more extensions
-               // @TODO This can be rewritten to filter
-               if (isExtensionInstalledAndNewer('holiday', '0.1.3')) {
-                       // Recent ext-holiday found
-                       $userExclusionSql .= " AND `d`.`holiday_active`='N'";
-               } // END - if
-
                // Check for all accounts
                addSql("SELECT
        `d`.`userid`,
@@ -273,7 +269,7 @@ WHERE
        (UNIX_TIMESTAMP() - `d`.`joined`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `d`.`last_online`) >= {?ap_inactive_since?} AND
        (UNIX_TIMESTAMP() - `d`.`ap_notified`) >= {?ap_inactive_since?}
-       " . runFilterChain('user_exclusion_sql', $userExclusionSql) . "
+       " . runFilterChain('user_exclusion_sql', ' ' . $userExclusionSql) . "
 ORDER BY
        `d`.`userid` ASC");
                $WHATs[]  = 'list_autopurge';
@@ -328,7 +324,7 @@ ORDER BY
        // Both extensions must be there
        if ((isExtensionInstalledAndNewer('bonus', '0.2.3')) && (isExtensionActive('user'))) {
                // Get more columns
-               $add = runFilterChain('add_bonus_points_user_columns', '');
+               $add = trim(runFilterChain('add_bonus_points_user_columns', ''));
 
                // Active rallye, so add more point columns, if not empty
                $pointsColumns = '';
@@ -345,7 +341,10 @@ ORDER BY
                        $lastOnline   = ' AND (UNIX_TIMESTAMP() - `last_online`) < {?ap_inactive_since?}';
                } // END - if
 
-               addSql("SELECT
+               // Is it empty?
+               if (!empty($ointsColumns)) {
+                       // No, then add it
+                       addSql("SELECT
        " . $pointsColumns . " AS `points`
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
@@ -356,10 +355,11 @@ WHERE
 ORDER BY
        `points` DESC,
        `userid` ASC");
-               $WHATs[]  = 'list_bonus';
-               $DESCRs[] = '{--ADMIN_TASK_LIST_BONUS--}';
-               $TITLEs[] = '{--ADMIN_TASK_LIST_BONUS_TITLE--}';
-       }
+                       $WHATs[]  = 'list_bonus';
+                       $DESCRs[] = '{--ADMIN_TASK_LIST_BONUS--}';
+                       $TITLEs[] = '{--ADMIN_TASK_LIST_BONUS_TITLE--}';
+               } // END - if
+       } // END - if
 
        // Again both extensions must be there
        if ((isExtensionInstalledAndNewer('beg', '0.1.2')) && (isExtensionActive('user'))) {
@@ -530,6 +530,12 @@ ORDER BY
                $DESCRs[] = '{--ADMIN_TASK_LIST_NETWORK_HEADER_LOG--}';
                $TITLEs[] = '{--ADMIN_TASK_LIST_NETWORK_HEADER_LOG_TITLE--}';
                $WHATs[]  = 'list_network_http_header';
+
+               // Check for API cache entries
+               addSql('SELECT `network_cache_id` FROM `{?_MYSQL_PREFIX?}_network_cache`');
+               $DESCRs[] = '{--ADMIN_TASK_LIST_NETWORK_API_CACHE--}';
+               $TITLEs[] = '{--ADMIN_TASK_LIST_NETWORK_API_CACHE_TITLE--}';
+               $WHATs[]  = 'list_network_api';
        } // END - if
 
        // Generate extra overview rows