Changeset 1533 for sandbox/filemanager/inc/class.uifilemanager.inc.php
- Timestamp:
- 10/28/09 08:04:06 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/filemanager/inc/class.uifilemanager.inc.php
r1529 r1533 293 293 $this->path = $this->cdtodir; 294 294 } 295 */ 295 */ 296 if(!$this->bo->vfs->acl_check(array( 297 'string' => $this->path, 298 'relatives' => array(RELATIVE_NONE), 299 'operation' => PHPGW_ACL_READ 300 ))) 301 { 302 $this->path = $this->bo->homedir; 303 } 296 304 // new method for switching to a new dir. 297 305 if($this->changedir=='true' && $this->cdtodir || $this->goto_x) … … 356 364 } 357 365 $this->readable_groups = array(); 358 359 366 while(list($num, $account) = each($groups)) 360 367 { … … 386 393 $this->bo->vfs->working_id = $this->bo->userinfo['username']; 387 394 } 388 389 395 390 396 # FIXME # comment waht happens here … … 1086 1092 } 1087 1093 1088 if(!$this->rename_x && $this->can_edit) 1094 if(!$this->rename_x && $this->can_edit && 1095 $_SESSION['phpgw_info']['user']['preferences']['filemanager']['comment'] == 1) 1089 1096 { 1090 1097 $toolbar.=$this->inputImage('edit_comments','edit_comments',lang('Edit comments')); … … 1183 1190 $c->read_repository(); 1184 1191 $current_config = $c->config_data; 1185 $max_size = $current_config['filemanager_Max_ attachment_size'];1192 $max_size = $current_config['filemanager_Max_file_size']; 1186 1193 if (! $max_size) 1187 1194 $max_size = ini_get('upload_max_filesize'); … … 1384 1391 { 1385 1392 $copied++; 1386 $this->message .= lang('Copied %1 to %2', $this->disppath.'/'.$file, $this->todir.'/'.$file);1393 $this->messages[] .= lang('Copied %1 to %2', $this->disppath.'/'.$file, $this->todir.'/'.$file); 1387 1394 } 1388 1395 else 1389 1396 { 1390 $this->message .= $GLOBALS['phpgw']->common->error_list(array(lang('Could not copy %1 to %2', $this->disppath.'/'.$file, $this->todir.'/'.$file)));1397 $this->messages[] .= lang('Could not copy %1 to %2', $this->disppath.'/'.$file, $this->todir.'/'.$file); 1391 1398 } 1392 1399 } … … 1599 1606 function edit() 1600 1607 { 1608 $files = array_keys($this->fileman); 1609 $this->file = $this->fileman[$files[0]]; 1610 if($this->file) 1611 { 1612 $ls_array = $this->bo->vfs->ls(array( 1613 'string' => $this->path.'/'.$this->file, 1614 'relatives' => array(RELATIVE_ALL), 1615 'checksubdirs' => False, 1616 'nofiles' => True 1617 )); 1618 1619 if($ls_array[0]['mime_type']) 1620 { 1621 $mime_type = $ls_array[0]['mime_type']; 1622 } 1623 elseif($this->prefs['viewtextplain']) 1624 { 1625 $mime_type = 'text/plain'; 1626 } 1627 $viewable = array('','text/plain','text/csv','text/html','text/text'); 1628 1629 if(!in_array($mime_type,$viewable)){ 1630 echo lang('Inpossbile to edit this file'); 1631 return False; 1632 } 1633 } 1634 1601 1635 $this->readFilesInfo(); 1602 1636
Note: See TracChangeset
for help on using the changeset viewer.