if (true) {
//if (($urlData['url_views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) {
// Run the query
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_urls` SET `url`='%s', `url_views_allowed`=%s, `url_views_max`=%s WHERE `url_id`=%s AND `status`='%s' LIMIT 1",
- array($urlData['url'], $urlData['edit']['limit'], $urlData['edit']['limit'], $urlData['id'], $urlData['url_status']), __FUNCTION__, __LINE__);
+ SQL_QUERY_ESC("UPDATE
+ `{?_MYSQL_PREFIX?}_surfbar_urls`
+SET
+ `url`='%s',
+ `url_views_allowed`=%s,
+ `url_views_max`=%s
+WHERE
+ `url_id`=%s AND
+ `status`='%s'
+LIMIT 1",
+ array(
+ $urlData['url'],
+ $urlData['edit']['limit'],
+ $urlData['edit']['limit'],
+ $urlData['id'],
+ $urlData['url_status']
+ ), __FUNCTION__, __LINE__);
// All fine
$status = true;
} // END - if
/* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.getMemberId().',reward='.SURFBAR_GET_REWARD());
- // Init referal system here
- initReferalSystem();
+ // Init referral system here
+ initReferralSystem();
// Book it to the user and ignore return status
- addPointsThroughReferalSystem(sprintf("surfbar:%s", getSurfbarPaymentModel()), getMemberId(), SURFBAR_GET_REWARD());
+ addPointsThroughReferralSystem(sprintf("surfbar:%s", getSurfbarPaymentModel()), getMemberId(), SURFBAR_GET_REWARD());
/* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid='.SURFBAR_GET_USERID().',costs='.SURFBAR_GET_COSTS() . ' - EXIT!');
}
// Do we have a limit?
if ($allowed > 0) {
// Then count views_max down!
- $add .= ', `url_views_max`=`url_views_max`-1';
+ $add .= ',`url_views_max`=`url_views_max`-1';
} // END - if
// Update URL stats