Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/debug/sfDebug.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
19 changes: 13 additions & 6 deletions lib/i18n/sfCultureInfo.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion lib/widget/sfWidgetFormSelectCheckbox.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down
3 changes: 3 additions & 0 deletions test/functional/fixtures/apps/frontend/config/view.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ default:
-
ie6:
condition: lte IE 6
-
multiple_media:
media: 'print,handheld'

javascripts: [ ]

Expand Down
3 changes: 2 additions & 1 deletion test/functional/genericTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier <[email protected]>
*
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Expand All @@ -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('<!--[if lte IE 6]><link rel="stylesheet" type="text/css" media="screen" href="/css/ie6.css" /><![endif]-->').'#')->
end()
;
Expand Down