@@ -12,6 +12,9 @@ |
||
| 12 | 12 | |
| 13 | 13 | if (!defined('_ECRIRE_INC_VERSION')) return; |
| 14 | 14 | |
| 15 | +/** |
|
| 16 | + * @param integer $version_cible |
|
| 17 | + */ |
|
| 15 | 18 | function v019_pre193($version_installee, $version_cible) |
| 16 | 19 | { |
| 17 | 20 | // Syndication : ajout de l'option resume=oui/non et de la langue |
@@ -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'>" |
@@ -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)) { |
@@ -71,6 +71,9 @@ |
||
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | |
| 74 | +/** |
|
| 75 | + * @param string $nom |
|
| 76 | + */ |
|
| 74 | 77 | function phraser_logo_faux_filtres($nom) |
| 75 | 78 | { |
| 76 | 79 | switch($nom) { |
@@ -183,7 +183,7 @@ |
||
| 183 | 183 | * http://doc.spip.org/@tester_redirection |
| 184 | 184 | * |
| 185 | 185 | * @param string $fond |
| 186 | - * @param array $contexte |
|
| 186 | + * @param string $contexte |
|
| 187 | 187 | * @param string $connect |
| 188 | 188 | * @return array|bool |
| 189 | 189 | */ |
@@ -36,6 +36,9 @@ |
||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | // http://doc.spip.org/@trace_query_chrono |
| 39 | +/** |
|
| 40 | + * @param string $m2 |
|
| 41 | + */ |
|
| 39 | 42 | function trace_query_chrono($m1, $m2, $query, $result, $serveur='') |
| 40 | 43 | { |
| 41 | 44 | static $tt = 0, $nb=0; |
@@ -139,6 +139,9 @@ discard block |
||
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | // http://doc.spip.org/@analyser_dtd_comment |
| 142 | +/** |
|
| 143 | + * @param string $dtd |
|
| 144 | + */ |
|
| 142 | 145 | function analyser_dtd_comment($dtd, &$dtc, $grammaire){ |
| 143 | 146 | // ejecter les commentaires, surtout quand ils contiennent du code. |
| 144 | 147 | // Option /s car sur plusieurs lignes parfois |
@@ -149,6 +152,9 @@ discard block |
||
| 149 | 152 | } |
| 150 | 153 | |
| 151 | 154 | // http://doc.spip.org/@analyser_dtd_pi |
| 155 | +/** |
|
| 156 | + * @param string $dtd |
|
| 157 | + */ |
|
| 152 | 158 | function analyser_dtd_pi($dtd, &$dtc, $grammaire){ |
| 153 | 159 | if (!preg_match('/^<\?.*?>\s*(.*)$/s', $dtd, $m)) |
| 154 | 160 | return -10; |
@@ -156,6 +162,9 @@ discard block |
||
| 156 | 162 | } |
| 157 | 163 | |
| 158 | 164 | // http://doc.spip.org/@analyser_dtd_lexeme |
| 165 | +/** |
|
| 166 | + * @param string $dtd |
|
| 167 | + */ |
|
| 159 | 168 | function analyser_dtd_lexeme($dtd, &$dtc, $grammaire){ |
| 160 | 169 | |
| 161 | 170 | if (!preg_match(_REGEXP_ENTITY_DEF,$dtd, $m)) |
@@ -181,6 +190,9 @@ discard block |
||
| 181 | 190 | // ca ne depasse pas 3 ici. |
| 182 | 191 | |
| 183 | 192 | // http://doc.spip.org/@analyser_dtd_data |
| 193 | +/** |
|
| 194 | + * @param string $dtd |
|
| 195 | + */ |
|
| 184 | 196 | function analyser_dtd_data($dtd, &$dtc, $grammaire){ |
| 185 | 197 | |
| 186 | 198 | if (!preg_match(_REGEXP_INCLUDE_USE,$dtd,$m)) |
@@ -196,6 +208,9 @@ discard block |
||
| 196 | 208 | } |
| 197 | 209 | |
| 198 | 210 | // http://doc.spip.org/@analyser_dtd_notation |
| 211 | +/** |
|
| 212 | + * @param string $dtd |
|
| 213 | + */ |
|
| 199 | 214 | function analyser_dtd_notation($dtd, &$dtc, $grammaire){ |
| 200 | 215 | if (!preg_match('/^<!NOTATION.*?>\s*(.*)$/s',$dtd, $m)) |
| 201 | 216 | return -8; |
@@ -204,6 +219,9 @@ discard block |
||
| 204 | 219 | } |
| 205 | 220 | |
| 206 | 221 | // http://doc.spip.org/@analyser_dtd_entity |
| 222 | +/** |
|
| 223 | + * @param string $dtd |
|
| 224 | + */ |
|
| 207 | 225 | function analyser_dtd_entity($dtd, &$dtc, $grammaire) |
| 208 | 226 | { |
| 209 | 227 | if (!preg_match(_REGEXP_ENTITY_DECL, $dtd, $m)) |
@@ -253,6 +271,9 @@ discard block |
||
| 253 | 271 | // Fin du controle en finElement |
| 254 | 272 | |
| 255 | 273 | // http://doc.spip.org/@analyser_dtd_element |
| 274 | +/** |
|
| 275 | + * @param string $dtd |
|
| 276 | + */ |
|
| 256 | 277 | function analyser_dtd_element($dtd, &$dtc, $grammaire) |
| 257 | 278 | { |
| 258 | 279 | if (!preg_match('/^<!ELEMENT\s+([^>\s]+)([^>]*)>\s*(.*)$/s', $dtd, $m)) |
@@ -295,6 +316,9 @@ discard block |
||
| 295 | 316 | |
| 296 | 317 | |
| 297 | 318 | // http://doc.spip.org/@analyser_dtd_attlist |
| 319 | +/** |
|
| 320 | + * @param string $dtd |
|
| 321 | + */ |
|
| 298 | 322 | function analyser_dtd_attlist($dtd, &$dtc, $grammaire) |
| 299 | 323 | { |
| 300 | 324 | if (!preg_match('/^<!ATTLIST\s+(\S+)\s+([^>]*)>\s*(.*)/s', $dtd, $m)) |
@@ -14,6 +14,9 @@ |
||
| 14 | 14 | |
| 15 | 15 | include_spip('base/abstract_sql'); |
| 16 | 16 | |
| 17 | +/** |
|
| 18 | + * @param string $cible |
|
| 19 | + */ |
|
| 17 | 20 | function is_url_prive($cible){ |
| 18 | 21 | include_spip('inc/filtres_mini'); |
| 19 | 22 | $path = parse_url(tester_url_absolue($cible)?$cible:url_absolue($cible)); |