1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-31 10:01:56 +02:00

Update file_class to make it more flexible; fix some calls and a couple of other things along the way

This commit is contained in:
e107steved
2008-11-20 20:35:24 +00:00
parent 113d4eaac8
commit d9697e4718
13 changed files with 208 additions and 150 deletions

View File

@@ -12,8 +12,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/content/handlers/content_form_class.php,v $
| $Revision: 1.20 $
| $Date: 2008-07-25 21:03:19 $
| $Revision: 1.21 $
| $Date: 2008-11-20 20:35:10 $
| $Author: e107steved $
+---------------------------------------------------------------+
*/
@@ -604,15 +604,16 @@ class contentform{
}
if( $checkicon || $checkattach || $checkimages ){
//prepare file lists
$rejectlist = array('$.','$..','/','CVS','thumbs.db','Thumbs.db','*._$', 'index', 'null*', 'thumb_*');
// $rejectlist = array('$.','$..','/','CVS','thumbs.db','Thumbs.db','*._$', 'index', 'null*', 'thumb_*');
$rejectlist = '~^thumb_|$th_';
$show['upload'] = true;
}else{
$show['upload'] = false;
}
if($checkicon){
$list1 = $fl->get_files($content_pref['content_icon_path_tmp'],"",$rejectlist);
$list1 = $fl->get_files($content_pref['content_icon_path_tmp'],$rejectlist);
if(varsettrue($content_pref['content_admin_loadicons'])){
$list2 = $fl->get_files($content_pref['content_icon_path'],"",$rejectlist);
$list2 = $fl->get_files($content_pref['content_icon_path'],$rejectlist);
}
$iconlist = ($list2) ? array_merge($list1, $list2) : $list1;
$show['icon'] = true;
@@ -621,9 +622,9 @@ class contentform{
$hidden .= $rs -> form_hidden("content_icon", $row['content_icon']);
}
if($checkattach){
$list1 = $fl->get_files($content_pref['content_file_path_tmp'],"",$rejectlist);
$list1 = $fl->get_files($content_pref['content_file_path_tmp'],$rejectlist);
if(varsettrue($content_pref['content_admin_loadattach'])){
$list2 = $fl->get_files($content_pref['content_file_path'],"",$rejectlist);
$list2 = $fl->get_files($content_pref['content_file_path'],$rejectlist);
}
$filelist = ($list2) ? array_merge($list1, $list2) : $list1;
$show['attach'] = true;
@@ -632,7 +633,7 @@ class contentform{
$hidden .= $rs -> form_hidden("content_file", $row['content_file']);
}
if($checkimages){
$imagelist = $fl->get_files($content_pref['content_image_path_tmp'],"",$rejectlist);
$imagelist = $fl->get_files($content_pref['content_image_path_tmp'],$rejectlist);
$show['images'] = true;
}else{
$show['images'] = false;
@@ -2223,8 +2224,8 @@ class contentform{
}
}
//get_files($path, $fmask = '', $omit='standard', $recurse_level = 0, $current_level = 0, $dirs_only = FALSE)
$rejectlist = array('$.','$..','/','CVS','thumbs.db','Thumbs.db','*._$', 'index', 'null*', '.bak');
$templatelist = $fl->get_files($dir,"content_content_",$rejectlist);
// $rejectlist = array('$.','$..','/','CVS','thumbs.db','Thumbs.db','*._$', 'index', 'null*', '.bak');
$templatelist = $fl->get_files($dir,"content_content_");
$TOPIC_TOPIC = CONTENT_ADMIN_OPT_LAN_21;
$TOPIC_FIELD = "

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/featurebox/admin_config.php,v $
| $Revision: 1.3 $
| $Date: 2007-08-28 19:13:49 $
| $Revision: 1.4 $
| $Date: 2008-11-20 20:35:24 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -26,8 +26,9 @@ require_once(e_ADMIN."auth.php");
require_once(e_HANDLER."userclass_class.php");
require_once(e_HANDLER."file_class.php");
$fl = new e_file;
$rejecthumb = array('$.','$..','/','CVS','thumbs.db','*._$',"thumb_", 'index', 'null*');
$templatelist = $fl->get_files(e_PLUGIN."featurebox/templates/","",$rejecthumb);
//$rejecthumb = array('$.','$..','/','CVS','thumbs.db','*._$',"thumb_", 'index', 'null*');
$rejecthumb = '~^thumb_|^th_';
$templatelist = $fl->get_files(e_PLUGIN."featurebox/templates/",$rejecthumb);
if (e_QUERY) {
list($action, $id) = explode(".", e_QUERY);

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/links_page/link_class.php,v $
| $Revision: 1.8 $
| $Date: 2008-07-28 20:16:11 $
| $Revision: 1.9 $
| $Date: 2008-11-20 20:35:24 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -643,9 +643,9 @@ class linkclass {
</td>
</tr>";
$rejectlist = array('$.','$..','/','CVS','thumbs.db','Thumbs.db','*._$', 'index', 'null*', 'blank*');
// $rejectlist = array('$.','$..','/','CVS','thumbs.db','Thumbs.db','*._$', 'index', 'null*', 'blank*');
$iconpath = e_PLUGIN."links_page/link_images/";
$iconlist = $fl->get_files($iconpath,"",$rejectlist);
$iconlist = $fl->get_files($iconpath);
$iconpath = e_PLUGIN_ABS."links_page/link_images/"; // Absolute paths now we've got the files
$text .= "
@@ -841,8 +841,8 @@ class linkclass {
$row['link_category_description'] = "";
$row['link_category_icon'] = "";
}
$rejectlist = array('$.','$..','/','CVS','thumbs.db','Thumbs.db','*._$', 'index', 'null*');
$iconlist = $fl->get_files(e_PLUGIN."links_page/cat_images/","",$rejectlist);
// $rejectlist = array('$.','$..','/','CVS','thumbs.db','Thumbs.db','*._$', 'index', 'null*');
$iconlist = $fl->get_files(e_PLUGIN."links_page/cat_images/");
$text = "<div style='text-align:center'>
".$rs->form_open("post", e_SELF.(e_QUERY ? "?".e_QUERY : ""), "linkform", "", "enctype='multipart/form-data'", "")."

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/admin_list_config.php,v $
| $Revision: 1.3 $
| $Date: 2008-03-09 20:33:18 $
| $Revision: 1.4 $
| $Date: 2008-11-20 20:35:24 $
| $Author: e107steved $
+---------------------------------------------------------------+
*/
@@ -52,8 +52,9 @@ if(isset($_POST['update_menu'])){
$list_pref = $rc -> getListPrefs();
$rejectlist = array('$.','$..','/','CVS','thumbs.db','Thumbs.db','*._$', 'index', 'null*');
$iconlist = $fl->get_files($listplugindir."images/", "", $rejectlist);
//$rejectlist = array('$.','$..','/','CVS','thumbs.db','Thumbs.db','*._$', 'index', 'null*');
//$iconlist = $fl->get_files($listplugindir."images/", "", $rejectlist);
$iconlist = $fl->get_files($listplugindir."images/");
//render message if set
if(isset($message)){