diff options
-rw-r--r-- | inc/media.php | 6 | ||||
-rw-r--r-- | inc/plugin.php | 4 | ||||
-rw-r--r-- | inc/template.php | 26 |
3 files changed, 29 insertions, 7 deletions
diff --git a/inc/media.php b/inc/media.php index 9022858e1..5190862d7 100644 --- a/inc/media.php +++ b/inc/media.php @@ -582,6 +582,12 @@ function media_notify($id,$file,$mime,$old_rev=false){ /** * List all files in a given Media namespace + * + * @param string $ns namespace + * @param null|int $auth permission level + * @param string $jump + * @param bool $fullscreenview + * @param bool|string $sort sorting, false skips sorting */ function media_filelist($ns,$auth=null,$jump='',$fullscreenview=false,$sort=false){ global $conf; diff --git a/inc/plugin.php b/inc/plugin.php index 92a8efd62..80689e389 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -53,11 +53,11 @@ class DokuWiki_Plugin { return $t; } public function getPluginName() { - list($t, $p, $n) = explode('_', get_class($this), 4); + list(/* $t */, /* $p */, $n) = explode('_', get_class($this), 4); return $n; } public function getPluginComponent() { - list($t, $p, $n, $c) = explode('_', get_class($this), 4); + list(/* $t */, /* $p */, /* $n */, $c) = explode('_', get_class($this), 4); return (isset($c)?$c:''); } diff --git a/inc/template.php b/inc/template.php index d4357cf0e..3730495c8 100644 --- a/inc/template.php +++ b/inc/template.php @@ -456,6 +456,12 @@ function _tpl_metaheaders_action($data) { * Just builds a link. * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $url + * @param string $name + * @param string $more + * @param bool $return if true return the link html, otherwise print + * @return bool|string html of the link, or true if printed */ function tpl_link($url, $name, $more = '', $return = false) { $out = '<a href="'.$url.'" '; @@ -472,6 +478,10 @@ function tpl_link($url, $name, $more = '', $return = false) { * Wrapper around html_wikilink * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $id page id + * @param string|null $name link name + * @return bool true */ function tpl_pagelink($id, $name = null) { print '<bdi>'.html_wikilink($id, $name).'</bdi>'; @@ -534,6 +544,13 @@ function tpl_button($type, $return = false) { * * @author Adrian Lang <mail@adrianlang.de> * @see tpl_get_action + * + * @param string $type action name + * @param string $pre prefix of link + * @param string $suf suffix of link + * @param string $inner inner HTML for link + * @param bool $return if true it returns html, otherwise prints + * @return bool|string html of action link or false if nothing, or true if printed */ function tpl_actionlink($type, $pre = '', $suf = '', $inner = '', $return = false) { global $lang; @@ -571,7 +588,7 @@ function tpl_actionlink($type, $pre = '', $suf = '', $inner = '', $return = fals $linktarget, $pre.(($inner) ? $inner : $caption).$suf, 'class="action '.$type.'" '. $akey.$rel. - 'title="'.hsc($caption).$addTitle.'"', 1 + 'title="'.hsc($caption).$addTitle.'"', true ); } if($return) return $out; @@ -747,7 +764,6 @@ function tpl_get_action($type) { break; default: return '[unknown %s type]'; - break; } return compact('accesskey', 'type', 'id', 'method', 'params', 'nofollow', 'replacement'); } @@ -768,9 +784,9 @@ function tpl_get_action($type) { function tpl_action($type, $link = false, $wrapper = false, $return = false, $pre = '', $suf = '', $inner = '') { $out = ''; if($link) { - $out .= tpl_actionlink($type, $pre, $suf, $inner, 1); + $out .= tpl_actionlink($type, $pre, $suf, $inner, true); } else { - $out .= tpl_button($type, 1); + $out .= tpl_button($type, true); } if($out && $wrapper) $out = "<$wrapper>$out</$wrapper>"; @@ -1027,7 +1043,7 @@ function tpl_pagetitle($id = null, $ret = false) { * Only allowed in: detail.php * * @author Andreas Gohr <andi@splitbrain.org> - * @param array $tags tags to try + * @param array|string $tags tag or array of tags to try * @param string $alt alternative output if no data was found * @param null $src the image src, uses global $SRC if not given * @return string |