From: Roland Häder Date: Sun, 1 Mar 2009 01:58:26 +0000 (+0000) Subject: Some rewrites X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=439a544d74b0f34908b8524777c8c50294c03073;p=mailer.git Some rewrites --- diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index c7c7f1062f..6b244371c2 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -927,12 +927,12 @@ function GET_ACTION ($MODE, &$wht) { // Get category name back function GET_CATEGORY ($cid) { // Default is not found - $ret = _CATEGORY_404; + $ret = getMessage('_CATEGORY_404'); // Is the category id set? if ($cid == "0") { // No category - $ret = _CATEGORY_NONE; + $ret = getMessage('_CATEGORY_NONE'); } elseif ($cid > 0) { // Lookup the category in database $result = SQL_QUERY_ESC("SELECT cat FROM `{!_MYSQL_PREFIX!}_cats` WHERE id=%s LIMIT 1", @@ -953,7 +953,7 @@ function GET_CATEGORY ($cid) { // Get a string of "mail title" and price back function GET_PAYMENT ($pid, $full=false) { // Default is not found - $ret = _PAYMENT_404; + $ret = getMessage('_PAYMENT_404'); // Load payment data $result = SQL_QUERY_ESC("SELECT mail_title, price FROM `{!_MYSQL_PREFIX!}_payments` WHERE id=%s LIMIT 1", @@ -966,7 +966,7 @@ function GET_PAYMENT ($pid, $full=false) { } else { // Return title and price list($t, $p) = SQL_FETCHROW($result); - $ret = $t." / ".TRANSLATE_COMMA($p)." ".POINTS; + $ret = $t." / ".TRANSLATE_COMMA($p)." {!POINTS!}"; } } @@ -978,13 +978,11 @@ function GET_PAYMENT ($pid, $full=false) { } // Get (basicly) the price of given payment id -function GET_PAY_POINTS($pid, $lookFor="price") -{ +function GET_PAY_POINTS ($pid, $lookFor = "price") { $ret = "-1"; $result = SQL_QUERY_ESC("SELECT %s FROM `{!_MYSQL_PREFIX!}_payments` WHERE id=%s LIMIT 1", array($lookFor, $pid), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { + if (SQL_NUMROWS($result) == 1) { // Payment type found... :-) list($ret) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -993,8 +991,7 @@ function GET_PAY_POINTS($pid, $lookFor="price") } // Remove a receiver's ID from $ARRAY and add a link for him to confirm -function REMOVE_RECEIVER (&$ARRAY, $key, $uid, $pool_id, $stats_id="", $bonus=false) -{ +function REMOVE_RECEIVER (&$ARRAY, $key, $uid, $pool_id, $stats_id="", $bonus=false) { $ret = "failed"; if ($uid > 0) {