Changeset 7681 for trunk/filemanager/inc/class.uifilemanager.inc.php
- Timestamp:
- 12/19/12 16:44:18 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/filemanager/inc/class.uifilemanager.inc.php
r7673 r7681 155 155 // check if basedir exist 156 156 $test = $this->bo->vfs->get_real_info(array('string' => $this->bo->basedir, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); 157 if ($test[ mime_type] != 'Directory') {157 if ($test['mime_type'] != 'Directory') { 158 158 die('Base directory does not exist, Ask adminstrator to check the global configuration.'); 159 159 } 160 160 161 161 $test = $this->bo->vfs->get_real_info(array('string' => $this->bo->basedir . $this->bo->fakebase, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); 162 if ($test[ mime_type] != 'Directory') {162 if ($test['mime_type'] != 'Directory') { 163 163 $this->bo->vfs->override_acl = 1; 164 164 … … 173 173 $test = $this->bo->vfs->get_real_info(array('string' => $this->bo->basedir . $this->bo->fakebase, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); 174 174 175 if ($test[ mime_type] != 'Directory') {175 if ($test['mime_type'] != 'Directory') { 176 176 die('Fake Base directory does not exist and could not be created, please ask the administrator to check the global configuration.'); 177 177 } else { … … 181 181 182 182 $test = $this->bo->vfs->get_real_info(array('string' => $this->bo->basedir . $this->bo->homedir, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); 183 if ($test[ mime_type] != 'Directory') {183 if ($test['mime_type'] != 'Directory') { 184 184 185 185 $c_admin = CreateObject('phpgwapi.config', 'expressoAdmin1_2'); … … 205 205 $test = $this->bo->vfs->get_real_info(array('string' => $this->bo->basedir . $this->bo->homedir, 'relatives' => array(RELATIVE_NONE), 'relative' => False)); 206 206 207 if ($test[ mime_type] != 'Directory') {207 if ($test['mime_type'] != 'Directory') { 208 208 die('Your Home Dir does not exist and could not be created, please ask the adminstrator to check the global configuration.'); 209 209 } else { … … 622 622 623 623 if ($this->numoffiles || $this->cwd) { 624 $vars[ path] = '<input type="hidden" id="currentPath" value="' . $this->path . '">';625 $vars[ css] = '<link rel="stylesheet" type="text/css" href="filemanager/templates/default/main.css">';626 $vars[ css].='<link rel="stylesheet" type="text/css" href="phpgwapi/js/dftree/dftree.css">';624 $vars['path'] = '<input type="hidden" id="currentPath" value="' . $this->path . '">'; 625 $vars['css'] = '<link rel="stylesheet" type="text/css" href="filemanager/templates/default/main.css">'; 626 $vars['css'].='<link rel="stylesheet" type="text/css" href="phpgwapi/js/dftree/dftree.css">'; 627 627 $_SESSION['phpgw_info']['user']['preferences']['filemanager']['lid'] = $GLOBALS['phpgw_info']['user']['account_lid']; 628 $vars[ preferences] = '<input type="hidden" id="userPreferences" value=\'' . serialize($_SESSION['phpgw_info']['user']['preferences']['filemanager']) . '\'>';628 $vars['preferences'] = '<input type="hidden" id="userPreferences" value=\'' . serialize($_SESSION['phpgw_info']['user']['preferences']['filemanager']) . '\'>'; 629 629 // Used for important operations that needs security 630 630 for ($key = ""; strlen($key) < 150; $key .= chr(rand(48, 95))) 631 631 ; 632 632 $_SESSION['phpgw_info']['filemanager']['user']['sec_key'] = $key; 633 $vars[ sec_key] = '<input type="hidden" id="userKey" value=\'' . $key . '\'>';634 $vars[ script] = '<script>initDrawApi();</script>';635 636 $vars[ new_button] = $this->toolButton('new', 'createfile', lang('New...'));637 $vars[ new_button].='<input type="hidden" id="newfile_or_dir" name="newfile_or_dir" value="" />';633 $vars['sec_key'] = '<input type="hidden" id="userKey" value=\'' . $key . '\'>'; 634 $vars['script'] = '<script>initDrawApi();</script>'; 635 636 $vars['new_button'] = $this->toolButton('new', 'createfile', lang('New...')); 637 $vars['new_button'].='<input type="hidden" id="newfile_or_dir" name="newfile_or_dir" value="" />'; 638 638 639 639 // reload button with this url 640 $vars[ refresh_button] = $this->toolButton('reload', 'reload', lang('reload'));640 $vars['refresh_button'] = $this->toolButton('reload', 'reload', lang('reload')); 641 641 642 642 // go up icon when we're not at the top, dont allow to go outside /home = fakebase 643 643 if ($this->path != '/' && $this->path != $this->bo->fakebase) { 644 $vars[ tools_button] = $this->toolButton('tools', 'tools', lang('tools'));644 $vars['tools_button'] = $this->toolButton('tools', 'tools', lang('tools')); 645 645 } 646 646 else 647 $vars[ tools_button] = "";648 649 $vars[ toolbar1] = $toolbar;647 $vars['tools_button'] = ""; 648 649 $vars['toolbar1'] = $toolbar; 650 650 651 651 if (count($this->messages) > 0) { … … 656 656 $this->messages = NULL; 657 657 658 $vars[ messages] = $messages;658 $vars['messages'] = $messages; 659 659 660 660 $this->t->set_var($vars); … … 815 815 $var = array( 816 816 'change_upload_boxes' => lang('Show'), 817 'form_action' => $GLOBALS[ phpgw]->link('/filemanager/inc/upload.php'),817 'form_action' => $GLOBALS['phpgw']->link('/filemanager/inc/upload.php'), 818 818 'emails_to' => $notify->EmailsToSend($GLOBALS['phpgw']->preferences->values['email']), 819 819 'lang_file' => lang('File(s)'), … … 906 906 907 907 908 $vars[ refresh_script] = "<script src='filemanager/js/refresh.js'></script>";909 910 $vars[ preview_content] = '';908 $vars['refresh_script'] = "<script src='filemanager/js/refresh.js'></script>"; 909 910 $vars['preview_content'] = ''; 911 911 if ($this->edit_file) { 912 912 $this->edit_file_content = stripslashes($this->edit_file_content); … … 916 916 $content = $this->edit_file_content; 917 917 918 $vars[ lang_preview_of] = lang('Preview of %1', $this->path . '/' . $edit_file);919 920 $vars[ preview_content] = nl2br($content);918 $vars['lang_preview_of'] = lang('Preview of %1', $this->path . '/' . $edit_file); 919 920 $vars['preview_content'] = nl2br($content); 921 921 } elseif ($this->edit_save_x || $this->edit_save_done_x) { 922 922 $content = $this->edit_file_content; … … 954 954 $content = $this->bo->vfs->read(array('string' => $this->filename)); 955 955 } 956 $vars[ form_action] = $GLOBALS['phpgw']->link('/index.php', 'menuaction=filemanager.uifilemanager.index', 'path=' . $this->path);957 $vars[ edit_file] = $this->filename;956 $vars['form_action'] = $GLOBALS['phpgw']->link('/index.php', 'menuaction=filemanager.uifilemanager.index', 'path=' . $this->path); 957 $vars['edit_file'] = $this->filename; 958 958 # We need to include all of the fileman entries for each file's form, 959 959 # so we loop through again … … 961 961 if ($this->filename) 962 962 $value = 'value="' . $this->filename . '"'; 963 $vars[ filemans_hidden] = '<input type="hidden" name="filename" ' . $value . ' />';964 } 965 $vars[ file_content] = $content;966 967 $vars[ buttonPreview] = $this->inputButton('edit_preview', 'edit_preview', lang('Preview %1', $this->bo->html_encode($this->fileman[0], 1)));968 $vars[ buttonSave] = $this->inputButton('edit_save', 'save', lang('Save %1', $this->bo->html_encode($this->filename, 1)));969 $vars[ buttonDone] = $this->inputButton('edit_save_done', 'ok', lang('Save %1, and go back to file listing ', $this->bo->html_encode($this->filename, 1)));970 $vars[ buttonCancel] = $this->inputButton('edit_cancel', 'cancel', lang('Cancel editing %1 without saving', $this->bo->html_encode($this->filename, 1)));963 $vars['filemans_hidden'] = '<input type="hidden" name="filename" ' . $value . ' />'; 964 } 965 $vars['file_content'] = $content; 966 967 $vars['buttonPreview'] = $this->inputButton('edit_preview', 'edit_preview', lang('Preview %1', $this->bo->html_encode($this->fileman[0], 1))); 968 $vars['buttonSave'] = $this->inputButton('edit_save', 'save', lang('Save %1', $this->bo->html_encode($this->filename, 1))); 969 $vars['buttonDone'] = $this->inputButton('edit_save_done', 'ok', lang('Save %1, and go back to file listing ', $this->bo->html_encode($this->filename, 1))); 970 $vars['buttonCancel'] = $this->inputButton('edit_cancel', 'cancel', lang('Cancel editing %1 without saving', $this->bo->html_encode($this->filename, 1))); 971 971 972 972 if ($mime_type == 'text/html') { 973 $vars[ fck_edit] = '<script type="text/javascript" src="./library/ckeditor/ckeditor.js"></script>973 $vars['fck_edit'] = '<script type="text/javascript" src="./library/ckeditor/ckeditor.js"></script> 974 974 <textarea cols="80" id="edit_file_content" name="edit_file_content" rows="10">' . $content . '</textarea> 975 975 <script type="text/javascript"> CKEDITOR.replace( \'edit_file_content\',{ … … 1144 1144 $test = $this->bo->vfs->get_real_info(array('string' => $this->bo->fakebase . '/' . $group_array['account_name'], 1145 1145 'relatives' => array(RELATIVE_NONE), 'relative' => False)); 1146 if ($test[ mime_type] != 'Directory') {1146 if ($test['mime_type'] != 'Directory') { 1147 1147 continue; 1148 1148 }
Note: See TracChangeset
for help on using the changeset viewer.