You are here

function _ocupload_get_allowed_ext in One Click Upload 7.2

Return current user allowed file ext.

3 calls to _ocupload_get_allowed_ext()
ocupload_element_text_format_process in ./ocupload.module
text_format process callback.
ocupload_library in ./ocupload.module
Implements hook_library().
ocupload_preprocess_html in ./ocupload.module
Implements hook_preprocess_html().

File

./ocupload.module, line 406

Code

function _ocupload_get_allowed_ext() {
  static $allowed_ext;
  if ($allowed_ext === NULL) {
    $allowed_ext = array();
    foreach (ocupload_templates() as $template) {
      if (user_access('upload files use template ' . $template->tid)) {
        $allowed_ext = array_merge($allowed_ext, explode(',', $template->mask));
      }
    }
  }
  return $allowed_ext;
}