Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1047068
D474.id1264.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jun 29, 4:36 PM
Size
1 KB
Mime Type
text/x-diff
Expires
Mon, Jun 30, 4:36 PM (3 h, 41 m)
Engine
blob
Format
Raw Data
Handle
676955
Attached To
D474: MINC-202 - Fix currency selection in Site Domain scenario
D474.id1264.diff
View Options
Index: branches/5.2.x/units/currencies/currencies_event_handler.php
===================================================================
--- branches/5.2.x/units/currencies/currencies_event_handler.php
+++ branches/5.2.x/units/currencies/currencies_event_handler.php
@@ -279,11 +279,21 @@
*/
protected function OnChangeCurrency($event)
{
- $currency_iso = $this->Application->GetVar('curr_iso');
+ $currency_iso = $this->Application->GetVar('curr_iso', '');
+
+ $sql = 'SELECT CurrencyId
+ FROM ' . TABLE_PREFIX . 'Currencies
+ WHERE ISO = ' . $this->Conn->qstr($currency_iso) . ' AND Status = ' . STATUS_ACTIVE;
+ $currency_id = $this->Conn->GetOne($sql);
+
+ if ( $currency_id === false ) {
+ return;
+ }
+
$available_currencies = $this->Application->siteDomainField('Currencies');
if ($available_currencies) {
- if (strpos($available_currencies, '|' . $currency_iso . '|') === false) {
+ if (strpos($available_currencies, '|' . $currency_id . '|') === false) {
// currency isn't allowed in site domain
return ;
}
Event Timeline
Log In to Comment