X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fsurfbar_functions.php;h=fff246464e3198be72592df85b9687939d99d476;hb=9bc2a494fae1a98f0873a6f3bd8c878b09124b9f;hp=5d311cd7e9f84b6a1d093da5a258ff4dc59eb043;hpb=f2aeaab0cd313b2eeb151642455ed558f6b186dc;p=mailer.git diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 5d311cd7e9..fff246464e 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -366,12 +366,6 @@ function SURFBAR_MEMBER_DISPLAY_ACTION_FORM ($action, $urlData) { // Translate some data if present $content = SURFBAR_PREPARE_CONTENT_FOR_TEMPLATE($content); - // Is the lock reason empty? - if (empty($urlData['url_lock_reason'])) { - // Fix it to three dashes - $urlData['url_lock_reason'] = '---'; - } // END - if - // Include fields only for action 'edit' if ($action == 'edit') { // Default is not limited @@ -418,7 +412,7 @@ function SURFBAR_MEMBER_EXECUTE_ACTION ($action, $urlData) { } // END - if } else { // Not found! - addFatalMessage(__FUNCTION__, __LINE__, getMessage('MEMBER_SURFBAR_EXECUTE_ACTION_404'), $functionName); + addFatalMessage(__FUNCTION__, __LINE__, '{--MEMBER_SURFBAR_EXECUTE_ACTION_404--}', $functionName); } // Return status @@ -602,7 +596,6 @@ function SURFBAR_REGISTER_URL ($url, $userid, $status = 'PENDING', $addMode = 'r // Prepare content $content = merge_array($extraFields, array( 'url' => $url, - 'frametester' => generateFrametesterUrl($url), 'url_userid' => $userid, 'url_status' => $status, )); @@ -667,9 +660,9 @@ function SURFBAR_NOTIFY_ADMIN ($messageType, $content) { $templateName = sprintf("admin_surfbar_%s", $messageType); // Prepare subject - $subject = getMessage(sprintf("ADMIN_SURFBAR_NOTIFY_%s_SUBJECT", + $subject = sprintf("{--ADMIN_SURFBAR_NOTIFY_%s_SUBJECT--}", strtoupper($messageType) - )); + ); // Is the subject line there? if ((substr($subject, 0, 1) == '!') && (substr($subject, -1, 1) == '!')) { @@ -695,9 +688,9 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) { $templateName = sprintf("member_surfbar_%s", $messageType); // Prepare subject - $subject = getMessage(sprintf("MEMBER_SURFBAR_NOTIFY_%s_SUBJECT", + $subject = sprintf("{--MEMBER_SURFBAR_NOTIFY_%s_SUBJECT--}", strtoupper($messageType) - )); + ); // Is the subject line there? if ((substr($subject, 0, 1) == '!') && (substr($subject, -1, 1) == '!')) { @@ -743,14 +736,8 @@ function translateSurfbarLimit ($limit) { // Translate the URL status function translateSurfbarUrlStatus ($status) { - // Create constant name - $constantName = sprintf("SURFBAR_URL_STATUS_%s", strtoupper($status)); - - // Get message - $statusTranslated = getMessage($constantName); - // Return result - return $statusTranslated; + return sprintf("{--SURFBAR_URL_STATUS_%s--}", strtoupper($status)); } // Determine reward @@ -820,7 +807,7 @@ function SURFBAR_DETERMINE_TEMPLATE_NAME() { // Check if the "reload lock" of the current user is full, call this function // before you call SURFBAR_CHECK_RELOAD_LOCK(). -function SURFBAR_CHECK_RELOAD_FULL() { +function SURFBAR_CHECK_RELOAD_FULL () { // Default is full! $isFull = true; @@ -912,6 +899,9 @@ LIMIT 1", // Free result SQL_FREERESULT($result); + // Debug message + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'cnt=' . $cnt); + // Return result return $cnt; } @@ -1089,6 +1079,9 @@ function SURFBAR_UPDATE_SALT_STATS () { // Update statistics record SURFBAR_UPDATE_INSERT_STATS_RECORD(); + // Update salt + SURFBAR_GENERATE_VALIDATION_CODE(SURFBAR_GET_ID()); + // Simply store the salt from cache away in database... SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_salts` SET `salts_last_salt`='%s' WHERE `salts_url_id`=%s AND `salts_userid`=%s LIMIT 1", array(