Browse Source

Mise en forme plus homegene et plus lisible, pour les declarations des fonctions

Regles : 
- un espace après chaque virgule
- un espace avant et apres chaque '='
svn/root/tags/plugins/statistiques/0.7.0
gilles.vincent@gmail.com 7 years ago
parent
commit
0c397a4d56
  1. 2
      action/statistiques_archiver.php
  2. 2
      base/delete_referers.php
  3. 2
      base/delete_stats.php
  4. 4
      inc/statistiques.php
  5. 2
      prive/squelettes/contenu/stats_repartition_fonctions.php
  6. 6
      prive/squelettes/inclure/stats-visites-data_fonctions.php
  7. 4
      stats_autoriser.php

2
action/statistiques_archiver.php

@ -51,7 +51,7 @@ if (!defined('STATISTIQUES_ARCHIVER_PAR_AN')) {
*
* @param string $arg
*/
function action_statistiques_archiver_dist($arg=null){
function action_statistiques_archiver_dist($arg = null){
if (!$arg) {
$securiser_action = charger_fonction('securiser_action', 'inc');
$arg = $securiser_action();

2
base/delete_referers.php

@ -23,7 +23,7 @@ if (!defined("_ECRIRE_INC_VERSION")) return; // securiser
* @param bool $reprise
* @return string
*/
function base_delete_referers_dist($titre='', $reprise='')
function base_delete_referers_dist($titre = '', $reprise = '')
{
if (!$titre) return; // anti-testeur automatique
sql_delete("spip_referers");

2
base/delete_stats.php

@ -23,7 +23,7 @@ if (!defined("_ECRIRE_INC_VERSION")) return; // securiser
* @param bool $reprise
* @return string
*/
function base_delete_stats_dist($titre='', $reprise='')
function base_delete_stats_dist($titre = '', $reprise = '')
{
if (!$titre) return; // anti-testeur automatique
sql_delete("spip_visites");

4
inc/statistiques.php

@ -18,7 +18,7 @@ if (!defined("_ECRIRE_INC_VERSION")) return;
* @param int $glisse
* @return float
*/
function moyenne_glissante($valeur = false, $glisse=0) {
function moyenne_glissante($valeur = false, $glisse = 0) {
static $v = array();
// pas d'argument, raz de la moyenne
if ($valeur === false) {
@ -57,7 +57,7 @@ function statistiques_moyenne($tab){
* @param string $serveur
* @return array
*/
function classement_populaires($type, $serveur=''){
function classement_populaires($type, $serveur = ''){
static $classement = array();
if (isset($classement[$type]))
return $classement[$type];

2
prive/squelettes/contenu/stats_repartition_fonctions.php

@ -35,7 +35,7 @@ function enfants($id_parent, $critere, &$nombre_branche, &$nombre_rub){
// http://code.spip.net/@enfants_aff
function enfants_aff($id_parent,$decalage, $taille, $critere, $gauche=0) {
function enfants_aff($id_parent, $decalage, $taille, $critere, $gauche = 0) {
global $spip_lang_right, $spip_lang_left;
static $total_site=null;
static $niveau=0;

6
prive/squelettes/inclure/stats-visites-data_fonctions.php

@ -5,7 +5,7 @@ if (!defined('_ECRIRE_INC_VERSION')) return;
include_spip('inc/acces');
include_spip('inc/statistiques');
function duree_affiche($duree,$periode){
function duree_affiche($duree, $periode){
if (intval($duree))
return $duree;
@ -18,7 +18,7 @@ function duree_affiche($duree,$periode){
return 90;
}
function duree_zoom($duree,$sens='plus'){
function duree_zoom($duree, $sens = 'plus'){
$largeur_abs = 420/$duree;
if ($largeur_abs > 1) {
@ -39,7 +39,7 @@ function duree_zoom($duree,$sens='plus'){
return ($sens=='plus'?$duree_moins:$duree_plus);
}
function stats_total($serveur=''){
function stats_total($serveur = ''){
$row = sql_fetsel("SUM(visites) AS total_absolu", "spip_visites",'','','','','',$serveur);
return $row ? $row['total_absolu'] : 0;
}

4
stats_autoriser.php

@ -27,7 +27,7 @@ function stats_autoriser(){}
* @param array $opt Options de cette autorisation
* @return bool true s'il a le droit, false sinon
*/
function autoriser_statistiques_menu_dist($faire, $type='', $id=0, $qui = NULL, $opt = NULL){
function autoriser_statistiques_menu_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){
return autoriser('voirstats', $type, $id, $qui, $opt);
}
@ -42,7 +42,7 @@ function autoriser_statistiques_menu_dist($faire, $type='', $id=0, $qui = NULL,
* @param array $opt Options de cette autorisation
* @return bool true s'il a le droit, false sinon
*/
function autoriser_referers_menu_dist($faire, $type='', $id=0, $qui = NULL, $opt = NULL){
function autoriser_referers_menu_dist($faire, $type = '', $id = 0, $qui = NULL, $opt = NULL){
return autoriser('voirstats', $type, $id, $qui, $opt);
}

Loading…
Cancel
Save