]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/doubler_functions.php
A lot while() conditions rewritten to SQL_FETCHARRAY(), see bug #107, @TODO tags...
[mailer.git] / inc / libs / doubler_functions.php
index 01720837be8084dde3ebc6e6afd307d71b730fb3..d61ef9634048cf624a784d6c6bef86fc6c6c777b 100644 (file)
@@ -74,19 +74,20 @@ LIMIT ".$limit, __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // List entries
                $OUT = ""; $SW = 2;
-               while (list($uid, $rid, $points, $time) = SQL_FETCHROW($result)) {
+               while ($content = SQL_FETCHARRAY($result)) {
+                       // Rewrite userid/refid only if admin is in
                        if (IS_ADMIN()) {
                                // Set links to admin area
-                               if ($uid > 0) { $uid = ADMIN_USER_PROFILE_LINK($uid); } else { $uid = "---"; }
-                               if ($rid > 0) { $rid = ADMIN_USER_PROFILE_LINK($rid); } else { $rid = "---"; }
-                       }
+                               if ($content['userid'] > 0) { $content['userid'] = ADMIN_USER_PROFILE_LINK($content['userid']); } else { $content['userid'] = "---"; }
+                               if ($content['refid'] > 0)  { $content['refid']  = ADMIN_USER_PROFILE_LINK($content['refid']);  } else { $content['refid']  = "---"; }
+                       } // END - if
 
                        // Prepare data for the row template
                        $content = array(
-                               'uid'    => $uid,
-                               'rid'    => $rid,
-                               'points' => TRANSLATE_COMMA($points),
-                               'stamp'  => MAKE_DATETIME($time, $DT_MODE),
+                               'uid'    => $content['userid'],
+                               'rid'    => $content['refid'],
+                               'points' => TRANSLATE_COMMA($content['points']),
+                               'stamp'  => MAKE_DATETIME($content['timemark'], $DT_MODE),
                                'sw'     => $SW,
                        );