Changeset 93092 in spip-zone
- Timestamp:
- Nov 22, 2015, 5:10:37 PM (5 years ago)
- Location:
- _core_/plugins
- Files:
-
- 186 edited
Legend:
- Unmodified
- Added
- Removed
-
_core_/plugins/breves/action/editer_breve.php
r91593 r93092 31 31 * Liste : identifiant de la brève, texte d'erreur éventuel 32 32 **/ 33 function action_editer_breve_dist($arg =null) {33 function action_editer_breve_dist($arg = null) { 34 34 35 35 if (is_null($arg)){ … … 64 64 * Identifiant de la nouvelle brève. 65 65 */ 66 function breve_inserer($id_rubrique, $set =null) {66 function breve_inserer($id_rubrique, $set = null) { 67 67 68 68 include_spip('inc/rubriques'); … … 127 127 * Chaîne contenant un texte d'erreur sinon. 128 128 */ 129 function breve_modifier ($id_breve, $set =null) {129 function breve_modifier ($id_breve, $set = null) { 130 130 131 131 include_spip('inc/modifier'); … … 305 305 * Chaîne contenant un texte d'erreur sinon. 306 306 */ 307 function revisions_breves ($id_breve, $set =false) {307 function revisions_breves ($id_breve, $set = false) { 308 308 return breve_modifier($id_breve,$set); 309 309 } -
_core_/plugins/breves/breves_administrations.php
r89285 r93092 28 28 * Version du schéma de données dans ce plugin (déclaré dans paquet.xml) 29 29 */ 30 function breves_upgrade($nom_meta_base_version, $version_cible){30 function breves_upgrade($nom_meta_base_version, $version_cible){ 31 31 // cas particulier : 32 32 // si plugin pas installe mais que la table existe -
_core_/plugins/breves/breves_autoriser.php
r89285 r93092 35 35 * @return bool true s'il a le droit, false sinon 36 36 */ 37 function autoriser_breves_menu_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){37 function autoriser_breves_menu_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 38 38 return ($GLOBALS['meta']["activer_breves"] != "non"); 39 39 } -
_core_/plugins/breves/formulaires/editer_breve.php
r89285 r93092 43 43 * Environnement du formulaire 44 44 **/ 45 function formulaires_editer_breve_charger_dist($id_breve ='new', $id_rubrique=0, $retour='', $lier_trad=0, $config_fonc='breves_edit_config', $row=array(), $hidden=''){45 function formulaires_editer_breve_charger_dist($id_breve = 'new', $id_rubrique = 0, $retour = '', $lier_trad = 0, $config_fonc = 'breves_edit_config', $row = array(), $hidden = ''){ 46 46 $valeurs = formulaires_editer_objet_charger('breve',$id_breve,$id_rubrique,$lier_trad,$retour,$config_fonc,$row,$hidden); 47 47 // un bug a permis a un moment que des breves soient dans des sous rubriques … … 74 74 * Hash du formulaire 75 75 **/ 76 function formulaires_editer_breve_identifier_dist($id_breve ='new', $id_rubrique=0, $retour='', $lier_trad=0, $config_fonc='breves_edit_config', $row=array(), $hidden=''){76 function formulaires_editer_breve_identifier_dist($id_breve = 'new', $id_rubrique = 0, $retour = '', $lier_trad = 0, $config_fonc = 'breves_edit_config', $row = array(), $hidden = ''){ 77 77 return serialize(array(intval($id_breve),$lier_trad)); 78 78 } … … 121 121 * Tableau des erreurs 122 122 */ 123 function formulaires_editer_breve_verifier_dist($id_breve ='new', $id_rubrique=0, $retour='', $lier_trad=0, $config_fonc='breves_edit_config', $row=array(), $hidden=''){123 function formulaires_editer_breve_verifier_dist($id_breve = 'new', $id_rubrique = 0, $retour = '', $lier_trad = 0, $config_fonc = 'breves_edit_config', $row = array(), $hidden = ''){ 124 124 // auto-renseigner le titre si il n'existe pas 125 125 titre_automatique('titre',array('texte')); … … 151 151 * Tableau des erreurs 152 152 */ 153 function formulaires_editer_breve_traiter_dist($id_breve ='new', $id_rubrique=0, $retour='', $lier_trad=0, $config_fonc='breves_edit_config', $row=array(), $hidden=''){153 function formulaires_editer_breve_traiter_dist($id_breve = 'new', $id_rubrique = 0, $retour = '', $lier_trad = 0, $config_fonc = 'breves_edit_config', $row = array(), $hidden = ''){ 154 154 return formulaires_editer_objet_traiter('breve',$id_breve,$id_rubrique,$lier_trad,$retour,$config_fonc,$row,$hidden); 155 155 } -
_core_/plugins/compresseur/compresseur_fonctions.php
r89285 r93092 146 146 * URL du fichier sinon (la source) 147 147 */ 148 function filtre_embarque_fichier ($src, $base ="", $maxsize = 4096) {148 function filtre_embarque_fichier ($src, $base = "", $maxsize = 4096) { 149 149 static $mime = array(); 150 150 $extension = substr(strrchr($src,'.'),1); -
_core_/plugins/compresseur/inc/compresseur.php
r90461 r93092 72 72 * Code HTML de la balise <link> 73 73 */ 74 function compresseur_ecrire_balise_css_dist(&$flux, $pos, $src, $comments = "", $media =""){74 function compresseur_ecrire_balise_css_dist(&$flux, $pos, $src, $comments = "", $media = ""){ 75 75 $src = timestamp($src); 76 76 $comments .= "<link rel='stylesheet'".($media?" media='$media'":"")." href='$src' type='text/css' />"; … … 143 143 * Contenu compressé du <head> de la page html 144 144 */ 145 function compacte_head_files($flux, $format) {145 function compacte_head_files($flux, $format) { 146 146 $url_base = url_de_base(); 147 147 $url_page = substr(generer_url_public('A'), 0, -1); … … 236 236 * @return bool|int|null|string 237 237 */ 238 function &compresseur_callback_prepare_css(&$css, $is_inline = false, $fonctions =null) {238 function &compresseur_callback_prepare_css(&$css, $is_inline = false, $fonctions = null) { 239 239 if ($is_inline) return compresseur_callback_prepare_css_inline($css,$is_inline); 240 240 if (!preg_match(',\.css$,i', $css, $r)) return $css; … … 287 287 * @return string 288 288 */ 289 function &compresseur_callback_prepare_css_inline(&$contenu, $url_base, $fonctions =null) {289 function &compresseur_callback_prepare_css_inline(&$contenu, $url_base, $fonctions = null) { 290 290 if (!$fonctions) $fonctions = compresseur_liste_fonctions_prepare_css(); 291 291 elseif (is_string($fonctions)) $fonctions = array($fonctions); -
_core_/plugins/compresseur/inc/compresseur_concatener.php
r89285 r93092 42 42 * Tableau a 2 entrées retournant le nom du fichier et des commentaires HTML à insérer dans la page initiale 43 43 */ 44 function concatener_fichiers($files, $format='js', $callbacks = array()){44 function concatener_fichiers($files, $format = 'js', $callbacks = array()){ 45 45 $nom = ""; 46 46 if (!is_array($files) && $files) $files = array($files); … … 179 179 * 180 180 */ 181 function &array_replace_key($tableau, $orig_key,$new_key,$new_value=null){181 function &array_replace_key($tableau, $orig_key, $new_key, $new_value = null){ 182 182 $t = array(); 183 183 foreach($tableau as $k=>$v) { -
_core_/plugins/compresseur/inc/compresseur_minifier.php
r89285 r93092 42 42 * Contenu CSS minifié 43 43 */ 44 function minifier_css ($contenu, $options ='') {44 function minifier_css ($contenu, $options = '') { 45 45 if (is_string($options) AND $options){ 46 46 if ($options=="all") // facile : media all => ne rien preciser … … 207 207 * Contenu JS compressé 208 208 */ 209 function minifier_encore_js($content, $file=false) {209 function minifier_encore_js($content, $file = false) { 210 210 # Closure Compiler n'accepte pas des POST plus gros que 200 000 octets 211 211 # au-dela il faut stocker dans un fichier, et envoyer l'url du fichier -
_core_/plugins/compresseur/lib/csstidy/class.csstidy.php
r85646 r93092 382 382 * @version 1.0 383 383 */ 384 public function set_cfg($setting, $value =null) {384 public function set_cfg($setting, $value = null) { 385 385 if (is_array($setting) && $value === null) { 386 386 foreach ($setting as $setprop => $setval) { … … 489 489 * @version 1.4 490 490 */ 491 public function write_page($filename, $doctype ='xhtml1.1', $externalcss=true, $title='', $lang='en') {491 public function write_page($filename, $doctype = 'xhtml1.1', $externalcss = true, $title = '', $lang = 'en') { 492 492 $this->write($filename, true); 493 493 } … … 505 505 * @version 1.4 506 506 */ 507 public function write($filename, $formatted =false, $doctype='xhtml1.1', $externalcss=true, $title='', $lang='en', $pre_code=true) {507 public function write($filename, $formatted = false, $doctype = 'xhtml1.1', $externalcss = true, $title = '', $lang = 'en', $pre_code = true) { 508 508 $filename .= ( $formatted) ? '.xhtml' : '.css'; 509 509 … … 534 534 * @see http://csstidy.sourceforge.net/templates.php 535 535 */ 536 public function load_template($content, $from_file =true) {536 public function load_template($content, $from_file = true) { 537 537 $predefined_templates = & $this->data['csstidy']['predefined_templates']; 538 538 if ($content === 'high_compression' || $content === 'default' || $content === 'highest_compression' || $content === 'low_compression') { … … 1105 1105 * @return string 1106 1106 */ 1107 public function css_new_selector($media, $selector) {1107 public function css_new_selector($media, $selector) { 1108 1108 if ($this->get_cfg('preserve_css')) { 1109 1109 return $selector; -
_core_/plugins/compresseur/lib/csstidy/class.csstidy_print.php
r81333 r93092 100 100 * @version 1.0 101 101 */ 102 public function plain($default_media ='') {102 public function plain($default_media = '') { 103 103 $this->_print(true, $default_media); 104 104 return $this->output_css_plain; … … 112 112 * @version 1.0 113 113 */ 114 public function formatted($default_media ='') {114 public function formatted($default_media = '') { 115 115 $this->_print(false, $default_media); 116 116 return $this->output_css; … … 127 127 * @version 1.4 128 128 */ 129 public function formatted_page($doctype ='html5', $externalcss=true, $title='', $lang='en') {129 public function formatted_page($doctype = 'html5', $externalcss = true, $title = '', $lang = 'en') { 130 130 switch ($doctype) { 131 131 case 'html5': … … 171 171 * @version 2.0 172 172 */ 173 public function _print($plain = false, $default_media ='') {173 public function _print($plain = false, $default_media = '') { 174 174 if ($this->output_css && $this->output_css_plain) { 175 175 return; … … 307 307 * @version 1.0 308 308 */ 309 public function _convert_raw_css($default_media ='') {309 public function _convert_raw_css($default_media = '') { 310 310 $this->tokens = array(); 311 311 $sort_selectors = $this->parser->get_cfg('sort_selectors'); -
_core_/plugins/compresseur/tests/compacte_css.php
r85642 r93092 83 83 echo "OK"; 84 84 85 function erreur($titre, $result,$expected){85 function erreur($titre, $result, $expected){ 86 86 echo "Erreur $titre<br />"; 87 87 echo "<tt>Resultat:</tt><pre>$result</pre>"; -
_core_/plugins/dump/action/restaurer.php
r89285 r93092 32 32 * @param string $arg 33 33 */ 34 function action_restaurer_dist($arg =null){34 function action_restaurer_dist($arg = null){ 35 35 if (!$arg) { 36 36 $securiser_action = charger_fonction('securiser_action', 'inc'); -
_core_/plugins/dump/action/sauvegarder.php
r89285 r93092 32 32 * @param string $arg 33 33 */ 34 function action_sauvegarder_dist($arg =null){34 function action_sauvegarder_dist($arg = null){ 35 35 if (!$arg) { 36 36 $securiser_action = charger_fonction('securiser_action', 'inc'); -
_core_/plugins/dump/action/supprimer_dump.php
r89285 r93092 21 21 * @param string $arg 22 22 */ 23 function action_supprimer_dump_dist($arg =null){23 function action_supprimer_dump_dist($arg = null){ 24 24 if (!$arg){ 25 25 $securiser_action = charger_fonction('securiser_action', 'inc'); -
_core_/plugins/dump/action/telecharger_dump.php
r89285 r93092 21 21 * @param string $arg 22 22 */ 23 function action_telecharger_dump_dist($arg =null){23 function action_telecharger_dump_dist($arg = null){ 24 24 if (!$arg) { 25 25 $securiser_action = charger_fonction('securiser_action', 'inc'); -
_core_/plugins/dump/base/restaurer.php
r89285 r93092 22 22 * @param bool $reprise true s'il s'agit d'une reprise de sauvegarde 23 23 */ 24 function base_restaurer_dist($titre ='', $reprise=false) {24 function base_restaurer_dist($titre = '', $reprise = false) { 25 25 $status_file = _DUMP_STATUS_FILE; 26 26 $status_file = _DIR_TMP.basename($status_file).".txt"; -
_core_/plugins/dump/inc/dump.php
r89285 r93092 49 49 * @return string 50 50 */ 51 function dump_nom_fichier($dir, $extension='sqlite'){51 function dump_nom_fichier($dir, $extension = 'sqlite'){ 52 52 include_spip('inc/texte'); 53 53 $site = 'spip'; … … 98 98 * @return array 99 99 */ 100 function dump_serveur($args =null) {100 function dump_serveur($args = null) { 101 101 static $connect_args = null; 102 102 if ($args) … … 122 122 * @return bool/string 123 123 */ 124 function dump_init($status_file, $archive, $tables =null, $where=array(),$action='sauvegarde'){124 function dump_init($status_file, $archive, $tables = null, $where = array(), $action = 'sauvegarde'){ 125 125 $status_file = _DIR_TMP.basename($status_file).".txt"; 126 126 … … 164 164 * @param <type> $table Nom de la table 165 165 */ 166 function dump_afficher_progres($courant, $total,$table) {166 function dump_afficher_progres($courant, $total, $table) { 167 167 static $etape = 1; 168 168 if (unique($table)) { … … 203 203 * - 'auvegarder : stocker dans le dump la structure de la base source 204 204 */ 205 function dump_end($status_file, $action =''){205 function dump_end($status_file, $action = ''){ 206 206 $status_file = _DIR_TMP.basename($status_file).".txt"; 207 207 if (!lire_fichier($status_file, $status) … … 245 245 * @return array 246 246 */ 247 function dump_lister_sauvegardes($dir, $tri='nom',$extension="sqlite",$limit = 100) {247 function dump_lister_sauvegardes($dir, $tri = 'nom', $extension = "sqlite", $limit = 100) { 248 248 $liste_dump = preg_files($dir,'\.'.$extension.'$',$limit,false); 249 249 -
_core_/plugins/dump/inc/sauvegarder.php
r89285 r93092 23 23 * @return bool 24 24 */ 25 function inc_sauvegarder_dist($status_file, $redirect ='') {25 function inc_sauvegarder_dist($status_file, $redirect = '') { 26 26 $status_file = _DIR_TMP.basename($status_file).".txt"; 27 27 if (!lire_fichier($status_file, $status) -
_core_/plugins/filtres_images/filtres/couleurs.php
r89285 r93092 22 22 23 23 // http://code.spip.net/@couleur_extraire 24 function couleur_extraire ($img, $x =10, $y=6) {24 function couleur_extraire ($img, $x = 10, $y = 6) { 25 25 include_spip('filtres/images_lib'); 26 26 return _image_couleur_extraire($img, $x, $y); … … 50 50 51 51 // http://code.spip.net/@couleur_extreme 52 function couleur_extreme ($couleur, $limite =0.5) {52 function couleur_extreme ($couleur, $limite = 0.5) { 53 53 // force la couleur au noir ou au blanc le plus proche 54 54 // -> donc couleur foncee devient noire … … 91 91 92 92 // http://code.spip.net/@couleur_foncer_si_claire 93 function couleur_foncer_si_claire ($couleur, $seuil =122) {93 function couleur_foncer_si_claire ($couleur, $seuil = 122) { 94 94 // ne foncer que les couleurs claires 95 95 // utile pour ecrire sur fond blanc, … … 110 110 111 111 // http://code.spip.net/@couleur_eclaircir_si_foncee 112 function couleur_eclaircir_si_foncee ($couleur, $seuil =123) {112 function couleur_eclaircir_si_foncee ($couleur, $seuil = 123) { 113 113 $couleurs = _couleur_hex_to_dec($couleur); 114 114 $red = $couleurs["red"]; -
_core_/plugins/filtres_images/filtres/images_lib.php
r89285 r93092 29 29 * @return array 30 30 */ 31 function _couleur_rgb2hsv ($R, $G,$B) {31 function _couleur_rgb2hsv ($R, $G, $B) { 32 32 $var_R = ( $R / 255 ) ; //Where RGB values = 0 ÷ 255 33 33 $var_G = ( $G / 255 ); … … 79 79 * @return array 80 80 */ 81 function _couleur_hsv2rgb ($H, $S,$V) {81 function _couleur_hsv2rgb ($H, $S, $V) { 82 82 83 83 if ( $S == 0 ) //HSV values = 0 ÷ 1 … … 126 126 * @return array 127 127 */ 128 function _couleur_rgb2hsl ($R, $G,$B) {128 function _couleur_rgb2hsl ($R, $G, $B) { 129 129 $var_R = ( $R / 255 ) ; //Where RGB values = 0 ÷ 255 130 130 $var_G = ( $G / 255 ); … … 194 194 * @return array 195 195 */ 196 function _couleur_hsl2rgb ($H, $S,$L) {196 function _couleur_hsl2rgb ($H, $S, $L) { 197 197 198 198 if ( $S == 0 ) //HSV values = 0 -> 1 … … 227 227 // http://code.spip.net/@image_couleur_extraire 228 228 229 function _image_couleur_extraire($img, $x =10, $y=6) {229 function _image_couleur_extraire($img, $x = 10, $y = 6) { 230 230 static $couleur_extraite = array(); 231 231 -
_core_/plugins/filtres_images/filtres/images_transforme.php
r89285 r93092 34 34 // 3/ $transparence a "true" permet de conserver la transparence (utile pour conversion GIF) 35 35 // http://code.spip.net/@image_aplatir 36 function image_aplatir($im, $format ='jpg', $coul='000000', $qualite=NULL, $transparence=false)36 function image_aplatir($im, $format = 'jpg', $coul = '000000', $qualite = NULL, $transparence = false) 37 37 { 38 38 if ($qualite===NULL){ … … 171 171 // utilise [->@image_aplatir] 172 172 // http://code.spip.net/@image_format 173 function image_format($img, $format ='png') {173 function image_format($img, $format = 'png') { 174 174 $qualite = null; 175 175 if ($format=='png8') {$format='png';$qualite=128;} … … 260 260 * balise image recadree 261 261 */ 262 function image_recadre($im, $width,$height,$position='center', $background_color='white')262 function image_recadre($im, $width, $height, $position = 'center', $background_color = 'white') 263 263 { 264 264 $fonction = array('image_recadre', func_get_args()); … … 538 538 539 539 // http://code.spip.net/@image_masque 540 function image_masque($im, $masque, $pos ="") {540 function image_masque($im, $masque, $pos = "") { 541 541 // Passer, en plus de l'image d'origine, 542 542 // une image de "masque": un fichier PNG24 transparent. … … 1010 1010 1011 1011 // http://code.spip.net/@image_flou 1012 function image_flou($im, $niveau=3)1012 function image_flou($im, $niveau = 3) 1013 1013 { 1014 1014 // Il s'agit d'une modification du script blur qu'on trouve un peu partout: … … 1138 1138 1139 1139 // http://code.spip.net/@image_RotateBicubic 1140 function image_RotateBicubic($src_img, $angle, $bicubic =0) {1140 function image_RotateBicubic($src_img, $angle, $bicubic = 0) { 1141 1141 include_spip('filtres/images_lib'); 1142 1142 … … 1317 1317 // la fonction "crop" n'est pas implementee... 1318 1318 // http://code.spip.net/@image_rotation 1319 function image_rotation($im, $angle, $crop =false)1319 function image_rotation($im, $angle, $crop = false) 1320 1320 { 1321 1321 $fonction = array('image_rotation', func_get_args()); … … 1553 1553 * @return string Code HTML de l'image 1554 1554 **/ 1555 function image_renforcement($im, $k =0.5)1555 function image_renforcement($im, $k = 0.5) 1556 1556 { 1557 1557 $fonction = array('image_flou', func_get_args()); … … 1642 1642 * @return mixed|null|string 1643 1643 */ 1644 function image_fond_transparent($im, $background_color, $tolerance =12, $alpha = 127, $coeff_lissage=7)1644 function image_fond_transparent($im, $background_color, $tolerance = 12, $alpha = 127, $coeff_lissage = 7) 1645 1645 { 1646 1646 $fonction = array('image_fond_transparent', func_get_args()); -
_core_/plugins/filtres_images/filtres/images_typo.php
r93068 r93092 397 397 398 398 // http://code.spip.net/@printWordWrapped 399 function printWordWrapped($image, $top, $left, $maxWidth, $font, $couleur, $text, $textSize, $align ="left", $hauteur_ligne = 0) {399 function printWordWrapped($image, $top, $left, $maxWidth, $font, $couleur, $text, $textSize, $align = "left", $hauteur_ligne = 0) { 400 400 static $memps = array(); 401 401 $fontps = false; -
_core_/plugins/filtres_images/images_fonctions.php
r89285 r93092 77 77 * @return string 78 78 */ 79 function extraire_image_couleur($img, $x =10, $y=6) {79 function extraire_image_couleur($img, $x = 10, $y = 6) { 80 80 include_spip('filtres/images_lib'); 81 81 return _image_couleur_extraire($img, $x, $y); -
_core_/plugins/filtres_images/inc/filtres_images_compat.php
r89285 r93092 20 20 function couleur_dec_to_hex($red, $green, $blue) {include_spip('filtres/images_lib');return _couleur_dec_to_hex($red, $green, $blue);} 21 21 function couleur_hex_to_dec($couleur) {include_spip('filtres/images_lib');return _couleur_hex_to_dec($couleur);} 22 function couleur_rgb2hsv($R, $G,$B) {include_spip('filtres/images_lib');return _couleur_rgb2hsv($R,$G,$B);}23 function couleur_hsv2rgb($H, $S,$V) {include_spip('filtres/images_lib');return _couleur_hsv2rgb($H,$S,$V);}24 function couleur_rgb2hsl($R, $G,$B) {include_spip('filtres/images_lib');return _couleur_rgb2hsl($R,$G,$B);}25 function couleur_hsl2rgb($H, $S,$L) {include_spip('filtres/images_lib');return _couleur_hsl2rgb($H,$S,$L);}26 function image_couleur_extraire($img, $x =10, $y=6) {include_spip('filtres/images_lib');return _image_couleur_extraire($img, $x, $y);}22 function couleur_rgb2hsv($R, $G, $B) {include_spip('filtres/images_lib');return _couleur_rgb2hsv($R, $G, $B);} 23 function couleur_hsv2rgb($H, $S, $V) {include_spip('filtres/images_lib');return _couleur_hsv2rgb($H, $S, $V);} 24 function couleur_rgb2hsl($R, $G, $B) {include_spip('filtres/images_lib');return _couleur_rgb2hsl($R, $G, $B);} 25 function couleur_hsl2rgb($H, $S, $L) {include_spip('filtres/images_lib');return _couleur_hsl2rgb($H, $S, $L);} 26 function image_couleur_extraire($img, $x = 10, $y = 6) {include_spip('filtres/images_lib');return _image_couleur_extraire($img, $x, $y);} 27 27 function image_distance_pixel($xo, $yo, $x0, $y0) {include_spip('filtres/images_lib');return _image_distance_pixel($xo, $yo, $x0, $y0);} 28 28 function image_decal_couleur($coul, $gamma) {include_spip('filtres/images_lib');return _image_decale_composante($coul, $gamma);} 29 29 function image_decal_couleur_127($coul, $val) {include_spip('filtres/images_lib');return _image_decale_composante_127 ($coul, $val);} 30 30 31 function image_creer_vignette($valeurs, $maxWidth, $maxHeight, $process ='AUTO', $force=false, $test_cache_only = false) {include_spip('inc/filtres_images_lib'); return _image_creer_vignette($valeurs, $maxWidth, $maxHeight, $process, $force, $test_cache_only);}32 function image_ecrire_tag($valeurs, $surcharge){include_spip('inc/filtres_images_lib'); return _image_ecrire_tag($valeurs,$surcharge);}33 function image_gd_output($img, $valeurs, $qualite=_IMG_GD_QUALITE){include_spip('inc/filtres_images_lib'); return _image_gd_output($img,$valeurs, $qualite);}34 function image_imagepng($img, $fichier) {include_spip('inc/filtres_images_lib'); return _image_imagepng($img,$fichier);}35 function image_imagegif($img, $fichier) {include_spip('inc/filtres_images_lib'); return _image_imagegif($img,$fichier);}36 function image_imagejpg($img, $fichier,$qualite=_IMG_GD_QUALITE) {include_spip('inc/filtres_images_lib'); return image_imagejpg($img,$fichier,$qualite=_IMG_GD_QUALITE);}31 function image_creer_vignette($valeurs, $maxWidth, $maxHeight, $process = 'AUTO', $force = false, $test_cache_only = false) {include_spip('inc/filtres_images_lib'); return _image_creer_vignette($valeurs, $maxWidth, $maxHeight, $process, $force, $test_cache_only);} 32 function image_ecrire_tag($valeurs, $surcharge){include_spip('inc/filtres_images_lib'); return _image_ecrire_tag($valeurs, $surcharge);} 33 function image_gd_output($img, $valeurs, $qualite = _IMG_GD_QUALITE){include_spip('inc/filtres_images_lib'); return _image_gd_output($img, $valeurs, $qualite);} 34 function image_imagepng($img, $fichier) {include_spip('inc/filtres_images_lib'); return _image_imagepng($img, $fichier);} 35 function image_imagegif($img, $fichier) {include_spip('inc/filtres_images_lib'); return _image_imagegif($img, $fichier);} 36 function image_imagejpg($img, $fichier, $qualite = _IMG_GD_QUALITE) {include_spip('inc/filtres_images_lib'); return image_imagejpg($img, $fichier, $qualite = _IMG_GD_QUALITE);} 37 37 function image_imageico($img, $fichier) {include_spip('inc/filtres_images_lib'); return _image_imageico($img, $fichier);} 38 38 function image_ratio ($srcWidth, $srcHeight, $maxWidth, $maxHeight) {include_spip('inc/filtres_images_lib');return _image_ratio ($srcWidth, $srcHeight, $maxWidth, $maxHeight);} 39 function image_tag_changer_taille($tag, $width,$height,$style=false){include_spip('inc/filtres_images_lib');return _image_tag_changer_taille($tag,$width,$height,$style);}39 function image_tag_changer_taille($tag, $width, $height, $style = false){include_spip('inc/filtres_images_lib');return _image_tag_changer_taille($tag, $width, $height, $style);} 40 40 function image_valeurs_trans($img, $effet, $forcer_format = false, $fonction_creation = NULL) {include_spip('inc/filtres_images_lib'); return _image_valeurs_trans($img, $effet, $forcer_format, $fonction_creation);} 41 41 -
_core_/plugins/forum/action/editer_forum.php
r89344 r93092 18 18 // http://code.spip.net/@revision_forum 19 19 if(!function_exists('revision_forum')){ 20 function revision_forum($id_forum, $c =false) {20 function revision_forum($id_forum, $c = false) { 21 21 22 22 $t = sql_fetsel("*", "spip_forum", "id_forum=".intval($id_forum)); -
_core_/plugins/forum/action/instituer_forum.php
r88959 r93092 14 14 15 15 // http://code.spip.net/@action_instituer_forum_dist 16 function action_instituer_forum_dist($arg =null) {16 function action_instituer_forum_dist($arg = null) { 17 17 18 18 if (is_null($arg)){ … … 29 29 } 30 30 31 function instituer_un_forum($statut, $row){31 function instituer_un_forum($statut, $row){ 32 32 33 33 $id_forum = $row['id_forum']; -
_core_/plugins/forum/action/instituer_lot_forum.php
r88959 r93092 14 14 15 15 // http://code.spip.net/@action_instituer_forum_dist 16 function action_instituer_lot_forum_dist($arg =null) {16 function action_instituer_lot_forum_dist($arg = null) { 17 17 18 18 if (is_null($arg)){ -
_core_/plugins/forum/balise/formulaire_forum.php
r81006 r93092 152 152 * @return array|bool 153 153 */ 154 function balise_forum_retrouve_objet($ido, $id_forum,$args,$context_compil, $objet_obligatoire = true){154 function balise_forum_retrouve_objet($ido, $id_forum, $args, $context_compil, $objet_obligatoire = true){ 155 155 $_objet = $context_compil[5]; // type le la boucle deja calcule 156 156 $nb_ids_env = $context_compil[6]; // nombre d'elements id_xx recuperes -
_core_/plugins/forum/formulaires/activer_forums_objet.php
r79783 r93092 27 27 * true si les forums publics sont autorisés, false sinon 28 28 **/ 29 function get_forums_publics($id_objet =0, $objet='article') {29 function get_forums_publics($id_objet = 0, $objet = 'article') { 30 30 31 31 if ($objet=='article' AND $id_objet) { … … 47 47 * Contexte du squelette du formulaire 48 48 */ 49 function formulaires_activer_forums_objet_charger_dist($id_objet, $objet ='article'){49 function formulaires_activer_forums_objet_charger_dist($id_objet, $objet = 'article'){ 50 50 if (!autoriser('modererforum', $objet, $id_objet)) 51 51 return false; … … 76 76 * Retours des traitements 77 77 */ 78 function formulaires_activer_forums_objet_traiter_dist($id_objet, $objet ='article'){78 function formulaires_activer_forums_objet_traiter_dist($id_objet, $objet = 'article'){ 79 79 include_spip('inc/autoriser'); 80 80 if ($objet=='article' AND autoriser('modererforum', $objet, $id_objet)){ -
_core_/plugins/forum/formulaires/forum.php
r90726 r93092 26 26 * @return array 27 27 */ 28 function formulaires_forum_identifier_dist($objet, $id_objet, $id_forum, $ajouter_mot, $ajouter_groupe, $afficher_previsu, $retour){28 function formulaires_forum_identifier_dist($objet, $id_objet, $id_forum, $ajouter_mot, $ajouter_groupe, $afficher_previsu, $retour){ 29 29 return array($objet, $id_objet, $id_forum,$ajouter_mot, $ajouter_groupe); 30 30 } … … 46 46 * @return array|bool 47 47 */ 48 function formulaires_forum_charger_dist($objet, $id_objet, $id_forum, 48 function formulaires_forum_charger_dist($objet, $id_objet, $id_forum, 49 49 $ajouter_mot, $ajouter_groupe, $forcer_previsu, $retour){ 50 50 … … 208 208 * @return array|bool 209 209 */ 210 function formulaires_forum_verifier_dist($objet, $id_objet, $id_forum, 210 function formulaires_forum_verifier_dist($objet, $id_objet, $id_forum, 211 211 $ajouter_mot, $ajouter_groupe, $forcer_previsu, $retour){ 212 212 include_spip('inc/acces'); … … 389 389 * @return string 390 390 */ 391 function inclure_previsu($texte, $titre, $url_site, $nom_site, $ajouter_mot, $doc, 391 function inclure_previsu($texte, $titre, $url_site, $nom_site, $ajouter_mot, $doc, 392 392 $objet, $id_objet, $id_forum){ 393 393 global $table_des_traitements; … … 455 455 * @return array|bool 456 456 */ 457 function formulaires_forum_traiter_dist($objet, $id_objet, $id_forum, 457 function formulaires_forum_traiter_dist($objet, $id_objet, $id_forum, 458 458 $ajouter_mot, $ajouter_groupe, $forcer_previsu, $retour){ 459 459 -
_core_/plugins/forum/formulaires/forum_prive.php
r92554 r93092 28 28 } 29 29 30 function formulaires_forum_prive_charger_dist($objet, $id_objet, $id_forum, $forcer_previsu, $statut, $retour ='') {30 function formulaires_forum_prive_charger_dist($objet, $id_objet, $id_forum, $forcer_previsu, $statut, $retour = '') { 31 31 32 32 if (!function_exists($f='forum_recuperer_titre')) … … 82 82 83 83 84 function formulaires_forum_prive_verifier_dist($objet, $id_objet, $id_forum, $forcer_previsu, $statut, $retour ='') {84 function formulaires_forum_prive_verifier_dist($objet, $id_objet, $id_forum, $forcer_previsu, $statut, $retour = '') { 85 85 include_spip('inc/acces'); 86 86 include_spip('inc/texte'); … … 124 124 125 125 126 function inclure_forum_prive_previsu($texte, $titre, $url_site, $nom_site, $ajouter_mot, $doc=""){126 function inclure_forum_prive_previsu($texte, $titre, $url_site, $nom_site, $ajouter_mot, $doc = ""){ 127 127 $bouton = _T('forum:forum_message_definitif'); 128 128 include_spip('public/assembler'); … … 151 151 152 152 153 function formulaires_forum_prive_traiter_dist($objet, $id_objet, $id_forum, $forcer_previsu, $statut, $retour ='') {153 function formulaires_forum_prive_traiter_dist($objet, $id_objet, $id_forum, $forcer_previsu, $statut, $retour = '') { 154 154 155 155 $forum_insert = charger_fonction('forum_insert', 'inc'); -
_core_/plugins/forum/forum_administrations.php
r85372 r93092 25 25 * @param string $version_cible 26 26 */ 27 function forum_upgrade($nom_meta_base_version, $version_cible){27 function forum_upgrade($nom_meta_base_version, $version_cible){ 28 28 29 29 // cas particulier : -
_core_/plugins/forum/forum_autoriser.php
r90059 r93092 34 34 * @return bool true s'il a le droit, false sinon 35 35 **/ 36 function autoriser_foruminternesuivi_menu_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){36 function autoriser_foruminternesuivi_menu_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 37 37 if ((($GLOBALS['meta']['forum_prive'] == 'non') && ($GLOBALS['meta']['forum_prive_admin'] == 'non')) 38 38 OR (($GLOBALS['meta']['forum_prive'] == 'non') && ($qui['statut'] == '1comite'))) … … 51 51 * @return bool true s'il a le droit, false sinon 52 52 **/ 53 function autoriser_forumreactions_menu_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){53 function autoriser_forumreactions_menu_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 54 54 return (sql_countsel('spip_forum') && autoriser('publierdans','rubrique',_request('id_rubrique'))); 55 55 } -
_core_/plugins/forum/inc/email_notification_forum.php
r79783 r93092 21 21 * @return string 22 22 */ 23 function inc_email_notification_forum_dist ($t, $email, $contexte =array()) {23 function inc_email_notification_forum_dist ($t, $email, $contexte = array()) { 24 24 static $contextes_store = array(); 25 25 -
_core_/plugins/forum/inc/forum.php
r88959 r93092 23 23 * @return array 24 24 */ 25 function critere_statut_controle_forum($type, $id_secteur =0, $recherche='') {25 function critere_statut_controle_forum($type, $id_secteur = 0, $recherche = '') { 26 26 27 27 if (!$id_secteur) { … … 82 82 // - objet/id_objet 83 83 // http://code.spip.net/@calcul_index_forum 84 function calcul_index_forum($objet, $id_objet) {84 function calcul_index_forum($objet, $id_objet) { 85 85 return substr($objet,0,1).$id_objet; 86 86 } … … 149 149 * @return unknown 150 150 */ 151 function generer_url_forum_dist($id_forum, $args ='', $ancre='') {151 function generer_url_forum_dist($id_forum, $args = '', $ancre = '') { 152 152 $generer_url_forum = charger_fonction('generer_url_forum','urls'); 153 153 return $generer_url_forum($id_forum, $args, $ancre); … … 191 191 // appelle conserver_original(), puis modifie le contenu via l'API inc/modifier 192 192 // http://code.spip.net/@enregistre_et_modifie_forum 193 function enregistre_et_modifie_forum($id_forum, $c =false) {193 function enregistre_et_modifie_forum($id_forum, $c = false) { 194 194 if ($err = conserver_original($id_forum)) { 195 195 spip_log("erreur de sauvegarde de l'original, $err"); … … 210 210 * @return bool|string 211 211 */ 212 function forum_recuperer_titre_dist($objet, $id_objet, $id_forum =0, $publie = true) {212 function forum_recuperer_titre_dist($objet, $id_objet, $id_forum = 0, $publie = true) { 213 213 include_spip('inc/filtres'); 214 214 $titre = ""; -
_core_/plugins/forum/inc/forum_insert.php
r88959 r93092 28 28 29 29 // http://code.spip.net/@tracer_erreur_forum 30 function tracer_erreur_forum($type ='') {30 function tracer_erreur_forum($type = '') { 31 31 spip_log("erreur forum ($type): ".print_r($_POST, true)); 32 32 … … 164 164 165 165 // http://code.spip.net/@forum_insert_statut 166 function forum_insert_statut($champs, $forcer_statut =NULL)166 function forum_insert_statut($champs, $forcer_statut = NULL) 167 167 { 168 168 include_spip('inc/forum'); -
_core_/plugins/forum/prive/modeles/forum_fonctions.php
r79783 r93092 13 13 if (!defined("_ECRIRE_INC_VERSION")) return; 14 14 15 function forum_compte_messages_from($email, $id_forum){15 function forum_compte_messages_from($email, $id_forum){ 16 16 static $mem = array(); 17 17 -
_core_/plugins/forum/urls/generer_url_ecrire_forum.php
r88959 r93092 14 14 15 15 // http://code.spip.net/@generer_url_ecrire_forum 16 function urls_generer_url_ecrire_forum_dist($id, $args ='', $ancre='', $public=null, $connect='') {16 function urls_generer_url_ecrire_forum_dist($id, $args = '', $ancre = '', $public = null, $connect = '') { 17 17 $a = "id_forum=" . intval($id); 18 18 if (is_null($public) AND !$connect) -
_core_/plugins/forum/urls/generer_url_forum.php
r79783 r93092 13 13 if (!defined("_ECRIRE_INC_VERSION")) return; 14 14 15 function urls_generer_url_forum_dist($id_forum, $args ='', $ancre='') {15 function urls_generer_url_forum_dist($id_forum, $args = '', $ancre = '') { 16 16 if ($id_forum = intval($id_forum)) { 17 17 include_spip('inc/forum'); -
_core_/plugins/mediabox/formulaires/configurer_mediabox.php
r62191 r93092 39 39 } 40 40 41 function box_choisir_skin($skins, $selected,$name='skin'){41 function box_choisir_skin($skins, $selected, $name = 'skin'){ 42 42 $out = ""; 43 43 if (!is_array($skins) OR !count($skins)) -
_core_/plugins/mediabox/mediabox_pipelines.php
r92824 r93092 3 3 if (!defined('_ECRIRE_INC_VERSION')) return; 4 4 5 function mediabox_config($public =null){5 function mediabox_config($public = null){ 6 6 include_spip("inc/filtres"); 7 7 include_spip("inc/config"); -
_core_/plugins/medias/action/ajouter_documents.php
r92550 r93092 291 291 * - false ou message d'erreur si l'extension est refusée 292 292 */ 293 function verifier_upload_autorise($source, $mode =''){293 function verifier_upload_autorise($source, $mode = ''){ 294 294 $infos = array('fichier'=>$source); 295 295 $res = false; … … 340 340 * @return array 341 341 */ 342 function fixer_fichier_upload($file, $mode =''){342 function fixer_fichier_upload($file, $mode = ''){ 343 343 /** 344 344 * On vérifie que le fichier existe et qu'il contient quelque chose -
_core_/plugins/medias/action/changer_mode_document.php
r88959 r93092 23 23 * @return void 24 24 */ 25 function action_changer_mode_document_dist($id_document =null, $mode=null){25 function action_changer_mode_document_dist($id_document = null, $mode = null){ 26 26 if (is_null($id_document) OR is_null($mode)){ 27 27 $securiser_action = charger_fonction('securiser_action', 'inc'); -
_core_/plugins/medias/action/copier_local.php
r88959 r93092 24 24 * @return bool|mixed|string 25 25 */ 26 function action_copier_local_dist($id_document =null) {26 function action_copier_local_dist($id_document = null) { 27 27 28 28 if (!$id_document){ -
_core_/plugins/medias/action/dissocier_document.php
r92541 r93092 32 32 * @return void 33 33 */ 34 function action_dissocier_document_dist($arg =null){34 function action_dissocier_document_dist($arg = null){ 35 35 if(is_null($arg)){ 36 36 $securiser_action = charger_fonction('securiser_action', 'inc'); -
_core_/plugins/medias/action/editer_document.php
r89157 r93092 20 20 * @return array 21 21 */ 22 function action_editer_document_dist($arg =null) {22 function action_editer_document_dist($arg = null) { 23 23 24 24 if (is_null($arg)){ … … 48 48 * @return int 49 49 */ 50 function document_inserer($id_parent =null, $set=null) {50 function document_inserer($id_parent = null, $set = null) { 51 51 52 52 $champs = array( … … 89 89 * @param array|bool $set 90 90 */ 91 function document_modifier($id_document, $set =false) {91 function document_modifier($id_document, $set = false) { 92 92 93 93 include_spip('inc/modifier'); … … 162 162 * @return bool 163 163 */ 164 function document_instituer($id_document, $champs=array()){164 function document_instituer($id_document, $champs = array()){ 165 165 166 166 $statut=isset($champs['statut'])?$champs['statut']:null; … … 233 233 * @param bool $ajout 234 234 */ 235 function medias_revision_document_parents($id_document, $parents =null, $ajout=false){235 function medias_revision_document_parents($id_document, $parents = null, $ajout = false){ 236 236 if (!is_array($parents)) 237 237 return; … … 300 300 * @param array|bool $set 301 301 */ 302 function document_set($id_document, $set =false) {302 function document_set($id_document, $set = false) { 303 303 return document_modifier($id_document, $set); 304 304 } … … 312 312 * @param array $champs 313 313 */ 314 function instituer_document($id_document, $champs=array()){314 function instituer_document($id_document, $champs = array()){ 315 315 return document_instituer($id_document,$champs); 316 316 } … … 324 324 * @param array $c 325 325 */ 326 function revision_document($id_document, $c =false) {326 function revision_document($id_document, $c = false) { 327 327 return document_modifier($id_document,$c); 328 328 } -
_core_/plugins/medias/action/supprimer_document.php
r91085 r93092 14 14 15 15 // http://code.spip.net/@supprimer_document 16 function action_supprimer_document_dist($id_document =0) {16 function action_supprimer_document_dist($id_document = 0) { 17 17 if (!$id_document){ 18 18 $securiser_action = charger_fonction('securiser_action','inc'); -
_core_/plugins/medias/action/tourner.php
r90041 r93092 26 26 * @return void 27 27 */ 28 function action_tourner_dist($id_document =null, $angle=null) {28 function action_tourner_dist($id_document = null, $angle = null) { 29 29 if (is_null($id_document) OR is_null($angle)){ 30 30 $securiser_action = charger_fonction('securiser_action', 'inc'); … … 54 54 * @return 55 55 */ 56 function action_tourner_post($id_document, $angle)56 function action_tourner_post($id_document, $angle) 57 57 { 58 58 $row = sql_fetsel("fichier,extension", "spip_documents", "id_document=".intval($id_document)); -
_core_/plugins/medias/action/verifier_documents_liens.php
r79783 r93092 26 26 * obtenu par la clé d'action sécurisée. 27 27 */ 28 function action_verifier_documents_liens_dist($id_document =null) {28 function action_verifier_documents_liens_dist($id_document = null) { 29 29 30 30 if (is_null($id_document)){ -
_core_/plugins/medias/base/medias.php
r85444 r93092 194 194 * @return void 195 195 */ 196 function creer_base_types_doc($serveur ='', $champ_media="media_defaut") {196 function creer_base_types_doc($serveur = '', $champ_media = "media_defaut") { 197 197 global $tables_images, $tables_sequences, $tables_documents, $tables_mime; 198 198 include_spip('base/typedoc'); -
_core_/plugins/medias/formulaires/editer_document.php
r91077 r93092 18 18 include_spip('inc/config'); 19 19 20 function formulaires_editer_document_charger_dist($id_document ='new', $id_parent='', $retour='', $lier_trad=0, $config_fonc='documents_edit_config', $row=array(), $hidden=''){20 function formulaires_editer_document_charger_dist($id_document = 'new', $id_parent = '', $retour = '', $lier_trad = 0, $config_fonc = 'documents_edit_config', $row = array(), $hidden = ''){ 21 21 $valeurs = formulaires_editer_objet_charger('document',$id_document,$id_parent,$lier_trad,$retour,$config_fonc,$row,$hidden); 22 22 … … 96 96 } 97 97 98 function formulaires_editer_document_verifier_dist($id_document ='new', $id_parent='', $retour='', $lier_trad=0, $config_fonc='documents_edit_config', $row=array(), $hidden=''){98 function formulaires_editer_document_verifier_dist($id_document = 'new', $id_parent = '', $retour = '', $lier_trad = 0, $config_fonc = 'documents_edit_config', $row = array(), $hidden = ''){ 99 99 $erreurs = formulaires_editer_objet_verifier('document',$id_document,is_numeric($id_document)?array():array('titre')); 100 100 … … 125 125 126 126 // http://code.spip.net/@inc_editer_article_dist 127 function formulaires_editer_document_traiter_dist($id_document ='new', $id_parent='', $retour='', $lier_trad=0, $config_fonc='documents_edit_config', $row=array(), $hidden=''){127 function formulaires_editer_document_traiter_dist($id_document = 'new', $id_parent = '', $retour = '', $lier_trad = 0, $config_fonc = 'documents_edit_config', $row = array(), $hidden = ''){ 128 128 if (is_null(_request('parents'))) 129 129 set_request('parents',array()); -
_core_/plugins/medias/formulaires/joindre_document.php
r86410 r93092 30 30 * Le mode définitif 31 31 */ 32 function joindre_determiner_mode($mode, $id_document,$objet){32 function joindre_determiner_mode($mode, $id_document, $objet){ 33 33 if ($mode=='auto'){ 34 34 if (intval($id_document)) … … 66 66 * Les valeurs chargées dans le formulaire 67 67 */ 68 function formulaires_joindre_document_charger_dist($id_document ='new',$id_objet=0,$objet='',$mode = 'auto',$galerie = false, $proposer_media=true, $proposer_ftp=true){68 function formulaires_joindre_document_charger_dist($id_document = 'new', $id_objet = 0, $objet = '', $mode = 'auto', $galerie = false, $proposer_media = true, $proposer_ftp = true){ 69 69 $valeurs = array(); 70 70 $mode = joindre_determiner_mode($mode,$id_document,$objet); … … 147 147 * Les erreurs éventuelles dans un tableau 148 148 */ 149 function formulaires_joindre_document_verifier_dist($id_document ='new',$id_objet=0,$objet='',$mode = 'auto',$galerie = false, $proposer_media=true, $proposer_ftp=true){149 function formulaires_joindre_document_verifier_dist($id_document = 'new', $id_objet = 0, $objet = '', $mode = 'auto', $galerie = false, $proposer_media = true, $proposer_ftp = true){ 150 150 include_spip('inc/joindre_document'); 151 151 … … 225 225 * Le tableau renvoyé par les CVT avec le message et editable 226 226 */ 227 function formulaires_joindre_document_traiter_dist($id_document ='new',$id_objet=0,$objet='',$mode = 'auto',$galerie = false, $proposer_media=true, $proposer_ftp=true){227 function formulaires_joindre_document_traiter_dist($id_document = 'new', $id_objet = 0, $objet = '', $mode = 'auto', $galerie = false, $proposer_media = true, $proposer_ftp = true){ 228 228 $res = array('editable'=>true); 229 229 $ancre = ''; -
_core_/plugins/medias/inc/documents.php
r91919 r93092 26 26 27 27 // http://code.spip.net/@contenu_document 28 function contenu_document($arg, $charset ='') {28 function contenu_document($arg, $charset = '') { 29 29 include_spip('inc/distant'); 30 30 if (is_numeric($arg)) { … … 55 55 56 56 // http://code.spip.net/@generer_url_document_dist 57 function generer_url_document_dist($id_document, $args ='', $ancre='') {57 function generer_url_document_dist($id_document, $args = '', $ancre = '') { 58 58 59 59 include_spip('inc/autoriser'); … … 96 96 // de la vignette -> c'est a ca que sert la variable $portfolio 97 97 // http://code.spip.net/@vignette_automatique 98 function vignette_automatique($img, $doc, $lien, $x =0, $y=0, $align='', $class='spip_logo spip_logos') {98 function vignette_automatique($img, $doc, $lien, $x = 0, $y = 0, $align = '', $class = 'spip_logo spip_logos') { 99 99 include_spip('inc/distant'); 100 100 include_spip('inc/texte'); … … 180 180 * Code HTML permettant de gérer des documents 181 181 */ 182 function afficher_documents_colonne($id, $type ="article", $script=NULL) {182 function afficher_documents_colonne($id, $type = "article", $script = NULL) { 183 183 return recuperer_fond('prive/objets/editer/colonne_document', array('objet'=>$type,'id_objet'=>$id)); 184 184 } -
_core_/plugins/medias/inc/joindre_document.php
r88959 r93092 268 268 269 269 // http://code.spip.net/@joindre_deballes 270 function joindre_deballer_lister_zip($path, $tmp_dir) {270 function joindre_deballer_lister_zip($path, $tmp_dir) { 271 271 include_spip('inc/pclzip'); 272 272 $archive = new PclZip($path); -
_core_/plugins/medias/inc/marquer_doublons_doc.php
r92771 r93092 58 58 * @return void|null 59 59 **/ 60 function inc_marquer_doublons_doc_dist($champs, $id, $type, $id_table_objet, $table_objet, $spip_table_objet, $desc =array(), $serveur=''){60 function inc_marquer_doublons_doc_dist($champs, $id, $type, $id_table_objet, $table_objet, $spip_table_objet, $desc = array(), $serveur = ''){ 61 61 62 62 // On conserve uniquement les champs qui modifient le calcul des doublons de documents -
_core_/plugins/medias/inc/renseigner_document.php
r85245 r93092 96 96 * - Si c'est un tableau, l'ensemble des informations récupérées du fichier 97 97 */ 98 function renseigner_taille_dimension_image($fichier, $ext,$distant=false){98 function renseigner_taille_dimension_image($fichier, $ext, $distant = false){ 99 99 100 100 $infos = array( -
_core_/plugins/medias/inc/vignette.php
r79783 r93092 37 37 * Tableau (chemin, largeur, hauteur) si on demande avec la taille. 38 38 */ 39 function inc_vignette_dist($ext, $size =true, $loop = true) {39 function inc_vignette_dist($ext, $size = true, $loop = true) { 40 40 41 41 if (!$ext) -
_core_/plugins/medias/lib/getid3/extension.cache.mysql.php
r92616 r93092 81 81 82 82 // public: constructor - see top of this file for cache type and cache_options 83 public function getID3_cached_mysql($host, $database, $username, $password, $table ='getid3_cache') {83 public function getID3_cached_mysql($host, $database, $username, $password, $table = 'getid3_cache') { 84 84 85 85 // Check for mysql support … … 135 135 136 136 // public: analyze file 137 public function analyze($filename, $filesize =null, $original_filename='') {137 public function analyze($filename, $filesize = null, $original_filename = '') { 138 138 139 139 if (file_exists($filename)) { … … 176 176 177 177 // private: (re)create sql table 178 private function create_table($drop =false) {178 private function create_table($drop = false) { 179 179 180 180 $SQLquery = 'CREATE TABLE IF NOT EXISTS `'.mysql_real_escape_string($this->table).'` ('; -
_core_/plugins/medias/lib/getid3/extension.cache.sqlite3.php
r92616 r93092 97 97 * @return type 98 98 */ 99 public function __construct($table ='getid3_cache', $hide=false) {99 public function __construct($table = 'getid3_cache', $hide = false) { 100 100 $this->table = $table; // Set table 101 101 $file = dirname(__FILE__).'/'.basename(__FILE__, 'php').'sqlite'; … … 160 160 * @return boolean 161 161 */ 162 public function analyze($filename, $filesize =null, $original_filename='') {162 public function analyze($filename, $filesize = null, $original_filename = '') { 163 163 if (!file_exists($filename)) { 164 164 return false; -
_core_/plugins/medias/lib/getid3/getid3.lib.php
r92616 r93092 16 16 { 17 17 18 public static function PrintHexBytes($string, $hex =true, $spaces=true, $htmlencoding='UTF-8') {18 public static function PrintHexBytes($string, $hex = true, $spaces = true, $htmlencoding = 'UTF-8') { 19 19 $returnstring = ''; 20 20 for ($i = 0; $i < strlen($string); $i++) { … … 54 54 55 55 56 public static function safe_inc(&$variable, $increment =1) {56 public static function safe_inc(&$variable, $increment = 1) { 57 57 if (isset($variable)) { 58 58 $variable += $increment; … … 107 107 108 108 109 public static function NormalizeBinaryPoint($binarypointnumber, $maxbits =52) {109 public static function NormalizeBinaryPoint($binarypointnumber, $maxbits = 52) { 110 110 // http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html 111 111 if (strpos($binarypointnumber, '.') === false) { … … 261 261 262 262 263 public static function BigEndian2Int($byteword, $synchsafe =false, $signed=false) {263 public static function BigEndian2Int($byteword, $synchsafe = false, $signed = false) { 264 264 $intvalue = 0; 265 265 $bytewordlen = strlen($byteword); … … 290 290 291 291 292 public static function LittleEndian2Int($byteword, $signed =false) {292 public static function LittleEndian2Int($byteword, $signed = false) { 293 293 return self::BigEndian2Int(strrev($byteword), false, $signed); 294 294 } … … 305 305 306 306 307 public static function BigEndian2String($number, $minbytes =1, $synchsafe=false, $signed=false) {307 public static function BigEndian2String($number, $minbytes = 1, $synchsafe = false, $signed = false) { 308 308 if ($number < 0) { 309 309 throw new Exception('ERROR: self::BigEndian2String() does not support negative numbers'); … … 340 340 341 341 342 public static function Bin2Dec($binstring, $signed =false) {342 public static function Bin2Dec($binstring, $signed = false) { 343 343 $signmult = 1; 344 344 if ($signed) { … … 367 367 368 368 369 public static function LittleEndian2String($number, $minbytes =1, $synchsafe=false) {369 public static function LittleEndian2String($number, $minbytes = 1, $synchsafe = false) { 370 370 $intstring = ''; 371 371 while ($number > 0) { … … 440 440 } 441 441 442 public static function fileextension($filename, $numextensions =1) {442 public static function fileextension($filename, $numextensions = 1) { 443 443 if (strstr($filename, '.')) { 444 444 $reversedfilename = strrev($filename); … … 505 505 } 506 506 507 public static function array_max($arraydata, $returnkey =false) {507 public static function array_max($arraydata, $returnkey = false) { 508 508 $maxvalue = false; 509 509 $maxkey = false; … … 519 519 } 520 520 521 public static function array_min($arraydata, $returnkey =false) {521 public static function array_min($arraydata, $returnkey = false) { 522 522 $minvalue = false; 523 523 $minkey = false; … … 697 697 698 698 // ISO-8859-1 => UTF-8 699 public static function iconv_fallback_iso88591_utf8($string, $bom =false) {699 public static function iconv_fallback_iso88591_utf8($string, $bom = false) { 700 700 if (function_exists('utf8_encode')) { 701 701 return utf8_encode($string); … … 714 714 715 715 // ISO-8859-1 => UTF-16BE 716 public static function iconv_fallback_iso88591_utf16be($string, $bom =false) {716 public static function iconv_fallback_iso88591_utf16be($string, $bom = false) { 717 717 $newcharstring = ''; 718 718 if ($bom) { … … 726 726 727 727 // ISO-8859-1 => UTF-16LE 728 public static function iconv_fallback_iso88591_utf16le($string, $bom =false) {728 public static function iconv_fallback_iso88591_utf16le($string, $bom = false) { 729 729 $newcharstring = ''; 730 730 if ($bom) { … … 787 787 788 788 // UTF-8 => UTF-16BE 789 public static function iconv_fallback_utf8_utf16be($string, $bom =false) {789 public static function iconv_fallback_utf8_utf16be($string, $bom = false) { 790 790 $newcharstring = ''; 791 791 if ($bom) { … … 830 830 831 831 // UTF-8 => UTF-16LE 832 public static function iconv_fallback_utf8_utf16le($string, $bom =false) {832 public static function iconv_fallback_utf8_utf16le($string, $bom = false) { 833 833 $newcharstring = ''; 834 834 if ($bom) { … … 1003 1003 } 1004 1004 1005 public static function recursiveMultiByteCharString2HTML($data, $charset ='ISO-8859-1') {1005 public static function recursiveMultiByteCharString2HTML($data, $charset = 'ISO-8859-1') { 1006 1006 if (is_string($data)) { 1007 1007 return self::MultiByteCharString2HTML($data, $charset); … … 1017 1017 } 1018 1018 1019 public static function MultiByteCharString2HTML($string, $charset ='ISO-8859-1') {1019 public static function MultiByteCharString2HTML($string, $charset = 'ISO-8859-1') { 1020 1020 $string = (string) $string; // in case trying to pass a numeric (float, int) string, would otherwise return an empty string 1021 1021 $HTMLstring = ''; … … 1165 1165 1166 1166 1167 public static function GetDataImageSize($imgData, &$imageinfo =array()) {1167 public static function GetDataImageSize($imgData, &$imageinfo = array()) { 1168 1168 static $tempdir = ''; 1169 1169 if (empty($tempdir)) { … … 1335 1335 } 1336 1336 1337 public static function IncludeDependency($filename, $sourcefile, $DieOnFailure =false) {1337 public static function IncludeDependency($filename, $sourcefile, $DieOnFailure = false) { 1338 1338 global $GETID3_ERRORARRAY; 1339 1339 -
_core_/plugins/medias/lib/getid3/getid3.php
r92616 r93092 244 244 245 245 246 public function openfile($filename, $filesize =null) {246 public function openfile($filename, $filesize = null) { 247 247 try { 248 248 if (!empty($this->startup_error)) { … … 343 343 344 344 // public: analyze file 345 public function analyze($filename, $filesize =null, $original_filename='') {345 public function analyze($filename, $filesize = null, $original_filename = '') { 346 346 try { 347 347 if (!$this->openfile($filename, $filesize)) { … … 1105 1105 1106 1106 1107 public function GetFileFormat(&$filedata, $filename ='') {1107 public function GetFileFormat(&$filedata, $filename = '') { 1108 1108 // this function will determine the format of a file based on usually 1109 1109 // the first 2-4 bytes of the file (8 bytes for PNG, 16 bytes for JPG, … … 1631 1631 1632 1632 1633 public function __construct(getID3 $getid3, $call_module =null) {1633 public function __construct(getID3 $getid3, $call_module = null) { 1634 1634 $this->getid3 = $getid3; 1635 1635 … … 1695 1695 } 1696 1696 1697 protected function fseek($bytes, $whence =SEEK_SET) {1697 protected function fseek($bytes, $whence = SEEK_SET) { 1698 1698 if ($this->data_string_flag) { 1699 1699 switch ($whence) { … … 1750 1750 } 1751 1751 1752 public function saveAttachment($name, $offset, $length, $image_mime =null) {1752 public function saveAttachment($name, $offset, $length, $image_mime = null) { 1753 1753 try { 1754 1754 -
_core_/plugins/medias/lib/getid3/module.audio-video.asf.php
r85814 r93092 1643 1643 } 1644 1644 1645 public static function FILETIMEtoUNIXtime($FILETIME, $round =true) {1645 public static function FILETIMEtoUNIXtime($FILETIME, $round = true) { 1646 1646 // FILETIME is a 64-bit unsigned integer representing 1647 1647 // the number of 100-nanosecond intervals since January 1, 1601 -
_core_/plugins/medias/lib/getid3/module.audio-video.matroska.php
r92616 r93092 1224 1224 } 1225 1225 1226 private function EnsureBufferHasEnoughData($min_data =1024) {1226 private function EnsureBufferHasEnoughData($min_data = 1024) { 1227 1227 if (($this->current_offset - $this->EBMLbuffer_offset) >= ($this->EBMLbuffer_length - $min_data)) { 1228 1228 $read_bytes = max($min_data, $this->getid3->fread_buffer_size()); … … 1277 1277 } 1278 1278 1279 private function readEBMLelementData($length, $check_buffer =false) {1279 private function readEBMLelementData($length, $check_buffer = false) { 1280 1280 if ($check_buffer && !$this->EnsureBufferHasEnoughData($length)) { 1281 1281 return false; … … 1286 1286 } 1287 1287 1288 private function getEBMLelement(&$element, $parent_end, $get_data =false) {1288 private function getEBMLelement(&$element, $parent_end, $get_data = false) { 1289 1289 if ($this->current_offset >= $parent_end) { 1290 1290 return false; -
_core_/plugins/medias/lib/getid3/module.audio-video.mpeg.php
r85814 r93092 503 503 } 504 504 505 private function readBitsFromStream(&$bitstream, &$bitstreamoffset, $bits_to_read, $return_singlebit_as_boolean =true) {505 private function readBitsFromStream(&$bitstream, &$bitstreamoffset, $bits_to_read, $return_singlebit_as_boolean = true) { 506 506 $return = bindec(substr($bitstream, $bitstreamoffset, $bits_to_read)); 507 507 $bitstreamoffset += $bits_to_read; -
_core_/plugins/medias/lib/getid3/module.audio-video.nsv.php
r85814 r93092 133 133 } 134 134 135 public function getNSVfHeaderFilepointer($fileoffset, $getTOCoffsets =false) {135 public function getNSVfHeaderFilepointer($fileoffset, $getTOCoffsets = false) { 136 136 $info = &$this->getid3->info; 137 137 $this->fseek($fileoffset); -
_core_/plugins/medias/lib/getid3/module.audio-video.quicktime.php
r92616 r93092 2135 2135 2136 2136 2137 public function CopyToAppropriateCommentsSection($keyname, $data, $boxname ='') {2137 public function CopyToAppropriateCommentsSection($keyname, $data, $boxname = '') { 2138 2138 static $handyatomtranslatorarray = array(); 2139 2139 if (empty($handyatomtranslatorarray)) { -
_core_/plugins/medias/lib/getid3/module.audio-video.riff.php
r85814 r93092 1898 1898 } 1899 1899 1900 public static function ParseBITMAPINFOHEADER($BITMAPINFOHEADER, $littleEndian =true) {1900 public static function ParseBITMAPINFOHEADER($BITMAPINFOHEADER, $littleEndian = true) { 1901 1901 1902 1902 $parsed['biSize'] = substr($BITMAPINFOHEADER, 0, 4); // number of bytes required by the BITMAPINFOHEADER structure … … 1917 1917 } 1918 1918 1919 public static function ParseDIVXTAG($DIVXTAG, $raw =false) {1919 public static function ParseDIVXTAG($DIVXTAG, $raw = false) { 1920 1920 // structure from "IDivX" source, Form1.frm, by "Greg Frazier of Daemonic Software Group", email: gfrazier@icestorm.net, web: http://dsg.cjb.net/ 1921 1921 // source available at http://files.divx-digest.com/download/c663efe7ef8ad2e90bf4af4d3ea6188a/on0SWN2r/edit/IDivX.zip … … 2577 2577 } 2578 2578 2579 private function EitherEndian2Int($byteword, $signed =false) {2579 private function EitherEndian2Int($byteword, $signed = false) { 2580 2580 if ($this->container == 'riff') { 2581 2581 return getid3_lib::LittleEndian2Int($byteword, $signed); -
_core_/plugins/medias/lib/getid3/module.audio.aac.php
r85814 r93092 259 259 260 260 261 public function getAACADTSheaderFilepointer($MaxFramesToScan =1000000, $ReturnExtendedInfo=false) {261 public function getAACADTSheaderFilepointer($MaxFramesToScan = 1000000, $ReturnExtendedInfo = false) { 262 262 $info = &$this->getid3->info; 263 263 -
_core_/plugins/medias/lib/getid3/module.audio.bonk.php
r85814 r93092 214 214 } 215 215 216 public static function BonkIsValidTagName($PossibleBonkTag, $ignorecase =false) {216 public static function BonkIsValidTagName($PossibleBonkTag, $ignorecase = false) { 217 217 static $BonkIsValidTagName = array('BONK', 'INFO', ' ID3', 'META'); 218 218 foreach ($BonkIsValidTagName as $validtagname) { -
_core_/plugins/medias/lib/getid3/module.audio.mp3.php
r92616 r93092 406 406 407 407 408 public function decodeMPEGaudioHeader($offset, &$info, $recursivesearch =true, $ScanAsCBR=false, $FastMPEGheaderScan=false) {408 public function decodeMPEGaudioHeader($offset, &$info, $recursivesearch = true, $ScanAsCBR = false, $FastMPEGheaderScan = false) { 409 409 static $MPEGaudioVersionLookup; 410 410 static $MPEGaudioLayerLookup; … … 1129 1129 } 1130 1130 1131 public function FreeFormatFrameLength($offset, $deepscan =false) {1131 public function FreeFormatFrameLength($offset, $deepscan = false) { 1132 1132 $info = &$this->getid3->info; 1133 1133 … … 1354 1354 1355 1355 1356 public function getOnlyMPEGaudioInfo($avdataoffset, $BitrateHistogram =false) {1356 public function getOnlyMPEGaudioInfo($avdataoffset, $BitrateHistogram = false) { 1357 1357 // looks for synch, decodes MPEG audio header 1358 1358 … … 1697 1697 } 1698 1698 1699 public static function MPEGaudioHeaderBytesValid($head4, $allowBitrate15 =false) {1699 public static function MPEGaudioHeaderBytesValid($head4, $allowBitrate15 = false) { 1700 1700 return self::MPEGaudioHeaderValid(self::MPEGaudioHeaderDecode($head4), false, $allowBitrate15); 1701 1701 } 1702 1702 1703 public static function MPEGaudioHeaderValid($rawarray, $echoerrors =false, $allowBitrate15=false) {1703 public static function MPEGaudioHeaderValid($rawarray, $echoerrors = false, $allowBitrate15 = false) { 1704 1704 if (($rawarray['synch'] & 0x0FFE) != 0x0FFE) { 1705 1705 return false; -
_core_/plugins/medias/lib/getid3/module.audio.mpc.php
r85814 r93092 465 465 } 466 466 467 public function SV8variableLengthInteger($data, &$packetLength, $maxHandledPacketLength =9) {467 public function SV8variableLengthInteger($data, &$packetLength, $maxHandledPacketLength = 9) { 468 468 $packet_size = 0; 469 469 for ($packetLength = 1; $packetLength <= $maxHandledPacketLength; $packetLength++) { -
_core_/plugins/medias/lib/getid3/module.audio.ogg.php
r92616 r93092 777 777 778 778 779 public static function OggPageSegmentLength($OggInfoArray, $SegmentNumber =1) {779 public static function OggPageSegmentLength($OggInfoArray, $SegmentNumber = 1) { 780 780 for ($i = 0; $i < $SegmentNumber; $i++) { 781 781 $segmentlength = 0; -
_core_/plugins/medias/lib/getid3/module.tag.id3v1.php
r85814 r93092 108 108 } 109 109 110 public static function ArrayOfGenres($allowSCMPXextended =false) {110 public static function ArrayOfGenres($allowSCMPXextended = false) { 111 111 static $GenreLookup = array( 112 112 0 => 'Blues', … … 292 292 } 293 293 294 public static function LookupGenreName($genreid, $allowSCMPXextended =true) {294 public static function LookupGenreName($genreid, $allowSCMPXextended = true) { 295 295 switch ($genreid) { 296 296 case 'RX': … … 308 308 } 309 309 310 public static function LookupGenreID($genre, $allowSCMPXextended =false) {310 public static function LookupGenreID($genre, $allowSCMPXextended = false) { 311 311 $GenreLookup = self::ArrayOfGenres($allowSCMPXextended); 312 312 $LowerCaseNoSpaceSearchTerm = strtolower(str_replace(' ', '', $genre)); … … 326 326 } 327 327 328 public static function GenerateID3v1Tag($title, $artist, $album, $year, $genreid, $comment, $track ='') {328 public static function GenerateID3v1Tag($title, $artist, $album, $year, $genreid, $comment, $track = '') { 329 329 $ID3v1Tag = 'TAG'; 330 330 $ID3v1Tag .= str_pad(trim(substr($title, 0, 30)), 30, "\x00", STR_PAD_RIGHT); -
_core_/plugins/medias/lib/getid3/module.tag.id3v2.php
r92616 r93092 2608 2608 2609 2609 2610 public static function LanguageLookup($languagecode, $casesensitive =false) {2610 public static function LanguageLookup($languagecode, $casesensitive = false) { 2611 2611 2612 2612 if (!$casesensitive) { … … 3123 3123 } 3124 3124 3125 public static function APICPictureTypeLookup($index, $returnarray =false) {3125 public static function APICPictureTypeLookup($index, $returnarray = false) { 3126 3126 static $APICPictureTypeLookup = array( 3127 3127 0x00 => 'Other', … … 3588 3588 } 3589 3589 3590 public static function IsANumber($numberstring, $allowdecimal =false, $allownegative=false) {3590 public static function IsANumber($numberstring, $allowdecimal = false, $allownegative = false) { 3591 3591 for ($i = 0; $i < strlen($numberstring); $i++) { 3592 3592 if ((chr($numberstring{$i}) < chr('0')) || (chr($numberstring{$i}) > chr('9'))) { -
_core_/plugins/medias/lib/getid3/write.apetag.php
r85814 r93092 161 161 } 162 162 163 public function GenerateAPEtagHeaderFooter(&$items, $isheader =false) {163 public function GenerateAPEtagHeaderFooter(&$items, $isheader = false) { 164 164 $tagdatalength = 0; 165 165 foreach ($items as $itemdata) { … … 177 177 } 178 178 179 public function GenerateAPEtagFlags($header =true, $footer=true, $isheader=false, $encodingid=0, $readonly=false) {179 public function GenerateAPEtagFlags($header = true, $footer = true, $isheader = false, $encodingid = 0, $readonly = false) { 180 180 $APEtagFlags = array_fill(0, 4, 0); 181 181 if ($header) { -
_core_/plugins/medias/lib/getid3/write.id3v2.php
r92616 r93092 261 261 262 262 263 public function GenerateID3v2FrameFlags($TagAlter =false, $FileAlter=false, $ReadOnly=false, $Compression=false, $Encryption=false, $GroupingIdentity=false, $Unsynchronisation=false, $DataLengthIndicator=false) {263 public function GenerateID3v2FrameFlags($TagAlter = false, $FileAlter = false, $ReadOnly = false, $Compression = false, $Encryption = false, $GroupingIdentity = false, $Unsynchronisation = false, $DataLengthIndicator = false) { 264 264 switch ($this->majorversion) { 265 265 case 4: … … 1532 1532 } 1533 1533 1534 public function GenerateID3v2Tag($noerrorsonly =true) {1534 public function GenerateID3v2Tag($noerrorsonly = true) { 1535 1535 $this->ID3v2FrameIsAllowed(null, ''); // clear static array in case this isn't the first call to $this->GenerateID3v2Tag() 1536 1536 … … 1843 1843 } 1844 1844 1845 public function IsWithinBitRange($number, $maxbits, $signed =false) {1845 public function IsWithinBitRange($number, $maxbits, $signed = false) { 1846 1846 if ($signed) { 1847 1847 if (($number > (0 - pow(2, $maxbits - 1))) && ($number <= pow(2, $maxbits - 1))) { … … 1867 1867 } 1868 1868 1869 public function IsValidURL($url, $allowUserPass =false) {1869 public function IsValidURL($url, $allowUserPass = false) { 1870 1870 if ($url == '') { 1871 1871 return false; -
_core_/plugins/medias/medias_administrations.php
r86322 r93092 43 43 * @param string $version_cible 44 44 */ 45 function medias_upgrade($nom_meta_base_version, $version_cible){45 function medias_upgrade($nom_meta_base_version, $version_cible){ 46 46 47 47 // ne pas installer tant qu'on est pas a jour sur version base SPIP … … 173 173 } 174 174 175 function medias_peuple_media_document($champ_media ="media_defaut"){175 function medias_peuple_media_document($champ_media = "media_defaut"){ 176 176 $res = sql_select("DISTINCT extension","spip_documents","media=".sql_quote('?')); 177 177 while($row = sql_fetch($res)){ … … 185 185 186 186 /* 187 function medias_install($action, $prefix,$version_cible){187 function medias_install($action, $prefix, $version_cible){ 188 188 $version_base = $GLOBALS[$prefix."_base_version"]; 189 189 switch ($action){ -
_core_/plugins/medias/medias_autoriser.php
r90356 r93092 35 35 * @return bool true s'il a le droit, false sinon 36 36 **/ 37 function autoriser_mediatheque_administrer_dist($faire, $type,$id,$qui,$opt) {37 function autoriser_mediatheque_administrer_dist($faire, $type, $id, $qui, $opt) { 38 38 return $qui['statut'] == '0minirezo'; 39 39 } … … 49 49 * @return bool true s'il a le droit, false sinon 50 50 **/ 51 function autoriser_documents_menu_dist($faire, $type,$id,$qui,$opt) {51 function autoriser_documents_menu_dist($faire, $type, $id, $qui, $opt) { 52 52 return autoriser('administrer','mediatheque',$id,$qui,$opt); 53 53 } … … 63 63 * @return bool true s'il a le droit, false sinon 64 64 */ 65 function autoriser_document_tailler_dist($faire, $type,$id,$qui,$options) {65 function autoriser_document_tailler_dist($faire, $type, $id, $qui, $options) { 66 66 67 67 if (!$id_document=intval($id)) -
_core_/plugins/medias/medias_fonctions.php
r92541 r93092 151 151 * @return string 152 152 */ 153 function lien_objet($id, $type,$longueur=80,$connect=NULL){153 function lien_objet($id, $type, $longueur = 80, $connect = NULL){ 154 154 return generer_lien_entite($id,$type,$longueur,$connect); 155 155 } … … 252 252 * Balise HTML <img...> ou chemin du fichier 253 253 **/ 254 function filtre_vignette_dist($extension ='defaut', $get_chemin = false) {254 function filtre_vignette_dist($extension = 'defaut', $get_chemin = false) { 255 255 static $vignette = false; 256 256 static $balise_img = false; -
_core_/plugins/medias/modeles/document_case_fonctions.php
r79783 r93092 14 14 15 15 include_spip('inc/documents'); // pour la fonction affiche_raccourci_doc 16 function medias_raccourcis_doc($id_document, $titre,$descriptif,$inclus,$largeur,$hauteur,$mode,$vu,$media=null){16 function medias_raccourcis_doc($id_document, $titre, $descriptif, $inclus, $largeur, $hauteur, $mode, $vu, $media = null){ 17 17 $raccourci = ''; 18 18 $doc = 'doc'; -
_core_/plugins/medias/modeles/emb_fonctions.php
r89247 r93092 16 16 * @return mixed 17 17 */ 18 function trouver_modele_emb($extension, $mime_type){18 function trouver_modele_emb($extension, $mime_type){ 19 19 if ($extension AND trouve_modele($fond="emb_".$extension)){ 20 20 return $fond; -
_core_/plugins/medias/puce_statut/document.php
r79783 r93092 25 25 * @return string 26 26 */ 27 function puce_statut_document_dist($id, $statut, $id_rubrique, $type, $ajax ='') {27 function puce_statut_document_dist($id, $statut, $id_rubrique, $type, $ajax = '') { 28 28 return "<img src='" . chemin_image("attachment-16.png") . "' width='16' height='16' alt='' />"; 29 29 } -
_core_/plugins/medias/urls/generer_url_document.php
r88959 r93092 27 27 * http://code.spip.net/@generer_url_ecrire_document 28 28 */ 29 function urls_generer_url_document_dist($id, $args ='', $ancre='', $public=null, $connect='') {29 function urls_generer_url_document_dist($id, $args = '', $ancre = '', $public = null, $connect = '') { 30 30 include_spip('inc/documents'); 31 31 return generer_url_document_dist($id, $args, $ancre); -
_core_/plugins/medias/urls/generer_url_ecrire_document.php
r88959 r93092 27 27 * http://code.spip.net/@generer_url_ecrire_document 28 28 */ 29 function urls_generer_url_ecrire_document_dist($id, $args ='', $ancre='', $public=null, $connect='') {29 function urls_generer_url_ecrire_document_dist($id, $args = '', $ancre = '', $public = null, $connect = '') { 30 30 include_spip('inc/documents'); 31 31 return generer_url_document_dist($id); -
_core_/plugins/mots/action/editer_groupe_mots.php
r89285 r93092 34 34 * Liste (identifiant du groupe de mot clé, Texte d'erreur éventuel) 35 35 **/ 36 function action_editer_groupe_mots_dist($id_groupe =null)36 function action_editer_groupe_mots_dist($id_groupe = null) 37 37 { 38 38 if (is_null($id_groupe)){ … … 64 64 * Identifiant du nouveau groupe de mots clés. 65 65 */ 66 function groupe_mots_inserer($id_parent =null, $set=null) {66 function groupe_mots_inserer($id_parent = null, $set = null) { 67 67 68 68 // support de la signature derogatoire pour compat … … 129 129 * Chaîne contenant un texte d'erreur sinon. 130 130 */ 131 function groupe_mots_modifier($id_groupe, $set =null) {131 function groupe_mots_modifier($id_groupe, $set = null) { 132 132 $err = ''; 133 133 … … 185 185 * Chaîne contenant un texte d'erreur sinon. 186 186 */ 187 function revision_groupe_mot($id_groupe, $c =false) {187 function revision_groupe_mot($id_groupe, $c = false) { 188 188 return groupe_mots_modifier($id_groupe,$c); 189 189 } … … 202 202 * Identifiant du nouveau groupe de mots clés. 203 203 */ 204 function groupemots_inserer($table ='', $set=null) {204 function groupemots_inserer($table = '', $set = null) { 205 205 return groupe_mots_inserer($table, $set); 206 206 } … … 223 223 * Chaîne contenant un texte d'erreur sinon. 224 224 */ 225 function groupemots_modifier($id_groupe, $set =null) {225 function groupemots_modifier($id_groupe, $set = null) { 226 226 return groupe_mots_modifier($id_groupe, $set); 227 227 } -
_core_/plugins/mots/action/editer_mot.php
r89285 r93092 33 33 * Liste (identifiant du mot clé, Texte d'erreur éventuel) 34 34 **/ 35 function action_editer_mot_dist($arg =null)35 function action_editer_mot_dist($arg = null) 36 36 { 37 37 if (is_null($arg)){ … … 64 64 * Identifiant du nouveau mot clé, false si erreur. 65 65 */ 66 function mot_inserer($id_groupe, $set =null) {66 function mot_inserer($id_groupe, $set = null) { 67 67 68 68 $champs = array(); … … 117 117 * - Chaîne contenant un texte d'erreur sinon. 118 118 */ 119 function mot_modifier($id_mot, $set =null) {119 function mot_modifier($id_mot, $set = null) { 120 120 include_spip('inc/modifier'); 121 121 $c = collecter_requests( … … 260 260 * Nombre de modifications, false si erreur 261 261 */ 262 function mot_associer($id_mot, $objets, $qualif = null){262 function mot_associer($id_mot, $objets, $qualif = null){ 263 263 264 264 include_spip('action/editer_liens'); … … 294 294 * Nombre de modifications, false si erreur 295 295 */ 296 function mot_dissocier($id_mot, $objets){296 function mot_dissocier($id_mot, $objets){ 297 297 include_spip('action/editer_liens'); 298 298 return objet_dissocier(array('mot'=>$id_mot), $objets); … … 322 322 * Nombre de modifications, false si erreur 323 323 */ 324 function mot_qualifier($id_mot, $objets,$qualif){324 function mot_qualifier($id_mot, $objets, $qualif){ 325 325 include_spip('action/editer_liens'); 326 326 return objet_qualifier(array('mot'=>$id_mot), $objets, $qualif); … … 382 382 * - Chaîne contenant un texte d'erreur sinon. 383 383 */ 384 function mots_set($id_mot, $set =null) {384 function mots_set($id_mot, $set = null) { 385 385 return mot_modifier($id_mot, $set); 386 386 } … … 403 403 * - Chaîne contenant un texte d'erreur sinon. 404 404 */ 405 function revision_mot($id_mot, $c =false) {405 function revision_mot($id_mot, $c = false) { 406 406 return mot_modifier($id_mot, $c); 407 407 } -
_core_/plugins/mots/action/supprimer_groupe_mots.php
r89285 r93092 32 32 * de l'action sécurisée. 33 33 */ 34 function action_supprimer_groupe_mots_dist($id_groupe =null){34 function action_supprimer_groupe_mots_dist($id_groupe = null){ 35 35 36 36 if (is_null($id_groupe)){ -
_core_/plugins/mots/formulaires/editer_groupe_mot.php
r89285 r93092 37 37 * Environnement du formulaire 38 38 **/ 39 function formulaires_editer_groupe_mot_charger_dist($id_groupe ='new',$retour='', $config_fonc='groupes_mots_edit_config', $row=array(), $hidden=''){39 function formulaires_editer_groupe_mot_charger_dist($id_groupe = 'new', $retour = '', $config_fonc = 'groupes_mots_edit_config', $row = array(), $hidden = ''){ 40 40 $valeurs = formulaires_editer_objet_charger('groupe_mots',$id_groupe,0,'',$retour,$config_fonc,$row,$hidden); 41 41 … … 69 69 * Hash du formulaire 70 70 */ 71 function formulaires_editer_groupe_mot_identifier_dist($id_groupe ='new',$retour='', $config_fonc='groupes_mots_edit_config', $row=array(), $hidden=''){71 function formulaires_editer_groupe_mot_identifier_dist($id_groupe = 'new', $retour = '', $config_fonc = 'groupes_mots_edit_config', $row = array(), $hidden = ''){ 72 72 return serialize(array(intval($id_groupe))); 73 73 } … … 107 107 * Tableau des erreurs 108 108 **/ 109 function formulaires_editer_groupe_mot_verifier_dist($id_groupe ='new',$retour='', $config_fonc='groupes_mots_edit_config', $row=array(), $hidden=''){109 function formulaires_editer_groupe_mot_verifier_dist($id_groupe = 'new', $retour = '', $config_fonc = 'groupes_mots_edit_config', $row = array(), $hidden = ''){ 110 110 111 111 $erreurs = formulaires_editer_objet_verifier('groupe_mots',0,array('titre')); … … 129 129 * Retour des traitements 130 130 **/ 131 function formulaires_editer_groupe_mot_traiter_dist($id_groupe ='new',$retour='', $config_fonc='groupes_mots_edit_config', $row=array(), $hidden=''){131 function formulaires_editer_groupe_mot_traiter_dist($id_groupe = 'new', $retour = '', $config_fonc = 'groupes_mots_edit_config', $row = array(), $hidden = ''){ 132 132 set_request('redirect',''); 133 133 // cas des checkbox : injecter la valeur non si rien de coche -
_core_/plugins/mots/formulaires/editer_mot.php
r91275 r93092 46 46 * Environnement du formulaire 47 47 **/ 48 function formulaires_editer_mot_charger_dist($id_mot ='new', $id_groupe=0, $retour='', $associer_objet='', $dummy1='', $dummy2='', $config_fonc='mots_edit_config', $row=array(), $hidden=''){48 function formulaires_editer_mot_charger_dist($id_mot = 'new', $id_groupe = 0, $retour = '', $associer_objet = '', $dummy1 = '', $dummy2 = '', $config_fonc = 'mots_edit_config', $row = array(), $hidden = ''){ 49 49 $valeurs = formulaires_editer_objet_charger('mot',$id_mot,$id_groupe,'',$retour,$config_fonc,$row,$hidden); 50 50 if ($valeurs['id_parent'] && !$valeurs['id_groupe']) … … 96 96 * Hash du formulaire 97 97 **/ 98 function formulaires_editer_mot_identifier_dist($id_mot ='new', $id_groupe=0, $retour='', $associer_objet='', $dummy1='', $dummy2='', $config_fonc='mots_edit_config', $row=array(), $hidden=''){98 function formulaires_editer_mot_identifier_dist($id_mot = 'new', $id_groupe = 0, $retour = '', $associer_objet = '', $dummy1 = '', $dummy2 = '', $config_fonc = 'mots_edit_config', $row = array(), $hidden = ''){ 99 99 return serialize(array(intval($id_mot),$associer_objet)); 100 100 } … … 144 144 * Tableau des erreurs 145 145 **/ 146 function formulaires_editer_mot_verifier_dist($id_mot ='new', $id_groupe=0, $retour='', $associer_objet='', $dummy1='', $dummy2='', $config_fonc='mots_edit_config', $row=array(), $hidden=''){146 function formulaires_editer_mot_verifier_dist($id_mot = 'new', $id_groupe = 0, $retour = '', $associer_objet = '', $dummy1 = '', $dummy2 = '', $config_fonc = 'mots_edit_config', $row = array(), $hidden = ''){ 147 147 148 148 $erreurs = formulaires_editer_objet_verifier('mot',$id_mot,array('titre')); … … 188 188 * Retour des traitements 189 189 **/ 190 function formulaires_editer_mot_traiter_dist($id_mot ='new', $id_groupe=0, $retour='', $associer_objet='', $dummy1='', $dummy2='', $config_fonc='mots_edit_config', $row=array(), $hidden=''){190 function formulaires_editer_mot_traiter_dist($id_mot = 'new', $id_groupe = 0, $retour = '', $associer_objet = '', $dummy1 = '', $dummy2 = '', $config_fonc = 'mots_edit_config', $row = array(), $hidden = ''){ 191 191 $res = array(); 192 192 set_request('redirect',''); -
_core_/plugins/mots/inc/mots.php
r89285 r93092 35 35 * Tableau de textes indiquant le nombre d'éléments tel que '3 articles' 36 36 **/ 37 function filtre_objets_associes_mot_dist($id_mot, $id_groupe) {37 function filtre_objets_associes_mot_dist($id_mot, $id_groupe) { 38 38 static $occurrences = array(); 39 39 -
_core_/plugins/mots/mots_administrations.php
r89285 r93092 27 27 * @return void 28 28 */ 29 function mots_upgrade($nom_meta_base_version, $version_cible){29 function mots_upgrade($nom_meta_base_version, $version_cible){ 30 30 31 31 // cas particulier : -
_core_/plugins/mots/mots_autoriser.php
r89285 r93092 240 240 * @return bool true s'il a le droit, false sinon 241 241 */ 242 function autoriser_associermots_dist($faire, $type,$id,$qui,$opt){242 function autoriser_associermots_dist($faire, $type, $id, $qui, $opt){ 243 243 // jamais de mots sur des mots 244 244 if ($type=='mot') return false; … … 292 292 * @return bool true s'il a le droit, false sinon 293 293 */ 294 function autoriser_groupemots_afficherselecteurmots_dist($faire, $type,$id,$qui,$opt){294 function autoriser_groupemots_afficherselecteurmots_dist($faire, $type, $id, $qui, $opt){ 295 295 if (!isset($opt['minirezo']) || !isset($opt['comite'])) { 296 296 $i = sql_fetsel( … … 323 323 * @return bool true s'il a le droit, false sinon 324 324 */ 325 function autoriser_mot_iconifier_dist($faire, $type,$id,$qui,$opt){325 function autoriser_mot_iconifier_dist($faire, $type, $id, $qui, $opt){ 326 326 return (($qui['statut'] == '0minirezo') AND !$qui['restreint']); 327 327 } … … 337 337 * @return bool true s'il a le droit, false sinon 338 338 */ 339 function autoriser_groupemots_iconifier_dist($faire, $type,$id,$qui,$opt){339 function autoriser_groupemots_iconifier_dist($faire, $type, $id, $qui, $opt){ 340 340 return (($qui['statut'] == '0minirezo') AND !$qui['restreint']); 341 341 } -
_core_/plugins/mots/puce_statut/mot.php
r89285 r93092 40 40 * Code HTML de l'image de puce de statut à insérer 41 41 */ 42 function puce_statut_mot_dist($id, $statut, $id_groupe, $type, $ajax ='', $menu_rapide=_ACTIVER_PUCE_RAPIDE) {42 function puce_statut_mot_dist($id, $statut, $id_groupe, $type, $ajax = '', $menu_rapide = _ACTIVER_PUCE_RAPIDE) { 43 43 return "<img src='" . chemin_image("mot-16.png") . "' width='16' height='16' alt='' />"; 44 44 } -
_core_/plugins/organiseur/action/effacer_messagerecu.php
r89285 r93092 19 19 * @return void 20 20 */ 21 function action_effacer_messagerecu_dist($id_auteur =null,$id_message=null){21 function action_effacer_messagerecu_dist($id_auteur = null, $id_message = null){ 22 22 if (is_null($id_auteur) OR is_null($id_message)){ 23 23 $securiser_action = charger_fonction('securiser_action','inc'); -
_core_/plugins/organiseur/action/envoyer_message.php
r89285 r93092 18 18 * @return void 19 19 */ 20 function action_envoyer_message_dist($id_message =null){20 function action_envoyer_message_dist($id_message = null){ 21 21 22 22 if (is_null($id_message)){ -
_core_/plugins/organiseur/action/supprimer_message.php
r89285 r93092 18 18 * @return void 19 19 */ 20 function action_supprimer_message_dist($id_message =null){20 function action_supprimer_message_dist($id_message = null){ 21 21 if (is_null($id_message)){ 22 22 $securiser_action = charger_fonction('securiser_action','inc'); -
_core_/plugins/organiseur/calendrier_quete.json_fonctions.php
r53208 r93092 5 5 include_spip('inc/json'); 6 6 7 function todate($t){return date('Y-m-d H:i:s', $t);}7 function todate($t){return date('Y-m-d H:i:s', $t);} 8 8 9 9 ?> -
_core_/plugins/organiseur/formulaires/editer_message.php
r89842 r93092 16 16 17 17 18 function formulaires_editer_message_charger_dist($id_message ='new',$type='message',$retour='',$accepter_email='oui',$destinataires='',$titre='',$texte=''){18 function formulaires_editer_message_charger_dist($id_message = 'new', $type = 'message', $retour = '', $accepter_email = 'oui', $destinataires = '', $titre = '', $texte = ''){ 19 19 include_spip('inc/autoriser'); 20 20 if ( … … 62 62 63 63 64 function formulaires_editer_message_verifier_dist($id_message ='new',$type='message',$retour='',$accepter_email='oui',$destinataires='',$titre='',$texte=''){64 function formulaires_editer_message_verifier_dist($id_message = 'new', $type = 'message', $retour = '', $accepter_email = 'oui', $destinataires = '', $titre = '', $texte = ''){ 65 65 66 66 $oblis = array('titre'); … … 100 100 } 101 101 102 function formulaires_editer_message_traiter_dist($id_message ='new',$type='message',$retour='',$accepter_email='oui',$destinataires='',$titre='',$texte=''){102 function formulaires_editer_message_traiter_dist($id_message = 'new', $type = 'message', $retour = '', $accepter_email = 'oui', $destinataires = '', $titre = '', $texte = ''){ 103 103 // preformater le post 104 104 // fixer le type de message -
_core_/plugins/organiseur/inc/date_gestion.php
r89285 r93092 21 21 * @return int 22 22 */ 23 function verifier_corriger_date_saisie($suffixe, $horaire,&$erreurs){23 function verifier_corriger_date_saisie($suffixe, $horaire, &$erreurs){ 24 24 include_spip('inc/filtres'); 25 25 $date = _request("date_$suffixe").($horaire?' '.trim(_request("heure_$suffixe")).':00':''); -
_core_/plugins/organiseur/inc/messages.php
r89285 r93092 54 54 * @return array 55 55 */ 56 function messagerie_verifier_destinataires($destinataires, $options=array('accepter_email'=>true)){56 function messagerie_verifier_destinataires($destinataires, $options = array('accepter_email' = >true)){ 57 57 $erreurs = array(); 58 58 … … 110 110 * @return bool|int 111 111 */ 112 function messagerie_diffuser_message($id_message, $auteurs_dest =array()){112 function messagerie_diffuser_message($id_message, $auteurs_dest = array()){ 113 113 $out = false; 114 114 if ($id_message=intval($id_message) … … 127 127 * @return bool 128 128 */ 129 function messagerie_mailer_message($id_message, $emails_dest =array()){129 function messagerie_mailer_message($id_message, $emails_dest = array()){ 130 130 if ($id_message=intval($id_message) 131 131 AND count($emails_dest)) { … … 153 153 * @return void 154 154 */ 155 function messagerie_marquer_message($id_auteur, $liste,$vu){155 function messagerie_marquer_message($id_auteur, $liste, $vu){ 156 156 include_spip('action/editer_liens'); 157 157 if (!is_array($liste)) … … 177 177 * @param array $liste_id_message 178 178 */ 179 function messagerie_marquer_lus($id_auteur, $liste_id_message){messagerie_marquer_message($id_auteur,$liste_id_message,'oui');}179 function messagerie_marquer_lus($id_auteur, $liste_id_message){messagerie_marquer_message($id_auteur, $liste_id_message, 'oui');} 180 180 181 181 /** … … 185 185 * @param array $liste_id_message 186 186 */ 187 function messagerie_marquer_non_lus($id_auteur, $liste_id_message){messagerie_marquer_message($id_auteur,$liste_id_message,'non');}187 function messagerie_marquer_non_lus($id_auteur, $liste_id_message){messagerie_marquer_message($id_auteur, $liste_id_message, 'non');} 188 188 189 189 /** … … 193 193 * @param array $liste_id_message 194 194 */ 195 function messagerie_effacer_message_recu($id_auteur, $liste_id_message){messagerie_marquer_message($id_auteur,$liste_id_message,'poub');}195 function messagerie_effacer_message_recu($id_auteur, $liste_id_message){messagerie_marquer_message($id_auteur, $liste_id_message, 'poub');} 196 196 197 197 ?> -
_core_/plugins/organiseur/inc/quete_calendrier.php
r89285 r93092 60 60 * Liste (date de la veille à 0h, date du lendemain à 23h59:59) 61 61 **/ 62 function quete_calendrier_jour($annee, $mois,$jour) {62 function quete_calendrier_jour($annee, $mois, $jour) { 63 63 $avant = "'" . date("Y-m-d", mktime(0,0,0,$mois,$jour-1,$annee)) . "'"; 64 64 $apres = "'" . date("Y-m-d", mktime(1,1,1,$mois,$jour+1,$annee)) . -
_core_/plugins/organiseur/notifications/instituermessage.php
r89285 r93092 22 22 * @param array $options 23 23 */ 24 function notifications_instituermessage_dist($quoi, $id_message, $options =array()){24 function notifications_instituermessage_dist($quoi, $id_message, $options = array()){ 25 25 26 26 // ne devrait jamais se produire -
_core_/plugins/organiseur/organiseur_administrations.php
r89692 r93092 19 19 * @param string $version_cible 20 20 */ 21 function organiseur_upgrade($nom_meta_base_version, $version_cible){21 function organiseur_upgrade($nom_meta_base_version, $version_cible){ 22 22 // cas particulier : 23 23 // si plugin pas installe mais que la table existe -
_core_/plugins/organiseur/organiseur_autoriser.php
r89285 r93092 19 19 function organiseur_autoriser(){} 20 20 21 function autoriser_calendrier_menu_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){21 function autoriser_calendrier_menu_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 22 22 if($GLOBALS['meta']['messagerie_agenda'] == 'oui') 23 23 return true; … … 25 25 } 26 26 27 function autoriser_messagerie_menu_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){27 function autoriser_messagerie_menu_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 28 28 if($GLOBALS['meta']['messagerie_agenda'] == 'oui') 29 29 return true; … … 31 31 } 32 32 33 function autoriser_message_modifier_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){33 function autoriser_message_modifier_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 34 34 if (!intval($qui['id_auteur'])) 35 35 return false; … … 44 44 } 45 45 46 function autoriser_message_instituer_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){46 function autoriser_message_instituer_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 47 47 // rediriger vers la bonne autorisation en cas de suppression 48 48 if ($opt['statut'] == 'poub') … … 51 51 } 52 52 53 function autoriser_message_supprimer_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){53 function autoriser_message_supprimer_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 54 54 // on peut supprimer un message que l'on peut modifier 55 55 if (autoriser('modifier','message',$id,$qui,$opt)) … … 66 66 } 67 67 68 function autoriser_messagerecu_effacer_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){68 function autoriser_messagerecu_effacer_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 69 69 if (isset($opt['id_auteur'])) 70 70 $id_auteur = $opt['id_auteur']; … … 78 78 } 79 79 80 function autoriser_message_dater_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){80 function autoriser_message_dater_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 81 81 return false; 82 82 } 83 83 84 function autoriser_envoyermessage_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){84 function autoriser_envoyermessage_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 85 85 if (!($GLOBALS['meta']['messagerie_agenda'] == 'oui') OR !intval($qui['id_auteur'])) 86 86 return false; … … 91 91 } 92 92 93 function autoriser_message_voir_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){93 function autoriser_message_voir_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 94 94 if (!intval($qui['id_auteur'])) 95 95 return false; -
_core_/plugins/organiseur/organiseur_fonctions.php
r89285 r93092 146 146 147 147 148 function organiseur_icone_message($type, $taille=24){148 function organiseur_icone_message($type, $taille = 24){ 149 149 $icone = array('pb'=>'pensebete','affich'=>'annonce'); 150 150 $icone = isset($icone[$type])?$icone[$type]:'message'; -
_core_/plugins/petitions/action/confirmer_signature.php
r89285 r93092 26 26 * @return string 27 27 */ 28 function action_confirmer_signature_dist($var_confirm =null) {28 function action_confirmer_signature_dist($var_confirm = null) { 29 29 static $confirm = null; 30 30 -
_core_/plugins/petitions/action/editer_petition.php
r89285 r93092 19 19 if (!defined("_ECRIRE_INC_VERSION")) return; 20 20 21 function action_editer_petition_dist($arg =null) {21 function action_editer_petition_dist($arg = null) { 22 22 23 23 if (is_null($arg)){ … … 51 51 * @return string 52 52 */ 53 function petition_modifier($id_petition, $set =null) {53 function petition_modifier($id_petition, $set = null) { 54 54 $err = ''; 55 55 … … 86 86 * Identifiant de la pétition 87 87 */ 88 function petition_inserer($id_article, $set =null) {88 function petition_inserer($id_article, $set = null) { 89 89 90 90 // Si id_article vaut 0 ou n'est pas definie, echouer … … 210 210 211 211 // http://code.spip.net/@revision_petition 212 function revision_petition($id_petition, $c =null) {212 function revision_petition($id_petition, $c = null) { 213 213 return petition_modifier($id_petition,$c); 214 214 } -
_core_/plugins/petitions/action/editer_signature.php
r89285 r93092 14 14 15 15 // http://code.spip.net/@action_editer_signature_dist 16 function action_editer_signature_dist($arg =null) {16 function action_editer_signature_dist($arg = null) { 17 17 18 18 if (is_null($arg)){ … … 44 44 * @return string 45 45 */ 46 function signature_modifier($id_signature, $set =null) {46 function signature_modifier($id_signature, $set = null) { 47 47 $err = ''; 48 48 … … 80 80 * @return int 81 81 */ 82 function signature_inserer($id_petition, $set =null) {82 function signature_inserer($id_petition, $set = null) { 83 83 84 84 // Si $id_petition vaut 0 ou n'est pas definie, echouer … … 123 123 // il n'est pas autoriser de deplacer une signature 124 124 // http://code.spip.net/@signature_instituer 125 function signature_instituer($id_signature, $c, $calcul_rub =true) {125 function signature_instituer($id_signature, $c, $calcul_rub = true) { 126 126 127 127 include_spip('inc/autoriser'); … … 237 237 238 238 // obsolete 239 function revision_signature($id_signature, $c =false) {239 function revision_signature($id_signature, $c = false) { 240 240 return signature_modifier($id_signature,$c); 241 241 } -
_core_/plugins/petitions/action/relancer_signature.php
r89285 r93092 13 13 if (!defined("_ECRIRE_INC_VERSION")) return; 14 14 15 function action_relancer_signature_dist($id_signature =null){15 function action_relancer_signature_dist($id_signature = null){ 16 16 if (!$id_signature){ 17 17 $securiser_action = charger_fonction('securiser_action','inc'); -
_core_/plugins/petitions/action/supprimer_signature.php
r89285 r93092 13 13 if (!defined("_ECRIRE_INC_VERSION")) return; 14 14 15 function action_supprimer_signature_dist($id_signature =null){15 function action_supprimer_signature_dist($id_signature = null){ 16 16 if (!$id_signature){ 17 17 $securiser_action = charger_fonction('securiser_action','inc'); -
_core_/plugins/petitions/action/traiter_lot_signature.php
r89285 r93092 13 13 if (!defined("_ECRIRE_INC_VERSION")) return; 14 14 15 function action_traiter_lot_signature_dist($arg =null) {15 function action_traiter_lot_signature_dist($arg = null) { 16 16 17 17 if (is_null($arg)){ -
_core_/plugins/petitions/action/valider_signature.php
r89285 r93092 13 13 if (!defined("_ECRIRE_INC_VERSION")) return; 14 14 15 function action_valider_signature_dist($id_signature =null){15 function action_valider_signature_dist($id_signature = null){ 16 16 if (!$id_signature){ 17 17 $securiser_action = charger_fonction('securiser_action','inc'); -
_core_/plugins/petitions/petitions_administrations.php
r89285 r93092 19 19 * @param string $version_cible 20 20 */ 21 function petitions_upgrade($nom_meta_base_version, $version_cible){21 function petitions_upgrade($nom_meta_base_version, $version_cible){ 22 22 // cas particulier : 23 23 // si plugin pas installe mais que la table existe -
_core_/plugins/petitions/petitions_autoriser.php
r89285 r93092 124 124 * @return bool true s'il a le droit, false sinon 125 125 */ 126 function autoriser_controlerpetition_menu_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){126 function autoriser_controlerpetition_menu_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 127 127 return sql_countsel('spip_signatures')>0; 128 128 } -
_core_/plugins/porte_plume/porte_plume_fonctions.php
r91617 r93092 140 140 * @return void 141 141 */ 142 function __construct($params =array()){142 function __construct($params = array()){ 143 143 foreach ($params as $p=>$v) { 144 144 if (isset($this->$p)) { … … 164 164 * Paramètres, soustrait de ceux qui ne sont pas valides 165 165 */ 166 function verif_params($nom, $params =array()) {166 function verif_params($nom, $params = array()) { 167 167 // si markupset, on boucle sur les items 168 168 if (stripos($nom, 'markupSet')!==false) { … … 212 212 * False si l'identifiant cherché n'est pas trouvé 213 213 */ 214 function affecter(&$tableau, $identifiant, $params =array(), $lieu='dedans', $plusieurs=false){214 function affecter(&$tableau, $identifiant, $params = array(), $lieu = 'dedans', $plusieurs = false){ 215 215 static $cle_de_recherche = 'id'; // ou className ? 216 216 … … 282 282 * false si aucun paramètre à affecter, true sinon. 283 283 */ 284 function affecter_a_tous(&$tableau, $params =array(), $ids=array()){284 function affecter_a_tous(&$tableau, $params = array(), $ids = array()){ 285 285 if (!$params) 286 286 return false; … … 319 319 * array sinon : description de l'identifiant cherché. 320 320 */ 321 function set($identifiant, $params =array()) {321 function set($identifiant, $params = array()) { 322 322 // prudence tout de meme a pas tout modifier involontairement (si array) 323 323 if (!$identifiant) return false; … … 800 800 * Texte traité avec les filtres déclarés pour le champ. 801 801 */ 802 function traitements_previsu($texte, $nom_champ ='', $type_objet='', $connect=null) {802 function traitements_previsu($texte, $nom_champ = '', $type_objet = '', $connect = null) { 803 803 include_spip('public/interfaces'); // charger les traitements 804 804 -
_core_/plugins/porte_plume/porte_plume_pipelines.php
r91618 r93092 134 134 * @return string Contenu du head complété 135 135 */ 136 function porte_plume_insert_head_css($flux ='', $prive = false){136 function porte_plume_insert_head_css($flux = '', $prive = false){ 137 137 include_spip('inc/autoriser'); 138 138 // toujours autoriser pour le prive. -
_core_/plugins/revisions/afficher_diff/champ.php
r89285 r93092 24 24 * @return string 25 25 */ 26 function afficher_diff_champ_dist($champ, $old,$new,$format='diff'){26 function afficher_diff_champ_dist($champ, $old, $new, $format = 'diff'){ 27 27 // ne pas se compliquer la vie ! 28 28 if ($old==$new) -
_core_/plugins/revisions/afficher_diff/id_rubrique.php
r89285 r93092 26 26 * @return string 27 27 */ 28 function afficher_diff_id_rubrique_dist($champ, $old,$new,$format='diff'){28 function afficher_diff_id_rubrique_dist($champ, $old, $new, $format = 'diff'){ 29 29 // ne pas se compliquer la vie ! 30 30 if ($old==$new) -
_core_/plugins/revisions/afficher_diff/jointure.php
r89285 r93092 24 24 * @return string 25 25 */ 26 function afficher_diff_jointure_dist($champ, $old,$new,$format='diff'){26 function afficher_diff_jointure_dist($champ, $old, $new, $format = 'diff'){ 27 27 $join = substr($champ,9); 28 28 $objet = objet_type($join); -
_core_/plugins/revisions/formulaires/reviser.php
r89285 r93092 15 15 include_spip('base/abstract_sql'); 16 16 17 function trouver_version_inf($objet, $id_objet,$cond=""){17 function trouver_version_inf($objet, $id_objet, $cond = ""){ 18 18 return sql_getfetsel( 19 19 'id_version', … … 25 25 ); 26 26 } 27 function check_version_diff($objet, $id_objet, $id_version, $id_diff, $last_version =0){27 function check_version_diff($objet, $id_objet, $id_version, $id_diff, $last_version = 0){ 28 28 if (!$last_version) 29 29 $last_version = trouver_version_inf($objet,$id_objet); … … 61 61 } 62 62 63 function formulaires_reviser_charger_dist($objet, $id_objet,$id_version,$id_diff){63 function formulaires_reviser_charger_dist($objet, $id_objet, $id_version, $id_diff){ 64 64 if (!$objets = unserialize($GLOBALS['meta']['objets_versions'])) 65 65 $objets = array(); … … 84 84 } 85 85 86 function formulaires_reviser_verifier_dist($objet, $id_objet,$id_version,$id_diff){86 function formulaires_reviser_verifier_dist($objet, $id_objet, $id_version, $id_diff){ 87 87 $erreurs = array(); 88 88 list($id_version,$id_diff) = check_version_diff($objet,$id_objet,_request('id_version'),_request('id_diff')); … … 92 92 } 93 93 94 function formulaires_reviser_traiter_dist($objet, $id_objet,$id_version,$id_diff){94 function formulaires_reviser_traiter_dist($objet, $id_objet, $id_version, $id_diff){ 95 95 $res = array('message_ok'=>'','editable'=>true); 96 96 -
_core_/plugins/revisions/inc/revisions.php
r92679 r93092 42 42 43 43 // http://code.spip.net/@replace_fragment 44 function replace_fragment($id_objet, $objet, $version_min, $version_max, $id_fragment, $fragment) {44 function replace_fragment($id_objet, $objet, $version_min, $version_max, $id_fragment, $fragment) { 45 45 $fragment = serialize($fragment); 46 46 $compress = 0; … … 82 82 83 83 // http://code.spip.net/@envoi_delete_fragments 84 function envoi_delete_fragments($id_objet, $objet, $deletes) {84 function envoi_delete_fragments($id_objet, $objet, $deletes) { 85 85 if (count($deletes)) { 86 86 sql_delete("spip_versions_fragments", "id_objet=".intval($id_objet)." AND objet=".sql_quote($objet)." AND ((". join(") OR (", $deletes)."))"); … … 93 93 // 94 94 // http://code.spip.net/@ajouter_fragments 95 function ajouter_fragments($id_objet, $objet, $id_version, $fragments) {95 function ajouter_fragments($id_objet, $objet, $id_version, $fragments) { 96 96 global $agregation_versions; 97 97 … … 142 142 // 143 143 // http://code.spip.net/@supprimer_fragments 144 function supprimer_fragments($id_objet, $objet, $version_debut, $version_fin) {144 function supprimer_fragments($id_objet, $objet, $version_debut, $version_fin) { 145 145 global $agregation_versions; 146 146 … … 259 259 * @return array Couples id_fragment => texte 260 260 */ 261 function recuperer_fragments($id_objet, $objet, $id_version) {261 function recuperer_fragments($id_objet, $objet, $id_version) { 262 262 $fragments = array(); 263 263 … … 400 400 * @return array Couples champs => textes 401 401 */ 402 function recuperer_version($id_objet, $objet, $id_version) {402 function recuperer_version($id_objet, $objet, $id_version) { 403 403 404 404 $champs = sql_getfetsel("champs", "spip_versions", "id_objet=" . intval($id_objet) . " AND objet=".sql_quote($objet)." AND id_version=" . intval($id_version)); … … 421 421 * @return array Couples (champ => texte) 422 422 */ 423 function reconstuire_version($champs, $fragments, $res =array()) {423 function reconstuire_version($champs, $fragments, $res = array()) { 424 424 425 425 static $msg; … … 441 441 442 442 // http://code.spip.net/@supprimer_versions 443 function supprimer_versions($id_objet, $objet, $version_min, $version_max) {443 function supprimer_versions($id_objet, $objet, $version_min, $version_max) { 444 444 sql_delete("spip_versions", "id_objet=".intval($id_objet)." AND objet=".sql_quote($objet)." AND id_version>=$version_min AND id_version<=$version_max"); 445 445 … … 461 461 * id_version : identifiant de la version 462 462 **/ 463 function ajouter_version($id_objet, $objet, $champs, $titre_version = "", $id_auteur = null) {463 function ajouter_version($id_objet, $objet, $champs, $titre_version = "", $id_auteur = null) { 464 464 $paras = $paras_old = $paras_champ = $fragments = array(); 465 465 … … 695 695 * @return string 696 696 */ 697 function recuperer_valeur_champ_jointure($objet, $id_objet,$jointure){697 function recuperer_valeur_champ_jointure($objet, $id_objet, $jointure){ 698 698 $objet_joint = objet_type($jointure); 699 699 include_spip('action/editer_liens'); … … 729 729 * @return int 730 730 */ 731 function verifier_premiere_revision($table, $objet,$id_objet,$champs=null, $id_auteur=0){731 function verifier_premiere_revision($table, $objet, $id_objet, $champs = null, $id_auteur = 0){ 732 732 733 733 $id_table_objet = id_table_objet($objet); -
_core_/plugins/revisions/inc/revisions_autoriser.php
r89285 r93092 69 69 * @return bool true s'il a le droit, false sinon 70 70 */ 71 function autoriser_revisions_menu_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){71 function autoriser_revisions_menu_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 72 72 // SI pas de revisions sur un objet quelconque. 73 73 // ET pas de version... pas de bouton, c'est inutile... -
_core_/plugins/revisions/inc/suivi_versions.php
r89285 r93092 33 33 * Texte HTML du diff. 34 34 */ 35 function revisions_diff ($id_objet, $objet, $id_version, $court=false){35 function revisions_diff ($id_objet, $objet, $id_version, $court = false){ 36 36 $textes = revision_comparee($id_objet,$objet, $id_version, 'diff'); 37 37 if (!is_array($textes)) return $textes; … … 70 70 * @return void 71 71 */ 72 function retrouver_champ_version_objet($objet, $id_objet,$id_version,$champ,&$champs){72 function retrouver_champ_version_objet($objet, $id_objet, $id_version, $champ, &$champs){ 73 73 if (isset($champs[$champ])) 74 74 return; … … 116 116 * Couples (champ => texte) 117 117 */ 118 function revision_comparee($id_objet, $objet, $id_version, $format ='diff', $id_diff=NULL) {118 function revision_comparee($id_objet, $objet, $id_version, $format = 'diff', $id_diff = NULL) { 119 119 include_spip('inc/diff'); 120 120 -
_core_/plugins/revisions/prive/objets/contenu/revision_fonctions.php
r72197 r93092 17 17 * Le label du champ 18 18 */ 19 function label_champ($champ, $objet=false){19 function label_champ($champ, $objet = false){ 20 20 $label = ""; 21 21 // si jointure: renvoyer le nom des objets joints -
_core_/plugins/revisions/revisions_administrations.php
r91102 r93092 25 25 * @param string $version_cible 26 26 */ 27 function revisions_upgrade($nom_meta_base_version, $version_cible){27 function revisions_upgrade($nom_meta_base_version, $version_cible){ 28 28 // cas particulier : 29 29 // si plugin pas installe mais que la table existe -
_core_/plugins/safehtml/lib/safehtml/classes/HTMLSax3.php
r82427 r93092 246 246 } 247 247 248 function set_option($name, $value =1) {248 function set_option($name, $value = 1) { 249 249 if ( array_key_exists($name,$this->state_parser->parser_options) ) { 250 250 $this->state_parser->parser_options[$name] = $value; -
_core_/plugins/safehtml/lib/safehtml/classes/HTMLSax3/Decorators.php
r82427 r93092 23 23 $this->orig_close_method = $orig_close_method; 24 24 } 25 function foldOpen(&$parser, $tag, $attrs =array(), $empty = FALSE) {25 function foldOpen(&$parser, $tag, $attrs = array(), $empty = FALSE) { 26 26 $this->orig_obj->{$this->orig_open_method}($parser, strtoupper($tag), $attrs, $empty); 27 27 } … … 74 74 } 75 75 if (version_compare(phpversion(), '4.3', '<') && !function_exists('html_entity_decode') ) { 76 function html_entity_decode($str, $style =ENT_NOQUOTES) {76 function html_entity_decode($str, $style = ENT_NOQUOTES) { 77 77 return strtr($str, 78 78 array_flip(get_html_translation_table(HTML_ENTITIES,$style))); -
_core_/plugins/safehtml/lib/safehtml/classes/safehtml.php
r82427 r93092 114 114 } 115 115 116 function _writeAttrs ($attrs, $tag=null)116 function _writeAttrs ($attrs, $tag = null) 117 117 { 118 118 if (is_array($attrs)) { -
_core_/plugins/sites/action/editer_site.php
r85600 r93092 38 38 * Liste (identifiant du site, Texte d'erreur éventuel) 39 39 */ 40 function action_editer_site_dist($arg =null) {40 function action_editer_site_dist($arg = null) { 41 41 42 42 if (is_null($arg)){ … … 76 76 * Identifiant du site créé 77 77 */ 78 function site_inserer($id_rubrique, $set =null) {78 function site_inserer($id_rubrique, $set = null) { 79 79 80 80 include_spip('inc/rubriques'); … … 143 143 * - Chaîne contenant un texte d'erreur sinon. 144 144 */ 145 function site_modifier($id_syndic, $set =false) {145 function site_modifier($id_syndic, $set = false) { 146 146 $resyndiquer = false; 147 147 … … 226 226 * @return string 227 227 **/ 228 function syndic_set($id_syndic, $set =false) {228 function syndic_set($id_syndic, $set = false) { 229 229 return site_modifier($id_syndic,$set); 230 230 } … … 240 240 * @return string 241 241 **/ 242 function revisions_sites($id_syndic, $set =false){242 function revisions_sites($id_syndic, $set = false){ 243 243 return site_modifier($id_syndic,$set); 244 244 } … … 255 255 * @return string 256 256 **/ 257 function instituer_syndic($id_syndic, $c, $calcul_rub =true){257 function instituer_syndic($id_syndic, $c, $calcul_rub = true){ 258 258 include_spip('action/editer_objet'); 259 259 return objet_instituer('site',$id_syndic, $c, $calcul_rub); -
_core_/plugins/sites/action/exporter_bookmarks.php
r88451 r93092 13 13 if (!defined("_ECRIRE_INC_VERSION")) return; 14 14 15 function action_exporter_bookmarks_dist($arg =null){15 function action_exporter_bookmarks_dist($arg = null){ 16 16 17 17 if (is_null($arg)){ -
_core_/plugins/sites/action/importer_bookmarks_netscape.php
r88451 r93092 13 13 if (!defined("_ECRIRE_INC_VERSION")) return; 14 14 15 function action_importer_bookmarks_netscape_dist($fichier_ok, $id_parent,$importer_statut_publie,$importer_tags){15 function action_importer_bookmarks_netscape_dist($fichier_ok, $id_parent, $importer_statut_publie, $importer_tags){ 16 16 17 17 $nb = 0; … … 80 80 } 81 81 82 function bookmarks_insert($tree, $id_parent,$importer_statut_publie,$importer_tags,$level=0){82 function bookmarks_insert($tree, $id_parent, $importer_statut_publie, $importer_tags, $level = 0){ 83 83 include_spip('action/editer_rubrique'); 84 84 include_spip('action/editer_site'); -
_core_/plugins/sites/action/importer_bookmarks_opml.php
r88451 r93092 13 13 if (!defined('_ECRIRE_INC_VERSION')) return; 14 14 15 function action_importer_bookmarks_opml_dist($fichier_ok, $id_parent,$importer_statut_publie,$importer_tags){15 function action_importer_bookmarks_opml_dist($fichier_ok, $id_parent, $importer_statut_publie, $importer_tags){ 16 16 $nb = 0; 17 17 if (autoriser('importer','_sites')){ … … 73 73 } 74 74 75 function bookmarks_opml_insert($tree, $id_parent,$importer_statut_publie,$importer_tags){75 function bookmarks_opml_insert($tree, $id_parent, $importer_statut_publie, $importer_tags){ 76 76 include_spip('action/editer_rubrique'); 77 77 include_spip('action/editer_site'); -
_core_/plugins/sites/action/syndiquer_site.php
r88959 r93092 14 14 15 15 // http://code.spip.net/@action_editer_site_dist 16 function action_syndiquer_site_dist($id_syndic =null) {16 function action_syndiquer_site_dist($id_syndic = null) { 17 17 18 18 if (is_null($id_syndic)){ -
_core_/plugins/sites/formulaires/editer_site.php
r90717 r93092 45 45 * Environnement du formulaire 46 46 **/ 47 function formulaires_editer_site_charger_dist($id_syndic ='new', $id_rubrique=0, $retour='', $lier_trad=0, $config_fonc='sites_edit_config', $row=array(), $hidden=''){47 function formulaires_editer_site_charger_dist($id_syndic = 'new', $id_rubrique = 0, $retour = '', $lier_trad = 0, $config_fonc = 'sites_edit_config', $row = array(), $hidden = ''){ 48 48 $valeurs = formulaires_editer_objet_charger('site',$id_syndic,$id_rubrique,$lier_trad,$retour,$config_fonc,$row,$hidden); 49 49 # pour recuperer le logo issu d'analyse auto … … 74 74 * Hash du formulaire 75 75 */ 76 function formulaires_editer_site_identifier_dist($id_syndic ='new', $id_rubrique=0, $retour='', $lier_trad=0, $config_fonc='sites_edit_config', $row=array(), $hidden=''){76 function formulaires_editer_site_identifier_dist($id_syndic = 'new', $id_rubrique = 0, $retour = '', $lier_trad = 0, $config_fonc = 'sites_edit_config', $row = array(), $hidden = ''){ 77 77 return serialize(array(intval($id_syndic),$lier_trad)); 78 78 } … … 120 120 * Erreurs du formulaire 121 121 */ 122 function formulaires_editer_site_verifier_dist($id_syndic ='new', $id_rubrique=0, $retour='', $lier_trad=0, $config_fonc='sites_edit_config', $row=array(), $hidden=''){122 function formulaires_editer_site_verifier_dist($id_syndic = 'new', $id_rubrique = 0, $retour = '', $lier_trad = 0, $config_fonc = 'sites_edit_config', $row = array(), $hidden = ''){ 123 123 include_spip('inc/filtres'); 124 124 include_spip('inc/site'); … … 186 186 * Erreurs du formulaire 187 187 */ 188 function formulaires_editer_site_traiter_dist($id_syndic ='new', $id_rubrique=0, $retour='', $lier_trad=0, $config_fonc='sites_edit_config', $row=array(), $hidden=''){188 function formulaires_editer_site_traiter_dist($id_syndic = 'new', $id_rubrique = 0, $retour = '', $lier_trad = 0, $config_fonc = 'sites_edit_config', $row = array(), $hidden = ''){ 189 189 // netoyer les entrees 190 190 if (!is_null(_request('url_site'))) -
_core_/plugins/sites/formulaires/editer_site_fonctions.php
r79783 r93092 13 13 if (!defined('_ECRIRE_INC_VERSION')) return; 14 14 15 function saisie_url_syndic($url_syndic, $name='url_syndic',$id='url_syndic'){15 function saisie_url_syndic($url_syndic, $name = 'url_syndic', $id = 'url_syndic'){ 16 16 $res = ""; 17 17 if (strlen($url_syndic) < 8) $url_syndic = "http://"; -
_core_/plugins/sites/formulaires/regler_moderation_site.php
r79783 r93092 35 35 * Environnement du formulaire 36 36 **/ 37 function formulaires_regler_moderation_site_charger_dist($id_syndic, $retour=''){37 function formulaires_regler_moderation_site_charger_dist($id_syndic, $retour = ''){ 38 38 $valeurs = formulaires_editer_objet_charger('site',$id_syndic,0,0,$retour,''); 39 39 # pour recuperer le logo issu d'analyse auto … … 56 56 * Hash du formulaire 57 57 */ 58 function formulaires_regler_moderation_site_identifier_dist($id_syndic, $retour=''){58 function formulaires_regler_moderation_site_identifier_dist($id_syndic, $retour = ''){ 59 59 return serialize(array($id_syndic)); 60 60 } … … 70 70 * Erreurs du formulaire 71 71 **/ 72 function formulaires_regler_moderation_site_verifier_dist($id_syndic, $retour=''){72 function formulaires_regler_moderation_site_verifier_dist($id_syndic, $retour = ''){ 73 73 $erreurs = array(); 74 74 … … 93 93 * Retours des traitements 94 94 **/ 95 function formulaires_regler_moderation_site_traiter_dist($id_syndic, $retour=''){95 function formulaires_regler_moderation_site_traiter_dist($id_syndic, $retour = ''){ 96 96 $res = formulaires_editer_objet_traiter('site',$id_syndic,0,0,$retour,''); 97 97 $res['editable'] = true; -
_core_/plugins/sites/inc/feedfinder.php
r88650 r93092 111 111 * Le tableau des feed trouvés dans la page 112 112 */ 113 function get_feed_from_url($url, $buffer =false){113 function get_feed_from_url($url, $buffer = false){ 114 114 global $verif_complete; 115 115 //j'ai prevenu ce sera pas fin -
_core_/plugins/sites/inc/syndic.php
r92997 r93092 38 38 * - string : texte d'erreur 39 39 **/ 40 function analyser_backend($rss, $url_syndic ='') {40 function analyser_backend($rss, $url_syndic = '') { 41 41 include_spip('inc/texte'); # pour couper() 42 42 … … 338 338 * Timestamp 339 339 **/ 340 function my_strtotime($la_date, $lang =null) {340 function my_strtotime($la_date, $lang = null) { 341 341 // format complet 342 342 if (preg_match( … … 406 406 // le mot et son url ; on cree <a href="url" rel="tag">mot</a> 407 407 // http://code.spip.net/@creer_tag 408 function creer_tag($mot, $type,$url) {408 function creer_tag($mot, $type, $url) { 409 409 if (!strlen($mot = trim($mot))) return ''; 410 410 $mot = "<a rel=\"tag\">$mot</a>"; -
_core_/plugins/sites/liens/implicite_site.php
r79783 r93092 13 13 if (!defined("_ECRIRE_INC_VERSION")) return; 14 14 15 function liens_implicite_site_dist($texte, $id,$type,$args,$ancre,$connect=''){15 function liens_implicite_site_dist($texte, $id, $type, $args, $ancre, $connect = ''){ 16 16 if (!$id = intval($id)) 17 17 return false; -
_core_/plugins/sites/puce_statut/site.php
r88959 r93092 15 15 16 16 // http://code.spip.net/@puce_statut_site_dist 17 function puce_statut_site_dist($id, $statut, $id_rubrique, $type, $ajax ='', $menu_rapide=_ACTIVER_PUCE_RAPIDE){17 function puce_statut_site_dist($id, $statut, $id_rubrique, $type, $ajax = '', $menu_rapide = _ACTIVER_PUCE_RAPIDE){ 18 18 19 19 $t = sql_getfetsel("syndication", "spip_syndic", "id_syndic=".intval($id)); -
_core_/plugins/sites/sites_administrations.php
r90968 r93092 19 19 * @param string $version_cible 20 20 */ 21 function sites_upgrade($nom_meta_base_version, $version_cible){21 function sites_upgrade($nom_meta_base_version, $version_cible){ 22 22 // cas particulier : 23 23 // si plugin pas installe mais que la table existe -
_core_/plugins/sites/sites_autoriser.php
r92732 r93092 19 19 20 20 // bouton du bandeau 21 function autoriser_sites_menu_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){21 function autoriser_sites_menu_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 22 22 return 23 23 autoriser('voir', '_sites', $id, $qui, $opt); … … 29 29 } 30 30 31 function autoriser_sites_voir_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){31 function autoriser_sites_voir_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 32 32 return 33 33 ($GLOBALS['meta']['activer_sites'] != 'non'); -
_core_/plugins/statistiques/action/statistiques_archiver.php
r92686 r93092 52 52 * @param string $arg 53 53 */ 54 function action_statistiques_archiver_dist($arg =null){54 function action_statistiques_archiver_dist($arg = null){ 55 55 if (!$arg) { 56 56 $securiser_action = charger_fonction('securiser_action', 'inc'); -
_core_/plugins/statistiques/base/delete_referers.php
r82427 r93092 24 24 * @return string 25 25 */ 26 function base_delete_referers_dist($titre ='', $reprise='')26 function base_delete_referers_dist($titre = '', $reprise = '') 27 27 { 28 28 if (!$titre) return; // anti-testeur automatique -
_core_/plugins/statistiques/base/delete_stats.php
r79783 r93092 24 24 * @return string 25 25 */ 26 function base_delete_stats_dist($titre ='', $reprise='')26 function base_delete_stats_dist($titre = '', $reprise = '') 27 27 { 28 28 if (!$titre) return; // anti-testeur automatique -
_core_/plugins/statistiques/inc/statistiques.php
r88959 r93092 19 19 * @return float 20 20 */ 21 function moyenne_glissante($valeur = false, $glisse =0) {21 function moyenne_glissante($valeur = false, $glisse = 0) { 22 22 static $v = array(); 23 23 // pas d'argument, raz de la moyenne … … 58 58 * @return array 59 59 */ 60 function classement_populaires($type, $serveur =''){60 function classement_populaires($type, $serveur = ''){ 61 61 static $classement = array(); 62 62 if (isset($classement[$type])) -
_core_/plugins/statistiques/prive/squelettes/contenu/stats_repartition_fonctions.php
r88959 r93092 36 36 37 37 // http://code.spip.net/@enfants_aff 38 function enfants_aff($id_parent, $decalage, $taille, $critere, $gauche=0) {38 function enfants_aff($id_parent, $decalage, $taille, $critere, $gauche = 0) { 39 39 global $spip_lang_right, $spip_lang_left; 40 40 static $total_site=null; -
_core_/plugins/statistiques/prive/squelettes/inclure/stats-visites-data_fonctions.php
r72730 r93092 6 6 include_spip('inc/statistiques'); 7 7 8 function duree_affiche($duree, $periode){8 function duree_affiche($duree, $periode){ 9 9 if (intval($duree)) 10 10 return $duree; … … 19 19 } 20 20 21 function duree_zoom($duree, $sens='plus'){21 function duree_zoom($duree, $sens = 'plus'){ 22 22 $largeur_abs = 420/$duree; 23 23 … … 40 40 } 41 41 42 function stats_total($serveur =''){42 function stats_total($serveur = ''){ 43 43 $row = sql_fetsel("SUM(visites) AS total_absolu", "spip_visites",'','','','','',$serveur); 44 44 return $row ? $row['total_absolu'] : 0; -
_core_/plugins/statistiques/stats_autoriser.php
r92665 r93092 28 28 * @return bool true s'il a le droit, false sinon 29 29 */ 30 function autoriser_statistiques_menu_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){30 function autoriser_statistiques_menu_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 31 31 return autoriser('voirstats', $type, $id, $qui, $opt); 32 32 } … … 43 43 * @return bool true s'il a le droit, false sinon 44 44 */ 45 function autoriser_referers_menu_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){45 function autoriser_referers_menu_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 46 46 return autoriser('voirstats', $type, $id, $qui, $opt); 47 47 } -
_core_/plugins/svp/action/teleporter.php
r71790 r93092 25 25 * true si l'opération est correctement réalisée 26 26 */ 27 function action_teleporter_composant_dist($methode, $source,$dest,$options=array()){27 function action_teleporter_composant_dist($methode, $source, $dest, $options = array()){ 28 28 29 29 # Si definie a '', le chargeur est interdit ; mais on n'aurait de toutes -
_core_/plugins/svp/formulaires/admin_plugin.php
r89117 r93092 30 30 * Environnement du formulaire 31 31 **/ 32 function formulaires_admin_plugin_charger_dist($voir ='actif', $verrouille='non', $id_paquet='',$redirect=''){32 function formulaires_admin_plugin_charger_dist($voir = 'actif', $verrouille = 'non', $id_paquet = '', $redirect = ''){ 33 33 $valeurs = array(); 34 34 … … 94 94 * Tableau des erreurs 95 95 **/ 96 function formulaires_admin_plugin_verifier_dist($voir ='actif', $verrouille='non', $id_paquet='',$redirect=''){96 function formulaires_admin_plugin_verifier_dist($voir = 'actif', $verrouille = 'non', $id_paquet = '', $redirect = ''){ 97 97 98 98 $erreurs = array(); … … 182 182 * Retours du traitement 183 183 **/ 184 function formulaires_admin_plugin_traiter_dist($voir ='actif', $verrouille='non', $id_paquet='',$redirect=''){184 function formulaires_admin_plugin_traiter_dist($voir = 'actif', $verrouille = 'non', $id_paquet = '', $redirect = ''){ 185 185 186 186 $retour = array(); -
_core_/plugins/svp/inc/pcltar.php
r55332 r93092 97 97 // 1 on success, or an error code (see table at the beginning). 98 98 // -------------------------------------------------------------------------------- 99 function PclTarCreate($p_tarname, $p_filelist ="", $p_mode="", $p_add_dir="", $p_remove_dir="")99 function PclTarCreate($p_tarname, $p_filelist = "", $p_mode = "", $p_add_dir = "", $p_remove_dir = "") 100 100 { 101 101 TrFctStart(__FILE__, __LINE__, "PclTarCreate", "tar=$p_tarname, file='$p_filelist', mode=$p_mode, add_dir='$p_add_dir', remove_dir='$p_remove_dir'"); … … 237 237 // Or an error code (see list on top). 238 238 // -------------------------------------------------------------------------------- 239 function PclTarAddList($p_tarname, $p_filelist, $p_add_dir ="", $p_remove_dir="", $p_mode="")239 function PclTarAddList($p_tarname, $p_filelist, $p_add_dir = "", $p_remove_dir = "", $p_mode = "") 240 240 { 241 241 TrFctStart(__FILE__, __LINE__, "PclTarAddList", "tar=$p_tarname, file=$p_filelist, p_add_dir='$p_add_dir', p_remove_dir='$p_remove_dir', mode=$p_mode"); … … 311 311 // echo "Filename :'".$v_list[$i][filename]."'<br>"; 312 312 // -------------------------------------------------------------------------------- 313 function PclTarList($p_tarname, $p_mode ="")313 function PclTarList($p_tarname, $p_mode = "") 314 314 { 315 315 TrFctStart(__FILE__, __LINE__, "PclTarList", "tar=$p_tarname, mode='$p_mode'"); … … 365 365 // Same as PclTarList() 366 366 // -------------------------------------------------------------------------------- 367 function PclTarExtract($p_tarname, $p_path ="./", $p_remove_path="", $p_mode="")367 function PclTarExtract($p_tarname, $p_path = "./", $p_remove_path = "", $p_mode = "") 368 368 { 369 369 TrFctStart(__FILE__, __LINE__, "PclTarExtract", "tar='$p_tarname', path='$p_path', remove_path='$p_remove_path', mode='$p_mode'"); … … 424 424 // Same as PclTarList() 425 425 // -------------------------------------------------------------------------------- 426 function PclTarExtractList($p_tarname, $p_filelist, $p_path ="./", $p_remove_path="", $p_mode="")426 function PclTarExtractList($p_tarname, $p_filelist, $p_path = "./", $p_remove_path = "", $p_mode = "") 427 427 { 428 428 TrFctStart(__FILE__, __LINE__, "PclTarExtractList", "tar=$p_tarname, list, path=$p_path, remove_path='$p_remove_path', mode='$p_mode'"); … … 513 513 // Same as PclTarList() 514 514 // -------------------------------------------------------------------------------- 515 function PclTarExtractIndex($p_tarname, $p_index, $p_path ="./", $p_remove_path="", $p_mode="")515 function PclTarExtractIndex($p_tarname, $p_index, $p_path = "./", $p_remove_path = "", $p_mode = "") 516 516 { 517 517 TrFctStart(__FILE__, __LINE__, "PclTarExtractIndex", "tar=$p_tarname, index='$p_index', path=$p_path, remove_path='$p_remove_path', mode='$p_mode'"); … … 582 582 // List of the files which are kept in the archive (same format as PclTarList()) 583 583 // -------------------------------------------------------------------------------- 584 function PclTarDelete($p_tarname, $p_filelist, $p_mode ="")584 function PclTarDelete($p_tarname, $p_filelist, $p_mode = "") 585 585 { 586 586 TrFctStart(__FILE__, __LINE__, "PclTarDelete", "tar='$p_tarname', list='$p_filelist', mode='$p_mode'"); … … 655 655 // "updated", "not_updated", "added" or "ok" for the files not concerned. 656 656 // -------------------------------------------------------------------------------- 657 function PclTarUpdate($p_tarname, $p_filelist, $p_mode ="", $p_add_dir="", $p_remove_dir="")657 function PclTarUpdate($p_tarname, $p_filelist, $p_mode = "", $p_add_dir = "", $p_remove_dir = "") 658 658 { 659 659 TrFctStart(__FILE__, __LINE__, "PclTarUpdate", "tar='$p_tarname', list='$p_filelist', mode='$p_mode'"); … … 729 729 // "updated", "not_updated", "added" or "ok" for the files not concerned. 730 730 // -------------------------------------------------------------------------------- 731 function PclTarMerge($p_tarname, $p_tarname_add, $p_mode ="", $p_mode_add="")731 function PclTarMerge($p_tarname, $p_tarname_add, $p_mode = "", $p_mode_add = "") 732 732 { 733 733 TrFctStart(__FILE__, __LINE__, "PclTarMerge", "tar='$p_tarname', tar_add='$p_tarname_add', mode='$p_mode', mode_add='$p_mode_add'"); … … 1044 1044 // Return Values : 1045 1045 // -------------------------------------------------------------------------------- 1046 function PclTarHandleCreate($p_tarname, $p_list, $p_mode, $p_add_dir ="", $p_remove_dir="")1046 function PclTarHandleCreate($p_tarname, $p_list, $p_mode, $p_add_dir = "", $p_remove_dir = "") 1047 1047 { 1048 1048 TrFctStart(__FILE__, __LINE__, "PclTarHandleCreate", "tar=$p_tarname, list, mode=$p_mode, add_dir='$p_add_dir', remove_dir='$p_remove_dir'"); -
_core_/plugins/svp/inc/svp_actionner.php
r92791 r93092 1151 1151 * @return void 1152 1152 **/ 1153 function activer_plugin_dossier($dossier, $i, $constante ='_DIR_PLUGINS') {1153 function activer_plugin_dossier($dossier, $i, $constante = '_DIR_PLUGINS') { 1154 1154 include_spip('inc/plugin'); 1155 1155 $this->log("Demande d'activation de : " . $dossier); … … 1313 1313 * - dossier : Chemin du paquet téléchargé, depuis _DIR_PLUGINS 1314 1314 */ 1315 function get_paquet_id($id_or_row, $dest_ancien ="") {1315 function get_paquet_id($id_or_row, $dest_ancien = "") { 1316 1316 // on peut passer direct le row sql... 1317 1317 if (!is_array($id_or_row)) { … … 1502 1502 * @return void 1503 1503 **/ 1504 function svp_actionner_traiter_actions_demandees($actions, &$retour, $redirect=null) {1504 function svp_actionner_traiter_actions_demandees($actions, &$retour, $redirect = null) { 1505 1505 $actionneur = new Actionneur(); 1506 1506 $actionneur->ajouter_actions($actions); -
_core_/plugins/svp/inc/svp_decider.php
r92791 r93092 260 260 * ou, avec $multiple=true : [p][MOTS][] = tableau de description 261 261 */ 262 function infos_courtes($condition, $multiple =false) {262 function infos_courtes($condition, $multiple = false) { 263 263 $plugs = array( 264 264 'i'=>array(), … … 950 950 * false si erreur (dépendance non résolue, incompatibilité...), true sinon 951 951 **/ 952 function verifier_dependances_plugin($info, $prof =0) {952 function verifier_dependances_plugin($info, $prof = 0) { 953 953 $this->log("- [$prof] verifier dependances " . $info['p']); 954 954 $id = $info['i']; -
_core_/plugins/svp/inc/svp_depoter_distant.php
r92777 r93092 36 36 * true si le dépot est ajouté correctement, false sinon 37 37 */ 38 function svp_ajouter_depot($url, &$erreur ='') {38 function svp_ajouter_depot($url, &$erreur = '') { 39 39 include_spip('inc/distant'); 40 40 -
_core_/plugins/svp/inc/svp_outiller.php
r85773 r93092 166 166 * Le sous index 'incluse' vaut true si cette borne est incluse dans l'intervalle. 167 167 **/ 168 function extraire_bornes($intervalle, $initialiser =false) {168 function extraire_bornes($intervalle, $initialiser = false) { 169 169 static $borne_vide = array('valeur' => '', 'incluse' => false); 170 170 static $borne_inf_init = array('valeur' => _SVP_VERSION_SPIP_MIN, 'incluse' => true); … … 206 206 * Intervalle de compatibilité tel que '[2.1;3.0]' 207 207 **/ 208 function construire_intervalle($bornes, $dtd ='paquet') {208 function construire_intervalle($bornes, $dtd = 'paquet') { 209 209 return ($bornes['min']['incluse'] ? '[' : ($dtd=='paquet' ? ']' : '(')) 210 210 . $bornes['min']['valeur'] . ';' . $bornes['max']['valeur'] … … 317 317 * Texte dans le charset du site 318 318 **/ 319 function entite2charset($texte, $charset =null) {319 function entite2charset($texte, $charset = null) { 320 320 if (!strlen($texte)) return ''; 321 321 if (!$charset) … … 448 448 * Numéro de version normalisée 449 449 **/ 450 function normaliser_version($version ='') {450 function normaliser_version($version = '') { 451 451 452 452 $version_normalisee = ''; -
_core_/plugins/svp/inc/svp_phraser.php
r92430 r93092 167 167 * Tableau (url => Tableau de description de l'archive) 168 168 */ 169 function svp_phraser_archives($archives, &$md5_cache=array()) {169 function svp_phraser_archives($archives, &$md5_cache = array()) { 170 170 include_spip('inc/plugin'); 171 171 $seen = array(); … … 412 412 * à chaque balise avec 'x' => 'valeur' 413 413 */ 414 function svp_aplatir_balises($balises, $arbre_xml, $mode ='vide_et_nonvide', $tableau_initial=array()) {414 function svp_aplatir_balises($balises, $arbre_xml, $mode = 'vide_et_nonvide', $tableau_initial = array()) { 415 415 $tableau_aplati = array(); 416 416 -
_core_/plugins/svp/inc/svp_rechercher.php
r82359 r93092 53 53 * - n => tableau de descriptions du paquet (si doublons autorisés) 54 54 **/ 55 function svp_rechercher_plugins_spip($phrase, $categorie, $etat, $depot, $version_spip ='',55 function svp_rechercher_plugins_spip($phrase, $categorie, $etat, $depot, $version_spip = '', 56 56 $exclusions=array(), $afficher_exclusions=false, $doublon=false, $tri='nom') 57 57 { -
_core_/plugins/svp/inc/where_compatible_spip.php
r82427 r93092 29 29 * Expression where de la requête SQL 30 30 */ 31 function inc_where_compatible_spip($version ='', $table, $op) {31 function inc_where_compatible_spip($version = '', $table, $op) { 32 32 33 33 // le critere s'applique a une VERSION (1.9.2, 2.0.8, ...) -
_core_/plugins/svp/lib/pcltar/pclerror.lib.php
r91325 r93092 55 55 // Parameters : 56 56 // -------------------------------------------------------------------------------- 57 function PclErrorLog($p_error_code =0, $p_error_string="")57 function PclErrorLog($p_error_code = 0, $p_error_string = "") 58 58 { 59 59 global $g_pcl_error_string; … … 71 71 // Parameters : 72 72 // -------------------------------------------------------------------------------- 73 function PclErrorFatal($p_file, $p_line, $p_error_string ="")73 function PclErrorFatal($p_file, $p_line, $p_error_string = "") 74 74 { 75 75 global $g_pcl_error_string; -
_core_/plugins/svp/lib/pcltar/pcltrace.lib.php
r91325 r93092 65 65 // 'log' : messages are writed in the file $p_filename 66 66 // -------------------------------------------------------------------------------- 67 function TrOn($p_level =1, $p_mode="memory", $p_filename="trace.txt")67 function TrOn($p_level = 1, $p_mode = "memory", $p_filename = "trace.txt") 68 68 { 69 69 global $g_pcl_trace_level; … … 140 140 // $p_level : Level of trace required. 141 141 // -------------------------------------------------------------------------------- 142 function TrFctStart($p_file, $p_line, $p_name, $p_param ="", $p_message="")142 function TrFctStart($p_file, $p_line, $p_name, $p_param = "", $p_message = "") 143 143 { 144 144 global $g_pcl_trace_level; … … 198 198 // $p_level : Level of trace required. 199 199 // -------------------------------------------------------------------------------- 200 function TrFctEnd($p_file, $p_line, $p_return =1, $p_message="")200 function TrFctEnd($p_file, $p_line, $p_return = 1, $p_message = "") 201 201 { 202 202 global $g_pcl_trace_level; … … 260 260 // Parameters : 261 261 // -------------------------------------------------------------------------------- 262 function TrFctMessage($p_file, $p_line, $p_level, $p_message ="")262 function TrFctMessage($p_file, $p_line, $p_level, $p_message = "") 263 263 { 264 264 global $g_pcl_trace_level; … … 293 293 // Parameters : 294 294 // -------------------------------------------------------------------------------- 295 function TrMessage($p_file, $p_line, $p_level, $p_message ="")295 function TrMessage($p_file, $p_line, $p_level, $p_message = "") 296 296 { 297 297 global $g_pcl_trace_level; -
_core_/plugins/svp/plugins/preparer_sql_plugin.php
r92791 r93092 129 129 * Le nom 130 130 **/ 131 function normaliser_nom($nom, $langue ='', $supprimer_numero=true) {131 function normaliser_nom($nom, $langue = '', $supprimer_numero = true) { 132 132 include_spip('inc/texte'); 133 133 -
_core_/plugins/svp/svp_fonctions.php
r88963 r93092 90 90 * Texte informant des dépendances 91 91 **/ 92 function svp_afficher_dependances($balise_serialisee, $dependance ='necessite', $sep='<br />', $lien='local') {92 function svp_afficher_dependances($balise_serialisee, $dependance = 'necessite', $sep = '<br />', $lien = 'local') { 93 93 $texte = ''; 94 94 … … 174 174 * Texte informant des crédits 175 175 **/ 176 function svp_afficher_credits($balise_serialisee, $sep =', ') {176 function svp_afficher_credits($balise_serialisee, $sep = ', ') { 177 177 $texte = ''; 178 178 … … 208 208 * Texte informant des langues et traducteurs 209 209 **/ 210 function svp_afficher_langues($langues, $sep =', '){210 function svp_afficher_langues($langues, $sep = ', '){ 211 211 $texte = ''; 212 212 … … 243 243 * Code HTML présentant les statistiques du dépot 244 244 **/ 245 function svp_afficher_statistiques_globales($id_depot =0){245 function svp_afficher_statistiques_globales($id_depot = 0){ 246 246 $info = ''; 247 247 … … 289 289 * Texte indiquant un nombre total de paquets 290 290 **/ 291 function svp_compter_telechargements($id_depot =0, $categorie='', $compatible_spip=''){291 function svp_compter_telechargements($id_depot = 0, $categorie = '', $compatible_spip = ''){ 292 292 $total = svp_compter('paquet', $id_depot, $categorie, $compatible_spip); 293 293 $info = _T('svp:info_paquets_disponibles', array('total_paquets'=>$total['paquet'])); … … 317 317 * Texte indiquant certains totaux tel que nombre de plugins, nombre de paquets... 318 318 **/ 319 function svp_compter_depots($id_depot, $contrib ='plugin'){319 function svp_compter_depots($id_depot, $contrib = 'plugin'){ 320 320 $info = ''; 321 321 … … 359 359 * Texte indiquant un nombre total de paquets 360 360 **/ 361 function svp_compter_plugins($id_depot =0, $categorie='', $compatible_spip='') {361 function svp_compter_plugins($id_depot = 0, $categorie = '', $compatible_spip = '') { 362 362 $total = svp_compter('plugin', $id_depot, $categorie, $compatible_spip); 363 363 $info = _T('svp:info_plugins_disponibles', array('total_plugins'=>$total['plugin'])); … … 395 395 * Couples (entite => nombre). 396 396 **/ 397 function svp_compter($entite, $id_depot =0, $categorie='', $compatible_spip=''){397 function svp_compter($entite, $id_depot = 0, $categorie = '', $compatible_spip = ''){ 398 398 $compteurs = array(); 399 399 … … 507 507 * Couples (type de catégorie => Texte de la catégorie) 508 508 **/ 509 function calcul_svp_categories($tri ='ordre_cle', $categorie='') {509 function calcul_svp_categories($tri = 'ordre_cle', $categorie = '') { 510 510 511 511 $retour = array(); … … 633 633 * URL calculée en fonction de l'URL d'entrée 634 634 **/ 635 function svp_calculer_url_demo($url_demo, $url_absolue =false) {635 function svp_calculer_url_demo($url_demo, $url_absolue = false) { 636 636 637 637 $url_calculee = ''; … … 745 745 * - n => tableau de descriptions du paquet (si doublons autorisés) 746 746 **/ 747 function filtre_construire_recherche_plugins($phrase ='', $categorie='', $etat='', $depot='', $afficher_exclusions=true, $afficher_doublons=false) {747 function filtre_construire_recherche_plugins($phrase = '', $categorie = '', $etat = '', $depot = '', $afficher_exclusions = true, $afficher_doublons = false) { 748 748 749 749 // On traite les paramètres d'affichage … … 794 794 * Numéro de version dénormalisée 795 795 **/ 796 function denormaliser_version($version_normalisee ='') {796 function denormaliser_version($version_normalisee = '') { 797 797 798 798 $version = ''; -
_core_/plugins/svp/teleporter/git.php
r88910 r93092 28 28 * True si l'opération réussie, false sinon. 29 29 */ 30 function teleporter_git_dist($methode, $source,$dest,$options=array()){30 function teleporter_git_dist($methode, $source, $dest, $options = array()){ 31 31 32 32 $branche = (isset($options['branche'])?$options['branche']:'master'); … … 96 96 * -- dest : Répertoire du dépot. 97 97 */ 98 function teleporter_git_read($dest, $options =array()) {98 function teleporter_git_read($dest, $options = array()) { 99 99 100 100 if (!is_dir("$dest/.git")) … … 147 147 * @return void 148 148 */ 149 function teleporter_git_exec($dest, $command) {149 function teleporter_git_exec($dest, $command) { 150 150 spip_log("{$dest}:{$command}","teleport"); 151 151 $curdir = getcwd(); -
_core_/plugins/svp/teleporter/http.php
r82359 r93092 29 29 * True si l'opération réussie. 30 30 */ 31 function teleporter_http_dist($methode, $source,$dest,$options=array()){31 function teleporter_http_dist($methode, $source, $dest, $options = array()){ 32 32 33 33 $tmp = $options['dir_tmp']; … … 69 69 * - Liste sinon (répertoire de destination temporaire, extension du fichier source) 70 70 */ 71 function teleporter_http_recuperer_source($source, $dest_tmp){71 function teleporter_http_recuperer_source($source, $dest_tmp){ 72 72 73 73 # securite : ici on repart toujours d'une source neuve -
_core_/plugins/svp/teleporter/svn.php
r89119 r93092 32 32 * True si l'opération réussie, false sinon. 33 33 */ 34 function teleporter_svn_dist($methode, $source,$dest,$options=array()){34 function teleporter_svn_dist($methode, $source, $dest, $options = array()){ 35 35 if (is_dir($dest)){ 36 36 $infos = teleporter_svn_read($dest); … … 94 94 * - dest : Chemin du répertoire 95 95 */ 96 function teleporter_svn_read($dest, $options=array()){96 function teleporter_svn_read($dest, $options = array()){ 97 97 98 98 if (!is_dir("$dest/.svn")) -
_core_/plugins/textwheel/engine/textwheel.php
r92397 r93092 84 84 AND $fun = $this->compiled[$rule->replace]) { 85 85 $pre[] = "\n###\n## $name\n###\n" . $fun; 86 preg_match(',function (\w+), ', $fun, $r);86 preg_match(',function (\w+), ', $fun, $r); 87 87 $rule->compilereplace = $r[1]; # ne pas modifier ->replace sinon on casse l'execution... 88 88 } … … 246 246 * @param int $count 247 247 */ 248 protected function apply(&$rule, &$t, &$count =null) {248 protected function apply(&$rule, &$t, &$count = null) { 249 249 250 250 if ($rule->disabled) … … 281 281 * @param int $count 282 282 */ 283 protected static function replace_identity(&$match, &$replace,&$t,&$count){283 protected static function replace_identity(&$match, &$replace, &$t, &$count){ 284 284 } 285 285 … … 291 291 * @param int $count 292 292 */ 293 protected static function replace_all(&$match, &$replace,&$t,&$count){293 protected static function replace_all(&$match, &$replace, &$t, &$count){ 294 294 # special case: replace $0 with $t 295 295 # replace: "A$0B" will surround the string with A..B … … 308 308 * @param int $count 309 309 */ 310 protected static function replace_all_cb(&$match, &$replace,&$t,&$count){310 protected static function replace_all_cb(&$match, &$replace, &$t, &$count){ 311 311 $t = $replace($t); 312 312 } … … 320 320 * @param int $count 321 321 */ 322 protected static function replace_str(&$match, &$replace,&$t,&$count){322 protected static function replace_str(&$match, &$replace, &$t, &$count){ 323 323 if (!is_string($match) OR strpos($t,$match)!==FALSE) 324 324 $t = str_replace($match, $replace, $t, $count); … … 333 333 * @param int $count 334 334 */ 335 protected static function replace_strtr(&$match, &$replace,&$t,&$count){335 protected static function replace_strtr(&$match, &$replace, &$t, &$count){ 336 336 $t = strtr( $t, $match, $replace); 337 337 } … … 345 345 * @param int $count 346 346 */ 347 protected static function replace_str_cb(&$match, &$replace,&$t,&$count){347 protected static function replace_str_cb(&$match, &$replace, &$t, &$count){ 348 348 if (strpos($t,$match)!==FALSE) 349 349 if (count($b = explode($match, $t)) > 1) … … 360 360 * @throws Exception 361 361 */ 362 protected static function replace_preg(&$match, &$replace,&$t,&$count){362 protected static function replace_preg(&$match, &$replace, &$t, &$count){ 363 363 $t = preg_replace($match, $replace, $t, -1, $count); 364 364 if (is_null($t)){ … … 375 375 * @throws Exception 376 376 */ 377 protected static function replace_preg_cb(&$match, &$replace,&$t,&$count){377 protected static function replace_preg_cb(&$match, &$replace, &$t, &$count){ 378 378 $t = preg_replace_callback($match, $replace, $t, -1, $count); 379 379 if (is_null($t)){ … … 390 390 * @param int $count 391 391 */ 392 protected static function replace_split(&$match, &$replace,&$t,&$count){392 protected static function replace_split(&$match, &$replace, &$t, &$count){ 393 393 throw new InvalidArgumentException('split rule always needs a callback function as replace'); 394 394 } … … 401 401 * @param int $count 402 402 */ 403 protected static function replace_split_cb(&$match, &$replace,&$t,&$count){403 protected static function replace_split_cb(&$match, &$replace, &$t, &$count){ 404 404 $a = explode($match[0], $t); 405 405 $t = join($match[1], array_map($replace,$a)); … … 423 423 * @return int/strinf 424 424 */ 425 protected function timer($t ='rien', $raw = false) {425 protected function timer($t = 'rien', $raw = false) { 426 426 static $time; 427 427 $a=time(); $b=microtime(); … … 530 530 } 531 531 532 public static function outputTotal($liste, $profondeur =0) {532 public static function outputTotal($liste, $profondeur = 0) { 533 533 ksort($liste); 534 534 foreach ($liste as $cause => $duree) { -
_core_/plugins/textwheel/engine/textwheelruleset.php
r92394 r93092 35 35 * @return string 36 36 */ 37 protected function findFile(&$file, $path =''){37 protected function findFile(&$file, $path = ''){ 38 38 static $default_path; 39 39 … … 61 61 * @return array 62 62 */ 63 protected function loadFile(&$file, $default_path ='') {63 protected function loadFile(&$file, $default_path = '') { 64 64 if (!preg_match(',[.]yaml$,i',$file) 65 65 // external rules … … 101 101 * @param string $filepath 102 102 */ 103 public function __construct($ruleset = array(), $filepath ='') {103 public function __construct($ruleset = array(), $filepath = '') { 104 104 if ($ruleset) 105 105 $this->addRules($ruleset, $filepath); … … 115 115 * @return class 116 116 */ 117 public static function &loader($ruleset, $callback ='', $class='TextWheelRuleSet'){117 public static function &loader($ruleset, $callback = '', $class = 'TextWheelRuleSet'){ 118 118 119 119 $ruleset = new $class($ruleset); … … 168 168 * @param string $filepath 169 169 */ 170 public function addRules($rules, $filepath ='') {170 public function addRules($rules, $filepath = '') { 171 171 // rules can be an array of filename 172 172 if (is_array($rules) AND is_string(reset($rules))) { -
_core_/plugins/textwheel/inc/lien.php
r91127 r93092 33 33 * @return string 34 34 */ 35 function inc_lien_dist($lien, $texte ='', $class='', $title='', $hlang='', $rel='', $connect='', $env=array()) {35 function inc_lien_dist($lien, $texte = '', $class = '', $title = '', $hlang = '', $rel = '', $connect = '', $env = array()) { 36 36 static $u=null; 37 37 if (!$u) $u = url_de_base(); … … 191 191 * Retourne une balise HTML de lien ou une chaîne vide. 192 192 */ 193 function balise_a($args =array()){193 function balise_a($args = array()){ 194 194 $balise_a = ''; 195 195 … … 234 234 235 235 // http://code.spip.net/@expanser_liens 236 function expanser_liens($t, $connect ='', $env=array()) {236 function expanser_liens($t, $connect = '', $env = array()) { 237 237 $t = pipeline('pre_liens', $t); 238 238 … … 263 263 264 264 265 function expanser_un_lien($reg, $quoi ='echappe', $env=null) {265 function expanser_un_lien($reg, $quoi = 'echappe', $env = null) { 266 266 static $pile = array(); 267 267 static $inserts; … … 323 323 // et ne laisser que leur titre, a expliciter si ce n'est fait 324 324 // http://code.spip.net/@nettoyer_raccourcis_typo 325 function nettoyer_raccourcis_typo($texte, $connect ='') {325 function nettoyer_raccourcis_typo($texte, $connect = '') { 326 326 $texte = pipeline('nettoyer_raccourcis_typo',$texte); 327 327 … … 450 450 * @return string 451 451 */ 452 function virtuel_redirige($virtuel, $url =false) {452 function virtuel_redirige($virtuel, $url = false) { 453 453 if (!strlen($virtuel)) return ''; 454 454 if ( … … 473 473 474 474 // http://code.spip.net/@calculer_url 475 function calculer_url ($ref, $texte ='', $pour='url', $connect='', $echappe_typo = true) {475 function calculer_url ($ref, $texte = '', $pour = 'url', $connect = '', $echappe_typo = true) { 476 476 $r = traiter_lien_implicite($ref, $texte, $pour, $connect, $echappe_typo); 477 477 $r = ($r ? $r : traiter_lien_explicite($ref, $texte, $pour, $connect, $echappe_typo)); … … 482 482 483 483 // http://code.spip.net/@traiter_lien_explicite 484 function traiter_lien_explicite ($ref, $texte ='', $pour='url', $connect='', $echappe_typo = true) {484 function traiter_lien_explicite ($ref, $texte = '', $pour = 'url', $connect = '', $echappe_typo = true) { 485 485 if (preg_match(_EXTRAIRE_LIEN, $ref)) { 486 486 return ($pour != 'tout') ? '' : array('','','',''); … … 524 524 } 525 525 526 function liens_implicite_glose_dist($texte, $id, $type, $args, $ancre, $connect =''){526 function liens_implicite_glose_dist($texte, $id, $type, $args, $ancre, $connect = ''){ 527 527 if (function_exists($f = 'glossaire_' . $ancre)) { 528 528 $url = $f($texte, $id); … … 555 555 * @return array|bool|string 556 556 */ 557 function traiter_lien_implicite($ref, $texte ='', $pour='url', $connect='') {557 function traiter_lien_implicite($ref, $texte = '', $pour = 'url', $connect = '') { 558 558 $cible = ($connect ? $connect : (isset($GLOBALS['lien_implicite_cible_public']) ? $GLOBALS['lien_implicite_cible_public'] : null)); 559 559 if (!($match = typer_raccourci($ref))) { … … 668 668 * } 669 669 **/ 670 function traiter_raccourci_titre($id, $type, $connect =NULL) {670 function traiter_raccourci_titre($id, $type, $connect = NULL) { 671 671 $trouver_table = charger_fonction('trouver_table', 'base'); 672 672 $desc = $trouver_table(table_objet($type)); … … 718 718 719 719 // http://code.spip.net/@traiter_modeles 720 function traiter_modeles($texte, $doublons =false, $echap='', $connect='', $liens = null, $env = array()) {720 function traiter_modeles($texte, $doublons = false, $echap = '', $connect = '', $liens = null, $env = array()) { 721 721 // preserver la compatibilite : true = recherche des documents 722 722 if ($doublons === true) { -
_core_/plugins/textwheel/inc/notes.php
r88959 r93092 55 55 * @return string|array 56 56 **/ 57 function inc_notes_dist($arg, $operation='traiter', $ignorer_autobr=false)57 function inc_notes_dist($arg, $operation = 'traiter', $ignorer_autobr = false) 58 58 { 59 59 static $pile = array(); … … 184 184 185 185 // http://code.spip.net/@traiter_les_notes 186 function traiter_les_notes($notes, $ignorer_autobr) {186 function traiter_les_notes($notes, $ignorer_autobr) { 187 187 $mes_notes = ''; 188 188 if ($notes) { -
_core_/plugins/textwheel/inc/texte.php
r92623 r93092 193 193 * Texte transformé 194 194 **/ 195 function typo($letexte, $echapper =true, $connect=null, $env=array()) {195 function typo($letexte, $echapper = true, $connect = null, $env = array()) { 196 196 // Plus vite ! 197 197 if (!$letexte) return $letexte; … … 266 266 * @return string Texte 267 267 */ 268 function corriger_typo($t, $lang ='') {268 function corriger_typo($t, $lang = '') { 269 269 static $typographie = array(); 270 270 // Plus vite ! … … 680 680 * Texte transformé 681 681 **/ 682 function propre($t, $connect =null, $env=array()) {682 function propre($t, $connect = null, $env = array()) { 683 683 // les appels directs a cette fonction depuis le php de l'espace 684 684 // prive etant historiquement ecrits sans argment $connect -
_core_/plugins/textwheel/inc/textwheel.php
r86013 r93092 65 65 66 66 class SPIPTextWheelRuleset extends TextWheelRuleSet { 67 protected function findFile(&$file, $path =''){67 protected function findFile(&$file, $path = ''){ 68 68 static $default_path; 69 69 -
_core_/plugins/textwheel/wheels/spip/spip-listes.php
r89245 r93092 14 14 } 15 15 16 function tw_liste_item($t, $quoi='item'){16 function tw_liste_item($t, $quoi = 'item'){ 17 17 global $class_spip, $class_spip_plus; 18 18 static $niveau; -
_core_/plugins/urls_etendues/action/editer_url.php
r89285 r93092 22 22 23 23 24 function url_nettoyer($titre, $longueur_maxi,$longueur_min=0,$separateur='-',$filtre=''){24 function url_nettoyer($titre, $longueur_maxi, $longueur_min = 0, $separateur = '-', $filtre = ''){ 25 25 26 26 $titre = supprimer_tags(supprimer_numero(extraire_multi($titre))); … … 75 75 } 76 76 77 function url_insert(&$set, $confirmer,$separateur){77 function url_insert(&$set, $confirmer, $separateur){ 78 78 $has_parent = true; 79 79 # assurer la coherence des champs techniques si non fournis … … 186 186 } 187 187 188 function url_verrouiller($objet, $id_objet,$url){188 function url_verrouiller($objet, $id_objet, $url){ 189 189 $where = "id_objet=".intval($id_objet)." AND type=".sql_quote($objet); 190 190 $where .= " AND url=".sql_quote($url); … … 194 194 } 195 195 196 function url_delete($objet, $id_objet,$url=""){196 function url_delete($objet, $id_objet, $url = ""){ 197 197 $where = "id_objet=".intval($id_objet)." AND type=".sql_quote($objet); 198 198 if (strlen($url)) -
_core_/plugins/urls_etendues/action/supprimer_url.php
r89285 r93092 13 13 if (!defined("_ECRIRE_INC_VERSION")) return; 14 14 15 function action_supprimer_url_dist($arg =null) {15 function action_supprimer_url_dist($arg = null) { 16 16 17 17 if (is_null($arg)){ -
_core_/plugins/urls_etendues/formulaires/configurer_urls.php
r89285 r93092 34 34 } 35 35 36 function type_url_choisir($liste, $name,$selected){36 function type_url_choisir($liste, $name, $selected){ 37 37 $res = '<dl class="choix">'; 38 38 foreach($liste as $url){ -
_core_/plugins/urls_etendues/formulaires/editer_url_objet.php
r89285 r93092 20 20 * @return array 21 21 */ 22 function formulaires_editer_url_objet_charger($type, $id){22 function formulaires_editer_url_objet_charger($type, $id){ 23 23 $valeurs = array('url'=>'','_objet'=>$type,'_id_objet'=>$id); 24 24 … … 26 26 } 27 27 28 function formulaires_editer_url_objet_verifier($type, $id){28 function formulaires_editer_url_objet_verifier($type, $id){ 29 29 $erreurs = array(); 30 30 include_spip('action/editer_url'); … … 64 64 * @return array 65 65 */ 66 function formulaires_editer_url_objet_traiter($type, $id){66 function formulaires_editer_url_objet_traiter($type, $id){ 67 67 $valeurs = array('editable'=>true); 68 68 -
_core_/plugins/urls_etendues/urls/arbo.php
r89285 r93092 211 211 * @return string 212 212 */ 213 function declarer_url_arbo_rec($url, $type,$parent,$type_parent){213 function declarer_url_arbo_rec($url, $type, $parent, $type_parent){ 214 214 if (is_null($parent)){ 215 215 return $url; … … 232 232 * @return bool|null|array 233 233 */ 234 function renseigner_url_arbo($type, $id_objet){234 function renseigner_url_arbo($type, $id_objet){ 235 235 $urls = array(); 236 236 $trouver_table = charger_fonction('trouver_table', 'base'); … … 383 383 * @return string 384 384 */ 385 function _generer_url_arbo($type, $id, $args ='', $ancre='') {385 function _generer_url_arbo($type, $id, $args = '', $ancre = '') { 386 386 387 387 if ($generer_url_externe = charger_fonction("generer_url_$type",'urls',true)) { … … 432 432 * @return array|string 433 433 */ 434 function urls_arbo_dist($i, $entite, $args ='', $ancre='') {434 function urls_arbo_dist($i, $entite, $args = '', $ancre = '') { 435 435 if (is_numeric($i)) 436 436 return _generer_url_arbo($entite, $i, $args, $ancre); -
_core_/plugins/urls_etendues/urls/html.php
r89285 r93092 38 38 39 39 // http://code.spip.net/@_generer_url_html 40 function _generer_url_html($type, $id, $args ='', $ancre='') {40 function _generer_url_html($type, $id, $args = '', $ancre = '') { 41 41 if ($generer_url_externe = charger_fonction("generer_url_$type",'urls',true)) { 42 42 $url = $generer_url_externe($id, $args, $ancre); … … 49 49 // retrouver les parametres d'une URL dite "html" 50 50 // http://code.spip.net/@urls_html_dist 51 function urls_html_dist($i, $entite, $args ='', $ancre='') {51 function urls_html_dist($i, $entite, $args = '', $ancre = '') { 52 52 53 53 if (is_numeric($i)) -
_core_/plugins/urls_etendues/urls/libres.php
r89285 r93092 27 27 28 28 // http://code.spip.net/@urls_libres_dist 29 function urls_libres_dist($i, &$entite, $args ='', $ancre='') {29 function urls_libres_dist($i, &$entite, $args = '', $ancre = '') { 30 30 $f = charger_fonction('propres', 'urls'); 31 31 return $f($i, $entite, $args, $ancre); -
_core_/plugins/urls_etendues/urls/propres.php
r89285 r93092 206 206 207 207 // http://code.spip.net/@_generer_url_propre 208 function _generer_url_propre($type, $id, $args ='', $ancre='') {208 function _generer_url_propre($type, $id, $args = '', $ancre = '') { 209 209 210 210 if ($generer_url_externe = charger_fonction("generer_url_$type",'urls',true)) { … … 268 268 // @return array([contexte],[type],[url_redirect],[fond]) : url decodee 269 269 // http://code.spip.net/@urls_propres_dist 270 function urls_propres_dist($i, $entite, $args ='', $ancre='') {270 function urls_propres_dist($i, $entite, $args = '', $ancre = '') { 271 271 272 272 if (is_numeric($i)) -
_core_/plugins/urls_etendues/urls/propres2.php
r89285 r93092 27 27 28 28 // http://code.spip.net/@urls_propres2_dist 29 function urls_propres2_dist($i, &$entite, $args ='', $ancre='') {29 function urls_propres2_dist($i, &$entite, $args = '', $ancre = '') { 30 30 $f = charger_fonction('propres', 'urls'); 31 31 return $f($i, $entite, $args, $ancre); -
_core_/plugins/urls_etendues/urls/propres_qs.php
r89285 r93092 36 36 37 37 // http://code.spip.net/@urls_propres_qs_dist 38 function urls_propres_qs_dist($i, &$entite, $args ='', $ancre='') {38 function urls_propres_qs_dist($i, &$entite, $args = '', $ancre = '') { 39 39 $f = charger_fonction('propres', 'urls'); 40 40 return $f($i, $entite, $args, $ancre); -
_core_/plugins/urls_etendues/urls/simple.php
r89285 r93092 23 23 24 24 25 function _generer_url_simple($type, $id, $args='', $ancre='') {25 function _generer_url_simple($type, $id, $args = '', $ancre = '') { 26 26 27 27 if ($generer_url_externe = charger_fonction("generer_url_$type",'urls',true)) { … … 41 41 // le contexte deja existant est fourni dans args sous forme de tableau ou query string 42 42 // http://code.spip.net/@urls_page_dist 43 function urls_simple_dist($i, &$entite, $args ='', $ancre='')43 function urls_simple_dist($i, &$entite, $args = '', $ancre = '') 44 44 { 45 45 if (is_numeric($i)){ -
_core_/plugins/urls_etendues/urls_administrations.php
r91103 r93092 19 19 * @param string $version_cible 20 20 */ 21 function urls_upgrade($nom_meta_base_version, $version_cible){21 function urls_upgrade($nom_meta_base_version, $version_cible){ 22 22 // cas particulier : 23 23 // si plugin pas installe mais que la table existe -
_core_/plugins/urls_etendues/urls_pipeline.php
r92629 r93092 14 14 function urls_autoriser($f){return $f;} 15 15 16 function autoriser_url_administrer($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){16 function autoriser_url_administrer($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 17 17 return ( 18 18 isset($GLOBALS['meta']['urls_activer_controle']) … … 22 22 } 23 23 24 function autoriser_controlerurls_menu_dist($faire, $type ='', $id=0, $qui = NULL, $opt = NULL){24 function autoriser_controlerurls_menu_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){ 25 25 return autoriser('administrer','url'); 26 26 }
Note: See TracChangeset
for help on using the changeset viewer.