Beispiel #1
0
 /**
  * a namespace has been deleted
  *
  */
 function deleted(&$event, $param)
 {
     $ns = $event->data[0];
     $path = Projects_file::projects_file_path($ns);
     $this->delete_dir($path);
 }
Beispiel #2
0
 protected function render_meta(&$renderer, $file)
 {
     // check if the project path exists
     global $ID;
     $ns = getNS($ID);
     $path = Projects_file::projects_file_path($ns, false);
     if (!file_exists($path)) {
         mkdir($path, 0700, true);
     }
     $file = Projects_file::file($ID, $renderer->meta['projectfile']);
     // auto dependency
     $file->analyze();
     $old = Projects_file::file($ID);
     $file->update_from($old);
     unset($renderer->meta['projectfile']);
     global $PROJECT_FILES;
     if (!isset($PROJECT_FILES)) {
         $PROJECT_FILES = array($ID => $file);
     } else {
         $PROJECT_FILES[$ID] = $file;
     }
 }