Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
705bd9ef51
4 changed files with 23 additions and 12 deletions
|
|
@ -105,37 +105,37 @@ $arrayphpminversionerror = array(5, 5, 0);
|
|||
$arrayphpminversionwarning = array(5, 6, 0);
|
||||
|
||||
if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0) {
|
||||
print '<img src="'.$ErrorPicturePath.'" alt="Error"> '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror));
|
||||
print img_picto('Error', 'error').' '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror));
|
||||
} elseif (versioncompare(versionphparray(), $arrayphpminversionwarning) < 0) {
|
||||
print '<img src="'.$WarningPicturePath.'" alt="Warning"> '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionwarning));
|
||||
print img_picto('Warning', 'warning').' '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionwarning));
|
||||
} else {
|
||||
print '<img src="'.$OkayPicturePath.'" alt="Ok"> '.versiontostring(versionphparray());
|
||||
print img_picto('Ok', 'tick').' '.versiontostring(versionphparray());
|
||||
}
|
||||
|
||||
print '</td></tr>';
|
||||
print '<tr><td>GET and POST support</td><td>';
|
||||
|
||||
if (!isset($_GET["testget"]) && !isset($_POST["testpost"]) && !isset($_GET["mainmenu"])) { // We must keep $_GET and $_POST here. This is a specific test.
|
||||
print '<img src="'.$WarningPicturePath.'" alt="Warning"> '.$langs->trans("PHPSupportPOSTGETKo");
|
||||
print img_picto('Warning', 'warning').' '.$langs->trans("PHPSupportPOSTGETKo");
|
||||
print ' (<a href="'.$_SERVER["PHP_SELF"].'?testget=ok">'.$langs->trans("Recheck").'</a>)';
|
||||
} else {
|
||||
print '<img src="'.$OkayPicturePath.'" alt="Ok"> '.$langs->trans("PHPSupportPOSTGETOk");
|
||||
print img_picto('Ok', 'tick').' '.$langs->trans("PHPSupportPOSTGETOk");
|
||||
}
|
||||
|
||||
print '</td></tr>';
|
||||
print '<tr><td>Sessions support</td><td>';
|
||||
if (!function_exists("session_id")) {
|
||||
print '<img src="'.$ErrorPicturePath.'" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportSessions");
|
||||
print img_picto('Error', 'error').' '.$langs->trans("ErrorPHPDoesNotSupportSessions");
|
||||
} else {
|
||||
print '<img src="'.$OkayPicturePath.'" alt="Ok"> '.$langs->trans("PHPSupportSessions");
|
||||
print img_picto('Ok', 'tick').' '.$langs->trans("PHPSupportSessions");
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>UTF-8 support</td><td>';
|
||||
if (!function_exists("utf8_encode")) {
|
||||
print '<img src="'.$WarningPicturePath.'" alt="Warning"> '.$langs->trans("ErrorPHPDoesNotSupport", "UTF8");
|
||||
print img_picto('Warning', 'warning').' '.$langs->trans("ErrorPHPDoesNotSupport", "UTF8");
|
||||
} else {
|
||||
print '<img src="'.$OkayPicturePath.'" alt="Ok"> '.$langs->trans("PHPSupport", "UTF8");
|
||||
print img_picto('Ok', 'tick').' '.$langs->trans("PHPSupport", "UTF8");
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
|
|||
|
|
@ -293,6 +293,8 @@ if (file_exists($installlock)) {
|
|||
} else {
|
||||
print img_warning().' '.$langs->trans("WarningLockFileDoesNotExists", DOL_DATA_ROOT);
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
// Is upgrade unlocked
|
||||
|
|
@ -301,6 +303,7 @@ if (file_exists($installlock)) { // If install not locked, no need to show this.
|
|||
print '<strong>'.$langs->trans("DolibarrUpgrade").'</strong>: ';
|
||||
print img_warning().' '.$langs->trans("WarningUpgradeHasBeenUnlocked", $upgradeunlock);
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue