-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(fixed #3887) updated to symfony 1.4.20
- Loading branch information
Showing
216 changed files
with
1,998 additions
and
956 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
lib/vendor/symfony/data/web/sf/sf_admin/images/default_icon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
lib/vendor/symfony/data/web/sf/sf_web_debug/images/database.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* @package symfony | ||
* @subpackage autoload | ||
* @author Kris Wallsmith <[email protected]> | ||
* @version SVN: $Id: sfAutoloadAgain.class.php 22248 2009-09-22 17:15:16Z fabien $ | ||
* @version SVN: $Id: sfAutoloadAgain.class.php 33561 2012-10-18 11:42:28Z fabien $ | ||
*/ | ||
class sfAutoloadAgain | ||
{ | ||
|
@@ -69,7 +69,7 @@ public function autoload($class) | |
{ | ||
foreach ($autoloads as $position => $autoload) | ||
{ | ||
if ($this === $autoload[0]) | ||
if (is_array($autoload) && $this === $autoload[0]) | ||
{ | ||
break; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* @package symfony | ||
* @subpackage command | ||
* @author Fabien Potencier <[email protected]> | ||
* @version SVN: $Id: sfCommandApplication.class.php 23218 2009-10-20 20:59:02Z FabianLange $ | ||
* @version SVN: $Id: sfCommandApplication.class.php 33151 2011-10-24 08:55:03Z fabien $ | ||
*/ | ||
abstract class sfCommandApplication | ||
{ | ||
|
@@ -519,7 +519,15 @@ public function getTaskToExecute($name) | |
|
||
protected function strlen($string) | ||
{ | ||
return function_exists('mb_strlen') ? mb_strlen($string) : strlen($string); | ||
if (!function_exists('mb_strlen')) { | ||
return strlen($string); | ||
} | ||
|
||
if (false === $encoding = mb_detect_encoding($string)) { | ||
return strlen($string); | ||
} | ||
|
||
return mb_strlen($string, $encoding); | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* @package symfony | ||
* @subpackage config | ||
* @author Fabien Potencier <[email protected]> | ||
* @version SVN: $Id: sfApplicationConfiguration.class.php 29526 2010-05-19 13:06:40Z fabien $ | ||
* @version SVN: $Id: sfApplicationConfiguration.class.php 33214 2011-11-19 13:47:24Z fabien $ | ||
*/ | ||
abstract class sfApplicationConfiguration extends ProjectConfiguration | ||
{ | ||
|
@@ -150,9 +150,9 @@ public function initConfiguration() | |
$this->initializePlugins(); | ||
|
||
// compress output | ||
if (!self::$coreLoaded) | ||
if (!self::$coreLoaded && sfConfig::get('sf_compressed')) | ||
{ | ||
ob_start(sfConfig::get('sf_compressed') ? 'ob_gzhandler' : ''); | ||
ob_start('ob_gzhandler'); | ||
} | ||
|
||
self::$coreLoaded = true; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
* @subpackage config | ||
* @author Fabien Potencier <[email protected]> | ||
* @author Sean Kerr <[email protected]> | ||
* @version SVN: $Id: sfFactoryConfigHandler.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ | ||
* @version SVN: $Id: sfFactoryConfigHandler.class.php 33299 2011-12-30 17:42:47Z fabien $ | ||
*/ | ||
class sfFactoryConfigHandler extends sfYamlConfigHandler | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
* @subpackage controller | ||
* @author Fabien Potencier <[email protected]> | ||
* @author Sean Kerr <[email protected]> | ||
* @version SVN: $Id: sfController.class.php 30912 2010-09-15 11:10:46Z fabien $ | ||
* @version SVN: $Id: sfController.class.php 33539 2012-09-19 05:36:02Z fabien $ | ||
*/ | ||
abstract class sfController | ||
{ | ||
|
@@ -489,7 +489,7 @@ public function setRenderMode($mode) | |
*/ | ||
public function inCLI() | ||
{ | ||
return 0 == strncasecmp(PHP_SAPI, 'cli', 3); | ||
return 'cli' == PHP_SAPI; | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
* @author Fabien Potencier <[email protected]> | ||
* @author Sean Kerr <[email protected]> | ||
* @author Dustin Whittle <[email protected]> | ||
* @version SVN: $Id: sfPDODatabase.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ | ||
* @version SVN: $Id: sfPDODatabase.class.php 33486 2012-07-09 08:57:29Z fabien $ | ||
*/ | ||
class sfPDODatabase extends sfDatabase | ||
{ | ||
|
@@ -109,6 +109,6 @@ public function shutdown() | |
*/ | ||
public function __call($method, $arguments) | ||
{ | ||
return $this->getConnection()->$method($arguments); | ||
return call_user_func_array(array($this->getConnection(), $method), $arguments); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* @package symfony | ||
* @subpackage debug | ||
* @author Fabien Potencier <[email protected]> | ||
* @version SVN: $Id: sfDebug.class.php 31250 2010-10-26 14:18:26Z fabien $ | ||
* @version SVN: $Id: sfDebug.class.php 33309 2012-01-20 13:06:21Z fabien $ | ||
*/ | ||
class sfDebug | ||
{ | ||
|
@@ -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(), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* @package symfony | ||
* @subpackage util | ||
* @author Fabien Potencier <[email protected]> | ||
* @version SVN: $Id: sfTimerManager.class.php 13339 2008-11-25 14:58:05Z fabien $ | ||
* @version SVN: $Id: sfTimerManager.class.php 33570 2012-10-25 09:44:55Z fabien $ | ||
*/ | ||
class sfTimerManager | ||
{ | ||
|
@@ -29,14 +29,16 @@ class sfTimerManager | |
* | ||
* @return sfTimer The timer instance | ||
*/ | ||
public static function getTimer($name) | ||
public static function getTimer($name,$reset=true) | ||
{ | ||
if (!isset(self::$timers[$name])) | ||
{ | ||
self::$timers[$name] = new sfTimer($name); | ||
} | ||
|
||
self::$timers[$name]->startTimer(); | ||
if($reset){ | ||
self::$timers[$name]->startTimer(); | ||
} | ||
|
||
return self::$timers[$name]; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* @package symfony | ||
* @subpackage debug | ||
* @author Fabien Potencier <[email protected]> | ||
* @version SVN: $Id: sfWebDebug.class.php 31254 2010-10-26 15:26:03Z fabien $ | ||
* @version SVN: $Id: sfWebDebug.class.php 32890 2011-08-05 07:44:44Z fabien $ | ||
*/ | ||
class sfWebDebug | ||
{ | ||
|
@@ -780,7 +780,7 @@ public function getStylesheet() | |
margin: 0; | ||
padding: 0; | ||
margin-left: 20px; | ||
list-style: number; | ||
list-style: decimal; | ||
} | ||
#sfWebDebugDatabaseLogs li | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
* @subpackage exception | ||
* @author Fabien Potencier <[email protected]> | ||
* @author Sean Kerr <[email protected]> | ||
* @version SVN: $Id: sfException.class.php 32641 2011-06-11 13:39:35Z fabien $ | ||
* @version SVN: $Id: sfException.class.php 33539 2012-09-19 05:36:02Z fabien $ | ||
*/ | ||
class sfException extends Exception | ||
{ | ||
|
@@ -100,7 +100,9 @@ public function printStackTrace() | |
} | ||
} | ||
|
||
ob_start(sfConfig::get('sf_compressed') ? 'ob_gzhandler' : ''); | ||
if (sfConfig::get('sf_compressed')) { | ||
ob_start('ob_gzhandler'); | ||
} | ||
|
||
header('HTTP/1.0 500 Internal Server Error'); | ||
} | ||
|
@@ -193,8 +195,9 @@ static protected function outputStackTrace(Exception $exception) | |
} | ||
} | ||
|
||
// when using CLI, we force the format to be TXT | ||
if (0 == strncasecmp(PHP_SAPI, 'cli', 3)) | ||
// when using CLI, we force the format to be TXT. Compare exactly to | ||
// the string 'cli' because the php 5.4 server is identified by 'cli-server' | ||
if ('cli' == PHP_SAPI) | ||
{ | ||
$format = 'txt'; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* @package symfony | ||
* @subpackage form | ||
* @author Kris Wallsmith <[email protected]> | ||
* @version SVN: $Id: sfFormObject.class.php 22917 2009-10-10 13:44:53Z Kris.Wallsmith $ | ||
* @version SVN: $Id: sfFormObject.class.php 33250 2011-12-12 16:02:15Z fabien $ | ||
*/ | ||
abstract class sfFormObject extends BaseForm | ||
{ | ||
|
@@ -241,8 +241,8 @@ public function saveEmbeddedForms($con = null, $forms = null) | |
{ | ||
if ($form instanceof sfFormObject) | ||
{ | ||
$form->saveEmbeddedForms($con); | ||
$form->getObject()->save($con); | ||
$form->saveEmbeddedForms($con); | ||
} | ||
else | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
* @package symfony | ||
* @subpackage form | ||
* @author Fabien Potencier <[email protected]> | ||
* @version SVN: $Id: sfForm.class.php 29678 2010-05-30 14:38:42Z Kris.Wallsmith $ | ||
* @version SVN: $Id: sfForm.class.php 33598 2012-11-25 09:57:29Z fabien $ | ||
*/ | ||
class sfForm implements ArrayAccess, Iterator, Countable | ||
{ | ||
|
@@ -222,6 +222,8 @@ public function bind(array $taintedValues = null, array $taintedFiles = null) | |
$this->taintedFiles = array(); | ||
} | ||
|
||
$this->checkTaintedValues($this->taintedValues); | ||
|
||
try | ||
{ | ||
$this->doBind(self::deepArrayUnion($this->taintedValues, self::convertFileInformation($this->taintedFiles))); | ||
|
@@ -1336,4 +1338,24 @@ static protected function deepArrayUnion($array1, $array2) | |
|
||
return $array1; | ||
} | ||
|
||
/** | ||
* Checks that the $_POST values do not contain something that | ||
* looks like a file upload (coming from $_FILE). | ||
*/ | ||
protected function checkTaintedValues($values) | ||
{ | ||
foreach ($values as $name => $value) | ||
{ | ||
if (!is_array($value)) { | ||
continue; | ||
} | ||
|
||
if (isset($value['tmp_name'])) { | ||
throw new InvalidArgumentException('Do not try to fake a file upload.'); | ||
} | ||
|
||
$this->checkTaintedValues($value); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
* @subpackage helper | ||
* @author Fabien Potencier <[email protected]> | ||
* @author David Heinemeier Hansson | ||
* @version SVN: $Id: AssetHelper.php 24289 2009-11-23 19:45:06Z Kris.Wallsmith $ | ||
* @version SVN: $Id: AssetHelper.php 33121 2011-10-07 12:29:09Z fabien $ | ||
*/ | ||
|
||
/** | ||
|
@@ -374,7 +374,7 @@ function image_tag($source, $options = array()) | |
|
||
function _compute_public_path($source, $dir, $ext, $absolute = false) | ||
{ | ||
if (strpos($source, '://')) | ||
if (strpos($source, '://') || strpos($source, '//') === 0) | ||
{ | ||
return $source; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* @package symfony | ||
* @subpackage helper | ||
* @author Fabien Potencier <[email protected]> | ||
* @version SVN: $Id: PartialHelper.php 27755 2010-02-08 20:51:02Z Kris.Wallsmith $ | ||
* @version SVN: $Id: PartialHelper.php 33122 2011-10-07 12:42:49Z fabien $ | ||
*/ | ||
|
||
/** | ||
|
@@ -136,6 +136,8 @@ function get_component($moduleName, $componentName, $vars = array()) | |
$context = sfContext::getInstance(); | ||
$actionName = '_'.$componentName; | ||
|
||
require($context->getConfigCache()->checkConfig('modules/'.$moduleName.'/config/module.yml')); | ||
|
||
$class = sfConfig::get('mod_'.strtolower($moduleName).'_partial_view_class', 'sf').'PartialView'; | ||
$view = new $class($context, $moduleName, $actionName, ''); | ||
$view->setPartialVars(true === sfConfig::get('sf_escaping_strategy') ? sfOutputEscaper::unescape($vars) : $vars); | ||
|
Oops, something went wrong.