Skip to content

Commit

Permalink
updated to symfony 1.4.3 (fixes #673)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kousuke Ebihara committed Mar 2, 2010
1 parent e6deaa6 commit 02b9af4
Show file tree
Hide file tree
Showing 108 changed files with 1,120 additions and 339 deletions.
48 changes: 48 additions & 0 deletions lib/vendor/symfony/CHANGELOG
@@ -1,3 +1,51 @@
02/25/10: Version 1.4.3
-----------------------

* [28260] fixed sql injection vulnerability in doctrine admin generator

02/12/10: Version 1.4.2
-----------------------

* [27954] fixed enabling of local csrf protection when disabled globally (closes #8228)
* [27942] fixed output of doctrine:insert-sql task (closes #8008)
* [27940] fixed field name used when propel unique validator throws a non-global error (closes #8108)
* [27842] fixed typo, fixed consistent use of field rather than column name in doctrine form generators (closes #8254)
* [27836] fixed submission of disable form fields by browser (closes #8178)
* [27755] fixed double escaping of partial vars (closes #7825, refs #1638)
* [27753] fixed helper signature (closes #8170)
* [27752] fixed initialization of output escaper array iterator (closes #8202)
* [27751] fixed symlink logic on vista+ with php 5.3 (closes #8237)
* [27750] updated generated stub task to guess a default connection name based on ORM (closes #8209)
* [27749] updated doctrine and propel forms to allow setting of defaults on numeric fields from within configure (closes #8238)
* [27748] fixed form filtering by 0 on a number column (closes #8175)
* [27747] fixed doctrine pager iteration (closes #7758, refs #8021)
* [27742] fixed generation of enum pk form widgets (closes #7959)
* [27738] fixed XSS hole in select checkbox and radio widgets (closes #8176)
* [27736] fixed sfValidatorDoctrineChoice in cloned forms (embedForEach) doesn't function correctly (closes #8198)
* [27616] passed the changeStack option in ->get() and ->post() calls of sfBrowserBase to the delegated ->call() (fixes #4271)
* [27612] added basic test for sfPager->rewind() and fixed bug not leading to ->reset() not working correctly. (fixes #8021)
* [27597] fixed minor incompatibility of new link_to() behaviour with 1.0 behaviour (fixes #7933, #8231)
* [27511] fixed typo preventing sfProjectOptimizeTask to work correctly (closes #7885)
* [27479] Removed svn version line from propel generated files showing them as modified even without changes each regeneration (backported r27472)
* [27284] fixed empty class attributes in WDT markup (closes #8196)
* [27211] added check and logging for non executable remote installer files in sfGenerateProjectTask (closes #7921)
* [27183] fixed behavior when using either no separators or non slash separators for sfPatternRouting (fixes #8114)
* [27061] partially fixed sfTester#isValid() on Windows systems (closes #7812)
* [26989] fixed typo in getting Priorities from sfVarLogger (fixes #7938)
* [26957] updated web debug javascript to work when the dom includes an svg element
* [26872] fixed sfDomCssSelector requires quotes for matching attribute values when they should be optional (closes #8120)
* [26871] fixed sfValidateDate for negative timestamps (closes #8134)
* [26870] fixed sfWidgetFormSchema::setPositions() which accepts duplication positions (closes #7992)
* [26867] turned off xdebug_logging by default as it can make the dev env very very slow (closes #8085)
* [26866] fixed sfValidatorDate errors (closes #8118)
* [26865] updated Propel to 1.4.1 (closes #8131)
* [26681] fixed format_currency is rounding bad (closes #6788)
* [25459] added the module name when including a partial in the admin generator
* [25458] updated Turkish translations of the admin generator (closes #7928, patch by metoikos)
* [25411] changed project:validate task to generate less false positive (closes #7852)
* [25406] removed duplicate is_string check in sfWebController (closes #7918)
* [25218] Fixing issue with disablePlugin() static method being called publicly while being defined protected

12/08/09: Version 1.4.1
-----------------------

Expand Down
59 changes: 43 additions & 16 deletions lib/vendor/symfony/lib/addon/sfPager.class.php
Expand Up @@ -14,7 +14,7 @@
* @package symfony
* @subpackage addon
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @version SVN: $Id: sfPager.class.php 24533 2009-11-29 15:58:01Z Kris.Wallsmith $
* @version SVN: $Id: sfPager.class.php 27747 2010-02-08 18:02:19Z Kris.Wallsmith $
*/
abstract class sfPager implements Iterator, Countable
{
Expand All @@ -31,6 +31,8 @@ abstract class sfPager implements Iterator, Countable
$currentMaxLink = 1,
$parameterHolder = null,
$maxRecordLimit = false,

// used by iterator interface
$results = null,
$resultsCounter = 0;

Expand Down Expand Up @@ -493,17 +495,44 @@ public function setParameter($name, $value)
$this->parameterHolder->set($name, $value);
}

/**
* Returns true if the properties used for iteration have been initialized.
*
* @return boolean
*/
protected function isIteratorInitialized()
{
return null !== $this->results;
}

/**
* Loads data into properties used for iteration.
*/
protected function initializeIterator()
{
$this->results = $this->getResults();
$this->resultsCounter = count($this->results);
}

/**
* Empties properties used for iteration.
*/
protected function resetIterator()
{
$this->results = null;
$this->resultsCounter = 0;
}

/**
* Returns the current result.
*
* @see Iterator
*/
public function current()
{
if (null === $this->results)
if (!$this->isIteratorInitialized())
{
$this->results = $this->getResults();
$this->resultsCounter = count($this->results);
$this->initializeIterator();
}

return current($this->results);
Expand All @@ -516,10 +545,9 @@ public function current()
*/
public function key()
{
if (null === $this->results)
if (!$this->isIteratorInitialized())
{
$this->results = $this->getResults();
$this->resultsCounter = count($this->results);
$this->initializeIterator();
}

return key($this->results);
Expand All @@ -532,10 +560,9 @@ public function key()
*/
public function next()
{
if (null === $this->results)
if (!$this->isIteratorInitialized())
{
$this->results = $this->getResults();
$this->resultsCounter = count($this->results);
$this->initializeIterator();
}

--$this->resultsCounter;
Expand All @@ -550,12 +577,13 @@ public function next()
*/
public function rewind()
{
if (null === $this->results)
if (!$this->isIteratorInitialized())
{
$this->results = $this->getResults();
$this->resultsCounter = count($this->results);
$this->initializeIterator();
}

$this->resultsCounter = count($this->results);

return reset($this->results);
}

Expand All @@ -566,10 +594,9 @@ public function rewind()
*/
public function valid()
{
if (null === $this->results)
if (!$this->isIteratorInitialized())
{
$this->results = $this->getResults();
$this->resultsCounter = count($this->results);
$this->initializeIterator();
}

return $this->resultsCounter > 0;
Expand Down
4 changes: 2 additions & 2 deletions lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php
Expand Up @@ -11,7 +11,7 @@
/**
* The current symfony version.
*/
define('SYMFONY_VERSION', '1.4.1');
define('SYMFONY_VERSION', '1.4.3');

/**
* sfCoreAutoload class.
Expand All @@ -22,7 +22,7 @@
* @package symfony
* @subpackage autoload
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @version SVN: $Id: sfCoreAutoload.class.php 25078 2009-12-08 14:14:38Z Kris.Wallsmith $
* @version SVN: $Id: sfCoreAutoload.class.php 28268 2010-02-25 07:01:44Z Kris.Wallsmith $
*/
class sfCoreAutoload
{
Expand Down
2 changes: 1 addition & 1 deletion lib/vendor/symfony/lib/config/config/factories.yml
Expand Up @@ -90,7 +90,7 @@ default:
param:
level: debug
condition: %SF_WEB_DEBUG%
xdebug_logging: true
xdebug_logging: false
web_debug_class: sfWebDebug
sf_file_debug:
class: sfFileLogger
Expand Down
Expand Up @@ -14,13 +14,14 @@
* @package symfony
* @subpackage config
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @version SVN: $Id: sfProjectConfiguration.class.php 24039 2009-11-16 17:52:14Z Kris.Wallsmith $
* @version SVN: $Id: sfProjectConfiguration.class.php 27191 2010-01-26 13:38:49Z FabianLange $
*/
class sfProjectConfiguration
{
protected
$rootDir = null,
$symfonyLibDir = null,
$dispatcher = null,
$plugins = array(),
$pluginPaths = array(),
$overriddenPluginPaths = array(),
Expand Down
4 changes: 2 additions & 2 deletions lib/vendor/symfony/lib/controller/sfWebController.class.php
Expand Up @@ -16,7 +16,7 @@
* @subpackage controller
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @author Sean Kerr <sean@code-box.org>
* @version SVN: $Id: sfWebController.class.php 24039 2009-11-16 17:52:14Z Kris.Wallsmith $
* @version SVN: $Id: sfWebController.class.php 25406 2009-12-15 12:22:30Z FabianLange $
*/
abstract class sfWebController extends sfController
{
Expand Down Expand Up @@ -47,7 +47,7 @@ public function genUrl($parameters = array(), $absolute = false)
return $parameters;
}

if (is_string($parameters) && $parameters == '#')
if ($parameters == '#')
{
return $parameters;
}
Expand Down
8 changes: 4 additions & 4 deletions lib/vendor/symfony/lib/debug/sfWebDebug.class.php
Expand Up @@ -14,7 +14,7 @@
* @package symfony
* @subpackage debug
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @version SVN: $Id: sfWebDebug.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
* @version SVN: $Id: sfWebDebug.class.php 27284 2010-01-28 18:34:57Z Kris.Wallsmith $
*/
class sfWebDebug
{
Expand Down Expand Up @@ -185,8 +185,8 @@ public function asHtml()
if (($content = $panel->getPanelContent()) || $panel->getTitleUrl())
{
$id = sprintf('sfWebDebug%sDetails', $name);
$titles[] = sprintf('<li class="%s"><a title="%s" href="%s"%s>%s</a></li>',
$panel->getStatus() ? 'sfWebDebug'.ucfirst($this->getPriority($panel->getStatus())) : '',
$titles[] = sprintf('<li%s><a title="%s" href="%s"%s>%s</a></li>',
$panel->getStatus() ? ' class="sfWebDebug'.ucfirst($this->getPriority($panel->getStatus())).'"' : '',
$panel->getPanelTitle(),
$panel->getTitleUrl() ? $panel->getTitleUrl() : '#',
$panel->getTitleUrl() ? '' : ' onclick="sfWebDebugShowDetailsFor(\''.$id.'\'); return false;"',
Expand Down Expand Up @@ -268,7 +268,7 @@ function sfWebDebugGetElementsByClassName(strClass, strTag, objContElm)
var j = objColl.length;
for (var i = 0; i < j; i++) {
if(objColl[i].className == undefined) continue;
var arrObjClass = objColl[i].className.split(' ');
var arrObjClass = objColl[i].className.split ? objColl[i].className.split(' ') : [];
if (delim == ' ' && arrClass.length > arrObjClass.length) continue;
var c = 0;
comparisonLoop:
Expand Down
4 changes: 2 additions & 2 deletions lib/vendor/symfony/lib/debug/sfWebDebugPanel.class.php
Expand Up @@ -14,7 +14,7 @@
* @package symfony
* @subpackage debug
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @version SVN: $Id: sfWebDebugPanel.class.php 22955 2009-10-12 16:44:07Z Kris.Wallsmith $
* @version SVN: $Id: sfWebDebugPanel.class.php 27284 2010-01-28 18:34:57Z Kris.Wallsmith $
*/
abstract class sfWebDebugPanel
{
Expand Down Expand Up @@ -123,7 +123,7 @@ public function getToggleableDebugStack($debugStack)

$isProjectFile = $file && 0 === strpos($file, sfConfig::get('sf_root_dir')) && !preg_match('/(cache|plugins|vendor)/', $file);

$html .= sprintf('<span class="%s">#%s &raquo; ', $isProjectFile ? 'sfWebDebugHighlight' : '', $keys[$j] + 1);
$html .= sprintf('<span%s>#%s &raquo; ', $isProjectFile ? ' class="sfWebDebugHighlight"' : '', $keys[$j] + 1);

if (isset($trace['function']))
{
Expand Down
Expand Up @@ -15,7 +15,7 @@
* @package symfony
* @subpackage view
* @author Mike Squire <mike@somosis.co.uk>
* @version SVN: $Id: sfOutputEscaperArrayDecorator.class.php 9158 2008-05-21 20:32:00Z FabianLange $
* @version SVN: $Id: sfOutputEscaperArrayDecorator.class.php 27752 2010-02-08 19:21:22Z Kris.Wallsmith $
*/
class sfOutputEscaperArrayDecorator extends sfOutputEscaperGetterDecorator implements Iterator, ArrayAccess, Countable
{
Expand All @@ -26,6 +26,18 @@ class sfOutputEscaperArrayDecorator extends sfOutputEscaperGetterDecorator imple
*/
private $count;

/**
* Constructor.
*
* @see sfOutputEscaper
*/
public function __construct($escapingMethod, $value)
{
parent::__construct($escapingMethod, $value);

$this->count = count($this->value);
}

/**
* Reset the array to the beginning (as required for the Iterator interface).
*/
Expand Down Expand Up @@ -66,7 +78,7 @@ public function next()
{
next($this->value);

$this->count --;
$this->count--;
}

/**
Expand Down
8 changes: 4 additions & 4 deletions lib/vendor/symfony/lib/form/sfForm.class.php
Expand Up @@ -23,7 +23,7 @@
* @package symfony
* @subpackage form
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @version SVN: $Id: sfForm.class.php 24278 2009-11-23 15:21:09Z Kris.Wallsmith $
* @version SVN: $Id: sfForm.class.php 27954 2010-02-12 16:12:44Z Kris.Wallsmith $
*/
class sfForm implements ArrayAccess, Iterator, Countable
{
Expand Down Expand Up @@ -827,7 +827,7 @@ public function setDefaults($defaults)

if ($this->isCSRFProtected())
{
$this->setDefault(self::$CSRFFieldName, $this->getCSRFToken(self::$CSRFSecret));
$this->setDefault(self::$CSRFFieldName, $this->getCSRFToken($this->localCSRFSecret ? $this->localCSRFSecret : self::$CSRFSecret));
}

$this->resetFormFields();
Expand Down Expand Up @@ -897,7 +897,7 @@ public function getCSRFToken($secret = null)
{
if (null === $secret)
{
$secret = self::$CSRFSecret;
$secret = $this->localCSRFSecret ? $this->localCSRFSecret : self::$CSRFSecret;
}

return md5($secret.session_id().get_class($this));
Expand Down Expand Up @@ -938,7 +938,7 @@ static public function getCSRFFieldName()
*/
public function enableLocalCSRFProtection($secret = null)
{
$this->localCSRFSecret = $secret;
$this->localCSRFSecret = null === $secret ? true : $secret;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/vendor/symfony/lib/generator/sfModelGenerator.class.php
Expand Up @@ -14,7 +14,7 @@
* @package symfony
* @subpackage generator
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @version SVN: $Id: sfModelGenerator.class.php 23194 2009-10-19 16:37:13Z fabien $
* @version SVN: $Id: sfModelGenerator.class.php 25459 2009-12-16 13:08:43Z fabien $
*/
abstract class sfModelGenerator extends sfGenerator
{
Expand Down Expand Up @@ -267,7 +267,7 @@ public function renderField($field)
}
else if ($field->isPartial())
{
return sprintf("get_partial('%s', array('type' => 'list', '%s' => \$%s))", $field->getName(), $this->getSingularName(), $this->getSingularName());
return sprintf("get_partial('%s/%s', array('type' => 'list', '%s' => \$%s))", $this->getModuleName(), $field->getName(), $this->getSingularName(), $this->getSingularName());
}
else if ('Date' == $field->getType())
{
Expand Down
6 changes: 3 additions & 3 deletions lib/vendor/symfony/lib/helper/PartialHelper.php
Expand Up @@ -14,7 +14,7 @@
* @package symfony
* @subpackage helper
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @version SVN: $Id: PartialHelper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
* @version SVN: $Id: PartialHelper.php 27755 2010-02-08 20:51:02Z Kris.Wallsmith $
*/

/**
Expand Down Expand Up @@ -138,7 +138,7 @@ function get_component($moduleName, $componentName, $vars = array())

$class = sfConfig::get('mod_'.strtolower($moduleName).'_partial_view_class', 'sf').'PartialView';
$view = new $class($context, $moduleName, $actionName, '');
$view->setPartialVars($vars);
$view->setPartialVars(true === sfConfig::get('sf_escaping_strategy') ? sfOutputEscaper::unescape($vars) : $vars);

if ($retval = $view->getCache())
{
Expand Down Expand Up @@ -213,7 +213,7 @@ function get_partial($templateName, $vars = array())

$class = sfConfig::get('mod_'.strtolower($moduleName).'_partial_view_class', 'sf').'PartialView';
$view = new $class($context, $moduleName, $actionName, '');
$view->setPartialVars($vars);
$view->setPartialVars(true === sfConfig::get('sf_escaping_strategy') ? sfOutputEscaper::unescape($vars) : $vars);

return $view->render();
}
Expand Down

0 comments on commit 02b9af4

Please sign in to comment.