@@ -121,6 +121,10 @@ discard block |
||
| 121 | 121 | // checkbox pour activer ou desactiver |
| 122 | 122 | // si ce n'est pas une extension |
| 123 | 123 | |
| 124 | +/** |
|
| 125 | + * @param integer $id_input |
|
| 126 | + * @param string $file |
|
| 127 | + */ |
|
| 124 | 128 | function plugin_checkbox($id_input, $file, $actif) { |
| 125 | 129 | $name = substr(md5($file), 0, 16); |
| 126 | 130 | |
@@ -185,6 +189,9 @@ discard block |
||
| 185 | 189 | . "</div>"; |
| 186 | 190 | } |
| 187 | 191 | |
| 192 | +/** |
|
| 193 | + * @param string $nom |
|
| 194 | + */ |
|
| 188 | 195 | function plugin_desintalle($plug_file, $nom, $dir_plugins = null) { |
| 189 | 196 | if (!$dir_plugins) { |
| 190 | 197 | $dir_plugins = _DIR_PLUGINS; |
@@ -75,11 +75,19 @@ |
||
| 75 | 75 | // vraiment n'importe quoi la gestion des chemins des plugins |
| 76 | 76 | // une fonction pour aider... |
| 77 | 77 | // http://code.spip.net/@chemin_plug |
| 78 | +/** |
|
| 79 | + * @param string $racine |
|
| 80 | + * |
|
| 81 | + * @return string |
|
| 82 | + */ |
|
| 78 | 83 | function chemin_plug($racine, $plug) { |
| 79 | 84 | return preg_replace(',[^/]+/\.\./,', '', "$racine/$plug"); |
| 80 | 85 | } |
| 81 | 86 | |
| 82 | 87 | // http://code.spip.net/@tree_open_close_dir |
| 88 | +/** |
|
| 89 | + * @param string $target |
|
| 90 | + */ |
|
| 83 | 91 | function tree_open_close_dir(&$current, $target, $deplie = array()) { |
| 84 | 92 | if ($current == $target) { |
| 85 | 93 | return ""; |
@@ -14,6 +14,9 @@ |
||
| 14 | 14 | return; |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | +/** |
|
| 18 | + * @return string|null |
|
| 19 | + */ |
|
| 17 | 20 | function securiser_redirect_action($redirect) { |
| 18 | 21 | if ((tester_url_absolue($redirect) or preg_match(',^\w+:,',trim($redirect))) |
| 19 | 22 | and !defined('_AUTORISER_ACTION_ABS_REDIRECT')) { |
@@ -59,6 +59,10 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | |
| 61 | 61 | // http://code.spip.net/@argumenter_inclure |
| 62 | +/** |
|
| 63 | + * @param boolean $rejet_filtres |
|
| 64 | + * @param string $id_boucle |
|
| 65 | + */ |
|
| 62 | 66 | function argumenter_inclure( |
| 63 | 67 | $params, |
| 64 | 68 | $rejet_filtres, |
@@ -747,7 +751,7 @@ discard block |
||
| 747 | 751 | * Nom de la commande |
| 748 | 752 | * @param string $val |
| 749 | 753 | * Code PHP décrivant la valeur à affecter |
| 750 | - * @return array |
|
| 754 | + * @return string[] |
|
| 751 | 755 | * |
| 752 | 756 | * - index 0 : Code pour une affectation statique. Si non rempli, la propriété devra |
| 753 | 757 | * être ré-affectée à chaque appel de la boucle. |
@@ -855,6 +859,9 @@ discard block |
||
| 855 | 859 | } |
| 856 | 860 | |
| 857 | 861 | // http://code.spip.net/@calculer_order |
| 862 | +/** |
|
| 863 | + * @param Boucle $boucle |
|
| 864 | + */ |
|
| 858 | 865 | function calculer_order(&$boucle) { |
| 859 | 866 | if (!$order = $boucle->order |
| 860 | 867 | and !$order = $boucle->default_order |
@@ -924,6 +931,9 @@ discard block |
||
| 924 | 931 | define('_REGEXP_CONCAT_NON_VIDE', "/^(.*)[.]\s*'[^']+'\s*$/"); |
| 925 | 932 | |
| 926 | 933 | // http://code.spip.net/@compile_cas |
| 934 | +/** |
|
| 935 | + * @param string $id_boucle |
|
| 936 | + */ |
|
| 927 | 937 | function compile_cas($tableau, $descr, &$boucles, $id_boucle) { |
| 928 | 938 | |
| 929 | 939 | $codes = array(); |
@@ -1113,6 +1123,9 @@ discard block |
||
| 1113 | 1123 | // de meme si EXP est de la forme (t ? '' : 'C') |
| 1114 | 1124 | |
| 1115 | 1125 | // http://code.spip.net/@compile_retour |
| 1126 | +/** |
|
| 1127 | + * @param string $tab |
|
| 1128 | + */ |
|
| 1116 | 1129 | function compile_retour($code, $avant, $apres, $altern, $tab, $n) { |
| 1117 | 1130 | if ($avant == "''") { |
| 1118 | 1131 | $avant = ''; |
@@ -133,6 +133,10 @@ discard block |
||
| 133 | 133 | return $nom ? $nom : false; |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | +/** |
|
| 137 | + * @param string $squelette |
|
| 138 | + * @param string $phpfile |
|
| 139 | + */ |
|
| 136 | 140 | function squelette_traduit($squelette, $sourcefile, $phpfile, $boucles) { |
| 137 | 141 | |
| 138 | 142 | // Le dernier index est '' (fonction principale) |
@@ -157,6 +161,9 @@ discard block |
||
| 157 | 161 | |
| 158 | 162 | // Le squelette compile est-il trop vieux ? |
| 159 | 163 | // http://code.spip.net/@squelette_obsolete |
| 164 | +/** |
|
| 165 | + * @param string $skel |
|
| 166 | + */ |
|
| 160 | 167 | function squelette_obsolete($skel, $squelette) { |
| 161 | 168 | static $date_change = null; |
| 162 | 169 | // ne verifier la date de mes_fonctions et mes_options qu'une seule fois |
@@ -661,6 +661,11 @@ discard block |
||
| 661 | 661 | } |
| 662 | 662 | |
| 663 | 663 | // http://code.spip.net/@calculer_critere_arg_dynamique |
| 664 | +/** |
|
| 665 | + * @param string $idb |
|
| 666 | + * |
|
| 667 | + * @return string |
|
| 668 | + */ |
|
| 664 | 669 | function calculer_critere_arg_dynamique($idb, &$boucles, $crit, $suffix = '') { |
| 665 | 670 | $boucle = $boucles[$idb]; |
| 666 | 671 | $alt = "('" . $boucle->id_table . '.\' . $x' . $suffix . ')'; |
@@ -1509,6 +1514,10 @@ discard block |
||
| 1509 | 1514 | } |
| 1510 | 1515 | |
| 1511 | 1516 | // http://code.spip.net/@critere_IN_cas |
| 1517 | +/** |
|
| 1518 | + * @param string $idb |
|
| 1519 | + * @param string $crit2 |
|
| 1520 | + */ |
|
| 1512 | 1521 | function critere_IN_cas($idb, &$boucles, $crit2, $arg, $op, $val, $col) { |
| 1513 | 1522 | static $num = array(); |
| 1514 | 1523 | $descr = $boucles[$idb]->descr; |
@@ -418,6 +418,10 @@ discard block |
||
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | // http://code.spip.net/@reference_boucle_debug |
| 421 | +/** |
|
| 422 | + * @param string $nom |
|
| 423 | + * @param string $self |
|
| 424 | + */ |
|
| 421 | 425 | function reference_boucle_debug($n, $nom, $self) { |
| 422 | 426 | list($skel, $boucle, $ligne) = trouve_boucle_debug($n, $nom); |
| 423 | 427 | |
@@ -806,6 +810,9 @@ discard block |
||
| 806 | 810 | } |
| 807 | 811 | |
| 808 | 812 | // http://code.spip.net/@debusquer_entete |
| 813 | +/** |
|
| 814 | + * @param string $corps |
|
| 815 | + */ |
|
| 809 | 816 | function debusquer_entete($titre, $corps) { |
| 810 | 817 | |
| 811 | 818 | include_spip('balise/formulaire_admin'); |
@@ -457,6 +457,10 @@ |
||
| 457 | 457 | * aller a la position $n en parcourant |
| 458 | 458 | * un par un tous les elements |
| 459 | 459 | */ |
| 460 | + |
|
| 461 | + /** |
|
| 462 | + * @param integer $n |
|
| 463 | + */ |
|
| 460 | 464 | private function seek_loop($n) { |
| 461 | 465 | if ($this->pos > $n) { |
| 462 | 466 | $this->rewind(); |
@@ -231,7 +231,7 @@ |
||
| 231 | 231 | * |
| 232 | 232 | * @param array $depart |
| 233 | 233 | * @param array $arrivee |
| 234 | - * @param string|array $col |
|
| 234 | + * @param string $col |
|
| 235 | 235 | * @return bool |
| 236 | 236 | */ |
| 237 | 237 | function nogroupby_if($depart, $arrivee, $col) { |