Index: admin.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/imce/inc/admin.inc,v retrieving revision 1.5.2.7 diff -u -r1.5.2.7 admin.inc --- admin.inc 1 Feb 2010 15:42:05 -0000 1.5.2.7 +++ admin.inc 1 Feb 2010 16:33:56 -0000 @@ -83,6 +83,13 @@ 'scale_and_crop' => t('First scale then crop the image to fit the thumbnail dimensions.') ), ); + $form['common']['root_text'] = array( + '#type' => 'textfield', + '#title' => t('Root directory text'), + '#default_value' => variable_get('imce_settings_root_text', ''), + '#maxlength' => 48, + '#description' => t('By default, IMCE displays the file directory path at the top of navigation tree. Here you can define a text to replace it.'), + ); $form['submit'] = array('#type' => 'submit', '#value' => t('Save configuration')); $form['#theme'] = 'imce_admin'; @@ -136,6 +143,7 @@ variable_set('imce_settings_absurls', $form_state['values']['absurls']); variable_set('imce_settings_replace', $form_state['values']['replace']); variable_set('imce_settings_thumb_method', $form_state['values']['thumb_method']); + variable_set('imce_settings_root_text', $form_state['values']['root_text']); drupal_set_message(t('Changes have been saved.')); } Index: page.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/imce/inc/page.inc,v retrieving revision 1.10.2.25 diff -u -r1.10.2.25 page.inc --- page.inc 1 Feb 2010 15:44:28 -0000 1.10.2.25 +++ page.inc 1 Feb 2010 16:34:26 -0000 @@ -965,7 +965,7 @@ } } //set root branch - $root = variable_get('file_downloads', '') == FILE_DOWNLOADS_PRIVATE && !user_access('administer imce') ? t('Directory root') : file_directory_path(); + $root = check_plain(imce_root_text()); $q = $imce['clean'] ? '?' : '&'; if (isset($imce['directories']['.'])) { $root = ''. $root .''; @@ -1002,3 +1002,16 @@ } return $html; } + +/** + * Return the text to display in place of root directory in navigation tree. + */ +function imce_root_text() { + if ($text = variable_get('imce_settings_root_text', '')) { + return $text; + } + if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PRIVATE && !user_access('administer imce')) { + return t('root'); + } + return file_directory_path(); +}