./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 *
./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&what=impressum&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
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__);
'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üeinträge finden.",
'USER_REFERAL_404' => "Dieses Mitglied hat keine Referals gemacht.",
'USER_NICKNAME' => "Nickname",
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
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?
elseif (isGetRequestParameterSet('mode')) $add .= '&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(
$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...
// 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 . '&what=email_details&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) {
$content['emails_sent'] = $base . '&what=email_details&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) {
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
$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,
$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,
$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,
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') . '--}';
// 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'))
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'] = '';
$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
$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
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)
<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>
</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 />
<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>
<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>
<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>
<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>
<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>
<div align="center">
<div class="para">
- {--MEMBER_DOUBLER_YOUR_LINK--}:
+ {--MEMBER_DOUBLER_YOUR_LINK--}:
</div>
<div>
<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]%}