You are here

function imce_reg_dir in IMCE 7

Same name and namespace in other branches
  1. 6.2 imce.module \imce_reg_dir()
  2. 6 imce.module \imce_reg_dir()

Check if the directory name is regular.

3 calls to imce_reg_dir()
imce_check_directory in inc/imce.page.inc
Create a writable directory(any level) under file system directory.
imce_clean_profile_fields in inc/imce.admin.inc
Unset empty fields in thumbnails and directory paths.
imce_directory_info in inc/imce.page.inc
Return the permissions.

File

./imce.module, line 249
Implements the necessary hooks for the file browser to work properly.

Code

function imce_reg_dir($dirname) {
  return $dirname == '.' || is_int($dirname) || is_string($dirname) && $dirname != '' && !preg_match('@(^\\s)|(^/)|(^\\./)|(\\s$)|(/$)|(/\\.$)|(\\.\\.)|(//)|(\\\\)|(/\\./)@', $dirname);
}