@@ -88,6 +88,9 @@ discard block |
||
| 88 | 88 | // la fonction cherchant un fichier PHP dans le SPIP_PATH |
| 89 | 89 | // |
| 90 | 90 | // http://doc.spip.org/@include_spip |
| 91 | +/** |
|
| 92 | + * @param string $f |
|
| 93 | + */ |
|
| 91 | 94 | function include_spip($f, $include = true) { |
| 92 | 95 | return find_in_path($f . '.php', '', $include); |
| 93 | 96 | } |
@@ -180,8 +183,6 @@ discard block |
||
| 180 | 183 | * |
| 181 | 184 | * @param string $message |
| 182 | 185 | * @param string|int $name |
| 183 | - * @param string $logdir ## inutile !! a supprimer ? |
|
| 184 | - * @param string $logsuf ## inutile !! a supprimer ? |
|
| 185 | 186 | */ |
| 186 | 187 | function spip_log($message=NULL, $name=NULL) { |
| 187 | 188 | static $pre = array(); |
@@ -366,6 +367,10 @@ discard block |
||
| 366 | 367 | // pour l'ancre on translitere, vire les non alphanum du debut, |
| 367 | 368 | // et on remplace ceux a l'interieur ou au bout par - |
| 368 | 369 | // http://doc.spip.org/@ancre_url |
| 370 | +/** |
|
| 371 | + * @param null|string $url |
|
| 372 | + * @param string $ancre |
|
| 373 | + */ |
|
| 369 | 374 | function ancre_url($url, $ancre) { |
| 370 | 375 | // lever l'#ancre |
| 371 | 376 | if (preg_match(',^([^#]*)(#.*)$,', $url, $r)) { |
@@ -596,6 +601,9 @@ discard block |
||
| 596 | 601 | // Renvoie False si un fichier n'est pas plus vieux que $duree secondes, |
| 597 | 602 | // sinon renvoie True et le date sauf si ca n'est pas souhaite |
| 598 | 603 | // http://doc.spip.org/@spip_touch |
| 604 | +/** |
|
| 605 | + * @param string $fichier |
|
| 606 | + */ |
|
| 599 | 607 | function spip_touch($fichier, $duree=0, $touch=true) { |
| 600 | 608 | if ($duree) { |
| 601 | 609 | clearstatcache(); |
@@ -660,9 +668,9 @@ discard block |
||
| 660 | 668 | /** |
| 661 | 669 | * Ajout d'une tache dans la file d'attente |
| 662 | 670 | * |
| 663 | - * @param $function |
|
| 671 | + * @param string $function |
|
| 664 | 672 | * The function name to call. |
| 665 | - * @param $description |
|
| 673 | + * @param string $description |
|
| 666 | 674 | * A human-readable description of the queued job. |
| 667 | 675 | * @param $arguments |
| 668 | 676 | * Optional array of arguments to pass to the function. |
@@ -718,7 +726,6 @@ discard block |
||
| 718 | 726 | * - si int, affecte la static directement avec la valeur |
| 719 | 727 | * |
| 720 | 728 | * @staticvar int $queue_next_job_time |
| 721 | - * @param int/bool $force_next |
|
| 722 | 729 | * @return int |
| 723 | 730 | */ |
| 724 | 731 | function queue_sleep_time_to_next_job($force=null) { |
@@ -795,6 +802,9 @@ discard block |
||
| 795 | 802 | // du path, dans cet ordre. |
| 796 | 803 | // Exception: si un $dossier_squelette est defini, il reste en tete, pour raison historique |
| 797 | 804 | // http://doc.spip.org/@_chemin |
| 805 | +/** |
|
| 806 | + * @param string $dir_path |
|
| 807 | + */ |
|
| 798 | 808 | function _chemin($dir_path=NULL){ |
| 799 | 809 | static $path_base = NULL; |
| 800 | 810 | static $path_full = NULL; |
@@ -1050,6 +1060,9 @@ discard block |
||
| 1050 | 1060 | * @return array |
| 1051 | 1061 | */ |
| 1052 | 1062 | // http://doc.spip.org/@find_all_in_path |
| 1063 | +/** |
|
| 1064 | + * @param string $pattern |
|
| 1065 | + */ |
|
| 1053 | 1066 | function find_all_in_path($dir,$pattern, $recurs=false){ |
| 1054 | 1067 | $liste_fichiers=array(); |
| 1055 | 1068 | $maxfiles = 10000; |
@@ -1197,6 +1210,9 @@ discard block |
||
| 1197 | 1210 | } |
| 1198 | 1211 | |
| 1199 | 1212 | // http://doc.spip.org/@generer_url_entite_absolue |
| 1213 | +/** |
|
| 1214 | + * @param boolean|string $connect |
|
| 1215 | + */ |
|
| 1200 | 1216 | function generer_url_entite_absolue($id='', $entite='', $args='', $ancre='', $connect=NULL) |
| 1201 | 1217 | { |
| 1202 | 1218 | if (!$connect) $connect = true; |
@@ -1440,6 +1456,9 @@ discard block |
||
| 1440 | 1456 | } |
| 1441 | 1457 | |
| 1442 | 1458 | // http://doc.spip.org/@generer_url_action |
| 1459 | +/** |
|
| 1460 | + * @param string $script |
|
| 1461 | + */ |
|
| 1443 | 1462 | function generer_url_action($script, $args="", $no_entities=false , $public = false) { |
| 1444 | 1463 | // si l'on est dans l'espace prive, on garde dans l'url |
| 1445 | 1464 | // l'exec a l'origine de l'action, qui permet de savoir si il est necessaire |
@@ -2202,7 +2221,7 @@ discard block |
||
| 2202 | 2221 | /** |
| 2203 | 2222 | * Trouve un squelette dans le repertoire modeles/ |
| 2204 | 2223 | * |
| 2205 | - * @param $nom |
|
| 2224 | + * @param string $nom |
|
| 2206 | 2225 | * @return string |
| 2207 | 2226 | */ |
| 2208 | 2227 | function trouve_modele($nom) { |
@@ -2256,6 +2275,9 @@ discard block |
||
| 2256 | 2275 | |
| 2257 | 2276 | // Charger dynamiquement une extension php |
| 2258 | 2277 | // http://doc.spip.org/@charger_php_extension |
| 2278 | +/** |
|
| 2279 | + * @param string $module |
|
| 2280 | + */ |
|
| 2259 | 2281 | function charger_php_extension($module) { |
| 2260 | 2282 | if (extension_loaded($module)) { |
| 2261 | 2283 | return true; |
@@ -2279,6 +2301,9 @@ discard block |
||
| 2279 | 2301 | */ |
| 2280 | 2302 | // Fonction depreciee |
| 2281 | 2303 | // http://doc.spip.org/@lire_meta |
| 2304 | +/** |
|
| 2305 | + * @param string $nom |
|
| 2306 | + */ |
|
| 2282 | 2307 | function lire_meta($nom) { |
| 2283 | 2308 | return $GLOBALS['meta'][$nom]; |
| 2284 | 2309 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | /** |
| 107 | 107 | * Declarer les criteres exceptions |
| 108 | - * @return array |
|
| 108 | + * @return string[] |
|
| 109 | 109 | */ |
| 110 | 110 | public function exception_des_criteres() { |
| 111 | 111 | return array('tableau'); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | 115 | * Recuperer depuis le cache si possible |
| 116 | - * @param $cle |
|
| 116 | + * @param string|null $cle |
|
| 117 | 117 | * @return |
| 118 | 118 | */ |
| 119 | 119 | protected function cache_get($cle) { |
@@ -126,8 +126,8 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | /** |
| 128 | 128 | * Stocker en cache si possible |
| 129 | - * @param $cle |
|
| 130 | - * @param $ttl |
|
| 129 | + * @param string|null $cle |
|
| 130 | + * @param integer $ttl |
|
| 131 | 131 | * @return |
| 132 | 132 | */ |
| 133 | 133 | protected function cache_set($cle, $ttl, $valeur = null) { |
@@ -661,7 +661,7 @@ discard block |
||
| 661 | 661 | * lister des fichiers a partir d'un dossier de base et selon une regexp. |
| 662 | 662 | * pour la syntaxe cf la fonction spip preg_files |
| 663 | 663 | * @param string $dir |
| 664 | - * @param string $regexp |
|
| 664 | + * @param integer $regexp |
|
| 665 | 665 | * @param int $limit |
| 666 | 666 | * @return array|bool |
| 667 | 667 | */ |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | |
| 695 | 695 | /** |
| 696 | 696 | * Object -> tableau |
| 697 | - * @param Object $object |
|
| 697 | + * @param SimpleXMLIterator $object |
|
| 698 | 698 | * @return array|bool |
| 699 | 699 | */ |
| 700 | 700 | function XMLObjectToArray($object){ |
@@ -346,6 +346,9 @@ |
||
| 346 | 346 | } |
| 347 | 347 | } |
| 348 | 348 | } |
| 349 | +/** |
|
| 350 | + * @param string $table |
|
| 351 | + */ |
|
| 349 | 352 | function maj_liens_insertq_multi_check($table,$couples,$desc=array()){ |
| 350 | 353 | $n_before = sql_countsel($table); |
| 351 | 354 | sql_insertq_multi($table,$couples,$desc); |
@@ -116,8 +116,6 @@ |
||
| 116 | 116 | * - 'nom' (= id) |
| 117 | 117 | * - 'compatibilite' (= version) |
| 118 | 118 | * |
| 119 | - * @param array $utilise |
|
| 120 | - * Liste des necessite trouvés pour le plugin |
|
| 121 | 119 | * @return array |
| 122 | 120 | * Liste des necessite modifiés. |
| 123 | 121 | */ |
@@ -57,6 +57,9 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | |
| 59 | 59 | // http://doc.spip.org/@argumenter_inclure |
| 60 | +/** |
|
| 61 | + * @param boolean $rejet_filtres |
|
| 62 | + */ |
|
| 60 | 63 | function argumenter_inclure($params, $rejet_filtres, $p, &$boucles, $id_boucle, $echap=true, $lang = '', $fond1=false){ |
| 61 | 64 | $l = array(); |
| 62 | 65 | $erreur_p_i_i = ''; |
@@ -665,6 +668,9 @@ discard block |
||
| 665 | 668 | } |
| 666 | 669 | |
| 667 | 670 | // http://doc.spip.org/@calculer_dec |
| 671 | +/** |
|
| 672 | + * @param string $nom |
|
| 673 | + */ |
|
| 668 | 674 | function calculer_dec($nom, $val) |
| 669 | 675 | { |
| 670 | 676 | $static = 'if (!isset($command[\''.$nom.'\'])) '; |
@@ -712,6 +718,9 @@ discard block |
||
| 712 | 718 | } |
| 713 | 719 | |
| 714 | 720 | // http://doc.spip.org/@calculer_from |
| 721 | +/** |
|
| 722 | + * @param Boucle $boucle |
|
| 723 | + */ |
|
| 715 | 724 | function calculer_from(&$boucle) |
| 716 | 725 | { |
| 717 | 726 | $res = ""; |
@@ -783,6 +792,9 @@ discard block |
||
| 783 | 792 | define('_REGEXP_CONCAT_NON_VIDE', "/^(.*)[.]\s*'[^']+'\s*$/"); |
| 784 | 793 | |
| 785 | 794 | // http://doc.spip.org/@compile_cas |
| 795 | +/** |
|
| 796 | + * @param string $id_boucle |
|
| 797 | + */ |
|
| 786 | 798 | function compile_cas($tableau, $descr, &$boucles, $id_boucle) { |
| 787 | 799 | |
| 788 | 800 | $codes = array(); |
@@ -960,6 +972,9 @@ discard block |
||
| 960 | 972 | // de meme si EXP est de la forme (t ? '' : 'C') |
| 961 | 973 | |
| 962 | 974 | // http://doc.spip.org/@compile_retour |
| 975 | +/** |
|
| 976 | + * @param string $tab |
|
| 977 | + */ |
|
| 963 | 978 | function compile_retour($code, $avant, $apres, $altern, $tab, $n) |
| 964 | 979 | { |
| 965 | 980 | if ($avant == "''") $avant = ''; |
@@ -788,6 +788,9 @@ discard block |
||
| 788 | 788 | // Code specifique aux criteres {pagination}, {1,n} {n/m} etc |
| 789 | 789 | // |
| 790 | 790 | |
| 791 | +/** |
|
| 792 | + * @param string $mode |
|
| 793 | + */ |
|
| 791 | 794 | function calculer_parties(&$boucles, $id_boucle, $debut, $mode){ |
| 792 | 795 | $total_parties = $boucles[$id_boucle]->total_parties; |
| 793 | 796 | |
@@ -978,6 +981,9 @@ discard block |
||
| 978 | 981 | } |
| 979 | 982 | |
| 980 | 983 | // http://doc.spip.org/@critere_IN_cas |
| 984 | +/** |
|
| 985 | + * @param string $crit2 |
|
| 986 | + */ |
|
| 981 | 987 | function critere_IN_cas($idb, &$boucles, $crit2, $arg, $op, $val, $col){ |
| 982 | 988 | static $num = array(); |
| 983 | 989 | $descr = $boucles[$idb]->descr; |
@@ -1473,6 +1479,9 @@ discard block |
||
| 1473 | 1479 | |
| 1474 | 1480 | |
| 1475 | 1481 | // http://doc.spip.org/@trouver_champ |
| 1482 | +/** |
|
| 1483 | + * @param string $champ |
|
| 1484 | + */ |
|
| 1476 | 1485 | function trouver_champ($champ, $where){ |
| 1477 | 1486 | if (!is_array($where)) |
| 1478 | 1487 | return preg_match($champ, $where); |
@@ -1680,6 +1689,10 @@ discard block |
||
| 1680 | 1689 | } |
| 1681 | 1690 | |
| 1682 | 1691 | // http://doc.spip.org/@calculer_param_date |
| 1692 | +/** |
|
| 1693 | + * @param string $date_compare |
|
| 1694 | + * @param string $date_orig |
|
| 1695 | + */ |
|
| 1683 | 1696 | function calculer_param_date($date_compare, $date_orig){ |
| 1684 | 1697 | if (preg_match(",'\" *\.(.*)\. *\"',", $date_compare, $r)){ |
| 1685 | 1698 | $init = "'\" . (\$x = $r[1]) . \"'"; |
@@ -374,6 +374,10 @@ discard block |
||
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | // http://doc.spip.org/@reference_boucle_debug |
| 377 | +/** |
|
| 378 | + * @param string $nom |
|
| 379 | + * @param string $self |
|
| 380 | + */ |
|
| 377 | 381 | function reference_boucle_debug($n, $nom, $self){ |
| 378 | 382 | list($skel, $boucle, $ligne) = trouve_boucle_debug($n, $nom); |
| 379 | 383 | |
@@ -459,6 +463,9 @@ discard block |
||
| 459 | 463 | |
| 460 | 464 | // l'environnement graphique du debuggueur |
| 461 | 465 | |
| 466 | +/** |
|
| 467 | + * @param null|string $self |
|
| 468 | + */ |
|
| 462 | 469 | function debusquer_squelette($fonc, $mode, $self){ |
| 463 | 470 | global $debug_objets; |
| 464 | 471 | |
@@ -745,6 +752,9 @@ discard block |
||
| 745 | 752 | } |
| 746 | 753 | |
| 747 | 754 | // http://doc.spip.org/@debusquer_entete |
| 755 | +/** |
|
| 756 | + * @param string $corps |
|
| 757 | + */ |
|
| 748 | 758 | function debusquer_entete($titre, $corps){ |
| 749 | 759 | global $debug_objets; |
| 750 | 760 | include_spip('balise/formulaire_admin'); |
@@ -130,6 +130,10 @@ discard block |
||
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | // http://doc.spip.org/@index_tables_en_pile |
| 133 | +/** |
|
| 134 | + * @param string $nom_champ |
|
| 135 | + * @param boolean $joker |
|
| 136 | + */ |
|
| 133 | 137 | function index_tables_en_pile($idb, $nom_champ, &$boucles, &$joker) { |
| 134 | 138 | global $exceptions_des_tables; |
| 135 | 139 | |
@@ -568,6 +572,9 @@ discard block |
||
| 568 | 572 | |
| 569 | 573 | // Filtres et,ou,oui,non,sinon,xou,xor,and,or,not,yes |
| 570 | 574 | // et comparateurs |
| 575 | +/** |
|
| 576 | + * @param string $arg |
|
| 577 | + */ |
|
| 571 | 578 | function filtre_logique($fonc, $code, $arg) |
| 572 | 579 | { |
| 573 | 580 | global $table_criteres_infixes; |
@@ -591,6 +598,9 @@ discard block |
||
| 591 | 598 | } |
| 592 | 599 | |
| 593 | 600 | // http://doc.spip.org/@compose_filtres_args |
| 601 | +/** |
|
| 602 | + * @param string $sep |
|
| 603 | + */ |
|
| 594 | 604 | function compose_filtres_args($p, $args, $sep) |
| 595 | 605 | { |
| 596 | 606 | $arglist = ""; |
@@ -607,6 +617,9 @@ discard block |
||
| 607 | 617 | // ET chez sa maman |
| 608 | 618 | // |
| 609 | 619 | // http://doc.spip.org/@calculer_argument_precedent |
| 620 | +/** |
|
| 621 | + * @param string $defaut |
|
| 622 | + */ |
|
| 610 | 623 | function calculer_argument_precedent($idb, $nom_champ, &$boucles, $defaut=null) { |
| 611 | 624 | |
| 612 | 625 | // si recursif, forcer l'extraction du champ SQL mais ignorer le code |
@@ -631,6 +644,10 @@ discard block |
||
| 631 | 644 | // |
| 632 | 645 | |
| 633 | 646 | // http://doc.spip.org/@rindex_pile |
| 647 | +/** |
|
| 648 | + * @param string $champ |
|
| 649 | + * @param string $motif |
|
| 650 | + */ |
|
| 634 | 651 | function rindex_pile($p, $champ, $motif) |
| 635 | 652 | { |
| 636 | 653 | $n = 0; |
@@ -20,8 +20,6 @@ discard block |
||
| 20 | 20 | * dans les squelette |
| 21 | 21 | * |
| 22 | 22 | * @param string $texte |
| 23 | - * @param string $code |
|
| 24 | - * @param string $arglist |
|
| 25 | 23 | * @param Object $p |
| 26 | 24 | * @return string |
| 27 | 25 | */ |
@@ -85,7 +83,7 @@ discard block |
||
| 85 | 83 | * Composer le code d'inclusion PHP |
| 86 | 84 | * |
| 87 | 85 | * @param string $fichier |
| 88 | - * @param Object $p |
|
| 86 | + * @param Inclure $p |
|
| 89 | 87 | * @param array $_contexte |
| 90 | 88 | * @return string |
| 91 | 89 | */ |