diff --git a/CHANGELOG.md b/CHANGELOG.md index b7fdf1427..b1369b486 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,17 @@ CHANGELOG * reverted [33226] because of side effects (see http://trac.symfony-project.org/ticket/8348) -12/13/11: Version 1.4.16 +08/03/12: Versions 1.4.17 +------------------------- + + * [33363] added some tests (closes #3237, patch from Stephen.Ostrow) + * [33362] fixed a notice on PHP 5.4 (closes #9985, patch from bshaffer) + * [33358] fixed Notice with PHP 5.4 (closes #10003) + * [33309] fixed error in Debug mode from sfDebug.class.php when myUser implements sfSecurityUser (closes #9996) + * [33299] reverted [33226] because of side effects (refs #8348) + * [33292] fixed test for PHP 5.3 (patch from pylebecq) + +12/13/12: Version 1.4.16 ------------------------ * [33251] fixed sfChoiceFormat when a string to translate contains a valid range (closes #9973) diff --git a/lib/debug/sfDebug.class.php b/lib/debug/sfDebug.class.php index 8d83d6714..f4adbf81f 100644 --- a/lib/debug/sfDebug.class.php +++ b/lib/debug/sfDebug.class.php @@ -167,7 +167,7 @@ public static function userAsArray(sfUser $user = null) 'culture' => $user->getCulture(), ); - if ($user instanceof sfSecurityUser) + if ($user instanceof sfBasicSecurityUser) { $data = array_merge($data, array( 'authenticated' => $user->isAuthenticated(), diff --git a/lib/i18n/sfCultureInfo.class.php b/lib/i18n/sfCultureInfo.class.php index f635c8d36..3afc0ccf2 100644 --- a/lib/i18n/sfCultureInfo.class.php +++ b/lib/i18n/sfCultureInfo.class.php @@ -772,16 +772,23 @@ public function getCurrencies($currencies = null, $full = false) $allCurrencies = array_intersect_key($allCurrencies, array_flip($currencies)); } - if (!$full) + $tmp = array(); + foreach ($allCurrencies as $key => $value) { - foreach ($allCurrencies as $key => $value) - { - $allCurrencies[$key] = $value[1]; - } + $allCurrencies[$key] = $value[1]; + $tmp[$key] = $value[0]; } $this->sortArray($allCurrencies); + if ($full) + { + foreach ($allCurrencies as $key => $value) + { + $allCurrencies[$key] = array($tmp[$key], $value); + } + } + return $allCurrencies; } @@ -846,7 +853,7 @@ public function getTimeZones() /** * sorts the passed array according to the locale of this sfCultureInfo class * - * @param array the array to pe sorted wiht "asort" and this locale + * @param array the array to be sorted with "asort" and this locale */ public function sortArray(&$array) { diff --git a/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineMigrateTask.class.php b/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineMigrateTask.class.php index b4078c078..03c65a8bf 100644 --- a/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineMigrateTask.class.php +++ b/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineMigrateTask.class.php @@ -100,7 +100,23 @@ protected function execute($arguments = array(), $options = array()) $this->logSection('doctrine', sprintf('Migrating from version %s to %s%s', $from, $version, $options['dry-run'] ? ' (dry run)' : '')); try { - $migration->migrate($version, $options['dry-run']); + $migration_classes = $migration->getMigrationClasses(); + if($version < $from) + { + for($i = (int)$from - 1; $i >= (int)$version; $i--) + { + $this->logSection('doctrine', 'executing migration : '.$i .', class: '.$migration_classes[$i]); + $migration->migrate($i, $options['dry-run']); + } + } + else + { + for($i = (int)$from + 1; $i <= (int)$version; $i++) + { + $this->logSection('doctrine', 'executing migration : '.$i.', class: '.$migration_classes[$i]); + $migration->migrate($i, $options['dry-run']); + } + } } catch (Exception $e) { diff --git a/lib/widget/sfWidgetFormSelectCheckbox.class.php b/lib/widget/sfWidgetFormSelectCheckbox.class.php index 4f1366aaa..864781b54 100644 --- a/lib/widget/sfWidgetFormSelectCheckbox.class.php +++ b/lib/widget/sfWidgetFormSelectCheckbox.class.php @@ -102,7 +102,7 @@ protected function formatChoices($name, $value, $choices, $attributes) 'id' => $id = $this->generateId($name, self::escapeOnce($key)), ); - if ((is_array($value) && in_array(strval($key), $value)) || strval($key) == strval($value)) + if ((is_array($value) && in_array(strval($key), $value)) || (is_string($value) && strval($key) == strval($value))) { $baseAttributes['checked'] = 'checked'; } diff --git a/test/functional/fixtures/apps/frontend/config/view.yml b/test/functional/fixtures/apps/frontend/config/view.yml index 64f550313..d690255fe 100644 --- a/test/functional/fixtures/apps/frontend/config/view.yml +++ b/test/functional/fixtures/apps/frontend/config/view.yml @@ -14,6 +14,9 @@ default: - ie6: condition: lte IE 6 + - + multiple_media: + media: 'print,handheld' javascripts: [ ] diff --git a/test/functional/genericTest.php b/test/functional/genericTest.php index 43ef9945b..f70672271 100644 --- a/test/functional/genericTest.php +++ b/test/functional/genericTest.php @@ -3,7 +3,7 @@ /* * This file is part of the symfony package. * (c) 2004-2006 Fabien Potencier - * + * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ @@ -23,6 +23,7 @@ checkElement('body', '/congratulations/i')-> checkElement('link[href="/sf/sf_default/css/screen.css"]')-> checkElement('link[href="/css/main.css"]')-> + checkElement('link[href="/css/multiple_media.css"][media="print,handheld"]')-> matches('#'.preg_quote('').'#')-> end() ;