diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index 995ba93fb64..416a0b46144 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -57,12 +57,12 @@ class box_activity extends ModeleBoxes { global $conf, $user; - $this->db=$db; + $this->db = $db; // FIXME: Pb into some status - $this->enabled=($conf->global->MAIN_FEATURES_LEVEL); // Not enabled by default due to bugs (see previous comments) + $this->enabled = ($conf->global->MAIN_FEATURES_LEVEL); // Not enabled by default due to bugs (see previous comments) - $this->hidden= ! ((! empty($conf->facture->enabled) && $user->rights->facture->lire) + $this->hidden = ! ((! empty($conf->facture->enabled) && $user->rights->facture->lire) || (! empty($conf->commande->enabled) && $user->rights->commande->lire) || (! empty($conf->propal->enabled) && $user->rights->propale->lire) ); diff --git a/htdocs/core/boxes/box_birthdays.php b/htdocs/core/boxes/box_birthdays.php index 0e37d830ef8..f15c5c8d1cb 100644 --- a/htdocs/core/boxes/box_birthdays.php +++ b/htdocs/core/boxes/box_birthdays.php @@ -56,7 +56,7 @@ class box_birthdays extends ModeleBoxes */ public function __construct($db, $param = '') { - global $conf, $user; + global $user; $this->db = $db; @@ -71,7 +71,7 @@ class box_birthdays extends ModeleBoxes */ public function loadBox($max = 20) { - global $user, $langs, $db, $conf; + global $user, $langs, $db; $langs->load("boxes"); $this->max=$max; diff --git a/htdocs/core/boxes/box_birthdays_members.php b/htdocs/core/boxes/box_birthdays_members.php index 6a36bc01ae4..446b74a184c 100644 --- a/htdocs/core/boxes/box_birthdays_members.php +++ b/htdocs/core/boxes/box_birthdays_members.php @@ -56,7 +56,7 @@ class box_birthdays_members extends ModeleBoxes */ public function __construct($db, $param = '') { - global $conf, $user; + global $user; $this->db = $db; @@ -71,7 +71,7 @@ class box_birthdays_members extends ModeleBoxes */ public function loadBox($max = 20) { - global $user, $langs, $db, $conf; + global $user, $langs, $db; $langs->load("boxes"); $this->max=$max; diff --git a/htdocs/core/boxes/box_bookmarks.php b/htdocs/core/boxes/box_bookmarks.php index 52f8c0f4a77..bb35c311f00 100644 --- a/htdocs/core/boxes/box_bookmarks.php +++ b/htdocs/core/boxes/box_bookmarks.php @@ -54,9 +54,9 @@ class box_bookmarks extends ModeleBoxes { global $user; - $this->db=$db; + $this->db = $db; - $this->hidden=! ($user->rights->bookmark->lire); + $this->hidden = ! ($user->rights->bookmark->lire); } /** diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php index 956e73b4acf..e0d7d1fee4d 100644 --- a/htdocs/core/boxes/box_commandes.php +++ b/htdocs/core/boxes/box_commandes.php @@ -58,9 +58,9 @@ class box_commandes extends ModeleBoxes { global $user; - $this->db=$db; + $this->db = $db; - $this->hidden=! ($user->rights->commande->lire); + $this->hidden = ! ($user->rights->commande->lire); } /** diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index 45886e00be7..667f892bc0a 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -60,9 +60,9 @@ class box_contacts extends ModeleBoxes { global $user; - $this->db=$db; + $this->db = $db; - $this->hidden=! ($user->rights->societe->lire && $user->rights->societe->contact->lire); + $this->hidden = ! ($user->rights->societe->lire && $user->rights->societe->contact->lire); } /** diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php index 6447b63b120..43ade84ad20 100644 --- a/htdocs/core/boxes/box_contracts.php +++ b/htdocs/core/boxes/box_contracts.php @@ -57,9 +57,9 @@ class box_contracts extends ModeleBoxes { global $user; - $this->db=$db; + $this->db = $db; - $this->hidden=! ($user->rights->contrat->lire); + $this->hidden = ! ($user->rights->contrat->lire); } /** diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index 3465182ff02..5aa7d0575c6 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -56,9 +56,9 @@ class box_factures extends ModeleBoxes { global $user; - $this->db=$db; + $this->db = $db; - $this->hidden=! ($user->rights->facture->lire); + $this->hidden = ! ($user->rights->facture->lire); } /** diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index fd55478932c..9d2e8e995e3 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -57,9 +57,9 @@ class box_factures_fourn extends ModeleBoxes { global $user; - $this->db=$db; + $this->db = $db; - $this->hidden=! ($user->rights->fournisseur->facture->lire); + $this->hidden = ! ($user->rights->fournisseur->facture->lire); } /** diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index 74f8cbc6b64..a28f275dc96 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -56,9 +56,9 @@ class box_factures_fourn_imp extends ModeleBoxes { global $user; - $this->db=$db; + $this->db = $db; - $this->hidden=! ($user->rights->fournisseur->facture->lire); + $this->hidden = ! ($user->rights->fournisseur->facture->lire); } /** diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index a0692c791b2..5dfa6c8c492 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -59,9 +59,9 @@ class box_factures_imp extends ModeleBoxes { global $user; - $this->db=$db; + $this->db = $db; - $this->hidden=! ($user->rights->facture->lire); + $this->hidden = ! ($user->rights->facture->lire); } /** diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php index 0debc76c507..8311ae7226c 100644 --- a/htdocs/core/boxes/box_ficheinter.php +++ b/htdocs/core/boxes/box_ficheinter.php @@ -57,9 +57,9 @@ class box_ficheinter extends ModeleBoxes { global $user; - $this->db=$db; + $this->db = $db; - $this->hidden=! ($user->rights->ficheinter->lire); + $this->hidden = ! ($user->rights->ficheinter->lire); } /** diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index 01f62bc38c9..8d231cc472b 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -57,9 +57,9 @@ class box_fournisseurs extends ModeleBoxes { global $user; - $this->db=$db; + $this->db = $db; - $this->hidden=! ($user->rights->societe->lire && empty($user->socid)); + $this->hidden = ! ($user->rights->societe->lire && empty($user->socid)); } /** diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index 75673ee3fce..36a35c3bbc2 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -52,9 +52,9 @@ class box_graph_propales_permonth extends ModeleBoxes { global $user; - $this->db=$db; + $this->db = $db; - $this->hidden=! ($user->rights->propale->lire); + $this->hidden = ! ($user->rights->propale->lire); } /** diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index c0c82677d4e..b0f1200dec7 100644 --- a/htdocs/core/boxes/box_members.php +++ b/htdocs/core/boxes/box_members.php @@ -65,7 +65,7 @@ class box_members extends ModeleBoxes $listofmodulesforexternal=explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); if (! in_array('adherent', $listofmodulesforexternal) && ! empty($user->societe_id)) $this->enabled=0; // disabled for external users - $this->hidden=! ($user->rights->adherent->lire); + $this->hidden = ! ($user->rights->adherent->lire); } /** diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index 38f9a73f57f..68c1b4c790b 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -64,7 +64,7 @@ class box_produits extends ModeleBoxes $listofmodulesforexternal=explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); $tmpentry=array('enabled'=>(! empty($conf->product->enabled) || ! empty($conf->service->enabled)), 'perms'=>(! empty($user->rights->produit->lire) || ! empty($user->rights->service->lire)), 'module'=>'product|service'); $showmode=isVisibleToUserType(($user->societe_id > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal); - $this->hidden=($showmode != 1); + $this->hidden = ($showmode != 1); } /** diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php index d1381870338..bdecbde39de 100644 --- a/htdocs/core/boxes/box_produits_alerte_stock.php +++ b/htdocs/core/boxes/box_produits_alerte_stock.php @@ -66,7 +66,7 @@ class box_produits_alerte_stock extends ModeleBoxes $listofmodulesforexternal=explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); $tmpentry=array('enabled'=>((! empty($conf->product->enabled) || ! empty($conf->service->enabled)) && ! empty($conf->stock->enabled)), 'perms'=>($user->rights->stock->lire), 'module'=>'product|service|stock'); $showmode=isVisibleToUserType(($user->societe_id > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal); - $this->hidden=($showmode != 1); + $this->hidden = ($showmode != 1); } /** diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index e7281708802..3cd36c470fe 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -59,9 +59,9 @@ class box_project extends ModeleBoxes $langs->loadLangs(array('boxes', 'projects')); $this->db = $db; - $this->boxlabel="OpenedProjects"; + $this->boxlabel = "OpenedProjects"; - $this->hidden=! ($user->rights->projet->lire); + $this->hidden = ! ($user->rights->projet->lire); } /** diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php index 6bf6a2c2166..f486463a32a 100644 --- a/htdocs/core/boxes/box_propales.php +++ b/htdocs/core/boxes/box_propales.php @@ -58,9 +58,9 @@ class box_propales extends ModeleBoxes { global $user; - $this->db=$db; + $this->db = $db; - $this->hidden=! ($user->rights->propale->lire); + $this->hidden = ! ($user->rights->propale->lire); } /** diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php index 7f5cc566f42..947ebc18b52 100644 --- a/htdocs/core/boxes/box_prospect.php +++ b/htdocs/core/boxes/box_prospect.php @@ -65,7 +65,7 @@ class box_prospect extends ModeleBoxes // disable box for such cases if (! empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $this->enabled=0; // disabled by this option - $this->hidden=! ($user->rights->societe->lire && empty($user->socid)); + $this->hidden = ! ($user->rights->societe->lire && empty($user->socid)); } /** diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index 3fcd8001227..eaca6dc1548 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -58,9 +58,9 @@ class box_services_contracts extends ModeleBoxes { global $user; - $this->db=$db; + $this->db = $db; - $this->hidden=! ($user->rights->service->lire && $user->rights->contrat->lire); + $this->hidden = ! ($user->rights->service->lire && $user->rights->contrat->lire); } /** diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php index 738d6af078f..58262a16dec 100644 --- a/htdocs/core/boxes/box_services_expired.php +++ b/htdocs/core/boxes/box_services_expired.php @@ -56,9 +56,9 @@ class box_services_expired extends ModeleBoxes { global $user; - $this->db=$db; + $this->db = $db; - $this->hidden=! ($user->rights->contrat->lire); + $this->hidden = ! ($user->rights->contrat->lire); } /** diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php index 34316cd1ad1..59a3a8afec6 100644 --- a/htdocs/core/boxes/box_supplier_orders.php +++ b/htdocs/core/boxes/box_supplier_orders.php @@ -56,9 +56,9 @@ class box_supplier_orders extends ModeleBoxes { global $user; - $this->db=$db; + $this->db = $db; - $this->hidden=! ($user->rights->fournisseur->commande->lire); + $this->hidden = ! ($user->rights->fournisseur->commande->lire); } /** diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index 34070520aa5..00559bcde32 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -54,7 +54,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box public $enabled=1; /** - * @var int Condition to have widget visible (in most cases, permissions) + * @var boolean Condition to have widget visible (in most cases, permissions) */ public $hidden=0;