Fix: uniformize code
This commit is contained in:
parent
00e0649cde
commit
0ad137e734
@ -139,12 +139,12 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
|
|||||||
closedir($dir);
|
closedir($dir);
|
||||||
|
|
||||||
// Obtain a list of columns
|
// Obtain a list of columns
|
||||||
if ($sortcriteria)
|
if (! empty($sortcriteria))
|
||||||
{
|
{
|
||||||
$myarray=array();
|
$myarray=array();
|
||||||
foreach ($file_list as $key => $row)
|
foreach ($file_list as $key => $row)
|
||||||
{
|
{
|
||||||
$myarray[$key] = $row[$sortcriteria];
|
$myarray[$key] = (isset($row[$sortcriteria])?$row[$sortcriteria]:'');
|
||||||
}
|
}
|
||||||
// Sort the data
|
// Sort the data
|
||||||
if ($sortorder) array_multisort($myarray, $sortorder, $file_list);
|
if ($sortorder) array_multisort($myarray, $sortorder, $file_list);
|
||||||
|
|||||||
@ -48,9 +48,9 @@ $result = restrictedArea($user, 'ecm','');
|
|||||||
$user->getrights('ecm');
|
$user->getrights('ecm');
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
$socid = GETPOST('socid','int');
|
||||||
$action = isset($_GET["action"])?$_GET["action"]:$_POST['action'];
|
$action = GETPOST('action','alpha');
|
||||||
$section=isset($_GET["section"])?$_GET["section"]:$_POST['section'];
|
$section=GETPOST('section');
|
||||||
if (! $section) $section=0;
|
if (! $section) $section=0;
|
||||||
|
|
||||||
$upload_dir = $conf->ecm->dir_output.'/'.$section;
|
$upload_dir = $conf->ecm->dir_output.'/'.$section;
|
||||||
@ -66,9 +66,9 @@ if (! $sortorder) $sortorder="ASC";
|
|||||||
if (! $sortfield) $sortfield="label";
|
if (! $sortfield) $sortfield="label";
|
||||||
|
|
||||||
$ecmdir = new EcmDirectory($db);
|
$ecmdir = new EcmDirectory($db);
|
||||||
if (! empty($_REQUEST["section"]))
|
if (! empty($section))
|
||||||
{
|
{
|
||||||
$result=$ecmdir->fetch($_REQUEST["section"]);
|
$result=$ecmdir->fetch($section);
|
||||||
if (! $result > 0)
|
if (! $result > 0)
|
||||||
{
|
{
|
||||||
dol_print_error($db,$ecmdir->error);
|
dol_print_error($db,$ecmdir->error);
|
||||||
@ -123,10 +123,8 @@ print_fiche_titre($langs->trans("ECMArea").' - '.$langs->trans("Search"));
|
|||||||
//print "<br>\n";
|
//print "<br>\n";
|
||||||
print $langs->trans("FeatureNotYetAvailable").'.<br><br>';
|
print $langs->trans("FeatureNotYetAvailable").'.<br><br>';
|
||||||
|
|
||||||
if ($mesg) { print $mesg."<br>"; }
|
|
||||||
|
|
||||||
// Tool bar
|
// Tool bar
|
||||||
$head = ecm_prepare_head_fm($fac);
|
$head = ecm_prepare_head_fm($ecmdir);
|
||||||
//dol_fiche_head($head, 'search_form', '', 1);
|
//dol_fiche_head($head, 'search_form', '', 1);
|
||||||
|
|
||||||
|
|
||||||
@ -210,7 +208,6 @@ print '</table>';
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user