diff options
author | Andreas Gohr <andi@splitbrain.org> | 2014-05-19 22:18:01 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2014-05-19 22:18:20 +0200 |
commit | 4bc480e54901356eb84ce27ab4a76c5f88875a60 (patch) | |
tree | f1c62d47722b231d2a4114b679aaf07f4c309052 | |
parent | 5171287a24c73f32e4765bdb998c23febb131467 (diff) | |
download | rpg-4bc480e54901356eb84ce27ab4a76c5f88875a60.tar.gz rpg-4bc480e54901356eb84ce27ab4a76c5f88875a60.tar.bz2 |
doc updates
-rw-r--r-- | inc/common.php | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/inc/common.php b/inc/common.php index 84121fd43..ecd743a96 100644 --- a/inc/common.php +++ b/inc/common.php @@ -386,10 +386,15 @@ function idfilter($id, $ue = true) { /** * This builds a link to a wikipage * - * It handles URL rewriting and adds additional parameter if - * given in $more + * It handles URL rewriting and adds additional parameters * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $id page id, defaults to start page + * @param string|array $urlParameters URL parameters, associative array recommended + * @param bool $absolute request an absolute URL instead of relative + * @param string $separator parameter separator + * @return string */ function wl($id = '', $urlParameters = '', $absolute = false, $separator = '&') { global $conf; @@ -431,13 +436,19 @@ function wl($id = '', $urlParameters = '', $absolute = false, $separator = '& * Handles URL rewriting if enabled. Follows the style of wl(). * * @author Ben Coburn <btcoburn@silicodon.net> + * @param string $id page id, defaults to start page + * @param string $format the export renderer to use + * @param string|array $urlParameters URL parameters, associative array recommended + * @param bool $abs request an absolute URL instead of relative + * @param string $sep parameter separator + * @return string */ -function exportlink($id = '', $format = 'raw', $more = '', $abs = false, $sep = '&') { +function exportlink($id = '', $format = 'raw', $urlParameters = '', $abs = false, $sep = '&') { global $conf; - if(is_array($more)) { - $more = buildURLparams($more, $sep); + if(is_array($urlParameters)) { + $urlParameters = buildURLparams($urlParameters, $sep); } else { - $more = str_replace(',', $sep, $more); + $urlParameters = str_replace(',', $sep, $urlParameters); } $format = rawurlencode($format); @@ -450,13 +461,13 @@ function exportlink($id = '', $format = 'raw', $more = '', $abs = false, $sep = if($conf['userewrite'] == 2) { $xlink .= DOKU_SCRIPT.'/'.$id.'?do=export_'.$format; - if($more) $xlink .= $sep.$more; + if($urlParameters) $xlink .= $sep.$urlParameters; } elseif($conf['userewrite'] == 1) { $xlink .= '_export/'.$format.'/'.$id; - if($more) $xlink .= '?'.$more; + if($urlParameters) $xlink .= '?'.$urlParameters; } else { $xlink .= DOKU_SCRIPT.'?do=export_'.$format.$sep.'id='.$id; - if($more) $xlink .= $sep.$more; + if($urlParameters) $xlink .= $sep.$urlParameters; } return $xlink; |