projects
/
mailer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
73078fa
)
Queries fixed
author
Roland Häder
<roland@mxchange.org>
Fri, 15 Jul 2011 22:15:20 +0000
(22:15 +0000)
committer
Roland Häder
<roland@mxchange.org>
Fri, 15 Jul 2011 22:15:20 +0000
(22:15 +0000)
13 files changed:
inc/daily/daily_birthday.php
patch
|
blob
|
history
inc/filters.php
patch
|
blob
|
history
inc/libs/bonus_functions.php
patch
|
blob
|
history
inc/libs/task_functions.php
patch
|
blob
|
history
inc/modules/admin/what-config_beg.php
patch
|
blob
|
history
inc/modules/admin/what-list_beg.php
patch
|
blob
|
history
inc/modules/admin/what-list_bonus.php
patch
|
blob
|
history
inc/modules/member/what-beg2.php
patch
|
blob
|
history
inc/modules/member/what-bonus.php
patch
|
blob
|
history
inc/monthly/monthly_beg.php
patch
|
blob
|
history
inc/monthly/monthly_bonus.php
patch
|
blob
|
history
inc/mysql-manager.php
patch
|
blob
|
history
mailid.php
patch
|
blob
|
history
diff --git
a/inc/daily/daily_birthday.php
b/inc/daily/daily_birthday.php
index 42273b6f314564adfb3c0d85e8244a3b8f54181e..25ba924b186edfd266d730195b0c4c37808ce1f6 100644
(file)
--- a/
inc/daily/daily_birthday.php
+++ b/
inc/daily/daily_birthday.php
@@
-59,8
+59,8
@@
$year = getYear();
$lastOnline = '';
// Shall I include only active members?
$lastOnline = '';
// Shall I include only active members?
-if ((getConfig('birthday_active') == 'Y') && (isExtensionActive('autopurge')) && (
isBegActiveEnabled()) && (
(getApInactiveSince() > 0))) {
- $add = ' AND (UNIX_TIMESTAMP() - `last_online`)
>=
{?ap_inactive_since?}';
+if ((getConfig('birthday_active') == 'Y') && (isExtensionActive('autopurge')) && ((getApInactiveSince() > 0))) {
+ $add = ' AND (UNIX_TIMESTAMP() - `last_online`)
<
{?ap_inactive_since?}';
} // END - if
// Only confirmed members shall receive birthday mails...
} // END - if
// Only confirmed members shall receive birthday mails...
diff --git
a/inc/filters.php
b/inc/filters.php
index 3cd51808454fe7031598e8ed8029df251309668f..57ebf505ba3d46276105a947fc2cc74a586d9191 100644
(file)
--- a/
inc/filters.php
+++ b/
inc/filters.php
@@
-293,7
+293,7
@@
function FILTER_UPDATE_LOGIN_DATA () {
} // END - if
// Recheck if logged in
} // END - if
// Recheck if logged in
- if (
!isMember(
)) {
+ if (
(!isMember()) || ((isAdmin()) && (!isDebugModeEnabled())
)) {
return false;
} // END - if
return false;
} // END - if
diff --git
a/inc/libs/bonus_functions.php
b/inc/libs/bonus_functions.php
index fe9d30de02272a2a14ea232f3875f5d08478cc20..6418d1e5431e9c5cc50a9cba5f361abd1ba72f17 100644
(file)
--- a/
inc/libs/bonus_functions.php
+++ b/
inc/libs/bonus_functions.php
@@
-95,8
+95,8
@@
function addTurboBonus ($mid, $userid, $type) {
// Add points to his account directly
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `turbo_bonus`=`turbo_bonus`+%s WHERE `userid`=%s LIMIT 1",
array(
// Add points to his account directly
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `turbo_bonus`=`turbo_bonus`+%s WHERE `userid`=%s LIMIT 1",
array(
-
bigintval($userid)
,
- $points
+
$points
,
+ bigintval($userid)
), __FUNCTION__, __LINE__);
// Rember this whole data for displaying ranking list
), __FUNCTION__, __LINE__);
// Rember this whole data for displaying ranking list
diff --git
a/inc/libs/task_functions.php
b/inc/libs/task_functions.php
index 47d9f1cd55552040cb6d6c625010e1294cac918a..b1451b999f5fa11c56540321c997b67afece807c 100644
(file)
--- a/
inc/libs/task_functions.php
+++ b/
inc/libs/task_functions.php
@@
-347,7
+347,7
@@
ORDER BY
// Autopurge installed?
if ((isExtensionActive('autopurge')) && (isAutopurgeInactiveEnabled()) && (getApInactiveSince() > 0)) {
// Use last online timestamp to keep inactive members away from here
// Autopurge installed?
if ((isExtensionActive('autopurge')) && (isAutopurgeInactiveEnabled()) && (getApInactiveSince() > 0)) {
// Use last online timestamp to keep inactive members away from here
- $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`)
>=
{?ap_inactive_since?}';
+ $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`)
<
{?ap_inactive_since?}';
} // END - if
addSql("SELECT
} // END - if
addSql("SELECT
@@
-376,7
+376,7
@@
ORDER BY
// Autopurge installed?
if ((isExtensionActive('autopurge')) && (isAutopurgeInactiveEnabled()) && (getApInactiveSince() > 0)) {
// Use last online timestamp to keep inactive members away from here
// Autopurge installed?
if ((isExtensionActive('autopurge')) && (isAutopurgeInactiveEnabled()) && (getApInactiveSince() > 0)) {
// Use last online timestamp to keep inactive members away from here
- $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`)
>=
{?ap_inactive_since?}';
+ $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`)
<
{?ap_inactive_since?}';
} // END - if
addSql("SELECT
} // END - if
addSql("SELECT
diff --git
a/inc/modules/admin/what-config_beg.php
b/inc/modules/admin/what-config_beg.php
index 786d5c43852a2797943417491e59779ccc81687f..537781600552fd7ad5ac5e904dd6c5e96d6a5314 100644
(file)
--- a/
inc/modules/admin/what-config_beg.php
+++ b/
inc/modules/admin/what-config_beg.php
@@
-62,7
+62,7
@@
if (isFormSent()) {
$content['wait_selection'] = createConfigurationTimeSelections('beg_notify_wait' , 'ms' );
// Init all Y/N selections
$content['wait_selection'] = createConfigurationTimeSelections('beg_notify_wait' , 'ms' );
// Init all Y/N selections
- foreach (array('rallye', 'active', '
mode', '
rallye_enable_notify', 'rallye_disable_notify', 'new_member_notify', 'include_own') as $entry) {
+ foreach (array('rallye', 'active', 'rallye_enable_notify', 'rallye_disable_notify', 'new_member_notify', 'include_own') as $entry) {
$content[$entry . '_y'] = '';
$content[$entry . '_n'] = '';
$content[$entry . '_' . strtolower(getConfig('beg_' . $entry))] = ' checked="checked"';
$content[$entry . '_y'] = '';
$content[$entry . '_n'] = '';
$content[$entry . '_' . strtolower(getConfig('beg_' . $entry))] = ' checked="checked"';
diff --git
a/inc/modules/admin/what-list_beg.php
b/inc/modules/admin/what-list_beg.php
index b109511d02c8b0acb972af91c03b95ad5be904cc..9d18924ea3cdc430f85c3798ee7024e457fe67c5 100644
(file)
--- a/
inc/modules/admin/what-list_beg.php
+++ b/
inc/modules/admin/what-list_beg.php
@@
-59,7
+59,7
@@
if (isBegRallyeEnabled()) {
// Autopurge installed?
if ((isExtensionActive('autopurge')) && (isBegActiveEnabled()) && ((getApInactiveSince() > 0))) {
// Use last online timestamp to keep inactive members away from here
// Autopurge installed?
if ((isExtensionActive('autopurge')) && (isBegActiveEnabled()) && ((getApInactiveSince() > 0))) {
// Use last online timestamp to keep inactive members away from here
- $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`)
>=
{?ap_inactive_since?}';
+ $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`)
<
{?ap_inactive_since?}';
} // END - if
// Check if at least one is in the active rallye
} // END - if
// Check if at least one is in the active rallye
diff --git
a/inc/modules/admin/what-list_bonus.php
b/inc/modules/admin/what-list_bonus.php
index ab6f753a30538dc3055a6088c942bbe3e5b2188c..2dace09bf4e719390edaa52a6ab4990b428b3876 100644
(file)
--- a/
inc/modules/admin/what-list_bonus.php
+++ b/
inc/modules/admin/what-list_bonus.php
@@
-73,12
+73,12
@@
if (isBonusRallyeActive()) {
// Autopurge installed?
if ((isExtensionActive('autopurge')) && ((getApInactiveSince() > 0))) {
// Use last online timestamp to keep inactive members away from here
// Autopurge installed?
if ((isExtensionActive('autopurge')) && ((getApInactiveSince() > 0))) {
// Use last online timestamp to keep inactive members away from here
- $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`)
>=
{?ap_inactive_since?}';
+ $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`)
<
{?ap_inactive_since?}';
} // END - if
// Check if at least one is in the active rallye
$result = SQL_QUERY("SELECT
} // END - if
// Check if at least one is in the active rallye
$result = SQL_QUERY("SELECT
- `userid`, `email`, `gender`, `surname`, `family`, "
.$USE.
" AS `points`, `last_online`
+ `userid`, `email`, `gender`, `surname`, `family`, "
. $USE .
" AS `points`, `last_online`
FROM
`{?_MYSQL_PREFIX?}_user_data`
WHERE
FROM
`{?_MYSQL_PREFIX?}_user_data`
WHERE
diff --git
a/inc/modules/member/what-beg2.php
b/inc/modules/member/what-beg2.php
index 9f265539f9d9ada84c192f7743983ae32419bba8..dbeb5affa2c198f35a48f1aebcc178102030d185 100644
(file)
--- a/
inc/modules/member/what-beg2.php
+++ b/
inc/modules/member/what-beg2.php
@@
-56,7
+56,7
@@
$ONLINE = '';
if ((isExtensionActive('autopurge')) && (isBegActiveEnabled()) && ((getApInactiveSince() > 0))) {
// Use last online timestamp to keep inactive members away from here
if ((isExtensionActive('autopurge')) && (isBegActiveEnabled()) && ((getApInactiveSince() > 0))) {
// Use last online timestamp to keep inactive members away from here
- $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`)
>=
{?ap_inactive_since?}';
+ $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`)
<
{?ap_inactive_since?}';
} // END - if
// Let's check if there are some points left we can pay...
} // END - if
// Let's check if there are some points left we can pay...
diff --git
a/inc/modules/member/what-bonus.php
b/inc/modules/member/what-bonus.php
index afd5af2f32b7f0fc169bcb3c35f46b862fd8cc79..7630af452acf3d02368c3ef9ed1fbb6e4ee73da4 100644
(file)
--- a/
inc/modules/member/what-bonus.php
+++ b/
inc/modules/member/what-bonus.php
@@
-72,7
+72,7
@@
$ONLINE = '';
// Autopurge installed?
if ((isExtensionActive('autopurge')) && ((getApInactiveSince() > 0))) {
// Use last online timestamp to keep inactive members away from here
// Autopurge installed?
if ((isExtensionActive('autopurge')) && ((getApInactiveSince() > 0))) {
// Use last online timestamp to keep inactive members away from here
- $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`)
>=
{?ap_inactive_since?}';
+ $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`)
<
{?ap_inactive_since?}';
} // END - if
// Let's check if there are some points left we can 'pay'...
} // END - if
// Let's check if there are some points left we can 'pay'...
diff --git
a/inc/monthly/monthly_beg.php
b/inc/monthly/monthly_beg.php
index 5372ce06be98fb5841bca64d1c0bd6728d64937a..dfc0eb786365a794ecd9ff596b8c4abdf9e05c7a 100644
(file)
--- a/
inc/monthly/monthly_beg.php
+++ b/
inc/monthly/monthly_beg.php
@@
-63,7
+63,7
@@
if ((getBegRanks() > 0) && (!isCssOutputMode())) {
// Let's check if there are some points left we can pay...
if ((isExtensionActive('autopurge')) && (isBegActiveEnabled()) && ((getApInactiveSince() > 0))) {
// Okay, include last online timestamp
// Let's check if there are some points left we can pay...
if ((isExtensionActive('autopurge')) && (isBegActiveEnabled()) && ((getApInactiveSince() > 0))) {
// Okay, include last online timestamp
- $whereStatement .= ' AND (UNIX_TIMESTAMP() - `last_online`)
>=
{?ap_inactive_since?}';
+ $whereStatement .= ' AND (UNIX_TIMESTAMP() - `last_online`)
<
{?ap_inactive_since?}';
} // END - if
// SQL string to check for accounts
} // END - if
// SQL string to check for accounts
diff --git
a/inc/monthly/monthly_bonus.php
b/inc/monthly/monthly_bonus.php
index ff5981a30adfb9d5940d9be85f6ceac7d7055541..ab81c37f9d224ba6a3e353d00f3b629416891e45 100644
(file)
--- a/
inc/monthly/monthly_bonus.php
+++ b/
inc/monthly/monthly_bonus.php
@@
-56,7
+56,7
@@
if ((getConfig('bonus_ranks') > 0) && (!isCssOutputMode())) {
// Shall I keep inactive members away from here? (mostly wanted in an "active-rallye" ...)
if ((isExtensionActive('autopurge')) && ((getApInactiveSince() > 0))) {
// Okay, include last online timestamp
// Shall I keep inactive members away from here? (mostly wanted in an "active-rallye" ...)
if ((isExtensionActive('autopurge')) && ((getApInactiveSince() > 0))) {
// Okay, include last online timestamp
- $whereStatement .= ' AND (UNIX_TIMESTAMP() - `last_online`)
>=
{?ap_inactive_since?}';
+ $whereStatement .= ' AND (UNIX_TIMESTAMP() - `last_online`)
<
{?ap_inactive_since?}';
} // END - if
// Add more bonus points here
} // END - if
// Add more bonus points here
diff --git
a/inc/mysql-manager.php
b/inc/mysql-manager.php
index d54e46a23322e7a6d2fa4d47e21e218411d5853a..48db0063ba2e835b4f1430f1cc3080cb469e0fd5 100644
(file)
--- a/
inc/mysql-manager.php
+++ b/
inc/mysql-manager.php
@@
-1605,7
+1605,9
@@
function reduceRecipientReceivedMails ($column, $id, $count) {
}
// Reduce this users total received emails?
}
// Reduce this users total received emails?
- if ($num === 0) $userids[$data['userid']] = $data['userid'];
+ if ($num === 0) {
+ $userids[$data['userid']] = $data['userid'];
+ } // END - if
} // END - while
if (count($userids) > 0) {
} // END - while
if (count($userids) > 0) {
@@
-1642,7
+1644,15
@@
function createNewTask ($subject, $notes, $taskType, $userid = NULL, $adminId =
// @TODO Fix inconsistency between last_module and getWhat()
function updateLastActivity($userid) {
// Run the update query
// @TODO Fix inconsistency between last_module and getWhat()
function updateLastActivity($userid) {
// Run the update query
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `last_module`='%s', `last_online`=UNIX_TIMESTAMP(), `REMOTE_ADDR`='%s' WHERE `userid`=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE
+ `{?_MYSQL_PREFIX?}_user_data`
+SET
+ `last_module`='%s',
+ `last_online`=UNIX_TIMESTAMP(),
+ `REMOTE_ADDR`='%s'
+WHERE
+ `userid`=%s
+LIMIT 1",
array(
getWhat(),
detectRemoteAddr(),
array(
getWhat(),
detectRemoteAddr(),
diff --git
a/mailid.php
b/mailid.php
index dfefdcac9fd38083901954544d36b433273ee54a..f93838a1bae4ddec241f994bad9fd01b09d195a4 100644
(file)
--- a/
mailid.php
+++ b/
mailid.php
@@
-130,7
+130,7
@@
if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalEr
// Status must be CONFIRMED
if (getUserData('status') == 'CONFIRMED') {
// Update last activity if not admin
// Status must be CONFIRMED
if (getUserData('status') == 'CONFIRMED') {
// Update last activity if not admin
- if (
!isAdmin(
)) {
+ if (
(!isAdmin()) || (isDebugModeEnabled()
)) {
// Is not admin, so update last activity
updateLastActivity($userId);
} // END - if
// Is not admin, so update last activity
updateLastActivity($userId);
} // END - if