From 62a356b6eb98a89944d2ee96ccdfad2318998e37 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 4 Feb 2012 10:48:47 +0100 Subject: [PATCH] Doxygen --- htdocs/core/lib/admin.lib.php | 4 +- htdocs/core/lib/agenda.lib.php | 19 +++--- htdocs/core/lib/bank.lib.php | 26 +++++--- htdocs/core/lib/categories.lib.php | 6 ++ htdocs/core/lib/contact.lib.php | 6 +- htdocs/core/lib/contract.lib.php | 6 ++ htdocs/core/lib/emailing.lib.php | 14 ++--- htdocs/core/lib/fichinter.lib.php | 6 ++ htdocs/core/lib/fourn.lib.php | 12 +++- htdocs/core/lib/order.lib.php | 8 ++- htdocs/core/lib/prelevement.lib.php | 7 ++- htdocs/core/lib/product.lib.php | 7 +++ htdocs/core/lib/project.lib.php | 47 +++++++++------ htdocs/core/lib/propal.lib.php | 6 ++ htdocs/core/lib/sendings.lib.php | 94 +++++++++++++++++------------ htdocs/core/lib/stock.lib.php | 6 +- htdocs/core/lib/tax.lib.php | 10 +-- htdocs/core/lib/treeview.lib.php | 43 +++++++------ htdocs/core/lib/trip.lib.php | 6 +- htdocs/core/lib/usergroups.lib.php | 18 ++++-- 20 files changed, 218 insertions(+), 133 deletions(-) diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 1c4e3030add..c479d7823f3 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -500,9 +500,9 @@ function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $not /** - * Define head array for tabs of security setup pages + * Prepare array with list of tabs * - * @return array Array of head + * @return array Array of tabs to shoc */ function security_prepare_head() { diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 6dd2a1bb0b4..40b308a6e45 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -356,9 +356,9 @@ function show_array_last_actions_done($max=5) /** - * Define head array for tabs of agenda setup pages + * Prepare array with list of tabs * - * @return Array of head + * @return array Array of tabs to shoc */ function agenda_prepare_head() { @@ -386,28 +386,29 @@ function agenda_prepare_head() } /** - * Define head array for tabs of agenda setup pages - * @param action Object action - * @return Array of head + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc */ -function actions_prepare_head($action) +function actions_prepare_head($object) { global $langs, $conf, $user; $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/comm/action/fiche.php?id='.$action->id; + $head[$h][0] = DOL_URL_ROOT.'/comm/action/fiche.php?id='.$object->id; $head[$h][1] = $langs->trans("CardAction"); $head[$h][2] = 'card'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$action->id; + $head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); $head[$h][2] = 'documents'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/comm/action/info.php?id='.$action->id; + $head[$h][0] = DOL_URL_ROOT.'/comm/action/info.php?id='.$object->id; $head[$h][1] = $langs->trans('Info'); $head[$h][2] = 'info'; $h++; diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index 0ac206dea1f..6c6e32aeb44 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -22,51 +22,57 @@ * \ingroup banque */ -function bank_prepare_head($obj) +/** + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc + */ +function bank_prepare_head($object) { global $langs, $conf, $user; $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/compta/bank/fiche.php?id='.$obj->id; + $head[$h][0] = DOL_URL_ROOT.'/compta/bank/fiche.php?id='.$object->id; $head[$h][1] = $langs->trans("AccountCard"); $head[$h][2] = 'bankname'; $h++; - if ($obj->type == 0 || $obj->type == 1) + if ($object->type == 0 || $object->type == 1) { - $head[$h][0] = DOL_URL_ROOT.'/compta/bank/bankid_fr.php?id='.$obj->id; + $head[$h][0] = DOL_URL_ROOT.'/compta/bank/bankid_fr.php?id='.$object->id; $head[$h][1] = $langs->trans("RIB"); $head[$h][2] = 'bankid'; $h++; } - $head[$h][0] = DOL_URL_ROOT."/compta/bank/account.php?account=".$obj->id; + $head[$h][0] = DOL_URL_ROOT."/compta/bank/account.php?account=".$object->id; $head[$h][1] = $langs->trans("Transactions"); $head[$h][2] = 'journal'; $h++; // if ($conf->global->MAIN_FEATURES_LEVEL >= 1) // { - $head[$h][0] = DOL_URL_ROOT."/compta/bank/treso.php?account=".$obj->id; + $head[$h][0] = DOL_URL_ROOT."/compta/bank/treso.php?account=".$object->id; $head[$h][1] = $langs->trans("PlannedTransactions"); $head[$h][2] = 'cash'; $h++; // } - $head[$h][0] = DOL_URL_ROOT."/compta/bank/annuel.php?account=".$obj->id; + $head[$h][0] = DOL_URL_ROOT."/compta/bank/annuel.php?account=".$object->id; $head[$h][1] = $langs->trans("IOMonthlyReporting"); $head[$h][2] = 'annual'; $h++; - $head[$h][0] = DOL_URL_ROOT."/compta/bank/graph.php?account=".$obj->id; + $head[$h][0] = DOL_URL_ROOT."/compta/bank/graph.php?account=".$object->id; $head[$h][1] = $langs->trans("Graph"); $head[$h][2] = 'graph'; $h++; - if ($obj->courant != 2) + if ($object->courant != 2) { - $head[$h][0] = DOL_URL_ROOT."/compta/bank/releve.php?account=".$obj->id; + $head[$h][0] = DOL_URL_ROOT."/compta/bank/releve.php?account=".$object->id; $head[$h][1] = $langs->trans("AccountStatements"); $head[$h][2] = 'statement'; $h++; diff --git a/htdocs/core/lib/categories.lib.php b/htdocs/core/lib/categories.lib.php index b2db2f04d3a..02d3cbae833 100644 --- a/htdocs/core/lib/categories.lib.php +++ b/htdocs/core/lib/categories.lib.php @@ -22,6 +22,12 @@ * \ingroup categorie */ +/** + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc + */ function categories_prepare_head($object,$type) { global $langs, $conf, $user; diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php index de6db84af94..04546ca6c2a 100644 --- a/htdocs/core/lib/contact.lib.php +++ b/htdocs/core/lib/contact.lib.php @@ -23,10 +23,10 @@ */ /** - * Enter description here... + * Prepare array with list of tabs * - * @param $object - * @return array + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc */ function contact_prepare_head($object) { diff --git a/htdocs/core/lib/contract.lib.php b/htdocs/core/lib/contract.lib.php index 00b34678f93..3935101916a 100644 --- a/htdocs/core/lib/contract.lib.php +++ b/htdocs/core/lib/contract.lib.php @@ -22,6 +22,12 @@ * \brief Ensemble de fonctions de base pour le module contrat */ +/** + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc + */ function contract_prepare_head($object) { global $langs, $conf; diff --git a/htdocs/core/lib/emailing.lib.php b/htdocs/core/lib/emailing.lib.php index b847d2c512e..d6df5f0804e 100644 --- a/htdocs/core/lib/emailing.lib.php +++ b/htdocs/core/lib/emailing.lib.php @@ -22,29 +22,29 @@ */ /** - * Enter description here... + * Prepare array with list of tabs * - * @param $mil - * @return array + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc */ -function emailing_prepare_head($mil) +function emailing_prepare_head($object) { global $langs, $conf; $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT."/comm/mailing/fiche.php?id=".$mil->id; + $head[$h][0] = DOL_URL_ROOT."/comm/mailing/fiche.php?id=".$object->id; $head[$h][1] = $langs->trans("MailCard"); $head[$h][2] = 'card'; $h++; - $head[$h][0] = DOL_URL_ROOT."/comm/mailing/cibles.php?id=".$mil->id; + $head[$h][0] = DOL_URL_ROOT."/comm/mailing/cibles.php?id=".$object->id; $head[$h][1] = $langs->trans("MailRecipients"); $head[$h][2] = 'targets'; $h++; - $head[$h][0] = DOL_URL_ROOT."/comm/mailing/info.php?id=".$mil->id; + $head[$h][0] = DOL_URL_ROOT."/comm/mailing/info.php?id=".$object->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; diff --git a/htdocs/core/lib/fichinter.lib.php b/htdocs/core/lib/fichinter.lib.php index dc89615c874..4f7c5c660f2 100644 --- a/htdocs/core/lib/fichinter.lib.php +++ b/htdocs/core/lib/fichinter.lib.php @@ -23,6 +23,12 @@ * \ingroup fichinter */ +/** + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc + */ function fichinter_prepare_head($object) { global $langs, $conf, $user; diff --git a/htdocs/core/lib/fourn.lib.php b/htdocs/core/lib/fourn.lib.php index 4fc5114b256..3ceea772fdf 100644 --- a/htdocs/core/lib/fourn.lib.php +++ b/htdocs/core/lib/fourn.lib.php @@ -24,10 +24,10 @@ */ /** - * Initialize the array of tabs for supplier invoice + * Prepare array with list of tabs * - * @param Facture $object Invoice object - * @return array Array of head tabs + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc */ function facturefourn_prepare_head($object) { @@ -74,6 +74,12 @@ function facturefourn_prepare_head($object) } +/** + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc + */ function ordersupplier_prepare_head($object) { global $langs, $conf; diff --git a/htdocs/core/lib/order.lib.php b/htdocs/core/lib/order.lib.php index 8c34d06cb19..2f8cfe7fd36 100644 --- a/htdocs/core/lib/order.lib.php +++ b/htdocs/core/lib/order.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2006-2012 Laurent Destailleur * Copyright (C) 2007 Rodolphe Quiedeville * Copyright (C) 2010 Regis Houssin * Copyright (C) 2010 Juanjo Menent @@ -25,6 +25,12 @@ * \ingroup commande */ +/** + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc + */ function commande_prepare_head($object) { global $langs, $conf, $user; diff --git a/htdocs/core/lib/prelevement.lib.php b/htdocs/core/lib/prelevement.lib.php index c1fa99af7a1..cc31068791c 100644 --- a/htdocs/core/lib/prelevement.lib.php +++ b/htdocs/core/lib/prelevement.lib.php @@ -26,9 +26,10 @@ /** - * Prepare head for prelevement screen and return it - * @param object Object BonPrelevement - * @return array head + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc */ function prelevement_prepare_head($object) { diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 14bd3be67a2..f381bb43115 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -24,6 +24,13 @@ * \ingroup product */ +/** + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @param User $user Object user + * @return array Array of tabs to shoc + */ function product_prepare_head($object, $user) { global $langs, $conf; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 837123ee9c2..04726bf5f80 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -1,22 +1,22 @@ +/* Copyright (C) 2006-2012 Laurent Destailleur * Copyright (C) 2010 Regis Houssin -* Copyright (C) 2011 Juanjo Menent -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* or see http://www.gnu.org/ -*/ + * Copyright (C) 2011 Juanjo Menent + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * or see http://www.gnu.org/ + */ /** * \file htdocs/core/lib/project.lib.php @@ -26,6 +26,12 @@ require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php"); +/** + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc + */ function project_prepare_head($object) { global $langs, $conf, $user; @@ -94,9 +100,10 @@ function project_prepare_head($object) /** - * \file htdocs/core/lib/project.lib.php - * \brief Ensemble de fonctions de base pour le module projet - * \ingroup societe + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc */ function task_prepare_head($object) { diff --git a/htdocs/core/lib/propal.lib.php b/htdocs/core/lib/propal.lib.php index e30cde362f8..21990a8f3f3 100644 --- a/htdocs/core/lib/propal.lib.php +++ b/htdocs/core/lib/propal.lib.php @@ -23,6 +23,12 @@ * \ingroup propal */ +/** + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc + */ function propal_prepare_head($object) { global $langs, $conf, $user; diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index b7d06d10ff5..fbe99f18fd6 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2008-2012 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,6 +24,12 @@ require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php"); require_once(DOL_DOCUMENT_ROOT."/expedition/class/expedition.class.php"); +/** + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc + */ function shipping_prepare_head($object) { global $langs, $conf, $user; @@ -47,16 +53,22 @@ function shipping_prepare_head($object) $h++; } - // Show more tabs from modules - // Entries must be declared in modules descriptor with line - // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab - // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab - complete_head_from_modules($conf,$langs,$object,$head,$h,'delivery'); + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab + complete_head_from_modules($conf,$langs,$object,$head,$h,'delivery'); - return $head; + return $head; } +/** + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc + */ function delivery_prepare_head($object) { global $langs, $conf, $user; @@ -80,13 +92,13 @@ function delivery_prepare_head($object) $head[$h][2] = 'delivery'; $h++; - // Show more tabs from modules - // Entries must be declared in modules descriptor with line - // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab - // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab - complete_head_from_modules($conf,$langs,$object,$head,$h,'delivery'); + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab + complete_head_from_modules($conf,$langs,$object,$head,$h,'delivery'); - return $head; + return $head; } /** @@ -114,9 +126,9 @@ function show_list_sending_receive($origin='commande',$origin_id,$filter='') $sql.= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed"; $sql.= ", ".MAIN_DB_PREFIX."expedition as e"; $sql.= ", ".MAIN_DB_PREFIX.$origin."det as obj"; - //if ($conf->livraison_bon->enabled) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."livraison as l ON l.fk_expedition = e.rowid LEFT JOIN ".MAIN_DB_PREFIX."livraisondet as ld ON ld.fk_livraison = l.rowid AND obj.rowid = ld.fk_origin_line"; + //if ($conf->livraison_bon->enabled) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."livraison as l ON l.fk_expedition = e.rowid LEFT JOIN ".MAIN_DB_PREFIX."livraisondet as ld ON ld.fk_livraison = l.rowid AND obj.rowid = ld.fk_origin_line"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON obj.fk_product = p.rowid"; - $sql.= " WHERE obj.fk_".$origin." = ".$origin_id; + $sql.= " WHERE obj.fk_".$origin." = ".$origin_id; if ($filter) $sql.=$filter; $sql.= " AND obj.rowid = ed.fk_origin_line"; $sql.= " AND ed.fk_expedition = e.rowid"; @@ -143,11 +155,11 @@ function show_list_sending_receive($origin='commande',$origin_id,$filter='') print ''.$langs->trans("DateDeliveryPlanned").''; print ''.$langs->trans("QtyShipped").''; if ($conf->livraison_bon->enabled) - { - print ''.$langs->trans("DeliveryOrder").''; - //print ''.$langs->trans("QtyReceived").''; + { + print ''.$langs->trans("DeliveryOrder").''; + //print ''.$langs->trans("QtyReceived").''; print ''.$langs->trans("DeliveryDate").''; - } + } print "\n"; $var=True; @@ -163,27 +175,29 @@ function show_list_sending_receive($origin='commande',$origin_id,$filter='') // Description if ($objp->fk_product > 0) { - // Define output language - if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) - { - $object = new $origin($db); - $object->fetch($origin_id); - $object->fetch_thirdparty(); - $prod = new Product($db, $objp->fk_product); - $outputlangs = $langs; - $newlang=''; - if (empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; - if (empty($newlang)) $newlang=$object->client->default_lang; - if (! empty($newlang)) - { - $outputlangs = new Translate("",$conf); - $outputlangs->setDefaultLang($newlang); - } - - $label = (! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $objp->product; - } - else - $label = $objp->product; + // Define output language + if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) + { + $object = new $origin($db); + $object->fetch($origin_id); + $object->fetch_thirdparty(); + $prod = new Product($db, $objp->fk_product); + $outputlangs = $langs; + $newlang=''; + if (empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; + if (empty($newlang)) $newlang=$object->client->default_lang; + if (! empty($newlang)) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($newlang); + } + + $label = (! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $objp->product; + } + else + { + $label = $objp->product; + } print ''; diff --git a/htdocs/core/lib/stock.lib.php b/htdocs/core/lib/stock.lib.php index 870f55a5e24..caf9d7ef43d 100644 --- a/htdocs/core/lib/stock.lib.php +++ b/htdocs/core/lib/stock.lib.php @@ -22,10 +22,10 @@ */ /** - * Prepare array for tabs of warehouses cards + * Prepare array with list of tabs * - * @param $object - * @return array + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc */ function stock_prepare_head($object) { diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index dc2be6baf2b..93b72a41244 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -25,11 +25,11 @@ /** -* Prepare array for tabs of warehouses cards -* -* @param $object -* @return array -*/ + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc + */ function tax_prepare_head($object) { global $langs, $conf; diff --git a/htdocs/core/lib/treeview.lib.php b/htdocs/core/lib/treeview.lib.php index 682aa15b4e6..a3cd4e95ec8 100644 --- a/htdocs/core/lib/treeview.lib.php +++ b/htdocs/core/lib/treeview.lib.php @@ -26,16 +26,16 @@ /** * Return if a child id is in descendance of parentid * - * @param $fulltree Full tree. Tree must be an array of records that looks like: - * id = id record - * id_mere = id record mother - * id_children = array of direct child id - * label = record label - * fullpath = Full path of id - * level = Level of record - * @param $parentid Parent id - * @param $childid Child id - * @return int 1=Yes, 0=No + * @param array $fulltree Full tree. Tree must be an array of records that looks like: + * id = id record + * id_mere = id record mother + * id_children = array of direct child id + * label = record label + * fullpath = Full path of id + * level = Level of record + * @param int $parentid Parent id + * @param int $childid Child id + * @return int 1=Yes, 0=No */ function is_in_subtree($fulltree,$parentid,$childid) { @@ -73,10 +73,11 @@ function is_in_subtree($fulltree,$parentid,$childid) /** * Show picto of a tree view - * @param fulltree Array of entries in correct order - * @param key Key of value to show picto - * @param selected Selected value - * @return array (0 or 1 if at least one of this level after, 0 or 1 if at least one of higher level after) + * + * @param array &$fulltree Array of entries in correct order + * @param string $key Key of value to show picto + * @param int $selected Selected value + * @return array (0 or 1 if at least one of this level after, 0 or 1 if at least one of higher level after) */ function tree_showpad(&$fulltree,$key,$selected=0) { @@ -141,8 +142,10 @@ function tree_showpad(&$fulltree,$key,$selected=0) /** * Show an element with correct offset - * @param $tab Array of all elements - * @param $rang Level of offset + * + * @param array $tab Array of all elements + * @param int $rang Level of offset + * @return void */ function tree_showline($tab,$rang) { @@ -212,9 +215,11 @@ function tree_showline($tab,$rang) /** * Recursive function to output menu tree - * @param $tab Array of elements - * @param $pere Id of parent - * @param $rang Level of element + * + * @param array $tab Array of elements + * @param int $pere Id of parent + * @param int $rang Level of element + * @return void */ function tree_recur($tab,$pere,$rang) { diff --git a/htdocs/core/lib/trip.lib.php b/htdocs/core/lib/trip.lib.php index 265d9e8df46..d2c150cf7da 100644 --- a/htdocs/core/lib/trip.lib.php +++ b/htdocs/core/lib/trip.lib.php @@ -22,10 +22,10 @@ */ /** - * Enter description here... + * Prepare array with list of tabs * - * @param $object - * @return array + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc */ function trip_prepare_head($object) { diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 001c1ca6c18..7fbb9fac610 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2006-2012 Laurent Destailleur * Copyright (C) 2010 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -22,6 +22,13 @@ * \file htdocs/core/lib/usergroups.lib.php * \brief Ensemble de fonctions de base pour la gestion des utilisaterus et groupes */ + +/** + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc + */ function user_prepare_head($object) { global $langs, $conf, $user; @@ -141,11 +148,12 @@ function group_prepare_head($object) /** - * Show list of themes. Show all thumbs of themes + * Show list of themes. Show all thumbs of themes * - * @param User $fuser User concerned or '' for global theme - * @param int $edit 1 to add edit form - * @param boolean $foruserprofile Show for user profile view + * @param User $fuser User concerned or '' for global theme + * @param int $edit 1 to add edit form + * @param boolean $foruserprofile Show for user profile view + * @return void */ function show_theme($fuser,$edit=0,$foruserprofile=false) {