cvs: smarty /libs/plugins function.eval.php function.popup.php modifier.escape.php shared.make_timestamp.php
"Messju Mohr" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmessju1082102454@cvsserver> |
messju Fri Apr 16 04:00:54 2004 EDT
Modified files:
/smarty/libs/plugins function.eval.php function.popup.php
modifier.escape.php shared.make_timestamp.php
Log:
reverted stuff
http://cvs.php.net/diff.php/smarty/libs/plugins/function.eval.php?r1=1.13&r2=1.14&ty=u
Index: smarty/libs/plugins/function.eval.php
diff -u smarty/libs/plugins/function.eval.php:1.13 smarty/libs/plugins/function.eval.php:1.14
--- smarty/libs/plugins/function.eval.php:1.13 Fri Apr 16 03:53:37 2004
+++ smarty/libs/plugins/function.eval.php Fri Apr 16 04:00:51 2004
@@ -20,7 +20,7 @@
function smarty_function_eval($params, &$smarty)
{
- if (!array_key_exists('var', $params)) {
+ if (!isset($params['var'])) {
$smarty->trigger_error("eval: missing 'var' parameter");
return;
}
http://cvs.php.net/diff.php/smarty/libs/plugins/function.popup.php?r1=1.13&r2=1.14&ty=u
Index: smarty/libs/plugins/function.popup.php
diff -u smarty/libs/plugins/function.popup.php:1.13 smarty/libs/plugins/function.popup.php:1.14
--- smarty/libs/plugins/function.popup.php:1.13 Fri Apr 16 03:53:37 2004
+++ smarty/libs/plugins/function.popup.php Fri Apr 16 04:00:51 2004
@@ -99,9 +99,7 @@
if (empty($trigger)) { $trigger = "onmouseover"; }
- $retval = $trigger . '="' . htmlspecialchars(
- 'return overlib(\''.preg_replace(array("!'!","![\r\n]!"),
- array("\'",'\r'),$text).'\'');
+ $retval = $trigger . '="return overlib(\''.preg_replace(array("!'!","![\r\n]!"),array("\'",'\r'),$text).'\'';
$retval .= $append . ');" onmouseout="nd();"';
return $retval;
http://cvs.php.net/diff.php/smarty/libs/plugins/modifier.escape.php?r1=1.12&r2=1.13&ty=u
Index: smarty/libs/plugins/modifier.escape.php
diff -u smarty/libs/plugins/modifier.escape.php:1.12 smarty/libs/plugins/modifier.escape.php:1.13
--- smarty/libs/plugins/modifier.escape.php:1.12 Fri Apr 16 03:53:37 2004
+++ smarty/libs/plugins/modifier.escape.php Fri Apr 16 04:00:51 2004
@@ -51,12 +51,7 @@
case 'javascript':
// escape quotes and backslashes and newlines
- $return = strtr($string, array(
- "\x08" => '\\b', "\x09" => '\\t', "\n" => '\\n',
- "\x0b" => '\\v', "\x0c" => '\\f', "\r" => '\\r',
- '"' => '\\"', '\'' => '\\\'', '\\' => '\\\\'));
-
- return preg_replace('!<(/\w)!', "<\\\\$1", $return);
+ return strtr($string, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n'));
default:
return $string;
http://cvs.php.net/diff.php/smarty/libs/plugins/shared.make_timestamp.php?r1=1.6&r2=1.7&ty=u
Index: smarty/libs/plugins/shared.make_timestamp.php
diff -u smarty/libs/plugins/shared.make_timestamp.php:1.6 smarty/libs/plugins/shared.make_timestamp.php:1.7
--- smarty/libs/plugins/shared.make_timestamp.php:1.6 Fri Apr 16 03:53:37 2004
+++ smarty/libs/plugins/shared.make_timestamp.php Fri Apr 16 04:00:51 2004
@@ -16,20 +16,18 @@
function smarty_make_timestamp($string)
{
if(empty($string)) {
- // now
- $time = -1;
+ $string = "now";
+ }
+ $time = strtotime($string);
+ if (is_numeric($time) && $time != -1)
+ return $time;
- } elseif (preg_match('/^\d{14}$/', $string)) {
- // is mysql timestamp format of YYYYMMDDHHMMSS?
+ // is mysql timestamp format of YYYYMMDDHHMMSS?
+ if (preg_match('/^\d{14}$/', $string)) {
$time = mktime(substr($string,8,2),substr($string,10,2),substr($string,12,2),
substr($string,4,2),substr($string,6,2),substr($string,0,4));
return $time;
-
- } else {
- $time = strtotime($string);
- if (is_numeric($time) && $time != -1)
- return $time;
}
// couldn't recognize it, try to return a time
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php