Skip to content

Commit f5eb89b

Browse files
committed
Fix string transformation to keep BC
1 parent b90e125 commit f5eb89b

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

lib/form/addon/sfFormObject.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,6 @@ public function renderFormTag($url, array $attributes = array())
285285

286286
protected function camelize($text)
287287
{
288-
return strtr(ucwords(strtr($text, array('/' => '::', '_' => ' ', '-' => ' ', '.' => '_ '))), array(' ' => ''));
288+
return strtr(ucwords(strtr($text, array('/' => ':: ', '_' => ' ', '-' => ' '))), array(' ' => ''));
289289
}
290290
}

lib/plugins/sfDoctrinePlugin/lib/form/sfFormFilterDoctrine.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ protected function getFieldName($colName)
323323

324324
protected function camelize($text)
325325
{
326-
return strtr(ucwords(strtr($text, array('/' => '::', '_' => ' ', '-' => ' ', '.' => '_ '))), array(' ' => ''));
326+
return strtr(ucwords(strtr($text, array('/' => ':: ', '_' => ' ', '-' => ' '))), array(' ' => ''));
327327
}
328328

329329
protected function getTable()

lib/util/sfInflector.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class sfInflector
2828
public static function camelize($lower_case_and_underscored_word)
2929
{
3030

31-
return strtr(ucwords(strtr($lower_case_and_underscored_word, array('/' => '::', '_' => ' ', '-' => ' ', '.' => '_ '))), array(' ' => ''));
31+
return strtr(ucwords(strtr($lower_case_and_underscored_word, array('/' => ':: ', '_' => ' ', '-' => ' '))), array(' ' => ''));
3232
}
3333

3434
/**

lib/util/sfToolkit.class.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,14 @@ public static function literalize($value, $quoted = false)
348348
*/
349349
public static function replaceConstants($value)
350350
{
351-
return is_string($value) ? preg_replace_callback('/%(.+?)%/', function ($v) {
351+
if (!is_string($value))
352+
{
353+
return $value;
354+
}
355+
356+
return preg_replace_callback('/%(.+?)%/', function ($v) {
352357
return sfConfig::has(strtolower($v[1])) ? sfConfig::get(strtolower($v[1])) : '%'.$v[1].'%';
353-
}, $value) : $value;
358+
}, $value);
354359
}
355360

356361
/**

lib/vendor/lime/lime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ function ($match) use ($colorizer) {
709709
$message = preg_replace_callback(
710710
'/(\->|\:\:)?([a-zA-Z0-9_]+?)\(\)/',
711711
function ($match) use ($colorizer) {
712-
return $colorizer->colorize($match[1].$match[2], 'PARAMETER');
712+
return $colorizer->colorize($match[1].$match[2].'()', 'PARAMETER');
713713
},
714714
$message
715715
);

0 commit comments

Comments
 (0)