summaryrefslogtreecommitdiff
path: root/inc/html.php
diff options
context:
space:
mode:
authorGerrit Uitslag <klapinklapin@gmail.com>2014-10-01 11:30:27 +0200
committerGerrit Uitslag <klapinklapin@gmail.com>2014-10-01 11:30:27 +0200
commit42ea7f447f39fbc2f79eaaec31f8c10ede59c5d0 (patch)
treed9cbd3d10d6b30e6b2092e39922b60e8616b4f92 /inc/html.php
parent59bc3b48fdffb76ee65a4b630be3ffa1f6c20c80 (diff)
downloadrpg-42ea7f447f39fbc2f79eaaec31f8c10ede59c5d0.tar.gz
rpg-42ea7f447f39fbc2f79eaaec31f8c10ede59c5d0.tar.bz2
Many PHPDocs, some unused and dyn declared vars
many PHPDocs some unused variables some dynamically declared variables declared
Diffstat (limited to 'inc/html.php')
-rw-r--r--inc/html.php68
1 files changed, 63 insertions, 5 deletions
diff --git a/inc/html.php b/inc/html.php
index ce6360175..adcd212ed 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -83,6 +83,10 @@ function html_denied() {
* inserts section edit buttons if wanted or removes the markers
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $text
+ * @param bool $show show section edit buttons?
+ * @return string
*/
function html_secedit($text,$show=true){
global $INFO;
@@ -101,8 +105,11 @@ function html_secedit($text,$show=true){
* prepares section edit button data for event triggering
* used as a callback in html_secedit
*
- * @triggers HTML_SECEDIT_BUTTON
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $matches matches with regexp
+ * @return string
+ * @triggers HTML_SECEDIT_BUTTON
*/
function html_secedit_button($matches){
$data = array('secid' => $matches[1],
@@ -121,6 +128,9 @@ function html_secedit_button($matches){
* used as default action form HTML_SECEDIT_BUTTON
*
* @author Adrian Lang <lang@cosmocode.de>
+ *
+ * @param array $data name, section id and target
+ * @return string html
*/
function html_secedit_get_button($data) {
global $ID;
@@ -147,6 +157,8 @@ function html_secedit_get_button($data) {
* Just the back to top button (in its own form)
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @return string html
*/
function html_topbtn(){
global $lang;
@@ -161,6 +173,15 @@ function html_topbtn(){
* If tooltip exists, the access key tooltip is replaced.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $name
+ * @param string $id
+ * @param string $akey access key
+ * @param string[string] $params key-value pairs added as hidden inputs
+ * @param string $method
+ * @param string $tooltip
+ * @param bool|string $label label text, false: lookup btn_$name in localization
+ * @return string
*/
function html_btn($name,$id,$akey,$params,$method='get',$tooltip='',$label=false){
global $conf;
@@ -213,9 +234,11 @@ function html_btn($name,$id,$akey,$params,$method='get',$tooltip='',$label=false
}
/**
- * show a wiki page
+ * Show a wiki page
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param null|string $txt wiki text or null for showing $ID
*/
function html_show($txt=null){
global $ID;
@@ -281,6 +304,10 @@ function html_draft(){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Harry Fuecks <hfuecks@gmail.com>
+ *
+ * @param string $html
+ * @param array|string $phrases
+ * @return string html
*/
function html_hilight($html,$phrases){
$phrases = (array) $phrases;
@@ -299,6 +326,9 @@ function html_hilight($html,$phrases){
* Callback used by html_hilight()
*
* @author Harry Fuecks <hfuecks@gmail.com>
+ *
+ * @param array $m matches
+ * @return string html
*/
function html_hilight_callback($m) {
$hlight = unslash($m[0]);
@@ -646,6 +676,9 @@ function html_revisions($first=0, $media_id = false){
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
* @author Ben Coburn <btcoburn@silicodon.net>
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param int $first
+ * @param string $show_changes
*/
function html_recent($first=0, $show_changes='both'){
global $conf;
@@ -833,6 +866,8 @@ function html_recent($first=0, $show_changes='both'){
* Display page index
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $ns
*/
function html_index($ns){
global $conf;
@@ -861,6 +896,9 @@ function html_index($ns){
* User function for html_buildlist()
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $item
+ * @return string
*/
function html_list_index($item){
global $ID, $conf;
@@ -891,6 +929,9 @@ function html_list_index($item){
* it gives different classes to opened or closed "folders"
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $item
+ * @return string html
*/
function html_li_index($item){
if($item['type'] == "f"){
@@ -906,6 +947,9 @@ function html_li_index($item){
* Default List item
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $item
+ * @return string html
*/
function html_li_default($item){
return '<li class="level'.$item['level'].'">';
@@ -1021,12 +1065,13 @@ function html_backlinks(){
/**
* Get header of diff HTML
+ *
* @param string $l_rev Left revisions
* @param string $r_rev Right revision
* @param string $id Page id, if null $ID is used
* @param bool $media If it is for media files
* @param bool $inline Return the header on a single line
- * @return array HTML snippets for diff header
+ * @return string[] HTML snippets for diff header
*/
function html_diff_head($l_rev, $r_rev, $id = null, $media = false, $inline = false) {
global $lang;
@@ -1482,7 +1527,7 @@ function html_diff_navigationlink($difftype, $linktype, $lrev, $rrev = null) {
/**
* Insert soft breaks in diff html
*
- * @param $diffhtml
+ * @param string $diffhtml
* @return string
*/
function html_insert_softbreaks($diffhtml) {
@@ -1521,6 +1566,9 @@ REGEX;
* show warning on conflict detection
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $text
+ * @param string $summary
*/
function html_conflict($text,$summary){
global $ID;
@@ -1681,7 +1729,6 @@ function html_edit(){
global $lang;
global $conf;
global $TEXT;
- global $RANGE;
if ($INPUT->has('changecheck')) {
$check = $INPUT->str('changecheck');
@@ -1783,6 +1830,7 @@ function html_edit(){
* Display the default edit form
*
* Is the default action for HTML_EDIT_FORMSELECTION.
+ *
* @param mixed[] $param
*/
function html_edit_form($param) {
@@ -1802,6 +1850,8 @@ function html_edit_form($param) {
* Adds a checkbox for minor edits for logged in users
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @return array|bool
*/
function html_minoredit(){
global $conf;
@@ -2081,6 +2131,9 @@ function html_resendpwd() {
* Return the TOC rendered to XHTML
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $toc
+ * @return string html
*/
function html_TOC($toc){
if(!count($toc)) return '';
@@ -2099,6 +2152,9 @@ function html_TOC($toc){
/**
* Callback for html_buildlist
+ *
+ * @param array $item
+ * @return string html
*/
function html_list_toc($item){
if(isset($item['hid'])){
@@ -2133,6 +2189,7 @@ function html_mktocitem($link, $text, $level, $hash='#'){
* Triggers an event with the form name: HTML_{$name}FORM_OUTPUT
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
* @param string $name The name of the form
* @param Doku_Form $form The form
*/
@@ -2145,6 +2202,7 @@ function html_form($name, &$form) {
/**
* Form print function.
* Just calls printForm() on the data object.
+ *
* @param Doku_Form $data The form
*/
function html_form_output($data) {