@@ -148,7 +148,7 @@ |
||
| 148 | 148 | * @param int $fichier |
| 149 | 149 | * - -1 pour retourner juste le chemin de l'image |
| 150 | 150 | * - 0 pour retourner le code HTML de l'image |
| 151 | - * @param string $lien |
|
| 151 | + * @param string $_lien |
|
| 152 | 152 | * Lien pour encadrer l'image avec si présent |
| 153 | 153 | * @param Champ $p |
| 154 | 154 | * Pile au niveau de la balise |
@@ -592,7 +592,7 @@ |
||
| 592 | 592 | * [(#ENV{objet_source}|rang_lien{#ID_AUTEUR,#ENV{objet},#ENV{id_objet},#ENV{_objet_lien}})] |
| 593 | 593 | * |
| 594 | 594 | * @param $objet_source |
| 595 | - * @param $ids |
|
| 595 | + * @param integer $ids |
|
| 596 | 596 | * @param $objet_lie |
| 597 | 597 | * @param $idl |
| 598 | 598 | * @param $objet_lien |
@@ -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 | // cas d'un double urlencode : si un urldecode de l'url n'est pas secure, on retient ca comme redirect |
| 19 | 22 | if (strpos($redirect, '%') !== false) { |
@@ -234,6 +234,9 @@ discard block |
||
| 234 | 234 | |
| 235 | 235 | |
| 236 | 236 | // https://code.spip.net/@info_etape |
| 237 | +/** |
|
| 238 | + * @param string $titre |
|
| 239 | + */ |
|
| 237 | 240 | function info_etape($titre, $complement = '') { |
| 238 | 241 | return "<h2>" . $titre . "</h2>\n" . |
| 239 | 242 | ($complement ? "" . $complement . "\n" : ''); |
@@ -259,6 +262,11 @@ discard block |
||
| 259 | 262 | } |
| 260 | 263 | |
| 261 | 264 | // https://code.spip.net/@info_progression_etape |
| 265 | +/** |
|
| 266 | + * @param integer $en_cours |
|
| 267 | + * @param string $phase |
|
| 268 | + * @param string $dir |
|
| 269 | + */ |
|
| 262 | 270 | function info_progression_etape($en_cours, $phase, $dir, $erreur = false) { |
| 263 | 271 | //$en_cours = _request('etape')?_request('etape'):""; |
| 264 | 272 | $liste = find_all_in_path($dir, $phase . '(([0-9])+|fin)[.]php$'); |
@@ -315,6 +323,9 @@ discard block |
||
| 315 | 323 | |
| 316 | 324 | |
| 317 | 325 | // https://code.spip.net/@fieldset |
| 326 | +/** |
|
| 327 | + * @param string $legend |
|
| 328 | + */ |
|
| 318 | 329 | function fieldset($legend, $champs = array(), $apres = '', $avant = '') { |
| 319 | 330 | return "<fieldset>\n" . |
| 320 | 331 | $avant . |
@@ -382,6 +393,10 @@ discard block |
||
| 382 | 393 | } |
| 383 | 394 | |
| 384 | 395 | // https://code.spip.net/@install_connexion_form |
| 396 | +/** |
|
| 397 | + * @param string[] $pass |
|
| 398 | + * @param integer $etape |
|
| 399 | + */ |
|
| 385 | 400 | function install_connexion_form($db, $login, $pass, $predef, $hidden, $etape, $jquery = true) { |
| 386 | 401 | $server_db = (is_string($predef[0])) ? $predef[0] : ''; |
| 387 | 402 | |
@@ -559,6 +574,9 @@ discard block |
||
| 559 | 574 | return array($checked, $bases); |
| 560 | 575 | } |
| 561 | 576 | |
| 577 | +/** |
|
| 578 | + * @param string[] $hidden |
|
| 579 | + */ |
|
| 562 | 580 | function install_propager($hidden) { |
| 563 | 581 | $res = ''; |
| 564 | 582 | foreach ($hidden as $k) { |
@@ -42,6 +42,9 @@ discard block |
||
| 42 | 42 | define('_RACCOURCI_LIEN', "/\[([^][]*?([[]\w*[]][^][]*)*)->(>?)([^]]*)\]/msS"); |
| 43 | 43 | |
| 44 | 44 | // https://code.spip.net/@expanser_liens |
| 45 | +/** |
|
| 46 | + * @return string |
|
| 47 | + */ |
|
| 45 | 48 | function expanser_liens($t, $connect = '', $env = array()) { |
| 46 | 49 | |
| 47 | 50 | $t = pipeline('pre_liens', $t); |
@@ -56,6 +59,9 @@ discard block |
||
| 56 | 59 | // Meme analyse mais pour eliminer les liens |
| 57 | 60 | // et ne laisser que leur titre, a expliciter si ce n'est fait |
| 58 | 61 | // https://code.spip.net/@nettoyer_raccourcis_typo |
| 62 | +/** |
|
| 63 | + * @param string $texte |
|
| 64 | + */ |
|
| 59 | 65 | function nettoyer_raccourcis_typo($texte, $connect = '') { |
| 60 | 66 | return $texte; |
| 61 | 67 | } |
@@ -96,6 +102,9 @@ discard block |
||
| 96 | 102 | // 'url': seulement U (i.e. generer_url_RACCOURCI) |
| 97 | 103 | |
| 98 | 104 | // https://code.spip.net/@calculer_url |
| 105 | +/** |
|
| 106 | + * @return string |
|
| 107 | + */ |
|
| 99 | 108 | function calculer_url($ref, $texte = '', $pour = 'url', $connect = '', $echappe_typo = true) { |
| 100 | 109 | $r = traiter_lien_implicite($ref, $texte, $pour, $connect, $echappe_typo); |
| 101 | 110 | |
@@ -256,7 +265,7 @@ discard block |
||
| 256 | 265 | * @param int $id Identifiant de l'objet |
| 257 | 266 | * @param string $type Type d'objet |
| 258 | 267 | * @param string|null $connect Connecteur SQL utilisé |
| 259 | - * @return array { |
|
| 268 | + * @return string { |
|
| 260 | 269 | * @var string $titre Titre si présent, sinon '' |
| 261 | 270 | * @var string $lang Langue si présente, sinon '' |
| 262 | 271 | * } |
@@ -302,6 +311,9 @@ discard block |
||
| 302 | 311 | define('_RACCOURCI_MODELE_DEBUT', '@^' . _RACCOURCI_MODELE . '@isS'); |
| 303 | 312 | |
| 304 | 313 | // https://code.spip.net/@traiter_modeles |
| 314 | +/** |
|
| 315 | + * @return string |
|
| 316 | + */ |
|
| 305 | 317 | function traiter_modeles($texte, $doublons = false, $echap = '', $connect = '', $liens = null, $env = array()) { |
| 306 | 318 | // preserver la compatibilite : true = recherche des documents |
| 307 | 319 | if ($doublons === true) { |
@@ -21,6 +21,9 @@ |
||
| 21 | 21 | // |
| 22 | 22 | |
| 23 | 23 | // https://code.spip.net/@image_math |
| 24 | +/** |
|
| 25 | + * @param string $tex |
|
| 26 | + */ |
|
| 24 | 27 | function produire_image_math($tex) { |
| 25 | 28 | |
| 26 | 29 | switch ($GLOBALS['traiter_math']) { |
@@ -78,6 +78,9 @@ discard block |
||
| 78 | 78 | // une $source differente ; le script detecte automagiquement si ce qu'on |
| 79 | 79 | // echappe est un div ou un span |
| 80 | 80 | // https://code.spip.net/@code_echappement |
| 81 | +/** |
|
| 82 | + * @param string $mode |
|
| 83 | + */ |
|
| 81 | 84 | function code_echappement($rempl, $source = '', $no_transform = false, $mode = null) { |
| 82 | 85 | if (!strlen($rempl)) { |
| 83 | 86 | return ''; |
@@ -282,6 +285,9 @@ discard block |
||
| 282 | 285 | // Reinserer le javascript de confiance (venant des modeles) |
| 283 | 286 | |
| 284 | 287 | // https://code.spip.net/@echappe_retour_modeles |
| 288 | +/** |
|
| 289 | + * @param string $letexte |
|
| 290 | + */ |
|
| 285 | 291 | function echappe_retour_modeles($letexte, $interdire_scripts = false) { |
| 286 | 292 | $letexte = echappe_retour($letexte); |
| 287 | 293 | |
@@ -427,6 +433,9 @@ discard block |
||
| 427 | 433 | } |
| 428 | 434 | |
| 429 | 435 | |
| 436 | +/** |
|
| 437 | + * @param string $letexte |
|
| 438 | + */ |
|
| 430 | 439 | function echapper_faux_tags($letexte) { |
| 431 | 440 | if (strpos($letexte, '<') === false) { |
| 432 | 441 | return $letexte; |
@@ -248,6 +248,9 @@ |
||
| 248 | 248 | |
| 249 | 249 | |
| 250 | 250 | // https://code.spip.net/@install_premier_auteur |
| 251 | +/** |
|
| 252 | + * @param string $hidden |
|
| 253 | + */ |
|
| 251 | 254 | function install_premier_auteur($email, $login, $nom, $pass, $hidden, $auteur_obligatoire) { |
| 252 | 255 | return info_progression_etape(3, 'etape_', 'install/') . |
| 253 | 256 | info_etape( |
@@ -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; |
@@ -221,6 +228,9 @@ discard block |
||
| 221 | 228 | } |
| 222 | 229 | |
| 223 | 230 | // https://code.spip.net/@plugin_propre |
| 231 | +/** |
|
| 232 | + * @return string |
|
| 233 | + */ |
|
| 224 | 234 | function plugin_propre($texte, $module = '',$propre='propre') { |
| 225 | 235 | // retirer le retour a la racine du module, car le find_in_path se fait depuis la racine |
| 226 | 236 | if (_DIR_RACINE and strncmp($module, _DIR_RACINE, strlen(_DIR_RACINE)) == 0) { |
@@ -233,6 +243,9 @@ discard block |
||
| 233 | 243 | return $propre($texte); |
| 234 | 244 | } |
| 235 | 245 | |
| 246 | +/** |
|
| 247 | + * @return string |
|
| 248 | + */ |
|
| 236 | 249 | function plugin_typo($texte, $module = '') { |
| 237 | 250 | return plugin_propre($texte, $module, 'typo'); |
| 238 | 251 | } |