More use of EL, fix for admin links
[mailer.git] / inc / functions.php
index f9a51c0cb6e0006883b0a6450a1e28d0fe1bf620..3ce992eb42afe71452a779c07c9c123b0c24e503 100644 (file)
@@ -178,7 +178,7 @@ function doFinalCompilation ($code, $insertComments = true) {
        $cnt = 0;
 
        // Compile all out
-       while (((strpos($code, '{--') !== false) || (strpos($code, '{DQUOTE}') !== false) || (strpos($code, '{?') !== false) || (strpos($code, '{%') !== false)) && ($cnt < 3)) {
+       while (((strpos($code, '{--') !== false) || (strpos($code, '{DQUOTE}') !== false) || (strpos($code, '{?') !== false) || (strpos($code, '{%') !== false)) && ($cnt < 4)) {
                // Init common variables
                $content = array();
                $newContent = '';
@@ -2058,13 +2058,16 @@ function isUrlValid ($URL, $compile=true) {
 }
 
 // Generate a list of administrative links to a given userid
-function generateMemberAdminActionLinks ($userid, $status = '') {
+function generateMemberAdminActionLinks ($userid) {
        // Make sure userid is a number
        if ($userid != bigintval($userid)) debug_report_bug(__FUNCTION__, __LINE__, 'userid is not a number!');
 
        // Define all main targets
        $targetArray = array('del_user', 'edit_user', 'lock_user', 'add_points', 'sub_points');
 
+       // Get user status
+       $status = getFetchedUserData('userid', $userid, 'status');
+
        // Begin of navigation links
        $OUT = '[';
 
@@ -2087,10 +2090,10 @@ function generateMemberAdminActionLinks ($userid, $status = '') {
                        $OUT .= strtoupper($tar);
                }
                $OUT .= '--}</a></span>|';
-       }
+       } // END - foreach
 
        // Finish navigation link
-       $OUT = substr($OUT, 0, -7) . ']';
+       $OUT = substr($OUT, 0, -1) . ']';
 
        // Return string
        return $OUT;