-function getPaymentTitlePrice ($pid, $full = false) {
- // Default is not found
- $ret = '{--_PAYMENT_404--}';
-
- // Load payment data
- $result = SQL_QUERY_ESC("SELECT `mail_title`,`price` FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=%s LIMIT 1",
- array(
- bigintval($pid)
- ), __FUNCTION__, __LINE__);
-
- // Do we have an entry?
- if (SQL_NUMROWS($result) == 1) {
- // Payment type found... :-)
- $data = SQL_FETCHARRAY($result);
-
- // Only title or also including price?
- if ($full === false) {
- $ret = $data['mail_title'];
- } else {
- $ret = $data['mail_title'] . ' / {%pipe,translateComma=' . $data['price'] . '%} {?POINTS?}';
- }
- } // END - if
-
- // Free result
- SQL_FREERESULT($result);
+function getPaymentTitlePrice ($paymentsId, $full = false) {
+ // Only title or also including price?
+ if ($full === false) {
+ $ret = getPaymentData($paymentsId, 'main_title');
+ } else {
+ $ret = getPaymentData($paymentsId, 'main_title') . ' / {%pipe,getPaymentData,translateComma=' . $paymentsId . '%} {?POINTS?}';
+ }