]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/refback_functions.php
Some language strings fixed, renamed. Copyright notice updated
[mailer.git] / inc / libs / refback_functions.php
index f3277f2d3e07f9999cc3d3e636e5fd5607eec26c..bb42f8f11d2d0bc649e96c1be4dbb284e4ce79ba 100644 (file)
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
- * Needs to be in all Files and every File needs "svn propset           *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -197,7 +195,7 @@ function updateRefbackTable ($userid) {
 
        // When no entry was updated then we have to create it here
        //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):found=".SQL_NUMROWS($result_refid)."<br />");
-       if (SQL_NUMROWS($result_refid) > 0) {
+       if (!SQL_HASZERONUMS($result_refid)) {
                // Load all refids
                while (list($GLOBALS['refback_refid'][$GLOBALS['refback_level']]) = SQL_FETCHROW($result_refid)) {
                        // Remmber userid
@@ -391,7 +389,7 @@ function updateMemberRefbackPercents ($id, $percents) {
                array($percents, $id, getMemberId()), __FUNCTION__, __LINE__);
 
        // Entry updated?
-       if (SQL_AFFECTEDROWS() < 1) {
+       if (SQL_HASZEROAFFECTED()) {
                // Entry not updated!
                $status['message'] = '{--MEMBER_REFBACK_ERROR_NOT_UPDATED--}';
                return $status;
@@ -420,13 +418,13 @@ function updateMemberRefbackPercents ($id, $percents) {
 // Checks wether refback is enabled
 function isRefbackEnabled () {
        // Do we have cache?
-       if (!isset($GLOBALS['is_refback_enabled'])) {
+       if (!isset($GLOBALS[__FUNCTION__])) {
                // Determine it
-               $GLOBALS['is_refback_enabled'] = (getConfig('refback_enabled') == 'Y');
+               $GLOBALS[__FUNCTION__] = (getConfig('refback_enabled') == 'Y');
        } // END - if
 
        // Return cache
-       return $GLOBALS['is_refback_enabled'];
+       return $GLOBALS[__FUNCTION__];
 }
 
 // [EOF]