From d488ae8e7573104476604dd078df46535877c8d4 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 3 Mar 2006 06:04:54 +0000 Subject: [PATCH] Added input_escape() function --- kernel.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/kernel.php b/kernel.php index 008292a..813a109 100644 --- a/kernel.php +++ b/kernel.php @@ -1020,6 +1020,31 @@ class ISSO return $this->in["$varname"]; } + // ################################################################### + /** + * Runs ISSO->escape() on a variable on ISSO->in[]. This is just a + * short-hand wrapper so that queries can be shortened. When this is used, + * the actual value in ISSO->in[] is not changed, only the return value + * is escaped. + * + * @access public + * + * @param string Input variable + * + * @return string Escaped input + */ + function input_escape($varname) + { + if (isset($this->in["$varname"])) + { + return $this->escape($this->in["$varname"]); + } + else + { + return $this->escape(null); + } + } + // ################################################################### /** * Cleaning function that does the work for input_clean(); this is -- 2.43.5