diff --git a/ChangeLog b/ChangeLog
index 0375d554b22..c028d285b35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,12 +29,12 @@ For users:
- New: Can add an event automatically when a projet is create.
- New: Add option MAIN_GENERATE_DOCUMENT_WITH_PICTURE.
- New: Add option excludethirdparties and onlythirdparties into merge pdf scripts.
+- New : [ task #925 ] Add ODT document generation for Tasks in project module.
+- New : [ task #924 ] Add numbering rule on task.
+- New : [ task #165 ] Add import/export of multiprices.
+- New: Add Maghreb regions and departments.
+- New: A more responsive desgin for statistic box of home page.
- Qual: Implement same rule for return value of all command line scripts (0 when success, <>0 if error).
-- New : [ task #925 ] Add ODT document generation for Tasks in project module
-- New : [ task #924 ] Add numbering rule on task
-- New : [ task #165 ] Add import/export of multiprices
-- New: Add Maghreb regions and departments
-
For translators:
@@ -55,6 +55,7 @@ For developers:
key to use a specific language file.
- New: Make some changes to allow usage of several alternative $dolibarr_main_url_root variables.
Fix also several bugs with old code.
+- Qual: All nowrap properties are now using CSS class nowrap.
WARNING: This may create regression for some external modules, but was necessary to make
Dolibarr better:
@@ -65,8 +66,8 @@ If your action class for hook was returning a string or an array, instead your m
set $actionclassinstance->results (to return array)
or $actionclassinstance->resprints (to return string)
to return same thing. The return value must be replaced by a "return 0";
-Goal is to fix old compatibility code that does not match hook
-specification: http://wiki.dolibarr.org/index.php/Hooks_system
+Goal is to fix old compatibility code that does not match hook specifications:
+ http://wiki.dolibarr.org/index.php/Hooks_system
- Some methods object->addline used a first parameter that was object->id, some not. Of course
this was not a good pratice, since object->id is already known so no need to provide it as
diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php
index e41334a30e0..bd13cc238b1 100644
--- a/htdocs/core/class/hookmanager.class.php
+++ b/htdocs/core/class/hookmanager.class.php
@@ -131,7 +131,8 @@ class HookManager
// Define type of hook ('output', 'returnvalue' or 'addreplace'). 'addreplace' should be type for all hooks. 'output' and 'returnvalue' are deprecated.
$hooktype='output';
if (preg_match('/^pdf_/',$method)) $hooktype='returnvalue'; // pdf_xxx except pdf_writelinedesc are returnvalue hooks. When there is 2 hooks of this type, only last one win.
- if (in_array($method,array('doActions','formObjectOptions','moveUploadedFile','pdf_writelinedesc','paymentsupplierinvoices','printSearchForm', 'formattachOptions', 'formBuilddocLineOptions'))) $hooktype='addreplace';
+ if (in_array($method,array('addStatisticLine','doActions','formObjectOptions','moveUploadedFile','pdf_writelinedesc','paymentsupplierinvoices',
+ 'printSearchForm', 'formattachOptions', 'formBuilddocLineOptions'))) $hooktype='addreplace';
// Loop on each hook to qualify modules that declared context
$modulealreadyexecuted=array();
diff --git a/htdocs/index.php b/htdocs/index.php
index 6108985a0b6..adb35c29f4d 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -109,7 +109,7 @@ $langs->load("orders");
$langs->load("contracts");
//print memory_get_usage();
-if ($user->societe_id == 0)
+if (empty($user->societe_id))
{
print '
';
print '
| '.$langs->trans("DolibarrStateBoard").' | '; print ''; print ''; + print ' | |
|---|---|---|
| '; $var=true; - // Condition to be checked for each display line dashboard - $conditions=array( - ! empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS), - ! empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS), - ! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS), - ! empty($conf->adherent->enabled) && $user->rights->adherent->lire, - ! empty($conf->product->enabled) && $user->rights->produit->lire, - ! empty($conf->service->enabled) && $user->rights->service->lire, - ! empty($conf->propal->enabled) && $user->rights->propale->lire, - ! empty($conf->commande->enabled) && $user->rights->commande->lire, - ! empty($conf->facture->enabled) && $user->rights->facture->lire, - ! empty($conf->contrat->enabled) && $user->rights->contrat->activer); - // Class file containing the method load_state_board for each line - $includes=array(DOL_DOCUMENT_ROOT."/societe/class/client.class.php", - DOL_DOCUMENT_ROOT."/comm/prospect/class/prospect.class.php", - DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.class.php", - DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php", - DOL_DOCUMENT_ROOT."/product/class/product.class.php", - DOL_DOCUMENT_ROOT."/product/class/service.class.php", - DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php", - DOL_DOCUMENT_ROOT."/commande/class/commande.class.php", - DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php", - DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php"); - // Name class containing the method load_state_board for each line - $classes=array('Client', - 'Prospect', - 'Fournisseur', - 'Adherent', - 'Product', - 'Service', - 'Propal', - 'Commande', - 'Facture', - 'Contrat'); - // Cle array returned by the method load_state_board for each line - $keys=array('customers', - 'prospects', - 'suppliers', - 'members', - 'products', - 'services', - 'proposals', - 'orders', - 'invoices', - 'Contracts'); - // Dashboard Icon lines - $icons=array('company', - 'company', - 'company', - 'user', - 'product', - 'service', - 'propal', - 'order', - 'bill', - 'order'); - // Translation keyword - $titres=array("ThirdPartyCustomersStats", - "ThirdPartyProspectsStats", - "Suppliers", - "Members", - "Products", - "Services", - "CommercialProposals", - "CustomersOrders", - "BillsCustomers", - "Contracts"); - // Dashboard Link lines - $links=array(DOL_URL_ROOT.'/comm/list.php', - DOL_URL_ROOT.'/comm/prospect/list.php', - DOL_URL_ROOT.'/fourn/liste.php', - DOL_URL_ROOT.'/adherents/liste.php?statut=1&mainmenu=members', - DOL_URL_ROOT.'/product/liste.php?type=0&mainmenu=products', - DOL_URL_ROOT.'/product/liste.php?type=1&mainmenu=products', - DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial', - DOL_URL_ROOT.'/commande/liste.php?mainmenu=commercial', - DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=accountancy', - DOL_URL_ROOT.'/contrat/liste.php'); - // Translation lang files - $langfile=array("companies", - "prospects", - "suppliers", - "members", - "products", - "produts", - "propal", - "orders", - "bills", - "contracts"); - - - // Loop and displays each line of table - foreach ($keys as $key=>$val) - { - if ($conditions[$key]) - { - $classe=$classes[$key]; - // Search in cache if load_state_board is already realized - if (! isset($boardloaded[$classe]) || ! is_object($boardloaded[$classe])) - { - include_once $includes[$key]; // Loading a class cost around 1Mb - - $board=new $classe($db); - $board->load_state_board($user); - $boardloaded[$classe]=$board; - } - else $board=$boardloaded[$classe]; - - $var=!$var; - if ($langfile[$key]) $langs->load($langfile[$key]); - $title=$langs->trans($titres[$key]); - print ' | ||
| '.img_object($title,$icons[$key]).' | '; - print ''.$title.' | '; - print ''.$board->nb[$val].' | '; - print '
| '.img_object($title,$icons[$key]).' | '; + print ''.$title.' | '; + print ''.$board->nb[$val].' | '; + print '