projects
/
mailer.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated copyright year.
[mailer.git]
/
inc
/
fix_user_points.php
diff --git
a/inc/fix_user_points.php
b/inc/fix_user_points.php
index d17e02515be147c0b7b75ba0e2e0bfdc7f190698..a070afaeab359f866a5ab2b92943fee9e75afe8a 100644
(file)
--- a/
inc/fix_user_points.php
+++ b/
inc/fix_user_points.php
@@
-10,14
+10,9
@@
* -------------------------------------------------------------------- *
* Kurzbeschreibung : Repariert doppelte Eintraege in user_points *
* -------------------------------------------------------------------- *
* -------------------------------------------------------------------- *
* Kurzbeschreibung : Repariert doppelte Eintraege in user_points *
* -------------------------------------------------------------------- *
- * $Revision:: $ *
- * $Date:: $ *
- * $Tag:: 0.2.1-FINAL $ *
- * $Author:: $ *
- * -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 201
1
by Mailer Developer Team *
- * For more information visit: http://
www.mxchange.org
*
+ * Copyright (c) 2009 - 201
6
by Mailer Developer Team *
+ * For more information visit: http://
mxchange.org
*
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@
-41,7
+36,7
@@
if (!defined('__SECURITY')) {
} // END - if
// Get all user points
} // END - if
// Get all user points
-$result =
SQL_QUERY
('SELECT
+$result =
sqlQuery
('SELECT
`userid`,
`points`,
`locked_points`,
`userid`,
`points`,
`locked_points`,
@@
-54,16
+49,16
@@
WHERE
ORDER BY
`userid` ASC', __FILE__, __LINE__);
ORDER BY
`userid` ASC', __FILE__, __LINE__);
-//
Do we have entries? (we should hav
e!)
-if (!
SQL_HASZERONUMS
($result)) {
+//
Are there entries? (there should b
e!)
+if (!
ifSqlHasZeroNumRows
($result)) {
// Load row by row
// Load row by row
- while ($row =
SQL_FETCHARRAY
($result)) {
+ while ($row =
sqlFetchArray
($result)) {
// Update the database again
foreach (array_keys($row) as $column) {
// Not userid itself
if ($column != 'userid') {
// Update amount
// Update the database again
foreach (array_keys($row) as $column) {
// Not userid itself
if ($column != 'userid') {
// Update amount
-
SQL_QUERY_ESC
("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `%s`=`%s`+%s WHERE `userid`=%s AND `ref_depth` IS NULL",
+
sqlQueryEscaped
("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `%s`=`%s`+%s WHERE `userid`=%s AND `ref_depth` IS NULL",
array(
$column,
$column,
array(
$column,
$column,
@@
-72,9
+67,9
@@
if (!SQL_HASZERONUMS($result)) {
), __FILE__, __LINE__);
// Nothing has been updated?
), __FILE__, __LINE__);
// Nothing has been updated?
- if (
SQL_HASZEROAFFECTED
()) {
+ if (
ifSqlHasZeroAffectedRows
()) {
// Then insert it
// Then insert it
-
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_points` (`userid`,`ref_depth`,
`%s`) VALUES (%s,NULL,%s)",
+
sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_user_points` (`userid`, `ref_depth`,
`%s`) VALUES (%s,NULL,%s)",
array(
$column,
$row['userid'],
array(
$column,
$row['userid'],
@@
-87,10
+82,10
@@
if (!SQL_HASZERONUMS($result)) {
} // END - if
// Free result
} // END - if
// Free result
-
SQL_FREERESULT
($result);
+
sqlFreeResult
($result);
// Remove all entries
// Remove all entries
-
SQL_QUERY
('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `ref_depth`=0', __FILE__, __LINE__);
+
sqlQuery
('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `ref_depth`=0', __FILE__, __LINE__);
// [EOF]
?>
// [EOF]
?>