From 14adee735b6679efe3d863df813a67387cc4c2f2 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Sat, 6 Jul 2013 08:13:07 +0000 Subject: [PATCH] * add note for closeColorbox. --- lib/front/front.class.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/front/front.class.php b/lib/front/front.class.php index ea5993660a..0223657db2 100644 --- a/lib/front/front.class.php +++ b/lib/front/front.class.php @@ -726,6 +726,14 @@ EOT; return $js; } + /** + * Close colorbox in javascript. + * + * @param string $window + * @static + * @access public + * @return void + */ static public function closeColorbox($window = 'self') { $js = self::start(); @@ -813,14 +821,14 @@ EOT; } elseif(is_array($value) or is_object($value) or is_string($value)) { + /* Fix for auto-complete when user is number.*/ if(is_array($value) or is_object($value)) { - $newValue = array(); + $value = (array)$value; foreach($value as $k => $v) { - $newValue[$k] = is_numeric($v) ? (string)$v : $v; + if(is_numeric($v)) $value[$k] = (string)$v; } - $value = $newValue; } $value = json_encode($value);