51 $validator->add(
new RequiredValidator(
"folder_value",
"Folder"));
71 if (!file_exists(
$path))
76 $handle = opendir(
$path);
77 while((
$f = readdir($handle)) !== FALSE)
79 if (
$f !=
"." &&
$f !=
"..")
90 Fakoli::end(
"The folder cannot be deleted because it is not empty");
100 $tree =
new DirectoryTreeControl(
"folder");
109 <script type=
"text/javascript">
112 document.id(
'folder_form').iFrameFormRequest({
'onRequest':
function() {
return validate_folder_form(document.id(
'folder_form')); },
'onComplete': deleteFolderResult,
'onFailure':
function() { alert(
"Failed to communicate with server"); }});
115 <form name=
"folder_form" id=
"folder_form" method=
"POST" action=
"/action/document/delete_folder?document_library_id=<?echo $document_library_id?>">
116 <p>Choose the folder you wish
to delete using the tree below. Please note that
only empty folders can be deleted
117 (i.e. those which
do not contain files or sub-folders).</p>
120 <td
style=
"vertical-align: top"><label>Folder</label></td>
122 <?
$tree->writeHTML(); ?>
126 <td
colspan=
"2"><input type=
"submit" class=
"button" value=
"Delete Folder"/></td>
The DocumentManager class provides the core API and management functions for uploading documents and ...
static usingFeature()
Uses the specified framework feature(s).
static using()
Import the datamodels, views and manifest for the specified component(s).
static end($message="")
Use this method to terminate execution of a script instead of using the php keywords exit() or die().
$method
Pull out a simple reference to the request method.
if(! $document_library_id) global $library