Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / filter / user_filter.php
index 3653be39047e17fcd32e00f1740ff1f069f8907c..e9eec0aca4d5e5ff1272b20f1a6161534d1460cd 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -175,20 +175,23 @@ function FILTER_SUBID_USER_REGISTRATION_ADD_SQL_COLUMNS ($filterData) {
 
 // Generic filter for updating referral counter of currently detected referral id
 function FILTER_GENERIC_UPDATE_USER_REFERRAL ($filterData) {
 
 // Generic filter for updating referral counter of currently detected referral id
 function FILTER_GENERIC_UPDATE_USER_REFERRAL ($filterData) {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+
        // Make sure the referral id is detected
        // Make sure the referral id is detected
-       assert(isValidReferralId(), 'isValidReferralId()=false which is not expected.');
+       assert(isValidReferralId());
 
        // Update ref counter, determineReferralId() must already be called before this filter is executed
        sqlQuery('UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_clicks`=`ref_clicks`+1 WHERE `userid`={%pipe,getReferralId%} LIMIT 1', __FUNCTION__, __LINE__);
 
        // Return filter data
 
        // Update ref counter, determineReferralId() must already be called before this filter is executed
        sqlQuery('UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_clicks`=`ref_clicks`+1 WHERE `userid`={%pipe,getReferralId%} LIMIT 1', __FUNCTION__, __LINE__);
 
        // Return filter data
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
        return $filterData;
 }
 
 // Filter for updating sub id records
 function FILTER_UPDATE_USER_SUBID ($filterData) {
        // Make sure the referral id is detected
        return $filterData;
 }
 
 // Filter for updating sub id records
 function FILTER_UPDATE_USER_SUBID ($filterData) {
        // Make sure the referral id is detected
-       assert(isValidReferralId(), 'isValidReferralId()=false which is not expected.');
+       assert(isValidReferralId());
 
        // Get sub id and secure it
        $subId = sqlEscapeString(getRequestElement('subid'));
 
        // Get sub id and secure it
        $subId = sqlEscapeString(getRequestElement('subid'));
@@ -251,7 +254,7 @@ function FILTER_MEMBER_REFLINK_USER_SUBIDS_CONTENT ($content = '') {
                        array(getMemberId()), __FUNCTION__, __LINE__);
 
                // There should be entries left
                        array(getMemberId()), __FUNCTION__, __LINE__);
 
                // There should be entries left
-               assert(!ifSqlHasZeroNums($result));
+               assert(!ifSqlHasZeroNumRows($result));
 
                // Load all
                $out = '';
 
                // Load all
                $out = '';
@@ -272,5 +275,25 @@ function FILTER_MEMBER_REFLINK_USER_SUBIDS_CONTENT ($content = '') {
        return $content;
 }
 
        return $content;
 }
 
+// Filter for generic user login
+// @TODO 0% done
+function FILTER_GENERIC_USER_LOGIN ($filterData) {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+
+       // Return filter data
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+       return $filterData;
+}
+
+// Filter for generic user login check
+// @TODO 0% done
+function FILTER_GENERIC_USER_LOGIN_CHECK ($filterData) {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+
+       // Return filter data
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+       return $filterData;
+}
+
 // [EOF]
 ?>
 // [EOF]
 ?>