You are here

function n1ed_flmngr in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7

Handler for Flmngr requests

1 string reference to 'n1ed_flmngr'
n1ed_menu in ./n1ed.module
Implementation of hook_menu

File

./n1ed.module, line 25

Code

function n1ed_flmngr() {
  $tmp = drupal_get_path('module', 'n1ed') . '/tmp/';
  $cache = drupal_get_path('module', 'n1ed') . '/cache/';
  if (!file_exists($tmp)) {
    mkdir($tmp, 0777, TRUE);
  }
  if (!file_exists($cache)) {
    mkdir($cache, 0777, TRUE);
  }
  if (!file_exists($cache)) {
    mkdir(drupal_realpath('public://') . '/flmngr', 0777, TRUE);
  }
  echo FlmngrServer::flmngrRequest([
    'dirFiles' => drupal_realpath('public://') . '/flmngr',
    'dirTmp' => $tmp,
    'dirCache' => $cache,
  ]);
}