Debug filemanager
This commit is contained in:
parent
ef6fcbbc67
commit
a066bbcd89
@ -220,7 +220,8 @@ if ($type == 'directory')
|
|||||||
if ($module == 'medias')
|
if ($module == 'medias')
|
||||||
{
|
{
|
||||||
$relativepath=GETPOST('file','alpha');
|
$relativepath=GETPOST('file','alpha');
|
||||||
$upload_dir = $dolibarr_main_data_root.'/medias/'.$relativepath;
|
if ($relativepath && $relativepath!= '/') $relativepath.='/';
|
||||||
|
$upload_dir = $dolibarr_main_data_root.'/'.$module.'/'.$relativepath;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -245,7 +246,11 @@ if ($type == 'directory')
|
|||||||
|
|
||||||
$textifempty = $langs->trans('NoFileFound');
|
$textifempty = $langs->trans('NoFileFound');
|
||||||
}
|
}
|
||||||
else if ($section === '0') $textifempty='<br><div align="center"><font class="warning">'.$langs->trans("DirNotSynchronizedSyncFirst").'</font></div><br>';
|
else if ($section === '0')
|
||||||
|
{
|
||||||
|
if ($module == 'ecm') $textifempty='<br><div align="center"><font class="warning">'.$langs->trans("DirNotSynchronizedSyncFirst").'</font></div><br>';
|
||||||
|
else $textifempty = $langs->trans('NoFileFound');
|
||||||
|
}
|
||||||
else $textifempty=($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("ECMSelectASection"));
|
else $textifempty=($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("ECMSelectASection"));
|
||||||
|
|
||||||
if ($module == 'medias')
|
if ($module == 'medias')
|
||||||
|
|||||||
@ -164,7 +164,7 @@ if (! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE
|
|||||||
{
|
{
|
||||||
if (empty($val['fullrelativename'])) // If we did not find entry into database, but found a directory (dol_is_dir was ok at previous test)
|
if (empty($val['fullrelativename'])) // If we did not find entry into database, but found a directory (dol_is_dir was ok at previous test)
|
||||||
{
|
{
|
||||||
$val['fullrelativename']=$file;
|
$val['fullrelativename']=(($selecteddir && $selecteddir != '/')?$selecteddir.'/':'').$file;
|
||||||
$val['id']=0;
|
$val['id']=0;
|
||||||
$val['label']=$file;
|
$val['label']=$file;
|
||||||
$val['description']='';
|
$val['description']='';
|
||||||
@ -205,6 +205,8 @@ if (! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE
|
|||||||
//print '<td align="right" width="14"> </td>';
|
//print '<td align="right" width="14"> </td>';
|
||||||
|
|
||||||
// Info
|
// Info
|
||||||
|
if ($modulepart == 'ecm')
|
||||||
|
{
|
||||||
print '<td align="right" width="18">';
|
print '<td align="right" width="18">';
|
||||||
$userstatic->id=isset($val['fk_user_c'])?$val['fk_user_c']:0;
|
$userstatic->id=isset($val['fk_user_c'])?$val['fk_user_c']:0;
|
||||||
$userstatic->lastname=isset($val['login_c'])?$val['login_c']:0;
|
$userstatic->lastname=isset($val['login_c'])?$val['login_c']:0;
|
||||||
@ -218,6 +220,7 @@ if (! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE
|
|||||||
else $htmltooltip.='<b>'.$langs->trans("ECMNbOfSubDir").'</b>: '.($nbofsubdir >= 0 ? $nbofsubdir : $langs->trans("NeedRefresh")).'<br>';
|
else $htmltooltip.='<b>'.$langs->trans("ECMNbOfSubDir").'</b>: '.($nbofsubdir >= 0 ? $nbofsubdir : $langs->trans("NeedRefresh")).'<br>';
|
||||||
print $form->textwithpicto('',$htmltooltip,1,"info");
|
print $form->textwithpicto('',$htmltooltip,1,"info");
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
}
|
||||||
|
|
||||||
print "</tr></table>\n";
|
print "</tr></table>\n";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -334,6 +334,7 @@ dol_fiche_head($head, 'index', $langs->trans("ECMArea").' - '.$langs->trans("ECM
|
|||||||
|
|
||||||
|
|
||||||
// Add filemanager component
|
// Add filemanager component
|
||||||
|
$module='ecm';
|
||||||
include DOL_DOCUMENT_ROOT.'/ecm/tpl/filemanager.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/ecm/tpl/filemanager.tpl.php';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -55,11 +55,13 @@ else
|
|||||||
print '<img class="toolbarbutton" border="0" src="'.DOL_URL_ROOT.'/theme/common/folder-new.png">';
|
print '<img class="toolbarbutton" border="0" src="'.DOL_URL_ROOT.'/theme/common/folder-new.png">';
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
|
if ($module == 'ecm')
|
||||||
|
{
|
||||||
$url=((! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS))?'#':($_SERVER["PHP_SELF"].'?action=refreshmanual'.($module?'&module='.$module:'').($section?'&section='.$section:'')));
|
$url=((! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS))?'#':($_SERVER["PHP_SELF"].'?action=refreshmanual'.($module?'&module='.$module:'').($section?'&section='.$section:'')));
|
||||||
print '<a href="'.$url.'" class="inline-block valignmiddle toolbarbutton" title="'.dol_escape_htmltag($langs->trans('ReSyncListOfDir')).'">';
|
print '<a href="'.$url.'" class="inline-block valignmiddle toolbarbutton" title="'.dol_escape_htmltag($langs->trans('ReSyncListOfDir')).'">';
|
||||||
print '<img id="refreshbutton" class="toolbarbutton" border="0" src="'.DOL_URL_ROOT.'/theme/common/view-refresh.png">';
|
print '<img id="refreshbutton" class="toolbarbutton" border="0" src="'.DOL_URL_ROOT.'/theme/common/view-refresh.png">';
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
// Start "Add new file" area
|
// Start "Add new file" area
|
||||||
$nameforformuserfile = 'formuserfileecm';
|
$nameforformuserfile = 'formuserfileecm';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user