From: Roland Häder Date: Thu, 16 Sep 2010 22:00:52 +0000 (+0000) Subject: Columns renamed, more EL than direct usage in PHP script X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=55dd61bf035773f00ba0f7f3b56a5299b2ac9693;p=mailer.git Columns renamed, more EL than direct usage in PHP script --- diff --git a/inc/extensions/ext-sponsor.php b/inc/extensions/ext-sponsor.php index 73e633b866..db17a5eb8e 100644 --- a/inc/extensions/ext-sponsor.php +++ b/inc/extensions/ext-sponsor.php @@ -92,8 +92,8 @@ switch (getExtensionMode()) { `refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `ref_count` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `hash` VARCHAR(32) NULL DEFAULT NULL, -`last_pay` FLOAT(7,2) UNSIGNED NOT NULL DEFAULT 0.00, -`last_curr` VARCHAR(255) NOT NULL DEFAULT '€', +`last_payment` FLOAT(7,2) UNSIGNED NOT NULL DEFAULT 0.00, +`last_currency` VARCHAR(255) NOT NULL DEFAULT '€', INDEX (`refid`), INDEX (`email`), UNIQUE KEY (`hash`), @@ -296,8 +296,8 @@ PRIMARY KEY (`id`) addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('refid','N')"); addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('ref_count','N')"); addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('hash','N')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('last_pay','N')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('last_curr','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('last_payment','N')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('last_currency','N')"); // // Add default entries // diff --git a/inc/language/yoomedia_de.php b/inc/language/yoomedia_de.php index 3fe44a425d..3f675120ea 100644 --- a/inc/language/yoomedia_de.php +++ b/inc/language/yoomedia_de.php @@ -64,7 +64,7 @@ addMessages(array( 'ADMIN_YOOMEDIA_REMOVE_MAIL' => "Mail entfernen", 'ADMIN_YOOMEDIA_UNLIST_MAIL' => "Aus Ausschlussliste nehmen", 'ADMIN_YOOMEDIA_TEXTMAIL_ALREADY_SENT' => "Textmail wurde %s bereits versendet.", - 'ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN' => "Textmail kann in %s erneut versendet werden.", + 'ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN' => "Textmail kann in {%%pipe,createFancyTime=%s%%} erneut versendet werden.", 'ADMIN_YOOMEDIA_TEXTMAIL_MANUALLY_LOCKED' => "Textmail wurde manuell gesperrt.", 'ADMIN_LIST_YOOMEDIA_TITLE' => "Alle Textmails von der Yoo!Media API 2.0 anzeigen", 'ADMIN_LIST_YOOMEDIA_NOTE' => "Hinweise: Mails mit 0 Sekunden Mindestaufenthalt sind meistens Framekiller-Mails. Sie können eine Mail nur erneut aussenden, wenn die Reload-Sperre abgelaufen ist.", diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index 39a4bec95f..cd3c7922cc 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -383,8 +383,8 @@ function saveSponsorData ($postData, $content) { // Unsecure data which we don't want $UNSAFE = array('password', 'id', 'remote_addr', 'sponsor_created', 'last_online', 'status', 'ref_count', - 'points_amount', 'points_used', 'refid', 'hash', 'last_pay', 'last_curr', 'pass_old', - 'ok', 'pass1', 'pass2'); + 'points_amount', 'points_used', 'refid', 'hash', 'last_payment', 'last_currency', + 'pass_old', 'ok', 'pass1', 'pass2'); // Set default message ("not saved") $message = '{--SPONSOR_ACCOUNT_DATA_NOT_SAVED--}'; diff --git a/inc/mails/beg_mails.php b/inc/mails/beg_mails.php index 46d05e95e5..f6e2a9b526 100644 --- a/inc/mails/beg_mails.php +++ b/inc/mails/beg_mails.php @@ -84,7 +84,7 @@ if (!empty($sql)) { if (getConfig('beg_ip_timeout') > 0) { // Create timemark - $content['ip_locker'] = createFancyTime(getConfig('beg_ip_timeout')); + $content['ip_locker'] = '{%config,createFancyTime=beg_ip_timeout%}'; } // END - if // Check for accounts to be notified diff --git a/inc/modules/admin/what-edit_sponsor.php b/inc/modules/admin/what-edit_sponsor.php index 6738f18fca..7ae9c49485 100644 --- a/inc/modules/admin/what-edit_sponsor.php +++ b/inc/modules/admin/what-edit_sponsor.php @@ -144,8 +144,8 @@ LIMIT 1", handleSponsorRequest(postRequestArray()); // Convert some data for the email template - postRequestParameter('gender' , translateGender(postRequestParameter('gender'))); - postRequestParameter('warning_interval', createFancyTime(postRequestParameter('warning_interval'))); + postRequestParameter('gender' , '{%pipe,translateComma=' . postRequestParameter('gender') . '%}'); + postRequestParameter('warning_interval', '{%pipe,createFancyTime=' . postRequestParameter('warning_interval') . '%}'); if ($PASS === false) setPostRequestParameter('pass1', '{--SPONSOR_PASS_UNCHANGED--}'); diff --git a/inc/modules/admin/what-list_yoomedia_tm.php b/inc/modules/admin/what-list_yoomedia_tm.php index 9088dfbb9a..05da918565 100644 --- a/inc/modules/admin/what-list_yoomedia_tm.php +++ b/inc/modules/admin/what-list_yoomedia_tm.php @@ -118,7 +118,7 @@ foreach ($result as $entry) { } // END - if // Add reload lock - $entry['already'] = getMaskedMessage('ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN', createFancyTime($countdown)); + $entry['already'] = getMaskedMessage('ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN', $countdown); } else { // Never resentable unless manual removal $entry['already'] = '{--ADMIN_YOOMEDIA_TEXTMAIL_MANUALLY_LOCKED--}'; diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index 215d31782b..6d1255957e 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -67,7 +67,7 @@ if (isGetRequestParameterSet('hash')) { `id`, `status`, `gender`, `surname`, `family`, `company`, `position`, `tax_ident`, `street_nr1`, `street_nr2`, `country`, `zip`, `city`, `email`, `phone`, `fax`, `cell`, - `points_amount` AS points, `last_pay` AS pay, `last_curr` AS curr + `points_amount` AS points, `last_payment`, `last_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index 526a9252cf..17dd29b148 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -221,8 +221,8 @@ LIMIT 1", // Add points to array postRequestParameter('points_amount', $points); postRequestParameter('points_used' , '0.00000'); - postRequestParameter('last_pay' , $pay); - postRequestParameter('last_curr' , $curr); + postRequestParameter('last_payment' , $pay); + postRequestParameter('last_currency', $curr); // Register sponsor but never ever update here! $message = doProcessSponsorFormRequest($messageArray); diff --git a/inc/modules/member/what-beg2.php b/inc/modules/member/what-beg2.php index cfe3e46d47..aff0de7848 100644 --- a/inc/modules/member/what-beg2.php +++ b/inc/modules/member/what-beg2.php @@ -59,7 +59,7 @@ if (isExtensionActive('autopurge')) { $lastOnline = " AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})"; } // END - if -// Let's check if there are some points left we can 'pay'... +// Let's check if there are some points left we can pay... $result = SQL_QUERY_ESC("SELECT `userid`, `beg_points` AS points, `last_online` FROM diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index 4edd967851..0970463dd0 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -140,7 +140,7 @@ switch ($mode) { // Remember transfer reason and fancy date/time in constants $content['reason'] = secureString(postRequestParameter('reason')); - $content['expires'] = createFancyTime(getConfig('transfer_age')); + $content['expires'] = '{%config,createFancyTime=transfer_age%}'; // Generate tranafer id $content['trans_id'] = bigintval(generateRandomCode('10', mt_rand(0, 99999), getMemberId(), postRequestParameter('reason'))); diff --git a/inc/monthly/monthly_beg.php b/inc/monthly/monthly_beg.php index 6b97b99b44..6a557df326 100644 --- a/inc/monthly/monthly_beg.php +++ b/inc/monthly/monthly_beg.php @@ -60,7 +60,7 @@ if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getC $whereStatement1 = " AND `userid` != {?beg_userid?}"; } // END - if - // Let's check if there are some points left we can 'pay'... + // Let's check if there are some points left we can pay... if (isExtensionActive('autopurge')) { // Use last online stamp only when autopurge for inactive members is activated if ((getApInactiveSince() > 0) && (getConfig('beg_active') == 'Y')) { diff --git a/inc/pool/pool-user.php b/inc/pool/pool-user.php index 4c206229d3..036aa3557b 100644 --- a/inc/pool/pool-user.php +++ b/inc/pool/pool-user.php @@ -175,7 +175,7 @@ if (!SQL_HASZERONUMS($result_main)) { 'cat_id' => $DATA['cat_id'], 'text' => $DATA['text'], 'url' => $DATA['url'], - 'expiration' => createFancyTime(getPaymentPoints($DATA['payment_id'], 'time')) + 'expiration' => '{%pipe,createFancyTime=' . getPaymentPoints($DATA['payment_id'], 'time') . '%}' ); // Yes we do, so we notify admin and sender about fully sent mail! diff --git a/inc/template-functions.php b/inc/template-functions.php index 057ec6a052..8f1349c454 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -430,7 +430,7 @@ function loadEmailTemplate ($template, $content = array(), $userid = '0') { $content['expiration'] = '{--MAIL_WILL_NEVER_EXPIRE--}'; } elseif (isConfigEntrySet('auto_purge')) { // Create nice date string - $content['expiration'] = createFancyTime(getAutoPurge()); + $content['expiration'] = '{%pipe,getAutoPurge,createFancyTime%}'; } else { // Missing entry $content['expiration'] = '{--MAIL_NO_CONFIG_AUTO_PURGE--}'; diff --git a/templates/de/emails/admin/admin_sponsor_pending.tpl b/templates/de/emails/admin/admin_sponsor_pending.tpl index b7086cc993..ea4590ccfd 100644 --- a/templates/de/emails/admin/admin_sponsor_pending.tpl +++ b/templates/de/emails/admin/admin_sponsor_pending.tpl @@ -7,7 +7,7 @@ Bitte setzen Sie sich mit ihm in Verbindung (die EMail-Adresse finden Sie weiter ------------------------------ Verwendungszweck: SPONSOR: $content[id], {%pipe,translateComma=$content[points]%} ------------------------------ -Zu überweisender Betrag: {%pipe,translateComma=$content[pay]%} $content[curr] +Zu überweisender Betrag: {%pipe,translateComma=$content[last_payment]%} $content[last_currency] ------------------------------ Hier sind nochmals alle seine Daten aus der Anmeldung: diff --git a/templates/de/emails/sponsor/sponsor_pending.tpl b/templates/de/emails/sponsor/sponsor_pending.tpl index 1544090219..caeab1584c 100644 --- a/templates/de/emails/sponsor/sponsor_pending.tpl +++ b/templates/de/emails/sponsor/sponsor_pending.tpl @@ -7,7 +7,7 @@ Wir werden uns bald mit Ihnen in Verbindung setzen und Ihnen unsere Kontodaten m ------------------------------ Verwendungszweck: SPONSOR: $content[id], {%pipe,translateComma=$content[points]%} ------------------------------ -Zu überweisender Betrag: {%pipe,translateComma=$content[pay]%} $content[curr] +Zu überweisender Betrag: {%pipe,translateComma=$content[last_payment]%} $content[last_currency] ------------------------------ Hier sind nochmals alle Ihre Daten aus der Anmeldung: