diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 2db6936e1d3..f29a6b66d37 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1028,7 +1028,7 @@ else // View by day $today=0; $todayarray=dol_getdate($now,'fast'); if ($todayarray['mday']==$day && $todayarray['mon']==$month && $todayarray['year']==$year) $today=1; - if ($today) $style='cal_today'; + //if ($today) $style='cal_today'; $timestamp=dol_mktime(12,0,0,$month,$day,$year); $arraytimestamp=dol_getdate($timestamp); diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index b3858c5f4aa..076ad9bc689 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -49,7 +49,11 @@ $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (! $sortorder) $sortorder="DESC"; -if (! $sortfield) $sortfield="fd.date"; +if (! $sortfield) +{ + if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) $sortfield="fd.date"; + else $sortfield="f.ref"; +} $limit = $conf->liste_limit; $search_ref=GETPOST('search_ref','alpha'); @@ -70,13 +74,12 @@ llxHeader('', $langs->trans("Intervention")); $sql = "SELECT"; $sql.= " f.ref, f.rowid as fichid, f.fk_statut, f.description,"; -$sql.= " fd.description as descriptiondetail, fd.date as dp, fd.duree,"; +if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) $sql.= " fd.description as descriptiondetail, fd.date as dp, fd.duree,"; $sql.= " s.nom as name, s.rowid as socid, s.client"; $sql.= " FROM (".MAIN_DB_PREFIX."societe as s"; -if (! $user->rights->societe->client->voir && empty($socid)) - $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +if (! $user->rights->societe->client->voir && empty($socid)) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ", ".MAIN_DB_PREFIX."fichinter as f)"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."fichinterdet as fd ON fd.fk_fichinter = f.rowid"; +if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."fichinterdet as fd ON fd.fk_fichinter = f.rowid"; $sql.= " WHERE f.fk_soc = s.rowid "; $sql.= " AND f.entity = ".$conf->entity; if ($search_ref) { @@ -86,7 +89,8 @@ if ($search_company) { $sql .= natural_search('s.nom', $search_company); } if ($search_desc) { - $sql .= natural_search(array('f.description', 'fd.description'), $search_desc); + if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) $sql .= natural_search(array('f.description', 'fd.description'), $search_desc); + else $sql .= natural_search(array('f.description'), $search_desc); } if ($search_status != '' && $search_status >= 0) { $sql .= ' AND f.fk_statut = '.$search_status; @@ -97,6 +101,7 @@ if ($socid) $sql.= " AND s.rowid = " . $socid; $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit+1, $offset); +//print $sql; $result=$db->query($sql); if ($result)