diff options
author | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-10-01 15:32:05 +0200 |
---|---|---|
committer | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-10-01 15:32:05 +0200 |
commit | 253d4b48ec708eb42033862dc15c8576f44a48ed (patch) | |
tree | d8673e304f0deaacb7a20a31cba7b82744a00bed /lib/exe/js.php | |
parent | 42ea7f447f39fbc2f79eaaec31f8c10ede59c5d0 (diff) | |
download | rpg-253d4b48ec708eb42033862dc15c8576f44a48ed.tar.gz rpg-253d4b48ec708eb42033862dc15c8576f44a48ed.tar.bz2 |
more PHPDocs, unused var, small bit code reformatting
Diffstat (limited to 'lib/exe/js.php')
-rw-r--r-- | lib/exe/js.php | 16 |
1 files changed, 16 insertions, 0 deletions
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 <andi@splitbrain.org> + * + * @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 <andi@splitbrain.org> + * + * @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 <birke@d-scribe.de> + * + * @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 <andi@splitbrain.org> + * + * @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 <andi@splitbrain.org> + * + * @param string $func */ function js_runonstart($func){ echo "jQuery(function(){ $func; });".NL; @@ -275,6 +288,9 @@ function js_runonstart($func){ * @author Nick Galbreath <nickg@modp.com> * @author Andreas Gohr <andi@splitbrain.org> * @link http://code.google.com/p/jsstrip/ + * + * @param string $s + * @return string */ function js_compress($s){ $s = ltrim($s); // strip all initial whitespace |