]> git.mxchange.org Git - mailer.git/commitdiff
More code parts could take advantage of previously improved fixEmptyContentToDashes():
authorRoland Häder <roland@mxchange.org>
Wed, 6 Jul 2011 08:47:01 +0000 (08:47 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 6 Jul 2011 08:47:01 +0000 (08:47 +0000)
- More code parts, all checked for ext-nickname is installed/active in an extra
  ugly looking if() block, could be improved by previously rewritten function
  fixEmptyContentToDashes().
- Some internal TODOs closed
- TODOs.txt updated

22 files changed:
DOCS/TODOs.txt
inc/gen_refback.php
inc/language/de.php
inc/libs/bonus_functions.php
inc/libs/refback_functions.php
inc/libs/user_functions.php
inc/modules/admin/what-list_user.php
inc/modules/guest/what-active.php
inc/modules/guest/what-top10.php
inc/modules/member/what-doubler.php
inc/modules/member/what-transfer.php
inc/modules/member/what-unconfirmed.php
inc/mysql-manager.php
templates/de/html/admin/admin_list_user_row.tpl
templates/de/html/admin/admin_user_details.tpl
templates/de/html/guest/guest_active_row.tpl
templates/de/html/guest/guest_top10_row_earner.tpl
templates/de/html/guest/guest_top10_row_login.tpl
templates/de/html/guest/guest_top10_row_refs.tpl
templates/de/html/member/member_bonus_turbo_row.tpl
templates/de/html/member/member_doubler.tpl
templates/de/html/member/member_ref_list_row.tpl

index 3f9934605595a3d527f9bd468f963f3756e22472..605bc0690f2452163cb7676656e7637d3ec8446f 100644 (file)
@@ -55,9 +55,9 @@
 ./inc/functions.php:2201:      // @TODO Rename column data_type to e.g. mail_status
 ./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter
 ./inc/install-functions.php:57:        // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0);
-./inc/language/de.php:1080:    // @TODO Rewrite these two constants
-./inc/language/de.php:1101:    // @TODO Rewrite these three constants
-./inc/language/de.php:772:// @TODO Are these constants longer used?
+./inc/language/de.php:1079:    // @TODO Rewrite these two constants
+./inc/language/de.php:1100:    // @TODO Rewrite these three constants
+./inc/language/de.php:771:// @TODO Are these constants longer used?
 ./inc/language-functions.php:255:      // @TODO These are all valid languages, again hard-coded
 ./inc/language-functions.php:44:// @TODO Rewrite all language constants to this function.
 ./inc/language/newsletter_de.php:13: * @TODO This language file is completely out-dated, please do no       *
@@ -66,7 +66,7 @@
 ./inc/language/sponsor_de.php:117:// @TODO Rewrite these four constants to one and use sprintf()
 ./inc/libs/admins_functions.php:451:           // @TODO This can be, somehow, rewritten
 ./inc/libs/beg_functions.php:55:               // @TODO Try to rewrite the following unset()
-./inc/libs/bonus_functions.php:203:            // @TODO Move this HTML to a template
+./inc/libs/bonus_functions.php:194:            // @TODO Move this HTML to a template
 ./inc/libs/doubler_functions.php:44:// @TODO Lame description
 ./inc/libs/doubler_functions.php:91:                   // @TODO Can't this be moved into EL?
 ./inc/libs/mailid_functions.php:47:            // @TODO Rewrite this to a dynamic include or so
 ./inc/libs/task_functions.php:240:             // @TODO These can be rewritten to filter
 ./inc/libs/task_functions.php:51:// @TODO Move all extension-dependent queries into filters
 ./inc/libs/theme_functions.php:93:     // @TODO Can't this be rewritten to an API function?
-./inc/libs/user_functions.php:144:     // @TODO These two constants are no longer used, maybe we reactivate this code?
-./inc/libs/user_functions.php:232:// @TODO Double-check configuration entry here
-./inc/libs/user_functions.php:327:                     // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content);
-./inc/libs/user_functions.php:356:                     // @TODO Make this filter working: $url = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON));
-./inc/libs/user_functions.php:623:                                     // @TODO Try to rewrite the following unset()
+./inc/libs/user_functions.php:146:     // @TODO These two constants are no longer used, maybe we reactivate this code?
+./inc/libs/user_functions.php:234:// @TODO Double-check configuration entry here
+./inc/libs/user_functions.php:329:                     // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content);
+./inc/libs/user_functions.php:358:                     // @TODO Make this filter working: $url = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON));
+./inc/libs/user_functions.php:625:                                     // @TODO Try to rewrite the following unset()
 ./inc/libs/yoomedia_functions.php:114: $response = YOOMEDIA_QUERY_API('out_textmail.php', true); // @TODO Ask Yoo!Media for test script
 ./inc/load_config.php:75:      // @TODO Rewrite them to avoid this else block
 ./inc/loader/load-extension.php:13: * @TODO Rewrite this whole file                                        *
 ./inc/modules/admin/what-list_refs.php:107:                                                            // @TODO Try to rewrite some to EL
 ./inc/modules/admin/what-list_unconfirmed.php:107:     // @TODO "Please do not call me directly." Should be rewritten to a nice selection depending on ext-bonus
 ./inc/modules/admin/what-list_unconfirmed.php:84:      // @TODO This constant might be unused? define('__LIST_UNCON_TITLE', '{--ADMIN_LIST_UNCONFIRMED_BONUS_LINKS--}');
-./inc/modules/admin/what-list_user.php:165:            // @TODO Rewrite these to filters
-./inc/modules/admin/what-list_user.php:273:            // @TODO Rewrite this into a filter
-./inc/modules/admin/what-list_user.php:322:                    // @TODO Rewrite this into a filter
-./inc/modules/admin/what-list_user.php:57:// @TODO Rewrite these if-blocks in a filter
+./inc/modules/admin/what-list_user.php:257:            // @TODO Rewrite this into a filter
+./inc/modules/admin/what-list_user.php:300:                    // @TODO Rewrite this into a filter
 ./inc/modules/admin/what-logs.php:64:                  // @TODO Fix content-type here
 ./inc/modules/admin/what-logs.php:70:                  // @TODO Fix content-type here
 ./inc/modules/admin/what-mem_add.php:124:                              // @TODO This can be somehow rewritten to a function
 ./inc/modules/member/what-rallyes.php:89:      // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&amp;what=impressum&amp;admin=' . $content['admin_id'] . '%}">' . $content['login'] . '</a>';
 ./inc/modules/member/what-refback.php:124:                     // @TODO UNUSED: $refRow['status']      = translateUserStatus($refRow['status']);
 ./inc/modules/member/what-reflinks.php:52:// @TODO Move this into a filter
-./inc/modules/member/what-transfer.php:134:                            // @TODO Rewrite this to a filter
-./inc/modules/member/what-transfer.php:223:                            // @TODO Try to rewrite his to $content = SQL_FETCHARRAY(), see some lines above for two different queries
-./inc/modules/member/what-transfer.php:96:                     // @TODO Rewrite this to a filter
+./inc/modules/member/what-transfer.php:127:                            // @TODO Rewrite this to a filter
 ./inc/modules/member/what-unconfirmed.php:138: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
 ./inc/modules/member/what-unconfirmed.php:203:                         // @TODO This 'userid' cannot be saved because of encapsulated EL code
 ./inc/modules/order.php:74:            // @TODO Unused: 2,4
 ./inc/mysql-manager.php:1485:                  // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
 ./inc/mysql-manager.php:1573:          // @TODO Rewrite these lines to a filter
 ./inc/mysql-manager.php:1597:  // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1965:                  // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:2009:// @TODO Fix inconsistency between last_module and getWhat()
+./inc/mysql-manager.php:1961:                  // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:2005:// @TODO Fix inconsistency between last_module and getWhat()
 ./inc/mysql-manager.php:371:   // @TODO Try to rewrite this to one or more functions
 ./inc/mysql-manager.php:44:// @TODO Can we cache this?
 ./inc/purge/purge-inact.php:55:        // @TODO Rewrite these if() blocks to a filter
index fe3b8672b2c8661f64ffe2d9618d4e4d0000f194..59e457098d7325a4986cced399f01d6c91e5ff20 100644 (file)
@@ -44,7 +44,7 @@ if (!defined('__SECURITY')) {
 loadIncludeOnce('inc/libs/refback_functions.php');
 
 // Sanity-check: Do we have ref level 0?
-$result = SQL_QUERY('SELECT `id` FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `level`=0', __FILE__, __LINE__);
+$result = SQL_QUERY('SELECT `id` FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `level`=0 OR `level` IS NULL', __FILE__, __LINE__);
 if (!SQL_HASZERONUMS($result)) {
        // Remove index temporaly
        SQL_ALTER_TABLE('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `userid_level`', __FILE__, __LINE__);
index b3578e0a244a79fa192a3cce0934ea2c6e6641c9..886d79ea0abf5944e6e2ec7823a548850d4c2a36 100644 (file)
@@ -740,7 +740,6 @@ addMessages(array(
        'OWN_POINTS' => "Eigenes Guthaben",
        'ADMIN_TASK_INFOS' => "Infos",
        'NICKNAME' => "Nickname",
-       'EXT_NICKNAME_404' => "Erweiterung <span class=\"data\">nickname</span> fehlt.",
        'ADMIN_PROBLEM_NO_MENU' => "Konnte keine Men&uuml;eintr&auml;ge finden.",
        'USER_REFERAL_404' => "Dieses Mitglied hat keine Referals gemacht.",
        'USER_NICKNAME' => "Nickname",
index 7bbf24eee983e811db0bffb3a7823024e3065260..fe9d30de02272a2a14ea232f3875f5d08478cc20 100644 (file)
@@ -173,15 +173,6 @@ LIMIT 1",
                        if (SQL_NUMROWS($result_users) == 1) {
                                // Load data
                                $rows = merge_array($rows, SQL_FETCHARRAY($result_users));
-
-                               // Is ext-nickname active?
-                               if (isExtensionActive('nickname')) {
-                                       // Then get the nickname
-                                       $nick = getNickname($rows['userid']);
-
-                                       // Is it not empty? Then use it
-                                       if (!empty($nick)) $rows['userid'] = $nick;
-                               } // END - if
                        } // END - if
 
                        // Free result
index 0911ea9b459b752f0eb747d48db08eeb57ec5a74..18b9ff9490cf53a347452f73074e6e602e9ac827 100644 (file)
@@ -285,33 +285,28 @@ function updateRefbackTable ($userid) {
 function getArrayFromRefbackUserRefs ($userid, $level) {
        //* DEBUG: */ print("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
        // Default is no refs and no nickname
-       $add = '';
        $refs = array();
 
-       // Do we have nickname extension installed?
-       if (isExtensionActive('nickname')) {
-               $add = ", d.`nickname`";
-       } // END - if
-
        // Get refs from database
        $result = SQL_QUERY_ESC("SELECT
-       r.id,
-       r.refid,
-       r.refback,
-       r.points,
-       d.status".$add.",
-       d.joined,
-       d.refid AS level_refid
+       r.`id`,
+       r.`refid`,
+       r.`refback`,
+       r.`points`,
+       d.`status`
+       d.`joined`,
+       d.`refid` AS `level_refid`
 FROM
        `{?_MYSQL_PREFIX?}_user_refs` AS r
 LEFT JOIN
        `{?_MYSQL_PREFIX?}_user_data` AS d
 ON
-       r.refid=d.userid
+       r.`refid`=d.`userid`
 WHERE
-       r.userid=%s AND r.level=%s
+       r.`userid`=%s AND
+       r.`level`=%s
 ORDER BY
-       r.refid ASC",
+       r.`refid` ASC",
                array(bigintval($userid), bigintval($level)), __FUNCTION__, __LINE__);
 
        // Are there some entries?
index 8e1eea9389e1432b67110480085ae5bb04883d66..18b0cd64c4c4682440ed318348a88aedaa7fbed9 100644 (file)
@@ -99,7 +99,9 @@ function addSortLinks ($letter, $sortby, $colspan, $return=false) {
        elseif (isGetRequestParameterSet('mode')) $add .= '&amp;mode=' . getRequestParameter('mode');
 
        // Makes order by links..
-       if ($letter == 'front') $letter = '';
+       if ($letter == 'front') {
+               $letter = '';
+       } // END - if
 
        // Prepare array with all possible sorters
        $list = array(
index 70120a8d3f678dfc2a520aec5a4c2382cd766fc0..36fc44e79c3fc8ec2752e6d4a94a273c28c22516 100644 (file)
@@ -53,15 +53,6 @@ if ((!isExtensionInstalled('user')) || (!isExtensionActive('user'))) {
 $MORE = '';
 $colspan = 4;
 
-// Add nickname if extension is found&active
-// @TODO Rewrite these if-blocks in a filter
-if (isExtensionActive('nickname')) {
-       // Add nickname
-       $MORE .= ", `nickname`";
-} else {
-       $MORE .= ", `userid`";
-}
-
 // Add random confirmed if extension version matches
 if (isExtensionInstalledAndNewer('user', '0.3.4')) {
        // Add it...
@@ -154,19 +145,12 @@ LIMIT 1",
                // Add more data
                $content['own_points']        = $data['points'];
                $content['lock_timestamp']    = generateDateTime($content['lock_timestamp'], 2);
-               $content['nickname']          = '{--EXT_NICKNAME_404--}';
 
                // Link to email_details if some are sent
                if ($content['emails_sent'] > 0) {
                        $content['emails_sent'] = $base . '&amp;what=email_details&amp;userid=' . $content['userid'] . '%}">}{%pipe,translateComma=' . $content['emails_sent'] . '%}</a>]';
                } // END - if
 
-               // Nickname inclusion?
-               // @TODO Rewrite these to filters
-               if (isExtensionInstalled('nickname')) {
-                       $content['nickname'] = getNickname($content['userid']);
-               } // END - if
-
                // Clickrate
                $content['click_rate'] = '0';
                if ($content['emails_received'] > 0) {
@@ -294,12 +278,6 @@ LIMIT 1",
                                $content['emails_sent'] = $base . '&amp;what=email_details&amp;userid=' . $content['userid'] . '%}">{%pipe,translateComma=' . $content['emails_sent'] . '%}</a>]';
                        } // END - if
 
-                       // Add nickname
-                       $content['nickname'] = '{--EXT_NICKNAME_404--}';
-                       if (isExtensionInstalled('nickname')) {
-                               $content['nickname'] = getNickname($content['userid']);
-                       } // END - if
-
                        // Clickrate
                        $content['rate'] = '0';
                        if ($content['emails_received'] > 0) {
index 36dd9e4443c3749550b1238d785853462363b0e7..a0075a13c91129ad9b06a0211032545fcb871dd9 100644 (file)
@@ -48,17 +48,9 @@ if ((!isExtensionActive('active')) && (!isAdmin())) {
        return;
 } // END - if
 
-// Extra field to include is by default userid
-$add = '';
-
-// If nickname is installed the extra field is the nickname of the user
-if (isExtensionActive('nickname')) {
-       $add = ', `nickname`';
-} // END - if
-
 // Check for members who were active only this day
 $result = SQL_QUERY("SELECT
-       `userid``, `last_online`".$add."
+       `userid``, `last_online`
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
 WHERE
index ebde2cb86c4fa8e1d14923d6e983502d9c3424c5..139f7f248ad6dc87ea6d8ed9ff0449c6a222cbba 100644 (file)
@@ -65,12 +65,6 @@ LIMIT {?top10_max?}", __FILE__, __LINE__);
 
 $OUT = ''; $count = 1;
 while ($content = SQL_FETCHARRAY($result)) {
-       // Init nickname
-       $content['nickname'] = '';
-
-       // Get nickname
-       if (isExtensionActive('nickname')) $content['nickname'] = getNickname($content['userid']);
-
        // Prepare data for template
        $content = array(
                'cnt'          => $count,
@@ -130,12 +124,6 @@ LIMIT {?top10_max?}", __FILE__, __LINE__);
 
 $OUT = ''; $count = 1;
 while ($content = SQL_FETCHARRAY($result)) {
-       // Init nickname
-       $content['nickname'] = '';
-
-       // Get nickname
-       if (isExtensionActive('nickname')) $content['nickname'] = getNickname($content['userid']);
-
        // Prepare data for template
        $content = array(
                'cnt'         => $count,
@@ -194,14 +182,6 @@ LIMIT {?top10_max?}", __FILE__, __LINE__);
 
 $OUT = ''; $count = 1;
 while ($content = SQL_FETCHARRAY($result)) {
-       // Init nickname
-       $content['nickname'] = '';
-
-       // Get nickname
-       if (isExtensionActive('nickname')) {
-               $content['nickname'] = getNickname($content['userid']);
-       } // END - if
-
        // Prepare data for template
        $content = array(
                'cnt'         => $count,
index 3687b6aeea1acdfeb2719909f9a8093ea85783c6..45f5512c683f3f809f360b1e9666b389037b3952 100644 (file)
@@ -50,15 +50,6 @@ if ((!isExtensionActive('doubler')) && (!isAdmin())) {
        return;
 } // END - if
 
-// Init nickname
-$content['nickname'] = '';
-
-// Transfer referal id
-if (isExtensionActive('nickname')) {
-       // Load nickname from DB
-       $content['nickname'] = getNickname(getMemberId());
-} // END - if
-
 // Which mail-send-mode did the admin setup?
 $content['payout_time'] = '{--DOUBLER_PAYOUT_TIME_' . getConfig('doubler_send_mode') . '--}';
 
index 1c78c583dddb2c449a0f43a9bb0ba11533b7bafe..03231df4cc2ede074fd42e355fc906c25cdd04fc 100644 (file)
@@ -92,15 +92,8 @@ switch ($mode) {
                        // Test if a recipient is selected
                        $valid_recipient = isValidUserId(postRequestParameter('to_userid'));
 
-                       // Check for nickname extension and set additional data
-                       // @TODO Rewrite this to a filter
-                       $add = '';
-                       if (isExtensionActive('nickname')) {
-                               $add = ', `nickname`';
-                       } // END - if
-
                        // Re-check receivers and own personal data
-                       $result = SQL_QUERY_ESC("SELECT `userid`, `gender`, `surname`, `family`, `email`".$add." FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid` IN ('%s','%s') AND `status`='CONFIRMED' LIMIT 2",
+                       $result = SQL_QUERY_ESC("SELECT `userid`, `gender`, `surname`, `family`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid` IN ('%s','%s') AND `status`='CONFIRMED' LIMIT 2",
                                array(
                                        getMemberId(),
                                        bigintval(postRequestParameter('to_userid'))
@@ -206,34 +199,20 @@ switch ($mode) {
 
                if (!isFormSent()) {
                        // Load member list
-                       if (isExtensionActive('nickname')) {
-                               // Load userid and nickname
-                               $result = SQL_QUERY_ESC("SELECT `userid`, `nickname` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' AND `opt_in`='Y' AND `userid` != '%s' ORDER BY `userid` ASC",
-                                       array(getMemberId()), __FILE__, __LINE__);
-                       } else {
-                               // Load only userid
-                               $result = SQL_QUERY_ESC("SELECT `userid`, `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' AND `opt_in`='Y' AND `userid` != '%s' ORDER BY `userid` ASC",
-                                       array(getMemberId()), __FILE__, __LINE__);
-                       }
+                       $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' AND `opt_in`='Y' AND `userid` != '%s' ORDER BY `userid` ASC",
+                               array(getMemberId()), __FILE__, __LINE__);
 
                        if (!SQL_HASZERONUMS($result)) {
                                // Load list
                                $OUT  = '<select name="to_userid" size="1" class="form_select">
        <option value="0">{--SELECT_NONE--}</option>';
-                               // @TODO Try to rewrite his to $content = SQL_FETCHARRAY(), see some lines above for two different queries
-                               while (list($userid, $nick) = SQL_FETCHROW($result)) {
+                               while (list($userid) = SQL_FETCHROW($result)) {
                                        $OUT .= '       <option value="' . $userid . '"';
-                                       if ((isPostRequestParameterSet('to_userid')) && (postRequestParameter('to_userid') == $userid)) $OUT .= ' selected="selected"';
-                                       $OUT .= '>';
-                                       if (($nick != $userid) && (!empty($nick))) {
-                                               // Output nickname
-                                               $OUT .= $nick;
-                                       } else {
-                                               // Output userid
-                                               $OUT .= $userid;
-                                       }
-                                       $OUT .= '</option>';
-                               }
+                                       if ((isPostRequestParameterSet('to_userid')) && (postRequestParameter('to_userid') == $userid)) {
+                                               $OUT .= ' selected="selected"';
+                                       } // END - if
+                                       $OUT .= '>' . $userid . ' ({%user,nickname,fixEmptyContentToDashes=' . $userid . '%})</option>';
+                               } // END - while
                                $OUT .= '</select>';
                                $content['to_disabled'] = '';
 
index 751148967430062c94db7ddb0cc2c39b013defbd..1389c33d6abf03212bbd06436156cf4488b5860a 100644 (file)
@@ -65,8 +65,8 @@ LIMIT 1",
        $content['userid']      = getMemberId();
        $content['user_status'] = '{%message,MEMBER_MAIL_BONUS_CONFIRMED_UNKNOWN=' . $content['id'] . '%}';
 
-       // Is ext-user installed?
-       if (isExtensionInstalled('user')) {
+       // Is ext-user active?
+       if (isExtensionActive('user')) {
                // Get timestamp from insert
                $content['user_status'] = '{%message,MEMBER_MAIL_BONUS_CONFIRMED_ON=' . generateDateTime(getEpocheTimeFromUserStats('bonusid', $content['id']), '2') . '%}';
        } // END - if
@@ -104,8 +104,8 @@ LIMIT 1",
        $content['userid']      = getMemberId();
        $content['user_status'] = '{%message,MEMBER_MAIL_NORMAL_CONFIRMED_UNKNOWN=' . $content['id'] . '%}';
 
-       // Is ext-user installed?
-       if (isExtensionInstalled('user')) {
+       // Is ext-user active?
+       if (isExtensionActive('user')) {
                // Get timestamp from insert
                $content['user_status'] = '{%message,MEMBER_MAIL_NORMAL_CONFIRMED_ON=' . generateDateTime(getEpocheTimeFromUserStats('mailid', $content['id']), '2') . '%}';
        } // END - if
index 41a80d2e7df0882533fbf10348bf7bc882ff2b7f..e80d559b852d2729fdf36634d34c7b387038764c 100644 (file)
@@ -1871,31 +1871,27 @@ function generateReceiverList ($categoryId, $receiver, $mode = '') {
 function getUserReferalPoints ($userid, $level) {
        //* DEBUG: */ debugOutput('----------------------- <font color="#00aa00">'.__FUNCTION__.' - ENTRY</font> ------------------------<ul><li>');
        // Default is no refs and no nickname
-       $add = '';
        $refs = array();
 
-       // Do we have nickname extension installed?
-       if (isExtensionActive('nickname')) {
-               $add = ', ud.nickname';
-       } // END - if
-
        // Get refs from database
        $result = SQL_QUERY_ESC("SELECT
-       ur.id, ur.refid, ud.status, ud.last_online, ud.mails_confirmed, ud.emails_received".$add."
+       ur.`id`, ur.`refid`, ud.`status`, ud.`last_online`, ud.`mails_confirmed`, ud.`emails_received`
 FROM
        `{?_MYSQL_PREFIX?}_user_refs` AS ur
 LEFT JOIN
        `{?_MYSQL_PREFIX?}_user_points` AS up
 ON
-       ur.refid=up.userid AND ur.level=0
+       ur.refid=up.userid AND
+       (ur.level=0 OR ur.level IS NULL)
 LEFT JOIN
        `{?_MYSQL_PREFIX?}_user_data` AS ud
 ON
-       ur.refid=ud.userid
+       ur.`refid`=ud.`userid`
 WHERE
-       ur.userid=%s AND ur.level=%s
+       ur.`userid`=%s AND
+       ur.`level`=%s
 ORDER BY
-       ur.refid ASC",
+       ur.`refid` ASC",
                array(
                        bigintval($userid),
                        bigintval($level)
index d797a40a579fdd26c0e7f47b455f684103c8d2dc..669ab0baa960cbfe2a25e012086e5aba31b18cd4 100644 (file)
@@ -10,7 +10,7 @@
        <td align="center" class="bottom right {%template,ColorSwitch%}">{%pipe,translateGender=$content[gender]%}</td>
        <td align="center" class="bottom right {%template,ColorSwitch%}">$content[surname]</td>
        <td align="center" class="bottom right {%template,ColorSwitch%}">$content[family]</td>
-       <td align="center" class="bottom {%template,ColorSwitch%}">{%pipe,fixEmptyContentToDashes=$content[nickname]%}</td>
+       <td align="center" class="bottom {%template,ColorSwitch%}">{%user,nickname,fixEmptyContentToDashes=$content[userid]%}</td>
 </tr>
 <tr>
        <td align="center" class="right {%template,ColorSwitch%}"><strong>{--EMAIL--}:</strong></td>
index 01733e34ed0cf59bfa792b33f624c94fb3caaf17..d2a61d817b2b284585884124c806f974f6916f57 100644 (file)
                </td>
                <td align="center" class="top right">
                        {--USER_NICKNAME--}:<br />
-                       <strong>$content[nickname]</strong>
+                       <strong>{%user,nickname,fixEmptyContentToDashes=$content[userid]%}</strong>
                </td>
                <td align="center" class="top right">
                        {--CLICK_RATE--}:<br />
index 0616c12211d84bd5c92f4fd60e6a31ef1395a686..be39d2aa9a1580ad02370b80015fc9627009fd33 100644 (file)
@@ -1,5 +1,5 @@
 <tr>
-       <td class="{%template,ColorSwitch%} bottom right">$content[userid] ({%pipe,fixEmptyContentToDashes=$content[nickname]%})</td>
+       <td class="{%template,ColorSwitch%} bottom right">$content[userid] ({%user,nickname,fixEmptyContentToDashes=$content[userid]%})</td>
        <td class="{%template,ColorSwitch%} bottom right">{%pipe,getTotalPoints,translateComma=$content[userid]%}</td>
        <td class="{%template,ColorSwitch%} bottom">$content[last_online]</td>
 </tr>
index ce7b6499477042df28b9199473e2c187b865423a..5f2b0ed38f3c408a1e45ea112146d20f51e768f3 100644 (file)
@@ -1,6 +1,6 @@
 <tr>
        <td class="top10_row1 {%template,ColorSwitch%} bottom right" align="center">$content[cnt]</td>
-       <td class="top10_row2 {%template,ColorSwitch%} bottom right">$content[userid] ({%pipe,fixEmptyContentToDashes=$content[nickname]%})</td>
+       <td class="top10_row2 {%template,ColorSwitch%} bottom right">$content[userid] ({%user,nickname,fixEmptyContentToDashes=$content[userid]%})</td>
        <td class="top10_row3 {%template,ColorSwitch%} bottom right">{%pipe,translateComma=$content[points]%}</td>
        <td class="top10_row5 {%template,ColorSwitch%} bottom">$content[last_online]</td>
 </tr>
index 0293b25c4c94548400f3bb4ca4c37ce85b6cb6fe..d390c75858f97eb130675dd7be5620ed37add930 100644 (file)
@@ -1,6 +1,6 @@
 <tr>
        <td class="top10_row1 {%template,ColorSwitch%} bottom right" align="center">$content[cnt]</td>
-       <td class="top10_row2 {%template,ColorSwitch%} bottom right">$content[userid] ({%pipe,fixEmptyContentToDashes=$content[nickname]%})</td>
+       <td class="top10_row2 {%template,ColorSwitch%} bottom right">$content[userid] ({%user,nickname,fixEmptyContentToDashes=$content[userid]%})</td>
        <td class="top10_row3 {%template,ColorSwitch%} bottom right">{%pipe,translateComma=$content[total_logins]%}</td>
        <td class="top10_row4 {%template,ColorSwitch%} bottom right">{%pipe,translateComma=$content[points]%}</td>
        <td class="top10_row5 {%template,ColorSwitch%} bottom">$content[last_online]</td>
index 22c3a7784c97155b7a9e430e5707372258a359b5..d37ec997a0ae2fc755ad67f946aeffbe108a8eb7 100644 (file)
@@ -1,6 +1,6 @@
 <tr>
        <td class="top10_row1 {%template,ColorSwitch%} bottom right" align="center">$content[cnt]</td>
-       <td class="top10_row2 {%template,ColorSwitch%} bottom right">$content[userid] ({%pipe,fixEmptyContentToDashes=$content[nickname]%})</td>
+       <td class="top10_row2 {%template,ColorSwitch%} bottom right">$content[userid] ({%user,nickname,fixEmptyContentToDashes=$content[userid]%})</td>
        <td class="top10_row3 {%template,ColorSwitch%} bottom right">{%pipe,translateComma=$content[refs]%}</td>
        <td class="top10_row4 {%template,ColorSwitch%} bottom right">{%pipe,getTotalPoints,translateComma=$content[userid]%}</td>
        <td class="top10_row5 {%template,ColorSwitch%} bottom">$content[last_online]</td>
index 855c1c6f8a0ce8397c5175c89608484e6c1c0f7b..efab5bbf4e74a314713ae91df681281605607126 100644 (file)
@@ -1,5 +1,11 @@
 <tr>
-  <td class="rank_$content[rank] bottom {%template,ColorSwitch%}">{%pipe,translateComma=$content[rank]%}.</td>
-  <td class="rank_$content[rank] bottom {%template,ColorSwitch%}" align="center">$content[userid]</td>
-  <td class="rank_$content[rank] bottom {%template,ColorSwitch%}" align="center">{%pipe,translateComma=$content[points]%}</td>
+       <td class="rank_$content[rank] bottom {%template,ColorSwitch%}">
+               {%pipe,translateComma=$content[rank]%}.
+       </td>
+       <td class="rank_$content[rank] bottom {%template,ColorSwitch%}" align="center">
+               $content[userid] ({%user,nickname,fixEmptyContentToDashes=$content[userid]%})
+       </td>
+       <td class="rank_$content[rank] bottom {%template,ColorSwitch%}" align="center">
+               {%pipe,translateComma=$content[points]%}
+       </td>
 </tr>
index 875990e861a9c40dc45686fdd1cb75905d35731c..567d94609ef39453ba122ea6d6feb1e7e9720633 100644 (file)
@@ -1,6 +1,6 @@
 <div align="center">
        <div class="para">
-       {--MEMBER_DOUBLER_YOUR_LINK--}:
+               {--MEMBER_DOUBLER_YOUR_LINK--}:
        </div>
 
        <div>
index c76dd275056072e3a27b16aafe28e2685b8d6038..0a6570f6ea398632ea99650ba87990c1adcb04e7 100644 (file)
@@ -1,6 +1,6 @@
 <tr>
        <td align="center" class="{%template,ColorSwitch%} bottom right">
-               $content[refid] ({%pipe,fixEmptyContentToDashes=$content[nickname]%})
+               $content[refid] ({%user,nickname,fixEmptyContentToDashes=$content[userid]%})
        </td>
        <td align="center" class="{%template,ColorSwitch%} bottom right">
                {%pipe,translateUserStatus=$content[status]%}