@@ -51,6 +51,10 @@ |
||
| 51 | 51 | |
| 52 | 52 | |
| 53 | 53 | // http://doc.spip.org/@affiche_block_initiale |
| 54 | +/** |
|
| 55 | + * @param string $initiale |
|
| 56 | + * @param string $block |
|
| 57 | + */ |
|
| 54 | 58 | function affiche_block_initiale($initiale,$block,$block_actif){ |
| 55 | 59 | if (strlen($block)){ |
| 56 | 60 | return "<li class='item'>" |
@@ -76,6 +76,9 @@ |
||
| 76 | 76 | // checkbox pour activer ou desactiver |
| 77 | 77 | // si ce n'est pas une extension |
| 78 | 78 | |
| 79 | +/** |
|
| 80 | + * @param integer $id_input |
|
| 81 | + */ |
|
| 79 | 82 | function plugin_checkbox($id_input, $file, $actif) |
| 80 | 83 | { |
| 81 | 84 | $name = substr(md5($file),0,16); |
@@ -69,11 +69,19 @@ |
||
| 69 | 69 | // vraiment n'importe quoi la gestion des chemins des plugins |
| 70 | 70 | // une fonction pour aider... |
| 71 | 71 | // http://doc.spip.org/@chemin_plug |
| 72 | +/** |
|
| 73 | + * @param string $racine |
|
| 74 | + * |
|
| 75 | + * @return string |
|
| 76 | + */ |
|
| 72 | 77 | function chemin_plug($racine, $plug) { |
| 73 | 78 | return preg_replace(',[^/]+/\.\./,', '', "$racine/$plug"); |
| 74 | 79 | } |
| 75 | 80 | |
| 76 | 81 | // http://doc.spip.org/@tree_open_close_dir |
| 82 | +/** |
|
| 83 | + * @param string $target |
|
| 84 | + */ |
|
| 77 | 85 | function tree_open_close_dir(&$current,$target,$deplie=array()){ |
| 78 | 86 | if ($current == $target) return ""; |
| 79 | 87 | $tcur = explode("/",$current); |
@@ -21,6 +21,9 @@ discard block |
||
| 21 | 21 | // Compatibilite : on utilise stripos/strripos() qui n'existent pas en php4 |
| 22 | 22 | if (!function_exists('strripos')) { |
| 23 | 23 | // http://doc.spip.org/@strripos |
| 24 | + /** |
|
| 25 | + * @param string $aiguille |
|
| 26 | + */ |
|
| 24 | 27 | function strripos($botte, $aiguille) { |
| 25 | 28 | if (preg_match('@^(.*)' . preg_quote($aiguille, '@') . '@is', |
| 26 | 29 | $botte, $regs)) { |
@@ -31,6 +34,9 @@ discard block |
||
| 31 | 34 | } |
| 32 | 35 | if (!function_exists('stripos')) { |
| 33 | 36 | // http://doc.spip.org/@stripos |
| 37 | + /** |
|
| 38 | + * @param string $aiguille |
|
| 39 | + */ |
|
| 34 | 40 | function stripos($botte, $aiguille) { |
| 35 | 41 | if (preg_match('@^(.*)' . preg_quote($aiguille, '@') . '@isU', |
| 36 | 42 | $botte, $regs)) { |
@@ -708,6 +708,9 @@ |
||
| 708 | 708 | // Si le tableau est vide on renvoie '' (utile pour #SESSION) |
| 709 | 709 | // |
| 710 | 710 | // http://doc.spip.org/@balise_ENV_dist |
| 711 | +/** |
|
| 712 | + * @param string $src |
|
| 713 | + */ |
|
| 711 | 714 | function balise_ENV_dist($p, $src = NULL) { |
| 712 | 715 | // le tableau de base de la balise (cf #META ci-dessous) |
| 713 | 716 | |
@@ -51,6 +51,9 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | |
| 53 | 53 | // http://doc.spip.org/@argumenter_inclure |
| 54 | +/** |
|
| 55 | + * @param boolean $rejet_filtres |
|
| 56 | + */ |
|
| 54 | 57 | function argumenter_inclure($params, $rejet_filtres, $p, &$boucles, $id_boucle, $echap = true, $lang = '', $fond1 = false){ |
| 55 | 58 | $l = array(); |
| 56 | 59 | $erreur_p_i_i = ''; |
@@ -442,6 +445,9 @@ discard block |
||
| 442 | 445 | } |
| 443 | 446 | |
| 444 | 447 | // http://doc.spip.org/@calculer_dec |
| 448 | +/** |
|
| 449 | + * @param string $nom |
|
| 450 | + */ |
|
| 445 | 451 | function calculer_dec($nom, $val){ |
| 446 | 452 | $static = "static "; |
| 447 | 453 | if ( |
@@ -553,6 +559,9 @@ discard block |
||
| 553 | 559 | define('_REGEXP_CONCAT_NON_VIDE', "/^(.*)[.]\s*'[^']+'\s*$/"); |
| 554 | 560 | |
| 555 | 561 | // http://doc.spip.org/@compile_cas |
| 562 | +/** |
|
| 563 | + * @param string $id_boucle |
|
| 564 | + */ |
|
| 556 | 565 | function compile_cas($tableau, $descr, &$boucles, $id_boucle){ |
| 557 | 566 | |
| 558 | 567 | $codes = array(); |
@@ -731,6 +740,9 @@ discard block |
||
| 731 | 740 | // de meme si EXP est de la forme (t ? '' : 'C') |
| 732 | 741 | |
| 733 | 742 | // http://doc.spip.org/@compile_retour |
| 743 | +/** |
|
| 744 | + * @param string $tab |
|
| 745 | + */ |
|
| 734 | 746 | function compile_retour($code, $avant, $apres, $altern, $tab, $n){ |
| 735 | 747 | if ($avant=="''") $avant = ''; |
| 736 | 748 | if ($apres=="''") $apres = ''; |
@@ -106,6 +106,9 @@ discard block |
||
| 106 | 106 | return $nom ? array($nom, $code) : false; |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | +/** |
|
| 110 | + * @param string $phpfile |
|
| 111 | + */ |
|
| 109 | 112 | function squelette_traduit($squelette, $sourcefile, $phpfile, $boucles) |
| 110 | 113 | { |
| 111 | 114 | |
@@ -128,6 +131,9 @@ discard block |
||
| 128 | 131 | |
| 129 | 132 | // Le squelette compile est-il trop vieux ? |
| 130 | 133 | // http://doc.spip.org/@squelette_obsolete |
| 134 | +/** |
|
| 135 | + * @param string $skel |
|
| 136 | + */ |
|
| 131 | 137 | function squelette_obsolete($skel, $squelette) { |
| 132 | 138 | static $date_change = null; |
| 133 | 139 | // ne verifier la date de mes_fonctions et mes_options qu'une seule fois |
@@ -467,6 +473,9 @@ discard block |
||
| 467 | 473 | return false; |
| 468 | 474 | } |
| 469 | 475 | // http://doc.spip.org/@remplace_sous_requete |
| 476 | +/** |
|
| 477 | + * @param string $sousrequete |
|
| 478 | + */ |
|
| 470 | 479 | function remplace_sous_requete($w,$sousrequete){ |
| 471 | 480 | if (is_array($w)) { |
| 472 | 481 | if (in_array(reset($w),array("SELF","SUBSELECT"))) return $sousrequete; |
@@ -647,6 +647,9 @@ discard block |
||
| 647 | 647 | // Code specifique aux criteres {pagination}, {1,n} {n/m} etc |
| 648 | 648 | // |
| 649 | 649 | |
| 650 | +/** |
|
| 651 | + * @param string $mode |
|
| 652 | + */ |
|
| 650 | 653 | function calculer_parties(&$boucles, $id_boucle, $debut, $mode) { |
| 651 | 654 | |
| 652 | 655 | $total_parties = $boucles[$id_boucle]->total_parties; |
@@ -729,6 +732,9 @@ discard block |
||
| 729 | 732 | // Sinon, ne retourne rien (affectation directe dans l'arbre) |
| 730 | 733 | |
| 731 | 734 | // http://doc.spip.org/@calculer_criteres |
| 735 | +/** |
|
| 736 | + * @param string $idb |
|
| 737 | + */ |
|
| 732 | 738 | function calculer_criteres ($idb, &$boucles) |
| 733 | 739 | { |
| 734 | 740 | $msg = ''; |
@@ -803,6 +809,9 @@ discard block |
||
| 803 | 809 | } |
| 804 | 810 | |
| 805 | 811 | // http://doc.spip.org/@critere_IN_cas |
| 812 | +/** |
|
| 813 | + * @param string $crit2 |
|
| 814 | + */ |
|
| 806 | 815 | function critere_IN_cas ($idb, &$boucles, $crit2, $arg, $op, $val, $col) |
| 807 | 816 | { |
| 808 | 817 | static $num = array(); |
@@ -1114,6 +1123,9 @@ discard block |
||
| 1114 | 1123 | } |
| 1115 | 1124 | |
| 1116 | 1125 | // http://doc.spip.org/@trouver_champ |
| 1126 | +/** |
|
| 1127 | + * @param string $champ |
|
| 1128 | + */ |
|
| 1117 | 1129 | function trouver_champ($champ, $where) |
| 1118 | 1130 | { |
| 1119 | 1131 | if (!is_array($where)) |
@@ -1243,6 +1255,9 @@ discard block |
||
| 1243 | 1255 | } |
| 1244 | 1256 | |
| 1245 | 1257 | // http://doc.spip.org/@calculer_critere_infixe_date |
| 1258 | +/** |
|
| 1259 | + * @param string[] $regs |
|
| 1260 | + */ |
|
| 1246 | 1261 | function calculer_critere_infixe_date($idb, &$boucles, $regs) |
| 1247 | 1262 | { |
| 1248 | 1263 | global $table_date; |
@@ -1311,6 +1326,10 @@ discard block |
||
| 1311 | 1326 | } |
| 1312 | 1327 | |
| 1313 | 1328 | // http://doc.spip.org/@calculer_param_date |
| 1329 | +/** |
|
| 1330 | + * @param string $date_compare |
|
| 1331 | + * @param string $date_orig |
|
| 1332 | + */ |
|
| 1314 | 1333 | function calculer_param_date($date_compare, $date_orig) { |
| 1315 | 1334 | if (preg_match(",'\" *\.(.*)\. *\"',", $date_compare, $r)) { |
| 1316 | 1335 | $init = "'\" . (\$x = $r[1]) . \"'"; |
@@ -112,6 +112,9 @@ discard block |
||
| 112 | 112 | exit; |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | +/** |
|
| 116 | + * @param string $msg |
|
| 117 | + */ |
|
| 115 | 118 | function debusquer_compose_message($msg) |
| 116 | 119 | { |
| 117 | 120 | if (is_array($msg)) { |
@@ -316,6 +319,10 @@ discard block |
||
| 316 | 319 | } |
| 317 | 320 | |
| 318 | 321 | // http://doc.spip.org/@reference_boucle_debug |
| 322 | +/** |
|
| 323 | + * @param string $nom |
|
| 324 | + * @param string $self |
|
| 325 | + */ |
|
| 319 | 326 | function reference_boucle_debug($n, $nom, $self) |
| 320 | 327 | { |
| 321 | 328 | list($skel, $boucle, $ligne) = trouve_boucle_debug($n, $nom); |
@@ -586,6 +593,9 @@ discard block |
||
| 586 | 593 | } |
| 587 | 594 | |
| 588 | 595 | // http://doc.spip.org/@debusquer_entete |
| 596 | +/** |
|
| 597 | + * @param string $corps |
|
| 598 | + */ |
|
| 589 | 599 | function debusquer_entete($titre, $corps) |
| 590 | 600 | { |
| 591 | 601 | global $debug_objets; |