diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php index 5972894065e..f54dfd74521 100644 --- a/htdocs/admin/system/phpinfo.php +++ b/htdocs/admin/system/phpinfo.php @@ -105,37 +105,37 @@ $arrayphpminversionerror = array(5, 5, 0); $arrayphpminversionwarning = array(5, 6, 0); if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0) { - print 'Error '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror)); + print img_picto('Error', 'error').' '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror)); } elseif (versioncompare(versionphparray(), $arrayphpminversionwarning) < 0) { - print 'Warning '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionwarning)); + print img_picto('Warning', 'warning').' '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionwarning)); } else { - print 'Ok '.versiontostring(versionphparray()); + print img_picto('Ok', 'tick').' '.versiontostring(versionphparray()); } print ''; print 'GET and POST support'; if (!isset($_GET["testget"]) && !isset($_POST["testpost"]) && !isset($_GET["mainmenu"])) { // We must keep $_GET and $_POST here. This is a specific test. - print 'Warning '.$langs->trans("PHPSupportPOSTGETKo"); + print img_picto('Warning', 'warning').' '.$langs->trans("PHPSupportPOSTGETKo"); print ' ('.$langs->trans("Recheck").')'; } else { - print 'Ok '.$langs->trans("PHPSupportPOSTGETOk"); + print img_picto('Ok', 'tick').' '.$langs->trans("PHPSupportPOSTGETOk"); } print ''; print 'Sessions support'; if (!function_exists("session_id")) { - print 'Error '.$langs->trans("ErrorPHPDoesNotSupportSessions"); + print img_picto('Error', 'error').' '.$langs->trans("ErrorPHPDoesNotSupportSessions"); } else { - print 'Ok '.$langs->trans("PHPSupportSessions"); + print img_picto('Ok', 'tick').' '.$langs->trans("PHPSupportSessions"); } print ''; print 'UTF-8 support'; if (!function_exists("utf8_encode")) { - print 'Warning '.$langs->trans("ErrorPHPDoesNotSupport", "UTF8"); + print img_picto('Warning', 'warning').' '.$langs->trans("ErrorPHPDoesNotSupport", "UTF8"); } else { - print 'Ok '.$langs->trans("PHPSupport", "UTF8"); + print img_picto('Ok', 'tick').' '.$langs->trans("PHPSupport", "UTF8"); } print ''; diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php index 279f85becae..ed033626fcd 100644 --- a/htdocs/admin/system/security.php +++ b/htdocs/admin/system/security.php @@ -293,6 +293,8 @@ if (file_exists($installlock)) { } else { print img_warning().' '.$langs->trans("WarningLockFileDoesNotExists", DOL_DATA_ROOT); } + +print '
'; print '
'; // Is upgrade unlocked @@ -301,6 +303,7 @@ if (file_exists($installlock)) { // If install not locked, no need to show this. print ''.$langs->trans("DolibarrUpgrade").': '; print img_warning().' '.$langs->trans("WarningUpgradeHasBeenUnlocked", $upgradeunlock); print '
'; + print '
'; } } diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 3c5f8b99bc0..4592adcd7e5 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1259,7 +1259,8 @@ class Categorie extends CommonObject } dol_syslog(get_class($this)."::get_full_arbo dol_sort_array", LOG_DEBUG); - $this->cats = dol_sort_array($this->cats, 'fulllabel', 'asc', true, false); + + $this->cats = dol_sort_array($this->cats, 'fulllabel', 'asc', 1, 0, 1); // Sort on full label like "Label 1 >> Sublabel a >> Subsublabel" return $this->cats; } diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 0d935b95721..6058bf898d7 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -311,7 +311,9 @@ $sql .= " c.rowid, c.ref, c.datec as date_creation, c.tms as date_modification, $sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays as country_id, s.client, s.code_client, s.status as company_status, s.logo as company_logo,'; $sql .= " typent.code as typent_code,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; -$sql .= " MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") as lower_planned_end_date,"; +// TODO Add a denormalized field "perf_lower_planned_end_date" so we can remove the HAVING and then, +// remove completely the SUM and GROUP BY (faster). Status of each service can be read into the loop that build the list. +$sql .= " MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") as lower_planned_end_date,"; // lowest expiration date among open service lines $sql .= " SUM(".$db->ifsql("cd.statut=0", 1, 0).') as nb_initial,'; $sql .= " SUM(".$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NULL OR cd.date_fin_validite >= '".$db->idate($now)."')", 1, 0).') as nb_running,'; $sql .= " SUM(".$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AND cd.date_fin_validite < '".$db->idate($now)."')", 1, 0).') as nb_expired,'; @@ -542,7 +544,12 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) { } else { /* The fast and low memory method to get and count full list converts the sql into a sql count */ $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql); - $sqlforcount = preg_replace('/LEFT JOIN '.MAIN_DB_PREFIX.'contratdet as cd ON c.rowid = cd.fk_contrat /', '', $sqlforcount); + + $sqlforcount = str_replace('LEFT JOIN '.MAIN_DB_PREFIX.'c_country as country on (country.rowid = s.fk_pays)', '', $sqlforcount); + $sqlforcount = str_replace('LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as typent on (typent.id = s.fk_typent)', '', $sqlforcount); + $sqlforcount = str_replace('LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as state on (state.rowid = s.fk_departement)', '', $sqlforcount); + $sqlforcount = str_replace('LEFT JOIN '.MAIN_DB_PREFIX.'contratdet as cd ON c.rowid = cd.fk_contrat', '', $sqlforcount); + $sqlforcount = str_replace('LEFT JOIN '.MAIN_DB_PREFIX.'contrat_extrafields as ef on (c.rowid = ef.fk_object)', '', $sqlforcount); $sqlforcount = preg_replace('/GROUP BY.*$/', '', $sqlforcount); $resql = $db->query($sqlforcount);