=====Listfiles Action===== >>==See also:== Documentation: ListfilesActionInfo.>>This is the development page for the Listfiles action.::c:: This is another (complete) transformation of the files action from Mod015fFilesAction (check also the FilesManagementHandler). It allows to get the links to the attached files but not to upload nor to delete any. ===Dependancy=== This relies of the [[WikkaBugsResolved | ExistsPage]] function developed by JavaWoman and part of release 1.1.6.0. You can find this version at WikkaBugsResolved under the heading "check of user-names against page-names".. ===The code=== %%(php) GetPageTag(); $uFile = $vars['file']; if ($uFile) $file = $uFile; // it is not useful to provide a title if there is no file parameter if ($file) { $uTitle = $vars['title']; if ($uTitle) $title = $uTitle; } // ***** End PARAMETERS Interface ***** // ***** MAIN SECTION ***** // check if the page exists (the function exists from wikka 1.1.6.0) if ($this->ExistsPage($page)) { // check if the user is allowed to read if ($this->HasAccess('read', $page)) { // upload path $upload_path = $this->config['upload_path'].'/'.$page; // check if the upload path does not exist if(is_dir($upload_path) ){ $handle = opendir($upload_path); while( (gettype( $name = readdir($handle)) != "boolean")){ $name_array[] = $name; } foreach($name_array as $temp) $folder_content .= $temp; closedir($handle); if($folder_content == "...") { print "