summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_html.class2
-rw-r--r--it_text.class2
-rw-r--r--it_url.class8
-rw-r--r--itjs.class10
4 files changed, 11 insertions, 11 deletions
diff --git a/it_html.class b/it_html.class
index 0544371..8e2d6c3 100644
--- a/it_html.class
+++ b/it_html.class
@@ -511,7 +511,7 @@ function Q($string)
* Build a complete url from base-url and params
* @param ... scalar args and numeric indices build base-url, rest as params
*/
-function U(/* ... */)
+static function U(/* ... */)
{
$args = func_get_args();
list($base, $params) = it_parse_args($args);
diff --git a/it_text.class b/it_text.class
index 57dfda5..7b47e92 100644
--- a/it_text.class
+++ b/it_text.class
@@ -115,7 +115,7 @@ function initlang($code)
/**
* Instanciate singleton if necessary
*/
-function init()
+static function init()
{
if (!$GLOBALS['it_text'])
new it_text;
diff --git a/it_url.class b/it_url.class
index 81729c6..a48013e 100644
--- a/it_url.class
+++ b/it_url.class
@@ -702,7 +702,7 @@ function _atomicwrite($path, $data)
* @param $url Optional URL ( foo.html, /foo.html, //host/bar.html, http://host/bar.html ), default self
* @return absolute version of URL ( http[s]://host/bar.html )
*/
-function absolute($url=null)
+static function absolute($url=null)
{
if (!isset($url))
$url = $_SERVER['PHP_SELF'];
@@ -744,7 +744,7 @@ function redirect($url = null, $type = "temporary")
/**
* Urlencode but leave some chars
*/
-function encode($str)
+static function encode($str)
{
return strtr(urlencode($str), array("%2C"=>",", "%28"=>"(", "%29"=>")"));
}
@@ -754,12 +754,12 @@ function encode($str)
* @param $params Array to take values from, usually $_GET
* @param $keys Keys to use; default: all
*/
-function params($params, $keys = null)
+static function params($params, $keys = null)
{
return join("&", it_url::_params($params, $keys));
}
-function _params($params, $keys = null)
+static function _params($params, $keys = null)
{
$result = array();
diff --git a/itjs.class b/itjs.class
index 6c82540..79158f6 100644
--- a/itjs.class
+++ b/itjs.class
@@ -46,7 +46,7 @@ function send_headers($charset = null)
* @param $envelope Encapsulate the data when callback function is provided (iframe solution)
* @return String with javascript code to be sent to client
*/
-function serialize($values, $envelope = false)
+static function serialize($values, $envelope = false)
{
if (($envelope || isset($values['eof'])) && ($callback = it::replace(array('[^\w.]' => ""), $_REQUEST['itjs_call'])))
{
@@ -70,7 +70,7 @@ function serialize($values, $envelope = false)
/*
* Encode the result into a javascript array to transfer and eval() in client
*/
-function encode($values)
+static function encode($values)
{
static $jskeyword = array("abstract" => 1, "boolean" => 1, "break" => 1, "byte" => 1, "case" => 1, "catch" => 1, "char" => 1, "class" => 1, "const" => 1, "continue" => 1, "debugger" => 1, "default" => 1, "delete" => 1, "do" => 1, "double" => 1, "each" => 1, "else" => 1, "enum" => 1, "export" => 1, "extends" => 1, "false" => 1, "final" => 1, "finally" => 1, "float" => 1, "for" => 1, "function" => 1, "goto" => 1, "if" => 1, "implements" => 1, "import" => 1, "in" => 1, "instanceof" => 1, "int" => 1, "interface" => 1, "long" => 1, "namespace" => 1, "native" => 1, "new" => 1, "null" => 1, "package" => 1, "private" => 1, "protected" => 1, "public" => 1, "return" => 1, "short" => 1, "static" => 1, "super" => 1, "switch" => 1, "synchronized" => 1, "this" => 1, "throw" => 1, "throws" => 1, "transient" => 1, "true" => 1, "try" => 1, "typeof" => 1, "var" => 1, "void" => 1, "volatile" => 1, "while" => 1, "with" => 1, "xml" => 1);
@@ -114,7 +114,7 @@ function encode($values)
return $result;
}
-function filenames($filelist)
+static function filenames($filelist)
{
$result = array();
$path = $GLOBALS['ULTRAHOME'] . "/itjs";
@@ -153,7 +153,7 @@ function filenames($filelist)
* @param $code String containing javascript code to be stripped
* @return Naked code
*/
-function strip($code)
+static function strip($code)
{
if (!it::is_devel())
$code = preg_replace(array(
@@ -172,7 +172,7 @@ function strip($code)
* @param $files Array of filenames to calculate checksum for
* @return Checksum for given files
*/
-function checksum($files = array())
+static function checksum($files = array())
{
$itjs = "/www/server/phpinclude/itools/itjs";
$itools_itjs = glob("$itjs/*.{js,css,php}", GLOB_BRACE);