Index: branches/fundraising/deployment/DonationInterface/payflowpro_gateway/extras/extras.body.php |
— | — | @@ -17,33 +17,64 @@ |
18 | 18 | } |
19 | 19 | |
20 | 20 | /** |
21 | | - * Prepare a log file |
| 21 | + * Prepare logging mechanism |
| 22 | + * |
| 23 | + * If 'syslog' is specified, we can use the syslogger. If a file |
| 24 | + * is specified, we'll writ to the file. Otherwise, do nothing. |
22 | 25 | * |
23 | 26 | * @param string path to log file |
24 | | - * @return resource Pointer for the log file |
25 | 27 | */ |
26 | 28 | protected function prepare_log_file( $log_file ) { |
27 | | - $this->log_fh = fopen( $log_file, 'a+' ); |
| 29 | + |
| 30 | + if ( strtolower( $log_file ) == "syslog" ) { |
| 31 | + |
| 32 | + $this->log_fh = 'syslog'; |
| 33 | + |
| 34 | + } elseif( is_file( $log_file )) { |
| 35 | + |
| 36 | + $this->log_fh = fopen( $log_file, 'a+' ); |
| 37 | + |
| 38 | + } else { |
| 39 | + |
| 40 | + $this->log_fh = null; |
| 41 | + |
| 42 | + } |
28 | 43 | } |
29 | 44 | |
30 | 45 | /** |
31 | | - * Writes message to a log file |
| 46 | + * Writes message to the log |
32 | 47 | * |
33 | | - * If a log file does not exist and could not be created, |
| 48 | + * If a log file does not exist and we are not using syslog, |
34 | 49 | * do nothing. |
35 | 50 | * @fixme Perhaps lack of log file can be handled better? |
36 | 51 | * @param string The message to log |
37 | 52 | */ |
38 | | - public function log( $id = '', $status = '', $data = '' ) { |
| 53 | + public function log( $id = '', $status = '', $data = '', $log_level=LOG_INFO ) { |
39 | 54 | if ( !$this->log_fh ) { |
40 | 55 | echo "what log file?"; |
41 | 56 | return; |
42 | 57 | } |
| 58 | + |
| 59 | + // format the message |
43 | 60 | $msg = '"' . date( 'c' ) . '"'; |
44 | 61 | $msg .= "\t" . '"' . $id . '"'; |
45 | 62 | $msg .= "\t" . '"' . $status . '"'; |
46 | 63 | $msg .= "\t" . $data . "\n"; |
47 | | - fwrite( $this->log_fh, $msg ); |
| 64 | + |
| 65 | + // write to the log |
| 66 | + if ( $this->log_fh == 'syslog' ) { //use syslog facility |
| 67 | + // replace tabs with spaces - maybe do this universally? cuz who needs tabs. |
| 68 | + $msg = str_replace( "\t", " ", $msg ); |
| 69 | + |
| 70 | + openlog( "payflowpro_gateway_trxn", LOG_ODELAY, LOG_SYSLOG ); |
| 71 | + syslog( $log_level, $msg ); |
| 72 | + closelog(); |
| 73 | + |
| 74 | + } else { //write to file |
| 75 | + |
| 76 | + fwrite( $this->log_fh, $msg ); |
| 77 | + |
| 78 | + } |
48 | 79 | } |
49 | 80 | |
50 | 81 | /** |
— | — | @@ -74,6 +105,6 @@ |
75 | 106 | * Close the open log file handler if it's open |
76 | 107 | */ |
77 | 108 | public function __destruct() { |
78 | | - if ( $this->log_fh ) fclose( $this->log_fh ); |
| 109 | + if ( is_resource( $this->log_fh ) ) fclose( $this->log_fh ); |
79 | 110 | } |
80 | 111 | } |
Index: branches/fundraising/deployment/DonationInterface/payflowpro_gateway/extras/extras.php |
— | — | @@ -26,4 +26,4 @@ |
27 | 27 | $wgPayflowGatewayLog = ''; |
28 | 28 | |
29 | 29 | $dir = dirname( __FILE__ ) . "/"; |
30 | | -$wgAutoloadClasses['PayflowProGateway_Extras'] = $dir . "extras.body.php"; |
| 30 | +$wgAutoloadClasses['PayflowProGateway_Extras'] = $dir . "extras.body.php"; |
\ No newline at end of file |
Index: branches/fundraising/deployment/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter7.php |
— | — | @@ -214,9 +214,9 @@ |
215 | 215 | $form .= '<td colspan="2"><span class="creditcard-error-msg">' . $this->form_errors['invalidamount'] . '</span></td>'; |
216 | 216 | $form .= '</tr>'; |
217 | 217 | $form .= '<tr>'; |
218 | | - $form .= '<td class="label">' . Xml::label( wfMsg( 'payflowpro_gateway-donor-amount' ), 'amount' ) . '</td>'; |
| 218 | + $form .= '<td class="label" style="position:relative;top:4px;">' . Xml::label( wfMsg( 'payflowpro_gateway-donor-amount' ), 'amount' ) . '</td>'; |
219 | 219 | $form .= '<td>' . |
220 | | - '<table cellspacing="3" cellpadding="0" border="0" style="margin-bottom:0.5em;"><tr>' . |
| 220 | + '<table cellspacing="3" cellpadding="0" border="0" style="margin-bottom:0.2em;"><tr>' . |
221 | 221 | '<td>'.Xml::radio( 'amount', 20, $this->form_data['amount'] == 20, array( 'onfocus' => 'clearField2( document.getElementById(\'amountOther\'), "Other" )' ) ) . '$20 '.'</td>'. |
222 | 222 | '<td>'.Xml::radio( 'amount', 35, $this->form_data['amount'] == 35, array( 'onfocus' => 'clearField2( document.getElementById(\'amountOther\'), "Other" )' ) ) . '$35 '.'</td>'. |
223 | 223 | '<td>'.Xml::radio( 'amount', 50, $this->form_data['amount'] == 50, array( 'onfocus' => 'clearField2( document.getElementById(\'amountOther\'), "Other" )' ) ) . '$50 '.'</td>'. |
— | — | @@ -245,13 +245,17 @@ |
246 | 246 | */ |
247 | 247 | |
248 | 248 | $form .= '<tr>'; |
249 | | - $form .= '<td class="label">' . wfMsg( 'payflowpro_gateway-payment-type' ) . '</td>'; |
| 249 | + $form .= '<td class="label" style="position:relative;top:8px;">' . wfMsg( 'payflowpro_gateway-payment-type' ) . '</td>'; |
250 | 250 | $form .= '<td>' . |
| 251 | + '<p style="border: 1px solid rgb(187, 187, 187); float: left; -moz-border-radius: 5px 5px 5px 5px; margin: 0 8px 0 0; padding: 5px 5px 5px 3px;">'. |
251 | 252 | Xml::radio( 'card', 'cc1', $this->form_data['card'] == 'cc1', array( 'id' => 'cc1radio', 'onclick' => 'switchToCreditCard()' ) ) . '<label for="cc1radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-visa.png" ) ). '</label>' . |
252 | | - Xml::radio( 'card', 'cc2', $this->form_data['card'] == 'cc2', array( 'id' => 'cc2radio', 'onclick' => 'switchToCreditCard()' ) ) . '<label for="cc2radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-mastercard.png" ) ). '</label>' . |
253 | | - Xml::radio( 'card', 'cc3', $this->form_data['card'] == 'cc3', array( 'id' => 'cc3radio', 'onclick' => 'switchToCreditCard()' ) ) . '<label for="cc3radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-amex.png" ) ). '</label>' . |
254 | | - Xml::radio( 'card', 'cc4', $this->form_data['card'] == 'cc4', array( 'id' => 'cc4radio', 'onclick' => 'switchToCreditCard()' ) ) . '<label for="cc4radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-discover.png" ) ). '</label>' . |
| 253 | + ' <label for="cc1radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-mastercard.png" ) ). '</label>' . |
| 254 | + ' <label for="cc1radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-amex.png" ) ). '</label>' . |
| 255 | + ' <label for="cc1radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-discover.png" ) ). '</label>' . |
| 256 | + '</p>'. |
| 257 | + '<p style="border: 1px solid transparent; float: left; -moz-border-radius: 5px 5px 5px 5px; margin: 0; padding: 5px 5px 5px 3px;">'. |
255 | 258 | Xml::radio( 'card', 'pp', $this->form_data['card'] == 'pp', array( 'id' => 'ppradio', 'onclick' => 'switchToPayPal()' ) ) . '<label for="ppradio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-paypal.png" ) ) . '</label>' . |
| 259 | + '</p>'. |
256 | 260 | '</td>'; |
257 | 261 | $form .= '</tr>'; |
258 | 262 | |
— | — | @@ -375,7 +379,7 @@ |
376 | 380 | } |
377 | 381 | $form .= Xml::openElement( 'div', array( 'id' => 'mw-donate-submit-button' ) ); |
378 | 382 | $form .= Html::hidden( 'PaypalRedirect', 0 ); |
379 | | - $form .= Xml::element( 'input', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/submit-donation-button.png", 'alt' => 'Submit donation', 'onclick' => 'document.payment.PaypalRedirect.value=1;return true;', 'type' => 'image' ) ); |
| 383 | + $form .= Xml::element( 'input', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/continue-button.png", 'alt' => 'Submit donation', 'onclick' => 'document.payment.PaypalRedirect.value=1;return true;', 'type' => 'image' ) ); |
380 | 384 | $form .= Xml::closeElement( 'div' ); // close div#mw-donate-submit-button |
381 | 385 | $form .= Xml::openElement( 'div', array( 'class' => 'mw-donate-submessage', 'id' => 'payflowpro_gateway-donate-submessage' ) ) . |
382 | 386 | Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/padlock.gif", 'style' => 'vertical-align:baseline;margin-right:4px;' ) ) . 'Your donation will be securely processed.'; |
Index: branches/fundraising/deployment/DonationInterface/payflowpro_gateway/forms/css/TwoColumnLetter7.css |
— | — | @@ -45,14 +45,6 @@ |
46 | 46 | width: 100%; |
47 | 47 | } |
48 | 48 | |
49 | | -#payflowpro_gateway-cc_form_form { |
50 | | - width: 475px; |
51 | | - float: right; |
52 | | - margin-left: 2em; |
53 | | - padding-left: 2em; |
54 | | - border-left: 1px solid #BBBBBB; |
55 | | -} |
56 | | - |
57 | 49 | #payflowpro_gateway-cc_form_letter { |
58 | 50 | height: 100%; |
59 | 51 | } |
— | — | @@ -106,7 +98,7 @@ |
107 | 99 | background-color:#cce7cd; |
108 | 100 | border:1px solid #5EAC58; |
109 | 101 | padding:16px 24px 24px; |
110 | | - width:450px; |
| 102 | + width:430px; |
111 | 103 | } |
112 | 104 | #donate-head { |
113 | 105 | border:none; |
Index: branches/fundraising/deployment/DonationInterface/payflowpro_gateway/includes/continue-button.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: branches/fundraising/deployment/DonationInterface/payflowpro_gateway/includes/continue-button.png |
___________________________________________________________________ |
Added: svn:mime-type |
114 | 106 | + application/octet-stream |
Index: branches/fundraising/deployment/DonationInterface/payflowpro_gateway/payflowpro_gateway.i18n.php |
— | — | @@ -2066,7 +2066,7 @@ |
2067 | 2067 | 'payflowpro_gateway-cancel' => 'Storno', |
2068 | 2068 | 'payflowpro_gateway-payment' => 'Platba', |
2069 | 2069 | 'payflowpro_gateway-payment-type' => 'Způsob platby', |
2070 | | - 'payflowpro_gateway-please-complete' => 'Prosíme, níže dokončete svůj příspěvek…', |
| 2070 | + 'payflowpro_gateway-please-complete' => 'Prosíme, dokončete níže svůj příspěvek…', |
2071 | 2071 | 'payflowpro_gateway-description' => 'Popis', |
2072 | 2072 | 'payflowpro_gateway-donation' => 'Příspěvek', |
2073 | 2073 | 'payflowpro_gateway-email-receipt' => 'E-mailové potvrzení na', |
— | — | @@ -2867,7 +2867,7 @@ |
2868 | 2868 | * @author Yekrats |
2869 | 2869 | */ |
2870 | 2870 | $messages['eo'] = array( |
2871 | | - 'payflowprogateway' => 'Subtenu Vikimedion', |
| 2871 | + 'payflowprogateway' => 'Donacu nun', |
2872 | 2872 | 'payflowpro_gateway-desc' => 'PayPal Payflow Pro kreditkcarta proceso', |
2873 | 2873 | 'payflowpro_gateway-accessible' => 'Ĉi tiu paĝo estas alirebla nur el la donacpaĝo.', |
2874 | 2874 | 'payflowpro_gateway-form-message' => 'Uzu la jenan formularon donaci per kreditkarto, aŭ', |
— | — | @@ -9473,6 +9473,7 @@ |
9474 | 9474 | * @author Ainali |
9475 | 9475 | * @author Boivie |
9476 | 9476 | * @author Cohan |
| 9477 | + * @author GameOn |
9477 | 9478 | * @author Nghtwlkr |
9478 | 9479 | * @author Per |
9479 | 9480 | */ |
— | — | @@ -9573,6 +9574,14 @@ |
9574 | 9575 | 'payflowpro_gateway-noscript-msg' => 'Det verkar som om du inte har JavaScript aktiverat alternativt att din webbläsare stödjer inte det. |
9575 | 9576 | För att tillhandahålla en säker, trygg och behaglig upplevelse, kräver vårt donationsformulär JavaScript.', |
9576 | 9577 | 'payflowpro_gateway-noscript-redirect-msg' => 'Om du inte kan eller inte vill aktivera JavaScript, kan du bidra ändå genom att besöka:', |
| 9578 | + 'payflowpro_gateway-or' => 'eller', |
| 9579 | + 'payflowpro_gateway-company-name' => 'Företag eller organisation', |
| 9580 | + 'payflowpro_gateway-apartment-number' => 'Lägenhet', |
| 9581 | + 'payflowpro_gateway-country' => 'Land', |
| 9582 | + 'payflowpro_gateway-telephone' => 'Telefon', |
| 9583 | + 'payflowpro_gateway-next' => 'Nästa', |
| 9584 | + 'payflowpro_gateway-continue' => 'Fortsätt', |
| 9585 | + 'payflowpro_gateway-cancel' => 'Avbryt', |
9577 | 9586 | ); |
9578 | 9587 | |
9579 | 9588 | /** Swahili (Kiswahili) |
Index: branches/fundraising/deployment/DonationInterface/donate_interface/donate_interface.i18n.php |
— | — | @@ -2512,17 +2512,17 @@ |
2513 | 2513 | 'donate_interface-comment-label' => 'Maoni:', |
2514 | 2514 | 'donate_interface-anon-message' => 'Tafadhali andika jina langu (kando ya maoni yangu) katika orodha ya wachangiaji inayotolewa kwa watu wote.', |
2515 | 2515 | 'donate_interface-email-agreement' => 'Nakubali nipokee taarifa mara kwa mara kutoka Wikimedia Foundation.', |
2516 | | - 'donate_interface-comment-title' => 'Maoni yatakayotolewa kwa watu wote', |
| 2516 | + 'donate_interface-comment-title' => 'Maoni ya umma', |
2517 | 2517 | 'donate_interface-amount-error' => '**Tafadhali ingiza kiasi halali**', |
2518 | | - 'donate_interface-processing-error' => 'Imetokea hitilafu wakati wa kufanyika ombi lako. |
2519 | | -Mashine ya kufanyika malipo haipatikani.', |
| 2518 | + 'donate_interface-processing-error' => 'Kumetokea hitilafu wakati wa uchakataji wa ombi lako. |
| 2519 | +Hakuna vichakataji vinavyopatikana.', |
2520 | 2520 | 'donate_interface-GBP' => 'GBP: Pauni ya Uingereza', |
2521 | 2521 | 'donate_interface-EUR' => 'EUR: Euro', |
2522 | | - 'donate_interface-USD' => 'USD: Dola ya U.S.A.', |
| 2522 | + 'donate_interface-USD' => 'USD: Dola ya Marekani', |
2523 | 2523 | 'donate_interface-AUD' => 'AUD: Dola ya Australia', |
2524 | 2524 | 'donate_interface-CAD' => 'CAD: Dola ya Kanada', |
2525 | 2525 | 'donate_interface-CZK' => 'CZK: Koruna ya Ucheki', |
2526 | | - 'donate_interface-DKK' => 'DKK: Krone ya Udeni', |
| 2526 | + 'donate_interface-DKK' => 'DKK: Krone ya Denmark', |
2527 | 2527 | 'donate_interface-HKD' => 'HKD: Dola ya Hong Kong', |
2528 | 2528 | 'donate_interface-NZD' => 'NZD: Dola ya New Zealand', |
2529 | 2529 | 'donate_interface-SGD' => 'SGD: Dola ya Singapore', |
Property changes on: branches/fundraising/deployment/DonationInterface |
___________________________________________________________________ |
Modified: svn:mergeinfo |
2530 | 2530 | Merged /trunk/extensions/DonationInterface:r77179-77244 |