From 5853d6eaaa9135f9e31557830e26f1794e0e9eda Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 4 Sep 2008 22:33:41 +0000 Subject: [PATCH] Translation of status/reward now happens after the record was inserted --- inc/libs/surfbar_functions.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 6f8449488b..8cd6082367 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -115,13 +115,17 @@ function SURFBAR_REGISTER_URL ($url, $uid, $reward, $status="PENDING", $addMode= 'url' => $url, 'frametester' => FRAMETESTER($url), 'uid' => $uid, - 'reward' => TRANSLATE_COMMA($reward), - 'status' => SURFBAR_TRANSLATE_STATUS($status) + 'reward' => $reward, + 'status' => $status ); // Insert the URL into database $content['insert_id'] = SURFBAR_INSERT_URL_BY_ARRAY($content); + // Translate status and reward + $content['status'] = SURFBAR_TRANSLATE_STATUS($content['status']); + $content['reward'] = TRANSLATE_COMMA($content['reward']); + // If in reg-mode we notify admin if (($addMode == "reg") || ($_CONFIG['surfbar_notify_admin_unlock'] == "Y")) { // Notify admin even when he as unlocked an email -- 2.39.5