From dfb697d794e710d1272cc10b327326e91d1b2125 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 Jun 2012 18:55:04 +0200 Subject: [PATCH] Prepare ajax for ecm module. --- htdocs/ecm/class/ecmdirectory.class.php | 11 +- htdocs/ecm/index.php | 188 +++++++++--------------- 2 files changed, 74 insertions(+), 125 deletions(-) diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 5ccef2be6b4..1cb0549a053 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -403,18 +403,19 @@ class EcmDirectory // extends CommonObject * @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul * @param string $option Sur quoi pointe le lien * @param int $max Max length + * @param string $morehtml Add more param on a link * @return string Chaine avec URL */ - function getNomUrl($withpicto=0,$option='',$max=0) + function getNomUrl($withpicto=0,$option='',$max=0,$more='') { global $langs; $result=''; - $lien = ''; - if ($option == 'index') $lien = ''; - if ($option == 'indexexpanded') $lien = ''; - if ($option == 'indexnotexpanded') $lien = ''; + $lien = ''; + if ($option == 'index') $lien = ''; + if ($option == 'indexexpanded') $lien = ''; + if ($option == 'indexnotexpanded') $lien = ''; $lienfin=''; //$picto=DOL_URL_ROOT.'/theme/common/treemenu/folder.gif'; diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index 35a286b965a..05a2b437598 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -204,7 +204,7 @@ if ($action == 'refreshmanual') // Now we compare both trees to complete missing trees into database //var_dump($disktree); //var_dump($sqltree); - foreach($disktree as $dirdesc) + foreach($disktree as $dirdesc) // Loop on tree onto disk { $dirisindatabase=0; foreach($sqltree as $dirsqldesc) @@ -293,6 +293,9 @@ if ($action == 'refreshmanual') } } + $sql="UPDATE ".MAIN_DB_PREFIX."ecm_directories set cachenbofdoc=0 WHERE cachenbofdoc < 0"; + $db->query($sql); + // If a directory was added, the fulltree array is not correctly completed and sorted, so we clean // it to be sure that fulltree array is not used without reloading it. if ($adirwascreated) $sqltree=null; @@ -467,87 +470,51 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti print ' '; print ' '; print ''; - //print $form->textwithpicto('',$htmltooltip,1,0); print ''; - //print ''.$langs->trans("ECMNbOfDocsSmall").' '.img_picto($langs->trans("Refresh"),'refresh').''; print ''; $sectionauto=dol_sort_array($sectionauto,'label','ASC',true,false); + print ''; + print ''; + print '
'; } @@ -637,8 +604,12 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti } else { + print ''; + print '
'; + print '
'; + print "\n"; } + + print ''; + print ''; + print ''; }