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

Commit 928f889

Browse files
committed
RELEASE_1_4_7 => v1.4.7 commit
1 parent 4da2a34 commit 928f889

File tree

134 files changed

+1154
-520
lines changed

Some content is hidden

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

134 files changed

+1154
-520
lines changed

CHANGELOG

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
09/21/10: Version 1.4.7
2+
-----------------------
3+
4+
* [30951] fixed WDT injects multiple times (closes #9080)
5+
* [30915] added support for "image/x-ms-bmp" mime type (closes #9069, patch from pbowyer)
6+
* [30912] fixed view class overriding (closes #5097, patch from caefer)
7+
* [30901] reverted remove of comments in Doctrine-generated table classes (closes #8880)
8+
* [30900] fixed getUriPrefix() when requested is forwarded from a secure one (closes #4723)
9+
* [30790] fixed logging of PHP errors to the WDT when error messages include a "%" character
10+
* [30563] fixed sfWebController::redirect method does not respect HTTP specification (closes #8952, patch from rande)
11+
* [30530] fixed path when a project is created on Windows and used on Linux (closes #8835)
12+
* [30529] fixed Swift_PropelSpool when the message is stored in a GLOB column (closes #8869, #8558, patch from netounet)
13+
* [30526] updated russian and ukrainian translation for the admin gen (closes #8814)
14+
* [30445] added a check whether doctrine is already loaded to allow use of a compiled core (closes #8917, thanks gnukix)
15+
* [30444] updated doctrine plugin to load Doctrine_Core rather than Doctrine
16+
* [30442] changed remaining calls to `Doctrine` to `Doctrine_Core`
17+
* [30441] Changed registration of Doctrine autoloader to use Doctrine_Core.
18+
119
06/29/10: Version 1.4.6
220
-----------------------
321

data/bin/changelog.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,20 @@
1515
*
1616
* @package symfony
1717
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
18-
* @version SVN: $Id: changelog.php 24071 2009-11-17 07:36:21Z Kris.Wallsmith $
18+
* @version SVN: $Id: changelog.php 30952 2010-09-22 02:22:51Z Kris.Wallsmith $
1919
*/
2020
require_once dirname(__FILE__).'/../../lib/task/sfFilesystem.class.php';
2121

2222
if (!isset($argv[1]))
2323
{
24-
throw new Exception('You must provide a revision range (-r123:456)');
24+
echo "You must provide a revision range (-r123:456)\n";
25+
exit(1);
2526
}
2627

2728
if (!isset($argv[2]))
2829
{
29-
throw new Exception('You must provide a repository path (/branches/1.3)');
30+
echo "You must provide a repository path (/branches/1.4)\n";
31+
exit(1);
3032
}
3133

3234
$filesystem = new sfFilesystem();

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.6');
14+
define('SYMFONY_VERSION', '1.4.7');
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 30053 2010-06-29 17:06:07Z Kris.Wallsmith $
25+
* @version SVN: $Id: sfCoreAutoload.class.php 30955 2010-09-22 02:35:27Z Kris.Wallsmith $
2626
*/
2727
class sfCoreAutoload
2828
{

lib/controller/sfController.class.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @subpackage controller
1717
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
1818
* @author Sean Kerr <sean@code-box.org>
19-
* @version SVN: $Id: sfController.class.php 29523 2010-05-19 12:50:54Z fabien $
19+
* @version SVN: $Id: sfController.class.php 30912 2010-09-15 11:10:46Z fabien $
2020
*/
2121
abstract class sfController
2222
{
@@ -203,7 +203,12 @@ public function forward($moduleName, $actionName)
203203
$this->getActionStack()->addEntry($moduleName, $actionName, $actionInstance);
204204

205205
// include module configuration
206+
$viewClass = sfConfig::get('mod_'.strtolower($moduleName).'_view_class', false);
206207
require($this->context->getConfigCache()->checkConfig('modules/'.$moduleName.'/config/module.yml'));
208+
if (false !== $viewClass)
209+
{
210+
sfConfig::set('mod_'.strtolower($moduleName).'_view_class', $viewClass);
211+
}
207212

208213
// module enabled?
209214
if (sfConfig::get('mod_'.strtolower($moduleName).'_enabled'))

lib/controller/sfWebController.class.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @subpackage controller
1717
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
1818
* @author Sean Kerr <sean@code-box.org>
19-
* @version SVN: $Id: sfWebController.class.php 28961 2010-04-01 14:17:52Z fabien $
19+
* @version SVN: $Id: sfWebController.class.php 30563 2010-08-06 11:22:44Z fabien $
2020
*/
2121
abstract class sfWebController extends sfController
2222
{
@@ -193,7 +193,14 @@ public function redirect($url, $delay = 0, $statusCode = 302)
193193
$response = $this->context->getResponse();
194194
$response->clearHttpHeaders();
195195
$response->setStatusCode($statusCode);
196-
$response->setHttpHeader('Location', $url);
196+
197+
// The Location header should only be used for status codes 201 and 3..
198+
// For other code, only the refresh meta tag is used
199+
if ($statusCode == 201 || ($statusCode >= 300 && $statusCode < 400))
200+
{
201+
$response->setHttpHeader('Location', $url);
202+
}
203+
197204
$response->setContent(sprintf('<html><head><meta http-equiv="refresh" content="%d;url=%s"/></head></html>', $delay, htmlspecialchars($url, ENT_QUOTES, sfConfig::get('sf_charset'))));
198205
$response->send();
199206
}

lib/debug/sfWebDebug.class.php

Lines changed: 11 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 27284 2010-01-28 18:34:57Z Kris.Wallsmith $
17+
* @version SVN: $Id: sfWebDebug.class.php 30951 2010-09-22 02:17:27Z Kris.Wallsmith $
1818
*/
1919
class sfWebDebug
2020
{
@@ -154,15 +154,21 @@ public function getOption($name, $default = null)
154154
*/
155155
public function injectToolbar($content)
156156
{
157-
$content = str_ireplace('</head>', '<style type="text/css">'.str_replace(array("\r", "\n"), ' ', $this->getStylesheet()).'</style></head>', $content);
157+
if (false !== $pos = stripos($content, '</head>'))
158+
{
159+
$styles = '<style type="text/css">'.str_replace(array("\r", "\n"), ' ', $this->getStylesheet()).'</style>';
160+
$content = substr($content, 0, $pos).$styles.substr($content, $pos);
161+
}
158162

159163
$debug = $this->asHtml();
160-
$count = 0;
161-
$content = str_ireplace('</body>', '<script type="text/javascript">'.$this->getJavascript().'</script>'.$debug.'</body>', $content, $count);
162-
if (!$count)
164+
if (false === $pos = strripos($content, '</body>'))
163165
{
164166
$content .= $debug;
165167
}
168+
else
169+
{
170+
$content = substr($content, 0, $pos).$debug.substr($content, $pos);
171+
}
166172

167173
return $content;
168174
}

lib/log/sfWebDebugLogger.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* @package symfony
1515
* @subpackage log
1616
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
17-
* @version SVN: $Id: sfWebDebugLogger.class.php 22853 2009-10-07 12:11:15Z fabien $
17+
* @version SVN: $Id: sfWebDebugLogger.class.php 30790 2010-08-31 13:23:50Z Kris.Wallsmith $
1818
*/
1919
class sfWebDebugLogger extends sfVarLogger
2020
{
@@ -82,7 +82,7 @@ public function handlePhpError($errno, $errstr, $errfile, $errline, $errcontext
8282
return false;
8383
}
8484

85-
$message = sprintf(' %%s at %s on line %s (%s)', $errfile, $errline, $errstr);
85+
$message = sprintf(' %%s at %s on line %s (%s)', $errfile, $errline, str_replace('%', '%%', $errstr));
8686
switch ($errno)
8787
{
8888
case E_STRICT:

lib/plugins/sfDoctrinePlugin/config/sfDoctrinePluginConfiguration.class.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* @package symfony
1515
* @subpackage doctrine
1616
* @author Jonathan H. Wage <jonwage@gmail.com>
17-
* @version SVN: $Id: sfDoctrinePluginConfiguration.class.php 29156 2010-04-14 22:22:41Z bschussek $
17+
* @version SVN: $Id: sfDoctrinePluginConfiguration.class.php 30445 2010-07-28 04:37:32Z Kris.Wallsmith $
1818
*/
1919
class sfDoctrinePluginConfiguration extends sfPluginConfiguration
2020
{
@@ -37,15 +37,18 @@ public function initialize()
3737
$this->dispatcher->connect('debug.web.load_panels', array('sfWebDebugPanelDoctrine', 'listenToAddPanelEvent'));
3838
}
3939

40-
require_once sfConfig::get('sf_doctrine_dir', realpath(dirname(__FILE__).'/../lib/vendor/doctrine')).'/Doctrine.php';
41-
spl_autoload_register(array('Doctrine', 'autoload'));
40+
if (!class_exists('Doctrine_Core', false))
41+
{
42+
require_once sfConfig::get('sf_doctrine_dir', realpath(dirname(__FILE__).'/../lib/vendor/doctrine')).'/Doctrine/Core.php';
43+
}
44+
spl_autoload_register(array('Doctrine_Core', 'autoload'));
4245

4346
$manager = Doctrine_Manager::getInstance();
44-
$manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_ALL);
45-
$manager->setAttribute(Doctrine::ATTR_VALIDATE, Doctrine::VALIDATE_NONE);
46-
$manager->setAttribute(Doctrine::ATTR_RECURSIVE_MERGE_FIXTURES, true);
47-
$manager->setAttribute(Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE, true);
48-
$manager->setAttribute(Doctrine::ATTR_AUTOLOAD_TABLE_CLASSES, true);
47+
$manager->setAttribute(Doctrine_Core::ATTR_EXPORT, Doctrine_Core::EXPORT_ALL);
48+
$manager->setAttribute(Doctrine_Core::ATTR_VALIDATE, Doctrine_Core::VALIDATE_NONE);
49+
$manager->setAttribute(Doctrine_Core::ATTR_RECURSIVE_MERGE_FIXTURES, true);
50+
$manager->setAttribute(Doctrine_Core::ATTR_AUTO_ACCESSOR_OVERRIDE, true);
51+
$manager->setAttribute(Doctrine_Core::ATTR_AUTOLOAD_TABLE_CLASSES, true);
4952

5053
// apply default attributes
5154
$manager->setDefaultAttributes();

lib/plugins/sfDoctrinePlugin/data/generator/sfDoctrineModule/admin/parts/paginationAction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ protected function buildQuery()
3131

3232
$query = $this->filters->buildQuery($this->getFilters());
3333
<?php else: ?>
34-
$query = Doctrine::getTable('<?php echo $this->getModelClass() ?>')
34+
$query = Doctrine_Core::getTable('<?php echo $this->getModelClass() ?>')
3535
->createQuery('a');
3636

3737
if ($tableMethod)
3838
{
39-
$query = Doctrine::getTable('<?php echo $this->getModelClass() ?>')->$tableMethod($query);
39+
$query = Doctrine_Core::getTable('<?php echo $this->getModelClass() ?>')->$tableMethod($query);
4040
}
4141
<?php endif; ?>
4242

lib/plugins/sfDoctrinePlugin/data/generator/sfDoctrineModule/admin/parts/sortingAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ protected function setSort(array $sort)
3737

3838
protected function isValidSortColumn($column)
3939
{
40-
return Doctrine::getTable('<?php echo $this->getModelClass() ?>')->hasColumn($column);
40+
return Doctrine_Core::getTable('<?php echo $this->getModelClass() ?>')->hasColumn($column);
4141
}

0 commit comments

Comments
 (0)