You are here

function webfm_insert_file in Web File Manager 5.2

Same name and namespace in other branches
  1. 5 webfm_file.inc \webfm_insert_file()

webfm_insert_file - inserts a file into the webfm_file table

Parameters

string $path - path relative to drupal root:

string &$err_arr - ref to error array for client feedback:

Return value

bool - TRUE if query executed successfully, otherwise FALSE

2 calls to webfm_insert_file()
webfm_ajax in ./webfm.module
Ajax post requests
webfm_insert_dir in ./webfm_file.inc
webfm_insert_dir - inserts files into the webfm_file table

File

./webfm_file.inc, line 298

Code

function webfm_insert_file($path, &$err_arr) {
  $file = new stdClass();
  $file->filepath = $path;
  if (webfm_enum_validate($file, $err_arr)) {
    if (($ret = webfm_dbinsert_file($file, $err)) === FALSE) {
      $err_arr[] = $err;
    }
    return $ret;
  }
  return FALSE;
}