Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-04-04-00-08-28
[civicrm-core.git] / CRM / Core / Config / Variables.php
index 5cfca7852b186285914dd1d9e4652688be2e1ae3..8de2b56787888e74393b7edd80dc3e747da6ee02 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -31,7 +31,7 @@
  * it need to be defined here first.
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -492,7 +492,7 @@ class CRM_Core_Config_Variables extends CRM_Core_Config_Defaults {
       if ($this->defaultCurrency || $defaultCurrency) {
         $this->currencySymbols = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'currency', array(
           'labelColumn' => 'symbol',
-          'orderColumn' => FALSE,
+          'orderColumn' => TRUE,
         ));
         $currency = $defaultCurrency ? $defaultCurrency : $this->defaultCurrency;
         $cachedSymbol = CRM_Utils_Array::value($currency, $this->currencySymbols, '');
@@ -585,7 +585,12 @@ class CRM_Core_Config_Variables extends CRM_Core_Config_Defaults {
       $country = array();
       if (is_array($this->provinceLimit)) {
         foreach ($this->provinceLimit as $val) {
-          $country[] = $countryIsoCodes[$val];
+          // CRM-12007
+          // some countries have disappeared and hence they might be in country limit
+          // but not in the country table
+          if (isset($countryIsoCodes[$val])) {
+            $country[] = $countryIsoCodes[$val];
+          }
         }
       }
       else {