Skip to content
This repository was archived by the owner on Nov 16, 2020. It is now read-only.

Commit 63e21e2

Browse files
committed
RELEASE_1_4_9 => v1.4.9 commit
1 parent 52e79c2 commit 63e21e2

File tree

94 files changed

+801
-261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+801
-261
lines changed

CHANGELOG

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
02/04/11: Version 1.4.9
2+
-----------------------
3+
4+
* [31928] copied more values into a cachable partial's cloned response when the partial is marked as contextual in cache.yml (closes #7192)
5+
* [31895] fixed _auto_link_urls() does not pick up URLs with complex fragments (as per RFC3986 - closes #9424 - patch from benlancaster)
6+
* [31893] fixed sfDomCssSelector on class names with hyphens (patch from richsage, closes #9411)
7+
* [31471] changed the default value for session_cache_limiter to 'null'.
8+
* [31399] fixed sfViewCacheManager returns incorrect cached http_protocol (closes #9254)
9+
* [31254] fixed WDT injection (closes #9107)
10+
* [31249] fixed memory leak in Swift_DoctrineSpool
11+
* [31248] fixed sfI18nModuleExtract.class.php always assumes a file based message source (closes #9153 - patch from daReaper)
12+
* [31247] fixed mbstring problem in sfFilesystem (closes #9139 - based on a patch from nresni)
13+
* [31002] added call to parent::preExecute() to generated admin action classes (closes #9099)
14+
15+
116
09/24/10: Version 1.4.8
217
-----------------------
318

lib/autoload/sfCoreAutoload.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/**
1212
* The current symfony version.
1313
*/
14-
define('SYMFONY_VERSION', '1.4.8');
14+
define('SYMFONY_VERSION', '1.4.9');
1515

1616
/**
1717
* sfCoreAutoload class.
@@ -22,7 +22,7 @@
2222
* @package symfony
2323
* @subpackage autoload
2424
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
25-
* @version SVN: $Id: sfCoreAutoload.class.php 30982 2010-09-24 02:41:20Z Kris.Wallsmith $
25+
* @version SVN: $Id: sfCoreAutoload.class.php 31977 2011-02-04 14:42:19Z Kris.Wallsmith $
2626
*/
2727
class sfCoreAutoload
2828
{

lib/debug/sfDebug.class.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* @package symfony
1515
* @subpackage debug
1616
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
17-
* @version SVN: $Id: sfDebug.class.php 22118 2009-09-18 07:02:26Z fabien $
17+
* @version SVN: $Id: sfDebug.class.php 31250 2010-10-26 14:18:26Z fabien $
1818
*/
1919
class sfDebug
2020
{
@@ -161,11 +161,22 @@ public static function userAsArray(sfUser $user = null)
161161
return array();
162162
}
163163

164-
return array(
164+
$data = array(
165165
'options' => $user->getOptions(),
166166
'attributeHolder' => self::flattenParameterHolder($user->getAttributeHolder(), true),
167167
'culture' => $user->getCulture(),
168168
);
169+
170+
if ($user instanceof sfSecurityUser)
171+
{
172+
$data = array_merge($data, array(
173+
'authenticated' => $user->isAuthenticated(),
174+
'credentials' => $user->getCredentials(),
175+
'lastRequest' => $user->getLastRequestTime(),
176+
));
177+
}
178+
179+
return $data;
169180
}
170181

171182
/**

lib/debug/sfWebDebug.class.php

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* @package symfony
1515
* @subpackage debug
1616
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
17-
* @version SVN: $Id: sfWebDebug.class.php 30961 2010-09-22 09:36:43Z Kris.Wallsmith $
17+
* @version SVN: $Id: sfWebDebug.class.php 31254 2010-10-26 15:26:03Z fabien $
1818
*/
1919
class sfWebDebug
2020
{
@@ -154,20 +154,33 @@ public function getOption($name, $default = null)
154154
*/
155155
public function injectToolbar($content)
156156
{
157-
if (false !== $pos = stripos($content, '</head>'))
157+
if (function_exists('mb_stripos'))
158+
{
159+
$posFunction = 'mb_stripos';
160+
$posrFunction = 'mb_strripos';
161+
$substrFunction = 'mb_substr';
162+
}
163+
else
164+
{
165+
$posFunction = 'stripos';
166+
$posrFunction = 'strripos';
167+
$substrFunction = 'substr';
168+
}
169+
170+
if (false !== $pos = $posFunction($content, '</head>'))
158171
{
159172
$styles = '<style type="text/css">'.str_replace(array("\r", "\n"), ' ', $this->getStylesheet()).'</style>';
160-
$content = substr($content, 0, $pos).$styles.substr($content, $pos);
173+
$content = $substrFunction($content, 0, $pos).$styles.$substrFunction($content, $pos);
161174
}
162175

163176
$debug = $this->asHtml();
164-
if (false === $pos = strripos($content, '</body>'))
177+
if (false === $pos = $posrFunction($content, '</body>'))
165178
{
166179
$content .= $debug;
167180
}
168181
else
169182
{
170-
$content = substr($content, 0, $pos).'<script type="text/javascript">'.$this->getJavascript().'</script>'.$debug.substr($content, $pos);
183+
$content = $substrFunction($content, 0, $pos).'<script type="text/javascript">'.$this->getJavascript().'</script>'.$debug.$substrFunction($content, $pos);
171184
}
172185

173186
return $content;

lib/helper/I18NHelper.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* @package symfony
1515
* @subpackage helper
1616
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
17-
* @version SVN: $Id: I18NHelper.php 29597 2010-05-24 06:00:11Z fabien $
17+
* @version SVN: $Id: I18NHelper.php 31894 2011-01-24 18:12:37Z fabien $
1818
*/
1919

2020
function __($text, $args = array(), $catalogue = 'messages')
@@ -43,6 +43,23 @@ function __($text, $args = array(), $catalogue = 'messages')
4343
}
4444
}
4545

46+
/**
47+
* Format a string according to a number.
48+
*
49+
* Every segment is separated with |
50+
* Each segment defines an intervale and a value.
51+
*
52+
* For example :
53+
*
54+
* * [0]Nobody is logged|[1]There is 1 person logged|(1,+Inf]There are %number persons logged
55+
*
56+
* @param string $text Text used for different number values
57+
* @param array $args Arguments to replace in the string
58+
* @param int $number Number to use to determine the string to use
59+
* @param string $catalogue Catalogue for translation
60+
*
61+
* @return string Result of the translation
62+
*/
4663
function format_number_choice($text, $args = array(), $number, $catalogue = 'messages')
4764
{
4865
$translated = __($text, $args, $catalogue);

lib/helper/TextHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @subpackage helper
1717
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
1818
* @author David Heinemeier Hansson
19-
* @version SVN: $Id: TextHelper.php 29417 2010-05-12 06:53:36Z fabien $
19+
* @version SVN: $Id: TextHelper.php 31895 2011-01-24 18:37:43Z fabien $
2020
*/
2121

2222
/**
@@ -234,7 +234,7 @@ function strip_links_text($text)
234234
(?::\d+)? # port
235235
(?:/(?:(?:[\~\w\+%-]|(?:[,.;:][^\s$]))+)?)* # path
236236
(?:\?[\w\+%&=.;-]+)? # query string
237-
(?:\#[\w\-]*)? # trailing anchor
237+
(?:\#[\w\-/\?!=]*)? # trailing anchor
238238
)
239239
([[:punct:]]|\s|<|$) # trailing text
240240
~x');

lib/helper/UrlHelper.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,22 @@
1414
* @package symfony
1515
* @subpackage helper
1616
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
17-
* @version SVN: $Id: UrlHelper.php 27753 2010-02-08 19:24:39Z Kris.Wallsmith $
17+
* @version SVN: $Id: UrlHelper.php 31396 2010-11-15 16:08:26Z fabien $
1818
*/
1919

20+
/**
21+
* @ignore
22+
*/
2023
function link_to2($name, $routeName, $params, $options = array())
2124
{
2225
$params = array_merge(array('sf_route' => $routeName), is_object($params) ? array('sf_subject' => $params) : $params);
2326

2427
return link_to1($name, $params, $options);
2528
}
2629

30+
/**
31+
* @ignore
32+
*/
2733
function link_to1($name, $internal_uri, $options = array())
2834
{
2935
$html_options = _parse_attributes($options);
@@ -76,13 +82,19 @@ function link_to1($name, $internal_uri, $options = array())
7682
return content_tag('a', $name, $html_options);
7783
}
7884

85+
/**
86+
* @ignore
87+
*/
7988
function url_for2($routeName, $params = array(), $absolute = false)
8089
{
8190
$params = array_merge(array('sf_route' => $routeName), is_object($params) ? array('sf_subject' => $params) : $params);
8291

8392
return url_for1($params, $absolute);
8493
}
8594

95+
/**
96+
* @ignore
97+
*/
8698
function url_for1($internal_uri, $absolute = false)
8799
{
88100
return sfContext::getInstance()->getController()->genUrl($internal_uri, $absolute);

lib/i18n/extract/sfI18nModuleExtract.class.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* @package symfony
1313
* @subpackage i18n
1414
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
15-
* @version SVN: $Id: sfI18nModuleExtract.class.php 7691 2008-02-29 16:56:22Z fabien $
15+
* @version SVN: $Id: sfI18nModuleExtract.class.php 31248 2010-10-26 13:54:12Z fabien $
1616
*/
1717
class sfI18nModuleExtract extends sfI18nExtract
1818
{
@@ -30,7 +30,9 @@ public function configure()
3030

3131
$this->module = $this->parameters['module'];
3232

33-
$this->i18n->setMessageSource($this->i18n->getConfiguration()->getI18NDirs($this->module), $this->culture);
33+
$options = $this->i18n->getOptions();
34+
$dirs = $this->i18n->isMessageSourceFileBased($options['source']) ? $this->i18n->getConfiguration()->getI18NDirs($this->module) : null;
35+
$this->i18n->setMessageSource($dirs, $this->culture);
3436
}
3537

3638
/**

lib/plugin/sfPearRestPlugin.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* @package symfony
1515
* @subpackage plugin
1616
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
17-
* @version SVN: $Id: sfPearRestPlugin.class.php 21908 2009-09-11 12:06:21Z fabien $
17+
* @version SVN: $Id: sfPearRestPlugin.class.php 31396 2010-11-15 16:08:26Z fabien $
1818
*/
1919
class sfPearRestPlugin extends sfPearRest11
2020
{
@@ -63,6 +63,7 @@ protected function getRESTBase($channelName)
6363
}
6464

6565
$mirror = $this->config->get('preferred_mirror', null, $channelName);
66+
6667
if (!$channel->supportsREST($mirror))
6768
{
6869
throw new sfPluginRestException(sprintf('The channel "%s" does not support the REST protocol', $channelName));

lib/plugins/sfDoctrinePlugin/data/generator/sfDoctrineModule/admin/template/actions/actions.class.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @package ##PROJECT_NAME##
1010
* @subpackage <?php echo $this->getModuleName()."\n" ?>
1111
* @author ##AUTHOR_NAME##
12-
* @version SVN: $Id: actions.class.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
12+
* @version SVN: $Id: actions.class.php 31002 2010-09-27 12:04:07Z Kris.Wallsmith $
1313
*/
1414
abstract class <?php echo $this->getGeneratedModuleName() ?>Actions extends <?php echo $this->getActionsBaseClass()."\n" ?>
1515
{
@@ -25,6 +25,8 @@ public function preExecute()
2525
$this->dispatcher->notify(new sfEvent($this, 'admin.pre_execute', array('configuration' => $this->configuration)));
2626

2727
$this->helper = new <?php echo $this->getModuleName() ?>GeneratorHelper();
28+
29+
parent::preExecute();
2830
}
2931

3032
<?php include dirname(__FILE__).'/../../parts/indexAction.php' ?>

0 commit comments

Comments
 (0)