Changeset 93661 in spip-zone
- Timestamp:
- Dec 13, 2015, 5:51:44 PM (5 years ago)
- Location:
- _core_/plugins
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
_core_/plugins/dump/prive/squelettes/contenu/restaurer_fonctions.php
r93610 r93661 37 37 // qu'on a le bon nombre de donnees 38 38 foreach ($tables as $t => $n) { 39 if (!sql_showtable($t, true) OR$n === 0) {39 if (!sql_showtable($t, true) or $n === 0) { 40 40 $erreurs[$t] = _T('dump:erreur_table_absente', array('table' => "<strong>$t</strong>")); 41 41 } else { … … 54 54 return $corps; 55 55 } 56 57 ?> -
_core_/plugins/dump/prive/squelettes/contenu/sauvegarder_fonctions.php
r93610 r93661 36 36 $n_dump = intval(sql_countsel($t, '', '', '', 'dump')); 37 37 $res = "$t "; 38 if ($n_dump == 0 AND$n == 0) {38 if ($n_dump == 0 and $n == 0) { 39 39 $res .= "(" . _T('dump:aucune_donnee') . ")"; 40 40 } else { … … 56 56 break; 57 57 default: 58 $n = floor(count($tables) /2);58 $n = floor(count($tables) / 2); 59 59 $corps = "<div style='width:49%;float:left;'><ul class='spip'><li class='spip'>" . join("</li><li class='spip'>", 60 60 array_slice($tables, 0, $n)) . "</li></ul></div>" … … 77 77 return $erreurs; 78 78 } 79 80 ?> -
_core_/plugins/plan/prive/squelettes/inclure/plan-articles_fonctions.php
r93620 r93661 3 3 include_spip('inc/autoriser'); 4 4 include_spip('inc/filtres_ecrire'); // pour statuts_articles_visibles 5 -
_core_/plugins/revisions/prive/squelettes/contenu/revision_fonctions.php
r93622 r93661 8 8 include_spip('inc/suivi_versions'); 9 9 include_spip('inc/puce_statut'); 10 11 ?> -
_core_/plugins/statistiques/prive/squelettes/contenu/stats_lang_fonctions.php
r93626 r93661 47 47 $lang = $row['lang']; 48 48 if ($row['cnt']) { 49 $visites = round($row['cnt'] /$total_visites*$taille);50 $pourcent = round($row['cnt'] /$total_visites*100);49 $visites = round($row['cnt'] / $total_visites * $taille); 50 $pourcent = round($row['cnt'] / $total_visites * 100); 51 51 } 52 52 … … 66 66 67 67 $out .= "<td style='border-bottom: 1px solid #cccccc;'>"; 68 $out .= "\n<table cellpadding='0' cellspacing='0' border='0' width='" . ($taille +5) . "'>";68 $out .= "\n<table cellpadding='0' cellspacing='0' border='0' width='" . ($taille + 5) . "'>"; 69 69 $out .= "\n<tr><td style='align:$spip_lang_right; background-color: #eeeeee; border: 1px solid #999999; white-space: nowrap;'>"; 70 70 if ($visites_abs > 0) { … … 85 85 return $out; 86 86 } 87 88 ?> -
_core_/plugins/statistiques/prive/squelettes/contenu/stats_referers_fonctions.php
r93626 r93661 19 19 function vigneter_referer($url) { 20 20 21 if (!strlen($GLOBALS['source_vignettes']) OR$GLOBALS['meta']["activer_captures_referers"] == 'non') {21 if (!strlen($GLOBALS['source_vignettes']) or $GLOBALS['meta']["activer_captures_referers"] == 'non') { 22 22 return ''; 23 23 } -
_core_/plugins/statistiques/prive/squelettes/contenu/stats_repartition_fonctions.php
r93626 r93661 29 29 $nombre_rub[$id_rubrique] = $visites; 30 30 $nombre_branche[$id_rubrique] = $visites; 31 $nombre += $visites +enfants($id_rubrique, $critere, $nombre_branche, $nombre_rub);31 $nombre += $visites + enfants($id_rubrique, $critere, $nombre_branche, $nombre_rub); 32 32 } 33 33 if (!isset($nombre_branche[$id_parent])) { … … 57 57 $visites_abs = 0; 58 58 $out = ""; 59 $width = intval(floor(($nombre_branche[$id_parent] /$total_site)*$taille));59 $width = intval(floor(($nombre_branche[$id_parent] / $total_site) * $taille)); 60 60 $width = "width:{$width}px;float:$spip_lang_left;"; 61 61 … … 68 68 $descriptif = attribut_html(couper(typo($row['descriptif']), 80)); 69 69 70 if ($nombre_branche[$id_rubrique] > 0 OR$nombre_rub[$id_rubrique] > 0) {71 $largeur_branche = floor(($nombre_branche[$id_rubrique] -$nombre_rub[$id_rubrique])*$taille/$total_site);72 $largeur_rub = floor($nombre_rub[$id_rubrique] *$taille/$total_site);70 if ($nombre_branche[$id_rubrique] > 0 or $nombre_rub[$id_rubrique] > 0) { 71 $largeur_branche = floor(($nombre_branche[$id_rubrique] - $nombre_rub[$id_rubrique]) * $taille / $total_site); 72 $largeur_rub = floor($nombre_rub[$id_rubrique] * $taille / $total_site); 73 73 74 if ($largeur_branche +$largeur_rub > 0) {74 if ($largeur_branche + $largeur_rub > 0) { 75 75 76 76 if ($niveau == 0) { … … 85 85 $out .= "<table cellpadding='2' cellspacing='0' border='0' width='100%'>"; 86 86 $out .= "\n<tr style='background-color: $couleur'>"; 87 $out .= "\n<td style='border-bottom: 1px solid #aaaaaa; padding-$spip_lang_left: " . ($niveau *20+5) . "px;'>";87 $out .= "\n<td style='border-bottom: 1px solid #aaaaaa; padding-$spip_lang_left: " . ($niveau * 20 + 5) . "px;'>"; 88 88 89 89 … … 102 102 103 103 // pourcentage de visites dans la branche par rapport au total du site 104 $pourcent = round($nombre_branche[$id_rubrique] /$total_site*1000)/10;104 $pourcent = round($nombre_branche[$id_rubrique] / $total_site * 1000) / 10; 105 105 $out .= "\n<td class='verdana1' style='text-align: $spip_lang_right; width: 40px; border-bottom: 1px solid #aaaaaa;'>$pourcent%</td>"; 106 106 107 107 108 $out .= "\n<td align='right' style='border-bottom: 1px solid #aaaaaa; width:" . ($taille +5) . "px'>";108 $out .= "\n<td align='right' style='border-bottom: 1px solid #aaaaaa; width:" . ($taille + 5) . "px'>"; 109 109 110 110 111 $out .= "\n<table cellpadding='0' cellspacing='0' border='0' width='" . ($decalage +1+$gauche) . "'>";111 $out .= "\n<table cellpadding='0' cellspacing='0' border='0' width='" . ($decalage + 1 + $gauche) . "'>"; 112 112 $out .= "\n<tr>"; 113 113 if ($gauche > 0) { … … 134 134 $niveau++; 135 135 $out .= debut_block_depliable(false, "stats$id_rubrique"); 136 $out .= enfants_aff($id_rubrique, $largeur_branche, $taille, $critere, $visites_abs +$gauche);136 $out .= enfants_aff($id_rubrique, $largeur_branche, $taille, $critere, $visites_abs + $gauche); 137 137 $out .= fin_block(); 138 138 $niveau--; 139 139 } 140 $visites_abs = $visites_abs +round($nombre_branche[$id_rubrique]/$total_site*$taille);140 $visites_abs = $visites_abs + round($nombre_branche[$id_rubrique] / $total_site * $taille); 141 141 } 142 142 143 143 return $out; 144 144 } 145 146 ?> -
_core_/plugins/statistiques/prive/squelettes/inclure/stats-visites-data_fonctions.php
r93626 r93661 16 16 $debut = sql_getfetsel("date", "spip_visites", "", "", "date", "0,1"); 17 17 $debut = strtotime($debut); 18 $duree = ceil((time() -$debut)/24/3600);18 $duree = ceil((time() - $debut) / 24 / 3600); 19 19 20 20 return $duree; … … 25 25 26 26 function duree_zoom($duree, $sens = 'plus') { 27 $largeur_abs = 420 /$duree;27 $largeur_abs = 420 / $duree; 28 28 29 29 if ($largeur_abs > 1) { 30 $inc = ceil($largeur_abs /5);31 $duree_plus = round(420 /($largeur_abs-$inc));32 $duree_moins = round(420 /($largeur_abs+$inc));30 $inc = ceil($largeur_abs / 5); 31 $duree_plus = round(420 / ($largeur_abs - $inc)); 32 $duree_moins = round(420 / ($largeur_abs + $inc)); 33 33 } 34 34 … … 39 39 40 40 if ($largeur_abs < 1) { 41 $duree_plus = round(420 *((1/$largeur_abs)+1));42 $duree_moins = round(420 *((1/$largeur_abs)-1));41 $duree_plus = round(420 * ((1 / $largeur_abs) + 1)); 42 $duree_moins = round(420 * ((1 / $largeur_abs) - 1)); 43 43 } 44 44 -
_core_/plugins/statistiques/prive/squelettes/inclure/stats-visites-jours_fonctions.php
r93626 r93661 6 6 7 7 include_spip('prive/squelettes/inclure/stats-visites-data_fonctions'); 8 9 ?> -
_core_/plugins/statistiques/prive/squelettes/inclure/stats-visites-mois_fonctions.php
r93626 r93661 6 6 7 7 include_spip('prive/squelettes/inclure/stats-visites-data_fonctions'); 8 9 ?> -
_core_/plugins/svp/plugins/fusion_paquet.php
r93627 r93661 61 61 // la compatibilite et ce pour chaque balise 62 62 foreach ($_paquet_spip as $_index => $_balise) { 63 if ($_index AND$_index != 'balise') {63 if ($_index and $_index != 'balise') { 64 64 $fusion[$_index][$_compatibilite] = $_balise; 65 65 if (!isset($fusion[$_index][0])) { … … 73 73 return $fusion; 74 74 } 75 76 ?> -
_core_/plugins/svp/plugins/fusion_plugin.php
r93627 r93661 83 83 // -- necessite, utilise, lib : on construit le tableau par intervalle de compatibilite SPIP 84 84 $cle_min_min = ($cle_min_max == 0) ? 1 : 0; 85 if (!$fusion['categorie'] AND$plugins[$cle_min_min]['categorie']) {85 if (!$fusion['categorie'] and $plugins[$cle_min_min]['categorie']) { 86 86 $fusion['categorie'] = $plugins[$cle_min_min]['categorie']; 87 87 } 88 if ((!isset($fusion['logo']) OR !$fusion['logo']) AND$plugins[$cle_min_min]['logo']) {88 if ((!isset($fusion['logo']) or !$fusion['logo']) and $plugins[$cle_min_min]['logo']) { 89 89 $fusion['logo'] = $plugins[$cle_min_min]['logo']; 90 90 } … … 94 94 // par l'intervalle de compatibilite sans regrouper les doublons pour l'instant 95 95 foreach ($balises_techniques as $_btech) { 96 if (!isset($fusion[$_btech]) AND!isset($plugins[$cle_min_min][$_btech])) {96 if (!isset($fusion[$_btech]) and !isset($plugins[$cle_min_min][$_btech])) { 97 97 // Aucun des tableaux ne contient cette balise technique : on la positionne a un array vide 98 98 $fusion[$_btech] = array(); 99 99 } else { 100 if (!isset($fusion[$_btech]) OR!$fusion[$_btech]) {100 if (!isset($fusion[$_btech]) or !$fusion[$_btech]) { 101 101 if ($plugins[$cle_min_min][$_btech]) { 102 102 // La balise technique est vide dans le tableau de fusion mais non vide dans la deuxieme balise plugin … … 106 106 } 107 107 } else { 108 if (!isset($plugins[$cle_min_min][$_btech]) OR!$plugins[$cle_min_min][$_btech]) {108 if (!isset($plugins[$cle_min_min][$_btech]) or !$plugins[$cle_min_min][$_btech]) { 109 109 // La balise technique est non vide dans le tableau de fusion mais vide dans la deuxieme balise plugin 110 110 // On deplace cette balise dans le tableau fusion de sa compatibilite et on cree la cle commune vide … … 153 153 return $fusion; 154 154 } 155 156 ?> -
_core_/plugins/svp/plugins/preparer_sql_paquet.php
r93627 r93661 49 49 50 50 // on normalise la version 1.3.12 => 001.003.012 51 $champs['version'] = (isset($plugin['version']) AND$plugin['version'])51 $champs['version'] = (isset($plugin['version']) and $plugin['version']) 52 52 ? normaliser_version($plugin['version']) 53 53 : ''; … … 89 89 90 90 // Extraction de la compatibilite SPIP et construction de la liste des branches spip supportees 91 $champs['compatibilite_spip'] = (isset($plugin['compatibilite']) AND$plugin['compatibilite'])91 $champs['compatibilite_spip'] = (isset($plugin['compatibilite']) and $plugin['compatibilite']) 92 92 ? $plugin['compatibilite'] 93 93 : ''; 94 $champs['branches_spip'] = (isset($plugin['compatibilite']) AND$plugin['compatibilite'])94 $champs['branches_spip'] = (isset($plugin['compatibilite']) and $plugin['compatibilite']) 95 95 ? compiler_branches_spip($plugin['compatibilite']) 96 96 : ''; … … 103 103 104 104 $champs['procure'] = ''; 105 if (isset($plugin['procure']) AND$plugin['procure']) {105 if (isset($plugin['procure']) and $plugin['procure']) { 106 106 $champs['procure'] = array(); 107 107 foreach ($plugin['procure'] as $procure) { 108 108 $p = strtoupper($procure['nom']); 109 109 if (!isset($champs['procure'][$p]) 110 ORspip_version_compare($procure['version'], $champs['procure'][$p], '>')110 or spip_version_compare($procure['version'], $champs['procure'][$p], '>') 111 111 ) { 112 112 $champs['procure'][$p] = $procure['version']; … … 118 118 return $champs; 119 119 } 120 121 ?> -
_core_/plugins/svp/plugins/preparer_sql_plugin.php
r93627 r93661 97 97 98 98 $champs['procure'] = ''; 99 if (isset($plugin['procure']) AND$plugin['procure']) {99 if (isset($plugin['procure']) and $plugin['procure']) { 100 100 $champs['procure'] = array(); 101 101 foreach ($plugin['procure'] as $procure) { 102 102 $p = strtoupper($procure['nom']); 103 103 if (!isset($champs['procure'][$p]) 104 ORspip_version_compare($procure['version'], $champs['procure'][$p], '>')104 or spip_version_compare($procure['version'], $champs['procure'][$p], '>') 105 105 ) { 106 106 $champs['procure'][$p] = $procure['version']; … … 141 141 // Si le nom n'est pas un multi alors le tableau renvoye est de la forme '' => 'nom' 142 142 $noms = extraire_trads(str_replace(array('<multi>', '</multi>'), array(), $nom, $nbr_replace)); 143 $multi = ($nbr_replace > 0 AND!$langue) ? true : false;143 $multi = ($nbr_replace > 0 and !$langue) ? true : false; 144 144 145 145 $nouveau_nom = ''; … … 154 154 $nbr_matches = 0; 155 155 } 156 if (!$langue OR $langue == $_lang ORcount($noms) == 1) {156 if (!$langue or $langue == $_lang or count($noms) == 1) { 157 157 $nouveau_nom .= (($multi) ? '[' . $_lang . ']' : '') . 158 158 (($nbr_matches > 0) ? trim($matches[1]) : $_nom); … … 247 247 248 248 // On detecte ensuite un mail eventuel 249 if (!$mail ANDpreg_match('/([^\w\d._-]*)(([\w\d._-]+)@([\w\d.-]+))/', $v, $r)) {249 if (!$mail and preg_match('/([^\w\d._-]*)(([\w\d._-]+)@([\w\d.-]+))/', $v, $r)) { 250 250 $mail = $r[2]; 251 251 $v = str_replace($r[2], '', $v); … … 276 276 } 277 277 $v = trim(textebrut($v)); 278 if ((strlen($v) > 2) AND!$licence) {278 if ((strlen($v) > 2) and !$licence) { 279 279 if ($balise == 'auteur') { 280 280 $res['auteur'][] = array('nom' => $v, 'url' => $href, 'mail' => $mail); … … 315 315 return $trads; 316 316 } 317 318 ?> -
_core_/plugins/svp/prive/squelettes/inclure/voir_en_ligne_fonctions.php
r93627 r93661 3 3 define('_SVP_PAGES_OBJET_PUBLIQUES', ''); 4 4 } 5 ?> -
_core_/plugins/svp/prive/squelettes/navigation/svp_admin_plugin_fonctions.php
r93627 r93661 11 11 12 12 include_spip('inc/svp_outiller'); 13 14 ?> -
_core_/plugins/urls_etendues/prive/squelettes/contenu/configurer_urls_fonctions.php
r93629 r93661 7 7 function choisir_form_configuration($type_url) { 8 8 if (include_spip("urls/$type_url") 9 ANDdefined($c = 'URLS_' . strtoupper($type_url) . '_CONFIG')9 and defined($c = 'URLS_' . strtoupper($type_url) . '_CONFIG') 10 10 ) { 11 11 return "configurer_urls_" . strtolower(constant($c)); … … 14 14 return ''; 15 15 } 16 17 ?>
Note: See TracChangeset
for help on using the changeset viewer.