diff --git a/filemanager/inc/class.bofilemanager.inc.php b/filemanager/inc/class.bofilemanager.inc.php index 35c91a5d25..dfe0345baf 100755 --- a/filemanager/inc/class.bofilemanager.inc.php +++ b/filemanager/inc/class.bofilemanager.inc.php @@ -8,10 +8,11 @@ * Free Software Foundation; either version 2 of the License, or (at your * * option) any later version. * \**************************************************************************/ + require_once(EGW_INCLUDE_ROOT.'/filemanager/inc/class.sofilemanager.inc.php'); /* $Id$ */ - class bofilemanager + class bofilemanager extends sofilemanager { // used @@ -31,9 +32,32 @@ var $matches;//FIXME matches not defined var $debug = False; + // Timestamps + //'vfs_created', 'vfs_modified', + var $timestamps=array( + ); + /** + * Offset in secconds between user and server-time, it need to be add to a server-time to get the user-time + * or substracted from a user-time to get the server-time + * + * @var int + */ + var $tz_offset_s; + /** + * Current time as timestamp in user-time + * + * @var int + */ + var $now; function bofilemanager() { + $this->sofilemanager(); + // discarded because of extension + //$this->so =& CreateObject('filemanager.sofilemanager'); + //$this->so->db_init(); + $this->db_init(); + $this->vfs =& CreateObject('phpgwapi.vfs'); error_reporting(4); @@ -93,6 +117,57 @@ 'comment' => lang('Comment'), 'version' => lang('Version') ); + if (!is_object($GLOBALS['egw']->datetime)) + { + $GLOBALS['egw']->datetime =& CreateObject('phpgwapi.datetime'); + } + $this->tz_offset_s = $GLOBALS['egw']->datetime->tz_offset; + $this->now = time() + $this->tz_offset_s; // time() is server-time and we need a user-time + + } + + /** + * changes the data from the db-format to your work-format + * + * reimplemented to adjust the timezone of the timestamps (adding $this->tz_offset_s to get user-time) + * Please note, we do NOT call the method of the parent so_sql !!! + * + * @param array $data if given works on that array and returns result, else works on internal data-array + * @return array with changed data + */ + function db2data($data=null) + { + if (!is_array($data)) + { + $data = &$this->data; + } + foreach($this->timestamps as $name) + { + if (isset($data[$name]) && $data[$name]) $data[$name] += $this->tz_offset_s; + } + return $data; + } + + /** + * changes the data from your work-format to the db-format + * + * reimplemented to adjust the timezone of the timestamps (subtraction $this->tz_offset_s to get server-time) + * Please note, we do NOT call the method of the parent so_sql !!! + * + * @param array $data if given works on that array and returns result, else works on internal data-array + * @return array with changed data + */ + function data2db($data=null) + { + if ($intern = !is_array($data)) + { + $data = &$this->data; + } + foreach($this->timestamps as $name) + { + if (isset($data[$name]) && $data[$name]) $data[$name] -= $this->tz_offset_s; + } + return $data; } ### diff --git a/filemanager/inc/class.sofilemanager.inc.php b/filemanager/inc/class.sofilemanager.inc.php new file mode 100755 index 0000000000..8039caabe1 --- /dev/null +++ b/filemanager/inc/class.sofilemanager.inc.php @@ -0,0 +1,59 @@ +db = clone($GLOBALS['egw']->db); + $this->so_sql('phpgwapi',$this->maintable); + } + + /* Any initializations that need to be done */ + function db_init() + { + $this->db->Auto_Free = 0; + } + + /* General SQL query */ + function db_query($query) + { + + return $this->db->query($query); + } + + /* Fetch next array for $query_id */ + function db_fetch_array($query_id) + { + // $egw->db->Query_ID = $query_id; + $this->db->next_record(); + return $this->db->Record; + } + + /* + General wrapper for all other db calls + Calls in here are simply returned, so not all will work + */ + function db_call($function, $query_id) + { + // $egw->db->Query_ID = $query_id; + return $this->db->$function(); + } + } +?> diff --git a/filemanager/inc/class.uifilemanager.inc.php b/filemanager/inc/class.uifilemanager.inc.php index cef0c7abb1..11ca18bfed 100755 --- a/filemanager/inc/class.uifilemanager.inc.php +++ b/filemanager/inc/class.uifilemanager.inc.php @@ -10,8 +10,9 @@ \**************************************************************************/ /* $Id$ */ + require_once(EGW_INCLUDE_ROOT.'/filemanager/inc/class.bofilemanager.inc.php'); - class uifilemanager + class uifilemanager extends bofilemanager { var $public_functions = array( 'index' => True, @@ -19,13 +20,22 @@ 'view' => True, 'history' => True, 'edit' => True, - 'download'=>True + 'download'=>True, + 'search_tpl'=>True, ); //keep var $bo; - var $t; //template object - var $dispath; + var $t; + //template object + /** + * instantiation of the etemplate as classenvariable + * + * @var etemplate + */ + var $tmpl; + var $search_options; + var $disppath; var $cwd; var $lesspath; var $readable_groups; @@ -78,20 +88,35 @@ var $messages = array(); var $show_upload_boxes; + //var $debug = false; var $debug = false; var $now; function uifilemanager() { + // discarded becouse of class extension + //$this->bo =& CreateObject('filemanager.bofilemanager'); + $this->bofilemanager(); + + //KL begin 200703 searchtemplate + // etemplate stuff + $this->tmpl =& CreateObject('etemplate.etemplate'); + $this->html =& $GLOBALS['egw']->html; + // this may be needed using etemplates + if(!@is_object($GLOBALS['egw']->js)) + { + $GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript'); + } + //KL end 200703 searchtemplate + // error_reporting(8); $GLOBALS['egw']->browser =& CreateObject('phpgwapi.browser'); $this->dateformat=$GLOBALS['egw_info']['user']['preferences']['common']['dateformat']; + //$this->now = date($this->dateformat); $this->now = date('Y-m-d'); - - $this->bo =& CreateObject('filemanager.bofilemanager'); - + $this->t = $GLOBALS['egw']->template; // here local vars are created from the HTTP vars @@ -159,12 +184,12 @@ } // get appl. and user prefs - $pref =& CreateObject('phpgwapi.preferences', $this->bo->userinfo['username']); + $pref =& CreateObject('phpgwapi.preferences', $this->userinfo['username']); $pref->read_repository(); // $GLOBALS['egw']->hooks->single('add_def_pref', $GLOBALS['appname']); $pref->save_repository(True); $pref_array = $pref->read_repository(); - $this->prefs = $pref_array[$this->bo->appname]; //FIXME check appname var in _debug_array + $this->prefs = $pref_array[$this->appname]; //FIXME check appname var in _debug_array //always show name @@ -181,26 +206,26 @@ */ // check if basedir exist - $test=$this->bo->vfs->get_real_info(array('string' => $this->bo->basedir, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); + $test=$this->vfs->get_real_info(array('string' => $this->basedir, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); if($test['mime_type'] != 'Directory') { die('Base directory does not exist, Ask adminstrator to check the global configuration.'); } - $test=$this->bo->vfs->get_real_info(array('string' => $this->bo->basedir.$this->bo->fakebase, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); + $test=$this->vfs->get_real_info(array('string' => $this->basedir.$this->fakebase, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); if($test['mime_type'] != 'Directory') { - $this->bo->vfs->override_acl = 1; + $this->vfs->override_acl = 1; - $this->bo->vfs->mkdir(array( - 'string' => $this->bo->fakebase, + $this->vfs->mkdir(array( + 'string' => $this->fakebase, 'relatives' => array(RELATIVE_NONE) )); - $this->bo->vfs->override_acl = 0; + $this->vfs->override_acl = 0; //test one more time - $test=$this->bo->vfs->get_real_info(array('string' => $this->bo->basedir.$this->bo->fakebase, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); + $test=$this->vfs->get_real_info(array('string' => $this->basedir.$this->fakebase, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); if($test['mime_type']!='Directory') { @@ -214,21 +239,21 @@ } } -// die($this->bo->homedir); - $test=$this->bo->vfs->get_real_info(array('string' => $this->bo->basedir.$this->bo->homedir, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); +// die($this->homedir); + $test=$this->vfs->get_real_info(array('string' => $this->basedir.$this->homedir, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); if($test['mime_type'] != 'Directory') { - $this->bo->vfs->override_acl = 1; + $this->vfs->override_acl = 1; - $this->bo->vfs->mkdir(array( - 'string' => $this->bo->homedir, + $this->vfs->mkdir(array( + 'string' => $this->homedir, 'relatives' => array(RELATIVE_NONE) )); - $this->bo->vfs->override_acl = 0; + $this->vfs->override_acl = 0; //test one more time - $test=$this->bo->vfs->get_real_info(array('string' => $this->bo->basedir.$this->bo->homedir, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); + $test=$this->vfs->get_real_info(array('string' => $this->basedir.$this->homedir, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); if($test['mime_type'] != 'Directory') { @@ -242,10 +267,28 @@ // FIXME we just created a fresh home dir so we know there nothing in it so we have to remove all existing content } } - } + $GLOBALS['uifilemanager'] =& $this; // make ourself available for ExecMethod of get_rows function + } + function index() { + //echo "
call index
"; + if ($_GET['action']=='search') + { + $this->search_tpl(); + } + else + { + $this->index_2(); + } + } + + function index_2() + { + //echo "call index_2
"; + //_debug_array($this->tmpl); + $sessiondata = $this->read_sessiondata(); if($noheader || $nofooter || ($this->download_x && (count($this->fileman) > 0))) { $noheader = True; @@ -264,7 +307,6 @@ 'noappheader' => $noappheader, 'enable_browser_class' => True ); - $GLOBALS['egw']->common->egw_header(); } @@ -289,20 +331,20 @@ if(!$this->path) { - $this->path = $this->bo->vfs->pwd(); + $this->path = $this->vfs->pwd(); - if(!$this->path || $this->bo->vfs->pwd(array('full' => False)) == '') + if(!$this->path || $this->vfs->pwd(array('full' => False)) == '') { - $this->path = $this->bo->homedir; + $this->path = $this->homedir; } } - $this->bo->vfs->cd(array('string' => False, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); - $this->bo->vfs->cd(array('string' => $this->path, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); + $this->vfs->cd(array('string' => False, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); + $this->vfs->cd(array('string' => $this->path, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); - $pwd = $this->bo->vfs->pwd(); + $pwd = $this->vfs->pwd(); - if(!$this->cwd = substr($this->path, strlen($this->bo->homedir) + 1)) + if(!$this->cwd = substr($this->path, strlen($this->homedir) + 1)) { $this->cwd = '/'; } @@ -312,7 +354,7 @@ } $this->disppath = $this->path; - + $sessiondata['workingdir']="$this->disppath"; /* This just prevents // in some cases */ if($this->path == '/') { @@ -327,22 +369,21 @@ { $this->lesspath = '/'; } - + //echo "#$this->path#
"; # Get their readable groups to be used throughout the script $groups = array(); $groups = $GLOBALS['egw']->accounts->get_list('groups'); - - $this->readable_groups = array(); + $this->readable_groups = Array(); while(list($num, $account) = each($groups)) { - if($this->bo->vfs->acl_check(array('owner_id' => $account['account_id'],'operation' => EGW_ACL_READ))) + if($this->vfs->acl_check(array('owner_id' => $account['account_id'],'operation' => EGW_ACL_READ))) { $this->readable_groups[$account['account_lid']] = Array('account_id' => $account['account_id'], 'account_name' => $account['account_lid']); } } - + $sessiondata['readable_groups']=$this->readable_groups; $this->groups_applications = array(); while(list($num, $group_array) = each($this->readable_groups)) @@ -352,21 +393,24 @@ $applications =& CreateObject('phpgwapi.applications', $group_id); $this->groups_applications[$group_array['account_name']] = $applications->read_account_specific(); } + $sessiondata['groups_applications']=$this->groups_applications; # We determine if they're in their home directory or a group's directory, # and set the VFS working_id appropriately - if((preg_match('+^'.$this->bo->fakebase.'\/(.*)(\/|$)+U', $this->path, $matches)) && $matches[1] != $this->bo->userinfo['account_lid']) //FIXME matches not defined + if((preg_match('+^'.$this->fakebase.'\/(.*)(\/|$)+U', $this->path, $matches)) && $matches[1] != $this->userinfo['account_lid']) //FIXME matches not defined { - $this->bo->vfs->working_id = $GLOBALS['egw']->accounts->name2id($matches[1]);//FIXME matches not defined + $this->vfs->working_id = $GLOBALS['egw']->accounts->name2id($matches[1]);//FIXME matches not defined } else { - $this->bo->vfs->working_id = $this->bo->userinfo['username']; + $this->vfs->working_id = $this->userinfo['username']; } + $this->save_sessiondata($sessiondata); - # FIXME # comment waht happens here - if($this->path != $this->bo->homedir && $this->path != $this->bo->fakebase && $this->path != '/' && !$this->bo->vfs->acl_check(array('string' => $this->path, 'relatives' => array(RELATIVE_NONE),'operation' => EGW_ACL_READ))) + # FIXME # comment what happens here + if($this->path != $this->homedir && $this->path != $this->fakebase && $this->path != '/' && !$this->vfs->acl_check(array('string' => $this->path, 'relatives' => array(RELATIVE_NONE),'operation' => EGW_ACL_READ))) { + echo "died for some reasons
"; $this->messages[]= $GLOBALS['egw']->common->error_list(array(lang('You do not have access to %1', $this->path))); $this->html_link('/index.php','menuaction=filemanager.uifilemanager.index','path='.$this->homedir, lang('Go to your home directory')); @@ -374,47 +418,47 @@ $GLOBALS['egw']->common->egw_exit(); } - $this->bo->userinfo['working_id'] = $this->bo->vfs->working_id; - $this->bo->userinfo['working_lid'] = $GLOBALS['egw']->accounts->id2name($this->bo->userinfo['working_id']); + $this->userinfo['working_id'] = $this->vfs->working_id; + $this->userinfo['working_lid'] = $GLOBALS['egw']->accounts->id2name($this->userinfo['working_id']); # If their home directory doesn't exist, we try to create it # Same for group directories - // Moved to constructor - /* - if(($this->path == $this->homedir) && !$this->bo->vfs->file_exists($pim_tmp_arr)) + // Moved to constructor + /* + if(($this->path == $this->homedir) && !$this->vfs->file_exists($pim_tmp_arr)) { - $this->bo->vfs->override_acl = 1; + $this->vfs->override_acl = 1; - if(!$this->bo->vfs->mkdir(array( - 'string' => $this->bo->homedir, + if(!$this->vfs->mkdir(array( + 'string' => $this->homedir, 'relatives' => array(RELATIVE_NONE) ))) { - $p = $this->bo->vfs->path_parts($pim_tmp_arr); + $p = $this->vfs->path_parts($pim_tmp_arr); $this->messages[]= $GLOBALS['egw']->common->error_list(array( lang('Could not create directory %1', - $this->bo->homedir . ' (' . $p->real_full_path . ')' + $this->homedir . ' (' . $p->real_full_path . ')' ))); } - $this->bo->vfs->override_acl = 0; + $this->vfs->override_acl = 0; } */ # Verify path is real - if($this->path != $this->bo->homedir && $this->path != '/' && $this->path != $this->bo->fakebase) + if($this->path != $this->homedir && $this->path != '/' && $this->path != $this->fakebase) { - if(!$this->bo->vfs->file_exists(array( + if(!$this->vfs->file_exists(array( 'string' => $this->path, 'relatives' => array(RELATIVE_NONE) ))) { + echo "died for some other reasons
"; $this->messages[] = $GLOBALS['egw']->common->error_list(array(lang('Directory %1 does not exist', $this->path))); - $this->html_link('/index.php','menuaction=filemanager.uifilemanager.index','path='.$this->bo->homedir, lang('Go to your home directory')); - + $this->html_link('/index.php','menuaction=filemanager.uifilemanager.index','path='.$this->homedir, lang('Go to your home directory')); $GLOBALS['egw']->common->egw_footer(); $GLOBALS['egw']->common->egw_exit(); } @@ -424,14 +468,14 @@ srand((double) microtime() * 1000000); if($_GET['update'] || rand(0, 19) == 4) { - $this->bo->vfs->update_real(array( + $this->vfs->update_real(array( 'string' => $this->path, 'relatives' => array(RELATIVE_NONE) )); } # Check available permissions for $this->path, so we can disable unusable operations in user interface - if($this->bo->vfs->acl_check(array( + if($this->vfs->acl_check(array( 'string' => $this->path, 'relatives' => array(RELATIVE_NONE), 'operation' => EGW_ACL_ADD @@ -551,11 +595,11 @@ ### $this->t->set_var('actions',lang('select')); - reset($this->bo->file_attributes); + reset($this->file_attributes); if($this->numoffiles>0) { - while(list($internal, $displayed) = each($this->bo->file_attributes)) + while(list($internal, $displayed) = each($this->file_attributes)) { if($this->prefs[$internal]) { @@ -639,8 +683,8 @@ } # Checkboxes - //if(!$this->rename_x && !$this->edit_comments_x && $this->path != $this->bo->fakebase && $this->path != '/') - if(!$this->rename_x && !$this->edit_comments_x && $this->path != '/') + //if(!$this->rename_x && !$this->edit_comments_x && $this->path != $this->fakebase && $this->path != '/') + if(!$this->rename_x && !$this->edit_comments_x && $this->path != '/') { $cbox=''; $this->t->set_var('actions',$cbox); @@ -675,7 +719,7 @@ else { - if($this->prefs['viewonserver'] && isset($this->bo->filesdir) && !$files['link_directory']) + if($this->prefs['viewonserver'] && isset($this->filesdir) && !$files['link_directory']) { #FIXME $clickview = $this->filesdir.$pwd.'/'.$files['name']; @@ -716,10 +760,10 @@ // 'relatives' => array(RELATIVE_NONE) //; //if($files['mime_type'] != 'Directory') $tmp_arr['checksubdirs'] = false; - //$size = $this->bo->vfs->get_size($tmp_arr); + //$size = $this->vfs->get_size($tmp_arr); $size = $files['size']; - $col_data=$this->bo->borkb($size); + $col_data=$this->borkb($size); $this->t->set_var('col_data',$col_data); $this->t->parse('columns','column',True); @@ -851,19 +895,19 @@ $vars['files_in_this_dir'] = $this->numoffiles; $vars['lang_used_space'] = lang('Used space'); - $vars['used_space'] = $this->bo->borkb($usedspace, NULL, 1); + $vars['used_space'] = $this->borkb($usedspace, NULL, 1); - if($this->path == $this->bo->homedir || $this->path == $this->bo->fakebase) + if($this->path == $this->homedir || $this->path == $this->fakebase) { $vars['lang_unused_space'] = lang('Unused space'); - $vars['unused_space'] = $this->bo->borkb($this->bo->userinfo['hdspace'] - $usedspace, NULL, 1); + $vars['unused_space'] = $this->borkb($this->userinfo['hdspace'] - $usedspace, NULL, 1); $tmp_arr=array( 'string' => $this->path, 'relatives' => array(RELATIVE_NONE) ); - $ls_array = $this->bo->vfs->ls($tmp_arr); + $ls_array = $this->vfs->ls($tmp_arr); $vars['lang_total_files'] = lang('Total Files'); $vars['total_files'] = count($ls_array); @@ -884,59 +928,59 @@ # $fakebase is a special directory. In that directory, we list the user's # home directory and the directories for the groups they're in $this->numoffiles = 0; - if($this->path == $this->bo->fakebase) + if($this->path == $this->fakebase) { // FIXME this test can be removed - if(!$this->bo->vfs->file_exists(array('string' => $this->bo->homedir, 'relatives' => array(RELATIVE_NONE)))) + if(!$this->vfs->file_exists(array('string' => $this->homedir, 'relatives' => array(RELATIVE_NONE)))) { - $this->bo->vfs->mkdir(array('string' => $this->bo->homedir, 'relatives' => array(RELATIVE_NONE))); + $this->vfs->mkdir(array('string' => $this->homedir, 'relatives' => array(RELATIVE_NONE))); } reset($this->readable_groups); // create the directorys of the readableGroups if they do not exist while(list($num, $group_array) = each($this->readable_groups)) { # If the group doesn't have access to this app, we don't show it, and do not appkly any action here - if(!$this->groups_applications[$group_array['account_name']][$this->bo->appname]['enabled']) + if(!$this->groups_applications[$group_array['account_name']][$this->appname]['enabled']) { continue; } - if(!$this->bo->vfs->file_exists(array('string' => $this->bo->fakebase.'/'.$group_array['account_name'],'relatives' => array(RELATIVE_NONE)))) + if(!$this->vfs->file_exists(array('string' => $this->fakebase.'/'.$group_array['account_name'],'relatives' => array(RELATIVE_NONE)))) { - $this->bo->vfs->override_acl = 1; - $this->bo->vfs->mkdir(array( - 'string' => $this->bo->fakebase.'/'.$group_array['account_name'], + $this->vfs->override_acl = 1; + $this->vfs->mkdir(array( + 'string' => $this->fakebase.'/'.$group_array['account_name'], 'relatives' => array(RELATIVE_NONE) )); // FIXME we just created a fresh group dir so we know there nothing in it so we have to remove all existing content - $this->bo->vfs->override_acl = 0; - $this->bo->vfs->set_attributes(array('string' => $this->bo->fakebase.'/'.$group_array['account_name'],'relatives' => array(RELATIVE_NONE),'attributes' => array('owner_id' => $group_array['account_id'],'createdby_id' => $group_array['account_id']))); + $this->vfs->override_acl = 0; + $this->vfs->set_attributes(array('string' => $this->fakebase.'/'.$group_array['account_name'],'relatives' => array(RELATIVE_NONE),'attributes' => array('owner_id' => $group_array['account_id'],'createdby_id' => $group_array['account_id']))); } } } // read the list of the existing directorys/files - $ls_array = $this->bo->vfs->ls(array( + $ls_array = $this->vfs->ls(array( 'string' => $this->path, 'relatives' => array(RELATIVE_NONE), 'checksubdirs' => false, 'nofiles' => false, 'orderby' => $this->sortby )); - $heimatverz=explode('/',$this->bo->homedir); + $heimatverz=explode('/',$this->homedir); // process the list: check if we are allowed to read it, get the real size, and count the files/dirs while(list($num, $file_array) = each($ls_array)) { - if($this->path == $this->bo->fakebase) + if($this->path == $this->fakebase) { - if ($file_array['name'] && (array_key_exists($file_array['name'],$this->readable_groups) || $this->bo->fakebase.'/'.$file_array['name'] == $this->bo->homedir || $file_array['name'] == $heimatverz[2])) + if ($file_array['name'] && (array_key_exists($file_array['name'],$this->readable_groups) || $this->fakebase.'/'.$file_array['name'] == $this->homedir || $file_array['name'] == $heimatverz[2])) { - if(!$this->groups_applications[$file_array['name']][$this->bo->appname]['enabled'] && $this->bo->fakebase.'/'.$file_array['name'] != $this->bo->homedir && $file_array['name'] != $heimatverz[2]) + if(!$this->groups_applications[$file_array['name']][$this->appname]['enabled'] && $this->fakebase.'/'.$file_array['name'] != $this->homedir && $file_array['name'] != $heimatverz[2]) { continue; } } - if ($file_array['name'] && !array_key_exists($file_array['name'],$this->readable_groups) && !($this->bo->fakebase.'/'.$file_array['name'] == $this->bo->homedir || $file_array['name'] == $heimatverz[2])) + if ($file_array['name'] && !array_key_exists($file_array['name'],$this->readable_groups) && !($this->fakebase.'/'.$file_array['name'] == $this->homedir || $file_array['name'] == $heimatverz[2])) { continue; } @@ -950,7 +994,7 @@ 'relatives' => array(RELATIVE_NONE) ); if($file_array['mime_type'] != 'Directory') $tmp_arr['checksubdirs'] = false; - $file_array['size']=$this->bo->vfs->get_size($tmp_arr); + $file_array['size']=$this->vfs->get_size($tmp_arr); // KL got the real size } if($this->prefs['owner']) @@ -1030,6 +1074,7 @@ function toolbar($type) { + //echo "call toolbar
"; switch($type) { case 'location': @@ -1043,16 +1088,16 @@
eGroupware debug:
- real getabsolutepath: " . $this->bo->vfs->getabsolutepath(array('target' => False, 'mask' => False, 'fake' => False)) . "
- fake getabsolutepath: " . $this->bo->vfs->getabsolutepath(array('target' => False)) . "
+ real getabsolutepath: " . $this->vfs->getabsolutepath(array('target' => False, 'mask' => False, 'fake' => False)) . "
+ fake getabsolutepath: " . $this->vfs->getabsolutepath(array('target' => False)) . "
appsession: " . $GLOBALS['egw']->session->appsession('vfs','') . "
- pwd: " . $this->bo->vfs->pwd() . "
";
+ pwd: " . $this->vfs->pwd() . "
";
echo '
search_tpl
"; + //_debug_array($content); + $debug=0; + $content['message']=''; + if ($_GET['action']=='search') + { + $content['searchcreated']=1; + $content['datecreatedfrom']=date("U")-24*60*60; + $content['start_search']=lang('start search'); + } + + if ($content['start_search'] && strlen($content['start_search'])>0) + { + $searchactivated=1; + $read_onlys['searchstring']=true; + } + $content['nm']=$this->read_sessiondata('nm'); + $this->search_options=$content['nm']['search_options']; + $content['nm']['search']=$content['searchstring']; + $debug=$content['debug']; + + // initialisieren des nextmatch widgets, durch auslesen der sessiondaten + // wenn leer, bzw. kein array dann von hand initialisieren + $content['nm']=$this->read_sessiondata('nm'); + $content['message'].= "content may be set
"; + if (!is_array($content['nm'])) + { + $content['message'].= "content is not set
"; + $content['debug']=$debug; + $content['nm'] = array( // I = value set by the app, 0 = value on return / output + 'get_rows' => 'filemanager.uifilemanager.get_rows', // I method/callback to request the data for the rows eg. 'notes.bo.get_rows' + 'filter_label' => '', // I label for filter (optional) + 'filter_help' => '', // I help-msg for filter (optional) + 'no_filter' => True, // I disable the 1. filter + 'no_filter2' => True, // I disable the 2. filter (params are the same as for filter) + 'no_cat' => True, // I disable the cat-selectbox + //'template' => , // I template to use for the rows, if not set via options + //'header_left' => ,// I template to show left of the range-value, left-aligned (optional) + //'header_right' => ,// I template to show right of the range-value, right-aligned (optional) + //'bottom_too' => True, // I show the nextmatch-line (arrows, filters, search, ...) again after the rows + 'never_hide' => True, // I never hide the nextmatch-line if less then maxmatch entrie + 'lettersearch' => True,// I show a lettersearch + 'searchletter' => false,// I0 active letter of the lettersearch or false for [all] + 'start' => 0,// IO position in list + //'num_rows' => // IO number of rows to show, defaults to maxmatches from the general prefs + //'cat_id' => // IO category, if not 'no_cat' => True + //'search' => // IO search pattern + 'order' => 'vfs_created',// IO name of the column to sort after (optional for the sortheaders) + 'sort' => 'DESC',// IO direction of the sort: 'ASC' or 'DESC' + 'col_filter' => array(),// IO array of column-name value pairs (optional for the filterheaders) + //'filter' => // IO filter, if not 'no_filter' => True + //'filter_no_lang' => True// I set no_lang for filter (=dont translate the options) + //'filter_onchange'=> 'this.form.submit();'// I onChange action for filter, default: this.form.submit(); + //'filter2' => // IO filter2, if not 'no_filter2' => True + //'filter2_no_lang'=> True// I set no_lang for filter2 (=dont translate the options) + //'filter2_onchange'=> 'this.form.submit();'// I onChange action for filter, default: this.form.submit(); + //'rows' => // O content set by callback + //'total' => // O the total number of entries + //'sel_options' => // O additional or changed sel_options set by the callback and merged into $tmpl->sel_options + 'no_columnselection'=>false, + ); + + } else { + // lesen wenn gesetzt + $content['message'].= "content is set
"; + //_debug_print($content); + } + //echo "enable_disable_SearchFields
"; + //echo "".$content['datecreatedfrom']."
"; + $switchflag=$searchactivated; + $this->tmpl->set_cell_attribute('checkall','disabled',$switchflag); + if ($content['checkall']) $this->tmpl->set_cell_attribute('alllabel','label',lang($this->tmpl->get_cell_attribute('alllabel','label')).'(x)'); + $this->tmpl->set_cell_attribute('checkonlyfiles','disabled',$switchflag); + if ($content['checkonlyfiles']) $this->tmpl->set_cell_attribute('filelabel','label',lang($this->tmpl->get_cell_attribute('filelabel','label')).'(x)'); + $this->tmpl->set_cell_attribute('checkonlydirs','disabled',$switchflag); + if ($content['checkonlydirs']) $this->tmpl->set_cell_attribute('dirlabel','label',lang($this->tmpl->get_cell_attribute('dirlabel','label')).'(x)'); + $this->tmpl->set_cell_attribute('searchstring','disabled',$switchflag); + //search created date + if ($content['searchcreated'] or $content['datecreatedfrom']!='' or $content['datecreatedto']!='') + { + $content['searchcreated']=1; + $this->tmpl->set_cell_attribute('createdlabel','label',lang($this->tmpl->get_cell_attribute('createdlabel','label')).'(x)'); + $read_onlys['datecreatedto']=$switchflag; + $read_onlys['datecreatedfrom']=$switchflag; + if (($content['datecreatedfrom']=='' && $content['datecreatedto']) or ($content['datecreatedfrom'] && $content['datecreatedto']=='') ) $content['searchcreatedtext']=lang('Choosing only one date (from/to) will result in a search returning all entries older/younger than the entered date'); + if (($content['datecreatedfrom']!='' && $content['datecreatedto']!='' && $content['datecreatedto']<$content['datecreatedfrom']) ) $content['searchcreatedtext']=lang('Choosing dates where to-date is smaller than the from-date, will result in a search returning all entries but thoose between the two entered dates'); + } + else + { + $content['searchcreatedtext']=''; + } + $this->tmpl->set_cell_attribute('searchcreated','disabled',$switchflag); + //search modified date + if ($content['searchmodified'] or $content['datemodifiedfrom']!='' or $content['datemodifiedto']!='') + { + $content['searchmodified']=1; + $this->tmpl->set_cell_attribute('modifiedlabel','label',lang($this->tmpl->get_cell_attribute('modifiedlabel','label')).'(x)'); + $read_onlys['datemodifiedto']=$switchflag; + $read_onlys['datemodifiedfrom']=$switchflag; + if (($content['datemodifiedfrom']=='' && $content['datemodifiedto']) or ($content['datemodifiedfrom'] && $content['datemodifiedto']=='') ) $content['searchmodifiedtext']=lang('Choosing only one date (from/to) will result in a search returning all entries older/younger than the entered date'); + if (($content['datemodifiedfrom']!='' && $content['datemodifiedto']!='' && $content['datemodifiedto']<$content['datemodifiedfrom']) ) $content['searchmodifiedtext']=lang('Choosing dates where to-date is smaller than the from-date, will result in a search returning all entries but thoose between the two entered dates'); + } + else + { + $content['searchmodifiedtext']=''; + } + $this->tmpl->set_cell_attribute('searchmodified','disabled',$switchflag); + $this->tmpl->set_cell_attribute('debuginfos','disabled',!$debug); + + //_debug_array($content); + //echo "#$debug,$searchactivated#
"; + $this->search_options['checkall']=$content['checkall']; + $this->search_options['checkonlyfiles']=$content['checkonlyfiles']; + $this->search_options['checkonlydirs']=$content['checkonlydirs']; + $this->search_options['searchstring']=$content['searchstring']; + $this->search_options['searchcreated']=$content['searchcreated']; + $this->search_options['datecreatedto']=$content['datecreatedto']; + $this->search_options['datecreatedfrom']=$content['datecreatedfrom']; + $this->search_options['searchmodified']=$content['searchmodified']; + $this->search_options['datemodifiedto']=$content['datemodifiedto']; + $this->search_options['datemodifiedfrom']=$content['datemodifiedfrom']; + + + $content['nm']['search_options']=$this->search_options; + + $content['nm']['search']=$content['searchstring']; + $content['nm']['start_search']=$content['start_search']; + + $this->save_sessiondata($content['nm'],'nm'); + // call and execute thge template + $content['message'].= "execute the template
"; + echo $this->tmpl->exec('filemanager.uifilemanager.search_tpl',$content,$sel_options,$read_onlys,array('vfs_file_id'=>$this->data['vfs_file_id'])); + // the debug info will be displayed at the very end of the page + //_debug_array($content); + + } + /** + * the call of this function switches from enabled to disabled for various fields of the search dialog + */ + function enable_disable_SearchFields($switchflag) + { + //does not work at all. The calling of $this->tmpl returns nothing + return; + echo "enable_disable_SearchFields
"; + $this->tmpl->set_cell_attribute('checkall','disabled',$switchflag); + if ($content['checkall']) $this->tmpl->set_cell_attribute('alllabel','label',lang($this->tmpl->get_cell_attribute('alllabel','label')).'(x)'); + $this->tmpl->set_cell_attribute('checkonlyfiles','disabled',$switchflag); + if ($content['checkonlyfiles']) $this->tmpl->set_cell_attribute('filelabel','label',lang($this->tmpl->get_cell_attribute('filelabel','label')).'(x)'); + $this->tmpl->set_cell_attribute('checkonlydirs','disabled',$switchflag); + if ($content['checkonlydirs']) $this->tmpl->set_cell_attribute('dirlabel','label',lang($this->tmpl->get_cell_attribute('dirlabel','label')).'(x)'); + $this->tmpl->set_cell_attribute('searchstring','disabled',$switchflag); + //return $template; + return true; + } + /** + * Saves state of the filemanager list in the session + * + * @param array $values + */ + function save_sessiondata($values,$key='') + { + if (strlen($key)>0) + { + $internalbuffer=$this->read_sessiondata(); + $internalbuffer[$key]=$values; + $this->save_sessiondata($internalbuffer); + } + else + { + //echo "$for: uifilemanager::save_sessiondata(".print_r($values,True).") called_by='$this->called_by', for='$for'
".function_backtrace()."
retrieve rows
"; + $startposition=$query['start']; + //$this->save_sessiondata($query); + $sessiondata = $this->read_sessiondata(); + //_debug_array($sessiondata['dirs_options_array']); + //_debug_array($sessiondata['readable_groups']); + //_debug_array($sessiondata['groups_applications']); + if (!($this->search_options)) + { + $sessiondata['start']=$startposition; + $this->search_options=$sessiondata['nm']['search_options']; + } + //_debug_array($this->search_options); + $additionalwhereclause=", (select vfs_file_id as fileid, concat(concat(vfs_directory,'/'),vfs_name) as fulldir from egw_vfs WHERE vfs_mime_type <> 'journal' and vfs_mime_type <> 'journal-deleted' and vfs_name is not null and vfs_name <>'' and vfs_name<>'home' and vfs_app='filemanager') vfs2 WHERE vfs2.fileid=egw_vfs.vfs_file_id"; + //search options + if ($this->search_options['checkonlyfiles'] && !$this->search_options['checkonlydirs']) + { + $additionalwhereclause.=" and vfs_mime_type<>'directory' "; + } + elseif ($this->search_options['checkonlydirs'] && !$this->search_options['checkonlyfiles']) + { + $additionalwhereclause.=" and vfs_mime_type='directory' "; + } + elseif ($this->search_options['checkonlyfiles'] && $this->search_options['checkonlydirs']) + { + + } + // timespecific search options + if ($this->search_options['searchcreated'] && $this->search_options['datecreatedfrom']) + { + $additionalwhereclause.=" and vfs_created >=FROM_UNIXTIME(".$this->search_options['datecreatedfrom'].")"; + } + if ($this->search_options['searchcreated'] && $this->search_options['datecreatedto']) + { + $additionalwhereclause.=" and vfs_created <=FROM_UNIXTIME(".$this->search_options['datecreatedto'].")"; + } + if ($this->search_options['searchmodified'] && $this->search_options['datemodifiedfrom']) + { + $additionalwhereclause.=" and vfs_modified >=FROM_UNIXTIME(".$this->search_options['datemodifiedfrom'].")"; + } + if ($this->search_options['searchmodified'] && $this->search_options['datemodifiedto']) + { + $additionalwhereclause.=" and vfs_modified <=FROM_UNIXTIME(".$this->search_options['datemodifiedto'].")"; + } + // only show contacts if the order-criteria starts with the given letter + if ($query['searchletter']!=false) + { + $additionalwhereclause .= " and ".($query['order']).' '.$GLOBALS['egw']->db->capabilities['case_insensitive_like'].' '.$GLOBALS['egw']->db->quote($query['searchletter'].'%'); + } + else + { + //echo "reset colfilter?!
"; + $query['searchletter']=false; + } + + // filter for allowed groups + $firstleveldirs[]=array(); + $count_fld=0; + $or=''; + $aclcondition=" ( "; + array_push($sessiondata['dirs_options_array'],$sessiondata['workingdir']); + foreach ($sessiondata['dirs_options_array'] as $dir) + { + $splitteddir=explode('/',$dir); + $nix=array_shift($splitteddir); + $vfsbase=array_shift($splitteddir); + $vfs1stleveldir=array_shift($splitteddir); + if (!in_array("/$vfsbase/$vfs1stleveldir", $firstleveldirs)) + { + $count_fld++; + if ($count_fld>1) $or='or'; + array_push($firstleveldirs,"/$vfsbase/$vfs1stleveldir"); + $aclcondition.=" $or concat(concat(vfs_directory,'/'),vfs_name) like '/$vfsbase/$vfs1stleveldir%' and vfs_mime_type='directory' "; + $aclcondition.=" or vfs_directory like '/$vfsbase/$vfs1stleveldir%' "; + //$aclcondition.=" or (vfs_directory='".implode('/',$splitteddir)."' and vfs_name='".$vfsname."')"; + } + } + $aclcondition.=")"; + if ($count_fld>0) $additionalwhereclause .= " and ".$aclcondition; + //echo "$aclcondition
"; + + // save the nextmatch entrys/settings with the sessiondata + if (!$_POST['exec']['clear_search']) + { + $query['search_options']=$this->search_options; + } + else + { + //echo "retrieve rows, clear search
"; + unset($query['search']); + unset($query['start_search']); + $switchflag=0; + + } + $this->save_sessiondata($query,'nm'); + // defaultfilter we dont want journal, and a whole lot of other stuff excluded, so we use the Join part of get_rows to do that + // echo "$additionalwhereclause
"; + $rc=parent::get_rows($query,$rows,$readonlys, $additionalwhereclause); + //set the applicationheader + $GLOBALS['egw_info']['flags']['app_header'] = lang('filemanager'); + foreach ($rows as $key => $row) + { + $plink=$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.index','path='.$rows[$key]['vfs_directory']); + $linktodir=''.$rows[$key]['vfs_directory'].' '; + if(strtolower($rows[$key]['vfs_mime_type']) == 'directory') + { + $link=$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.index','path='.$rows[$key]['vfs_directory']."/".$rows[$key]['vfs_name']); + $icon=$this->mime_icon($rows[$key]['vfs_mime_type']); + $col_data=''.$icon.' '; + $col_data.=''.$rows[$key]['vfs_directory']."/".$rows[$key]['vfs_name'].' '; + } + else + { + if($this->prefs['viewonserver'] && isset($this->filesdir) && !$rows[$key]['vfs_link_directory']) + { + #FIXME + $clickview = $rows[$key]['vfs_directory'].'/'.$rows[$key]['vfs_name']; + } + else + { + $icon=$this->mime_icon($rows[$key]['vfs_mime_type']); + $link=$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.view','file='.$rows[$key]['vfs_name'].'&path='.$rows[$key]['vfs_directory']); + $col_data=''.$icon.' '.$rows[$key]['vfs_directory']."/".$rows[$key]['vfs_name'].''; + } + } + $rows[$key]['fulldir']=$col_data; + $rows[$key]['vfs_directory']=$linktodir; + } + // add some info to the appheader that the user may be informed about the search-base of its query-result + if ($query['searchletter']) + { + $order = $order; + $GLOBALS['egw_info']['flags']['app_header'] .= ' - '.lang("%1 starts with '%2'",$order,$query['searchletter']); + } + if ($query['search']) + { + $GLOBALS['egw_info']['flags']['app_header'] .= ' - '.lang("Search for '%1'",$query['search']); + } + return $rc; + } + } diff --git a/filemanager/inc/hook_sidebox_menu.inc.php b/filemanager/inc/hook_sidebox_menu.inc.php index 1bf6b54d39..d83c03e9ef 100755 --- a/filemanager/inc/hook_sidebox_menu.inc.php +++ b/filemanager/inc/hook_sidebox_menu.inc.php @@ -26,9 +26,14 @@ $menu_title = $GLOBALS['egw_info']['apps'][$appname]['title'] . ' '. lang('Menu'); $file = Array( array( - '', + 'Preferences', 'text' => 'Filemanager Preferences', - 'link' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uisettings.index&appname=filemanager') + 'link' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uisettings.index&appname=filemanager'), + ), + array( + 'Search', + 'text' => 'Search', + 'link' => $GLOBALS['egw']->link('/index.php',array('menuaction'=>'filemanager.uifilemanager.index', 'action'=>'search')), ) ); display_sidebox($appname,$menu_title,$file); diff --git a/filemanager/index.php b/filemanager/index.php index 51568d9664..86b9b897aa 100755 --- a/filemanager/index.php +++ b/filemanager/index.php @@ -10,7 +10,7 @@ \**************************************************************************/ /* $Id$ */ - +/* $GLOBALS['egw_info'] = array( 'flags' => array( 'currentapp' => 'filemanager', @@ -24,4 +24,6 @@ include('../header.inc.php'); ExecMethod('filemanager.uifilemanager.index'); +*/ +header('Location: ../index.php?menuaction=filemanager.uifilemanager.index'); ?> diff --git a/filemanager/setup/phpgw_de.lang b/filemanager/setup/phpgw_de.lang index 0caa690771..8a8fcd4855 100644 --- a/filemanager/setup/phpgw_de.lang +++ b/filemanager/setup/phpgw_de.lang @@ -4,6 +4,9 @@ back to file manager filemanager de Zur cancel editing %1 without saving filemanager de Bearbeiten abbrechen %1 ohne zu speichern cannot create directory because it begins or ends in a space filemanager de Kann Verzeichnis nicht anlegen, da der Name mit einem Leerzeichen endet cannot replace %1 because it is a directory filemanager de Kann %1 nicht ersetzen, da es ein Verzeichnis ist +choosing dates where to-date is smaller than the from-date, will result in a search returning all entries but thoose between the two entered dates filemanager de Wenn Sie das bis Datum kleiner als das von Datum wählen, finden Sie alle Einträge, ausser denen, deren Datum im Zeitraum der beiden Daten liegt. +choosing only one date (from/to) will result in a search returning all entries older/younger than the entered date filemanager de Wenn Sie nur ein Datum (von/bis) wählen, finden Sie alle Einträge deren Bezugsdatum älter, bzw. jünger als das jeweilige angegebene Datum ist +clear search filemanager de Suchfelder zurücksetzen command sucessfully run filemanager de Kommando erfolgreich ausgeführt comment filemanager de Kommentar comments cannot contain "%1" filemanager de Kommentare dürfen kein "%1" enthalten @@ -24,6 +27,7 @@ create folder filemanager de Neues Verzeichnis created filemanager de Erstellt created %1 filemanager de %1 erstellt created %1,%2 filemanager de %1,%2 erstellt +created between filemanager de erstellt zwischen created by filemanager de Erstellt von created directory %1 filemanager de Verzeichnis %1 erstellt date filemanager de Datum @@ -45,6 +49,7 @@ fake base dir did not exist, egroupware created a new one. filemanager de Dateim file filemanager de Datei file %1 already exists. please edit it or delete it first. filemanager de Datei %1 existiert bereits. Bitte zuerst bearbeiten oder löschen. file %1 could not be created. filemanager de Datei %1 konnte nicht erstellt werden. +file %1 may be too big. contact your systemadministrator for further info filemanager de Datei %1 ist möglicherweise zu gross. Kontaktieren Sie Ihren Systemadministrator um weitergehende Informationen zu erhalten file name filemanager de Dateiname file names cannot contain "%1" filemanager de Dateinamen dürfen kein "%1" enthalten file names cannot contain \ or / filemanager de Dateinamen dürfen kein \ oder / enthalten @@ -61,10 +66,12 @@ go to your home directory filemanager de Zu Ihrem Heimverzeichnis wechseln go to: filemanager de Gehe zu: go up filemanager de einen Ordner nach oben home filemanager de Home +id filemanager de Id location filemanager de Pfad locked filemanager de Gesperrt mime type filemanager de MIME-Typ modified filemanager de Verändert +modified between filemanager de verändert zwischen modified by filemanager de Verändert von move to filemanager de Verschieben nach move to: filemanager de Verschieben nach: @@ -87,6 +94,7 @@ save %1, and go back to file listing filemanager de %1 speichern und zur save all filemanager de Alles speichern save changes filemanager de Änderungen speichern saved %1 filemanager de %1 gespeichert +searchstring filemanager de Suchbegriff show filemanager de Anzeigen show .. filemanager de Anzeigen ... show .files filemanager de .Dateien anzeigen @@ -94,6 +102,7 @@ show command line (experimental. dangerous.) filemanager de Kommando anzeigen (E show help filemanager de Hilfe anzeigen size filemanager de Größe sort by: filemanager de Sortieren nach: +start search filemanager de Suche starten the future filemanager, now for testing purposes only, please send bugreports filemanager de Der neue Dateimanager, jetzt NUR ZUM TESTEN, bitte Fehlermeldungen senden total files filemanager de Anzahl Dateien unknown mime-type defaults to text/plain when viewing filemanager de Zum Anzeigen von unbekannte MIME-Typen text/plain verwenden diff --git a/filemanager/setup/phpgw_en.lang b/filemanager/setup/phpgw_en.lang index a7e491638f..f0792085cd 100644 --- a/filemanager/setup/phpgw_en.lang +++ b/filemanager/setup/phpgw_en.lang @@ -4,6 +4,9 @@ back to file manager filemanager en Back to file manager cancel editing %1 without saving filemanager en Cancel editing %1 without saving cannot create directory because it begins or ends in a space filemanager en Cannot create directory because it begins or ends in a space cannot replace %1 because it is a directory filemanager en Cannot replace %1 because it is a directory +choosing dates where to-date is smaller than the from-date, will result in a search returning all entries but thoose between the two entered dates filemanager en Choosing dates where to-date is smaller than the from-date, will result in a search returning all entries but thoose between the two entered dates +choosing only one date (from/to) will result in a search returning all entries older/younger than the entered date filemanager en Choosing only one date (from/to) will result in a search returning all entries older/younger than the entered date +clear search filemanager en clear search command sucessfully run filemanager en Command sucessfully run comment filemanager en Comment comments cannot contain "%1" filemanager en Comments cannot contain "%1" @@ -24,6 +27,7 @@ create folder filemanager en Create Folder created filemanager en Created created %1 filemanager en Created %1 created %1,%2 filemanager en Created %1,%2 +created between filemanager en created between created by filemanager en Created by created directory %1 filemanager en Created directory %1 date filemanager en Date @@ -45,6 +49,7 @@ fake base dir did not exist, egroupware created a new one. filemanager en Fake B file filemanager en File file %1 already exists. please edit it or delete it first. filemanager en File %1 already exists. Please edit it or delete it first. file %1 could not be created. filemanager en File %1 could not be created. +file %1 may be too big. contact your systemadministrator for further info filemanager en File %1 may be too big. Contact your Systemadministrator for further info file name filemanager en File Name file names cannot contain "%1" filemanager en File names cannot contain "%1" file names cannot contain \ or / filemanager en File names cannot contain \ or / @@ -61,10 +66,12 @@ go to your home directory filemanager en Go to your home directory go to: filemanager en Go to: go up filemanager en go up home filemanager en Home +id filemanager en Id location filemanager en Location locked filemanager en Locked mime type filemanager en MIME Type modified filemanager en Modified +modified between filemanager en modified between modified by filemanager en Modified by move to filemanager en Move To move to: filemanager en Move to: @@ -87,6 +94,7 @@ save %1, and go back to file listing filemanager en Save %1, and go back to file save all filemanager en Save all save changes filemanager en Save changes saved %1 filemanager en Saved %1 +searchstring filemanager en searchstring show filemanager en Show show .. filemanager en Show .. show .files filemanager en Show .files @@ -94,6 +102,7 @@ show command line (experimental. dangerous.) filemanager en Show command line (E show help filemanager en Show help size filemanager en Size sort by: filemanager en Sort by: +start search filemanager en start search the future filemanager, now for testing purposes only, please send bugreports filemanager en The future filemanager, now for TESTING PURPOSES ONLY, please send bugreports total files filemanager en Total Files unknown mime-type defaults to text/plain when viewing filemanager en Unknown MIME-type defaults to text/plain when viewing diff --git a/filemanager/setup/setup.inc.php b/filemanager/setup/setup.inc.php index a462875e1e..5d3950b092 100755 --- a/filemanager/setup/setup.inc.php +++ b/filemanager/setup/setup.inc.php @@ -13,18 +13,18 @@ $setup_info['filemanager']['name'] = 'filemanager'; $setup_info['filemanager']['title'] = 'Filemanager'; - $setup_info['filemanager']['version'] = '1.4'; + $setup_info['filemanager']['version'] = '1.5'; $setup_info['filemanager']['app_order'] = 6; $setup_info['filemanager']['enable'] = 1; + $setup_info['filemanager']['tables'] =array('egw_vfs'); /* The hooks this app includes, needed for hooks registration */ - $setup_info['filemanager']['hooks'] = array( - 'deleteaccount', - 'settings', - 'sidebox_menu', - 'preferences' - ); + $setup_info['filemanager']['hooks']['preferences'] = 'filemanager.admin_prefs_sidebox_hooks.all_hooks'; + $setup_info['filemanager']['hooks']['deleteaccount'] = 'filemanager.admin_prefs_sidebox_hooks.all_hooks'; + $setup_info['filemanager']['hooks'][] = 'settings'; + $setup_info['filemanager']['hooks']['sidebox_menu'] = 'filemanager.admin_prefs_sidebox_hooks.all_hooks'; + /* Dependencies for this app to work */ $setup_info['filemanager']['depends'][] = array( 'appname' => 'phpgwapi', diff --git a/filemanager/templates/default/app.css b/filemanager/templates/default/app.css index f723139a6e..6137f054f5 100644 --- a/filemanager/templates/default/app.css +++ b/filemanager/templates/default/app.css @@ -11,7 +11,7 @@ .fmButton { background-repeat: no-repeat; - background-image:url(../images/buttonbackground.png); + background-image:url(../default/images/buttonbackground.png); width:28px; height:28px; } diff --git a/filemanager/templates/default/images/buttonbackground.png b/filemanager/templates/default/images/buttonbackground.png new file mode 100755 index 0000000000..35da4fc325 Binary files /dev/null and b/filemanager/templates/default/images/buttonbackground.png differ diff --git a/filemanager/templates/default/images/favicon.ico b/filemanager/templates/default/images/favicon.ico new file mode 100755 index 0000000000..2fe0b2cb0a Binary files /dev/null and b/filemanager/templates/default/images/favicon.ico differ diff --git a/filemanager/webdav.php b/filemanager/webdav.php index 9015917ae0..b87ef90ac0 100644 --- a/filemanager/webdav.php +++ b/filemanager/webdav.php @@ -1,49 +1,49 @@ - - * @copyright (c) 2006 by Ralf Becker