Qual: We can enable box by default because a warning is output to user.

This commit is contained in:
Laurent Destailleur 2013-01-15 15:53:35 +01:00
parent db923b9814
commit 6a51db82e9
5 changed files with 15 additions and 6 deletions

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@ -397,7 +397,14 @@ foreach($boxactivated as $key => $box)
print "\n".'<!-- Box '.$box->boxcode.' -->'."\n";
print '<tr '.$bc[$var].'>';
print '<td>'.img_object("",$logo).' '.$box->boxlabel.'</td>';
print '<td>' . ($box->note?$box->note:'&nbsp;') . '</td>';
print '<td>';
if ($box->note == '(WarningUsingThisBoxSlowDown)')
{
$langs->load("errors");
print img_warning('',0).' '.$langs->trans("WarningUsingThisBoxSlowDown");
}
else print ($box->note?$box->note:'&nbsp;');
print '</td>';
print '<td align="center">' . (isset($pos_name[$box->position])?$pos_name[$box->position]:'') . '</td>';
$hasnext=($key < (count($boxactivated)-1));
$hasprevious=($key != 0);

View File

@ -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

View File

@ -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

View File

@ -129,4 +129,5 @@ WarningsOnXLines=Warnings on <b>%s</b> 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 <b>install.lock</b> into directory <b>%s</b>. 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.
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.

View File

@ -130,4 +130,5 @@ WarningsOnXLines=Alertes sur <b>%s</b> 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 <b>install.lock</b> dans le répertoire <b>%s</b>. 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.
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.