From 253d4b48ec708eb42033862dc15c8576f44a48ed Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Wed, 1 Oct 2014 15:32:05 +0200 Subject: more PHPDocs, unused var, small bit code reformatting --- lib/exe/js.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/exe/js.php') diff --git a/lib/exe/js.php b/lib/exe/js.php index bec12ef7a..97f2b52c3 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -154,6 +154,8 @@ function js_out(){ * Load the given file, handle include calls and print it * * @author Andreas Gohr + * + * @param string $file filename path to file */ function js_load($file){ if(!@file_exists($file)) return; @@ -189,6 +191,8 @@ function js_load($file){ * Returns a list of possible Plugin Scripts (no existance check here) * * @author Andreas Gohr + * + * @return array */ function js_pluginscripts(){ $list = array(); @@ -206,6 +210,8 @@ function js_pluginscripts(){ * - Nothing is returned for plugins without an entry for $lang['js'] * * @author Gabriel Birke + * + * @return array */ function js_pluginstrings() { global $conf; @@ -231,6 +237,8 @@ function js_pluginstrings() { * * - $lang['js'] must be an array. * - Nothing is returned for template without an entry for $lang['js'] + * + * @return array */ function js_templatestrings() { global $conf; @@ -252,6 +260,9 @@ function js_templatestrings() { * as newline * * @author Andreas Gohr + * + * @param string $string + * @return string */ function js_escape($string){ return str_replace('\\\\n','\\n',addslashes($string)); @@ -261,6 +272,8 @@ function js_escape($string){ * Adds the given JavaScript code to the window.onload() event * * @author Andreas Gohr + * + * @param string $func */ function js_runonstart($func){ echo "jQuery(function(){ $func; });".NL; @@ -275,6 +288,9 @@ function js_runonstart($func){ * @author Nick Galbreath * @author Andreas Gohr * @link http://code.google.com/p/jsstrip/ + * + * @param string $s + * @return string */ function js_compress($s){ $s = ltrim($s); // strip all initial whitespace -- cgit v1.2.3