@@ -311,7 +311,7 @@ |
||
| 311 | 311 | * peut etre utilise pour l'import depuis xml, |
| 312 | 312 | * ou la copie de base a base (mysql<->sqlite par exemple) |
| 313 | 313 | * |
| 314 | - * @param array $tables |
|
| 314 | + * @param string[] $tables |
|
| 315 | 315 | * @param array $exclure_tables |
| 316 | 316 | * @param string $serveur |
| 317 | 317 | */ |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | * Chemin sur lequel le cookie sera disponible |
| 36 | 36 | * @param string $domain |
| 37 | 37 | * Domaine à partir duquel le cookie est disponible |
| 38 | - * @param bool $secure |
|
| 38 | + * @param string|boolean $secure |
|
| 39 | 39 | * cookie sécurisé ou non ? |
| 40 | 40 | * @return bool |
| 41 | 41 | * true si le cookie a été posé, false sinon. |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | * Couples champ/valeur à modifier |
| 84 | 84 | * @param string $serveur |
| 85 | 85 | * Nom du connecteur à la base de données |
| 86 | - * @return bool|string |
|
| 86 | + * @return string|false |
|
| 87 | 87 | * - false : Aucune modification, aucun champ n'est à modifier |
| 88 | 88 | * - chaîne vide : Vide si tout s'est bien passé |
| 89 | 89 | * - chaîne : Texte d'un message d'erreur |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | * @param int $height_max |
| 123 | 123 | * Hauteur minimale de l'image à traiter (10000 par défaut) |
| 124 | 124 | * @return |
| 125 | - * Le tag html `<img src=... />` avec une class `filtre_inactif` ou pas |
|
| 125 | + string Le tag html `<img src=... />` avec une class `filtre_inactif` ou pas |
|
| 126 | 126 | */ |
| 127 | 127 | function image_select($img, $width_min = 0, $height_min = 0, $width_max = 10000, $height_max = 1000) { |
| 128 | 128 | if (!$img) { |
@@ -644,7 +644,7 @@ |
||
| 644 | 644 | * |
| 645 | 645 | * @param string $dir |
| 646 | 646 | * Répertoire à parcourir |
| 647 | - * @param int|string $pattern |
|
| 647 | + * @param integer $pattern |
|
| 648 | 648 | * Expression régulière pour trouver des fichiers, tel que `[.]lock$` |
| 649 | 649 | * @param int $maxfiles |
| 650 | 650 | * Nombre de fichiers maximums retournés |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * |
| 32 | 32 | * @param string $lang |
| 33 | 33 | * La langue à utiliser |
| 34 | - * @return string|bool |
|
| 34 | + * @return false|string |
|
| 35 | 35 | * string : La langue qui a été utilisée si trouvée |
| 36 | 36 | * false : aucune langue ne correspondait à la demande |
| 37 | 37 | **/ |
@@ -80,6 +80,9 @@ discard block |
||
| 80 | 80 | // retourne son 2e argument si c'est un index du premier |
| 81 | 81 | // ou un index approchant sinon et si possible, |
| 82 | 82 | // la langue X etant consideree comme une approche de X_Y |
| 83 | +/** |
|
| 84 | + * @return string |
|
| 85 | + */ |
|
| 83 | 86 | function approcher_langue($trads, $lang = '') { |
| 84 | 87 | |
| 85 | 88 | if (!$lang) { |
@@ -175,6 +178,9 @@ discard block |
||
| 175 | 178 | // pour 'changer_lang' (langue de l'article, espace prive), c'est en Ajax |
| 176 | 179 | // |
| 177 | 180 | // http://code.spip.net/@menu_langues |
| 181 | +/** |
|
| 182 | + * @param string $nom_select |
|
| 183 | + */ |
|
| 178 | 184 | function menu_langues($nom_select, $default = '') { |
| 179 | 185 | include_spip('inc/actions'); |
| 180 | 186 | |
@@ -209,6 +215,10 @@ discard block |
||
| 209 | 215 | } |
| 210 | 216 | |
| 211 | 217 | // http://code.spip.net/@select_langues |
| 218 | +/** |
|
| 219 | + * @param string $change |
|
| 220 | + * @param string $options |
|
| 221 | + */ |
|
| 212 | 222 | function select_langues($nom_select, $change, $options, $label = "") { |
| 213 | 223 | static $cpt = 0; |
| 214 | 224 | $id = "menu_langues" . $cpt++; |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * |
| 33 | 33 | * @param $function |
| 34 | 34 | * The function name to call. |
| 35 | - * @param $description |
|
| 35 | + * @param string $description |
|
| 36 | 36 | * A human-readable description of the queued job. |
| 37 | 37 | * @param $arguments |
| 38 | 38 | * Optional array of arguments to pass to the function. |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | * |
| 163 | 163 | * @param int $id_job |
| 164 | 164 | * id de la tache a retirer |
| 165 | - * @return bool |
|
| 165 | + * @return boolean|string |
|
| 166 | 166 | */ |
| 167 | 167 | function queue_remove_job($id_job) { |
| 168 | 168 | include_spip('base/abstract_sql'); |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | * Nom de la fonction de tâche |
| 467 | 467 | * @param string $inclure |
| 468 | 468 | * Nom de l'inclusion contenant la fonction |
| 469 | - * @return bool|int |
|
| 469 | + * @return integer |
|
| 470 | 470 | * Périodicité de la tâche en secondes, si tâche périodique, sinon false. |
| 471 | 471 | */ |
| 472 | 472 | function queue_is_cron_job($function, $inclure) { |
@@ -80,6 +80,9 @@ discard block |
||
| 80 | 80 | // une $source differente ; le script detecte automagiquement si ce qu'on |
| 81 | 81 | // echappe est un div ou un span |
| 82 | 82 | // http://code.spip.net/@code_echappement |
| 83 | +/** |
|
| 84 | + * @param string $mode |
|
| 85 | + */ |
|
| 83 | 86 | function code_echappement($rempl, $source = '', $no_transform = false, $mode = null) { |
| 84 | 87 | if (!strlen($rempl)) { |
| 85 | 88 | return ''; |
@@ -284,6 +287,9 @@ discard block |
||
| 284 | 287 | // Reinserer le javascript de confiance (venant des modeles) |
| 285 | 288 | |
| 286 | 289 | // http://code.spip.net/@echappe_retour_modeles |
| 290 | +/** |
|
| 291 | + * @param string $letexte |
|
| 292 | + */ |
|
| 287 | 293 | function echappe_retour_modeles($letexte, $interdire_scripts = false) { |
| 288 | 294 | $letexte = echappe_retour($letexte); |
| 289 | 295 | |
@@ -433,6 +439,9 @@ discard block |
||
| 433 | 439 | } |
| 434 | 440 | |
| 435 | 441 | |
| 442 | +/** |
|
| 443 | + * @param string $letexte |
|
| 444 | + */ |
|
| 436 | 445 | function echapper_faux_tags($letexte) { |
| 437 | 446 | if (strpos($letexte, '<') === false) { |
| 438 | 447 | return $letexte; |
@@ -98,6 +98,10 @@ discard block |
||
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | // http://code.spip.net/@phraser_polyglotte |
| 101 | +/** |
|
| 102 | + * @param string $texte |
|
| 103 | + * @param integer $ligne |
|
| 104 | + */ |
|
| 101 | 105 | function phraser_polyglotte($texte, $ligne, $result) { |
| 102 | 106 | |
| 103 | 107 | if (preg_match_all(BALISE_POLYGLOTTE, $texte, $m, PREG_SET_ORDER)) { |
@@ -260,6 +264,9 @@ discard block |
||
| 260 | 264 | // on recommence tant qu'il y a des [...] en substituant a l'appel suivant |
| 261 | 265 | |
| 262 | 266 | // http://code.spip.net/@phraser_champs_etendus |
| 267 | +/** |
|
| 268 | + * @param integer $ligne |
|
| 269 | + */ |
|
| 263 | 270 | function phraser_champs_etendus($texte, $ligne, $result) { |
| 264 | 271 | if ($texte === "") { |
| 265 | 272 | return $result; |
@@ -279,6 +286,9 @@ discard block |
||
| 279 | 286 | // Tres chevelu |
| 280 | 287 | |
| 281 | 288 | // http://code.spip.net/@phraser_args |
| 289 | +/** |
|
| 290 | + * @param string $fin |
|
| 291 | + */ |
|
| 282 | 292 | function phraser_args($texte, $fin, $sep, $result, &$pointeur_champ) { |
| 283 | 293 | $texte = ltrim($texte); |
| 284 | 294 | while (($texte !== "") && strpos($fin, $texte[0]) === false) { |
@@ -293,6 +303,9 @@ discard block |
||
| 293 | 303 | } |
| 294 | 304 | |
| 295 | 305 | // http://code.spip.net/@phraser_arg |
| 306 | +/** |
|
| 307 | + * @param string $texte |
|
| 308 | + */ |
|
| 296 | 309 | function phraser_arg(&$texte, $sep, $result, &$pointeur_champ) { |
| 297 | 310 | preg_match(",^(\|?[^}{)|]*)(.*)$,ms", $texte, $match); |
| 298 | 311 | $suite = ltrim($match[2]); |
@@ -430,6 +443,9 @@ discard block |
||
| 430 | 443 | |
| 431 | 444 | |
| 432 | 445 | // http://code.spip.net/@phraser_champs_exterieurs |
| 446 | +/** |
|
| 447 | + * @param string $texte |
|
| 448 | + */ |
|
| 433 | 449 | function phraser_champs_exterieurs($texte, $ligne, $sep, $nested) { |
| 434 | 450 | $res = array(); |
| 435 | 451 | while (($p = strpos($texte, "%$sep")) !== false) { |
@@ -449,6 +465,9 @@ discard block |
||
| 449 | 465 | } |
| 450 | 466 | |
| 451 | 467 | // http://code.spip.net/@phraser_champs_interieurs |
| 468 | +/** |
|
| 469 | + * @param string $sep |
|
| 470 | + */ |
|
| 452 | 471 | function phraser_champs_interieurs($texte, $ligne, $sep, $result) { |
| 453 | 472 | $i = 0; // en fait count($result) |
| 454 | 473 | $x = ""; |
@@ -742,6 +761,10 @@ discard block |
||
| 742 | 761 | } |
| 743 | 762 | |
| 744 | 763 | // http://code.spip.net/@phraser_critere_infixe |
| 764 | +/** |
|
| 765 | + * @param string $arg1 |
|
| 766 | + * @param string $arg2 |
|
| 767 | + */ |
|
| 745 | 768 | function phraser_critere_infixe($arg1, $arg2, $args, $op, $not, $cond) { |
| 746 | 769 | $args[0] = new Texte; |
| 747 | 770 | $args[0]->texte = $arg1; |