diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 7e092c56abd..262cd4c29d4 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -397,7 +397,14 @@ foreach($boxactivated as $key => $box) print "\n".''."\n"; print ''; print ''.img_object("",$logo).' '.$box->boxlabel.''; - print '' . ($box->note?$box->note:' ') . ''; + print ''; + if ($box->note == '(WarningUsingThisBoxSlowDown)') + { + $langs->load("errors"); + print img_warning('',0).' '.$langs->trans("WarningUsingThisBoxSlowDown"); + } + else print ($box->note?$box->note:' '); + print ''; print '' . (isset($pos_name[$box->position])?$pos_name[$box->position]:'') . ''; $hasnext=($key < (count($boxactivated)-1)); $hasprevious=($key != 0); diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index adbc2c7090a..834799878d2 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -55,8 +55,7 @@ class box_activity extends ModeleBoxes $this->boxlabel = $langs->transnoentitiesnoconv("BoxGlobalActivity"); - // Disabled by default because, still has some bug (pgsl support, filters) and slow down seriously Dolibarr - $this->enabled = (! empty($conf->global->MAIN_FEATURES_LEVEL) || ! empty($conf->global->MAIN_BOX_ACTIVITY_ENABLED)); + $this->enabled = 1; // FIXME: Use a cache to save data because this slow down too much main home page. This box slow down too seriously software. // FIXME: Removed number_format (not compatible with all languages) // FIXME: Pb into some status diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 72c4ea71889..a5c446a02e7 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -126,6 +126,7 @@ class modSociete extends DolibarrModules $this->boxes[$r][1] = "box_contacts.php"; $r++; $this->boxes[$r][1] = "box_activity.php"; + $this->boxes[$r][2] = '(WarningUsingThisBoxSlowDown)'; $r++; // Permissions diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index f034287a880..2c5f634fff6 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -129,4 +129,5 @@ WarningsOnXLines=Warnings on %s source lines WarningNoDocumentModelActivated=No model, for document generation, has been activated. A model will be choosed by default until you check your module setup. WarningLockFileDoesNotExists=Warning, once setup is finished, you must disable install/migrate tools by adding a file install.lock into directory %s. Missing this file is a security hole. WarningUntilDirRemoved=All security warnings (visible by admin users only) will remain active as long as the vulnerability is present (or that constant MAIN_REMOVE_INSTALL_WARNING is added in Setup->Other setup). -WarningCloseAlways=Warning, closing is done even if amount differs between source and target elements. Enable this feature with caution. \ No newline at end of file +WarningCloseAlways=Warning, closing is done even if amount differs between source and target elements. Enable this feature with caution. +WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box. \ No newline at end of file diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index f683af9b736..99112a0db96 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -130,4 +130,5 @@ WarningsOnXLines=Alertes sur %s lignes sources WarningNoDocumentModelActivated=Aucun modèle, pour la génération de document, n'a été activé. Un modèle sera pris par défaut en attendant la correction de configuration du module. WarningLockFileDoesNotExists=Attention, une fois l'installation terminée, les outils d'installation/migration doivent être désactivés en ajoutant un fichier install.lock dans le répertoire %s. L'absence de ce fichier représente une faille de sécurité. WarningUntilDirRemoved=Les alertes de sécurité sont visibles par les administrateurs uniquement et resteront actives tant que la vulnérabilité sera avérée (ou que la constante MAIN_REMOVE_INSTALL_WARNING aura été définie dans Configuration->Divers) -WarningCloseAlways=Attention, la fermeture se fait même lorsque le montant diffère. N'activez cette fonctionnalité qu'en connaissance de cause. \ No newline at end of file +WarningCloseAlways=Attention, la fermeture se fait même lorsque le montant diffère. N'activez cette fonctionnalité qu'en connaissance de cause. +WarningUsingThisBoxSlowDown=Attention, l'utilisation de cette boite provoque de sérieux ralentissement des pages affichant cette boite. \ No newline at end of file