edit_autoenable($sid); break; case "editplugins": edit_plugins($sid); break; case "editprefs": edit_serverprefs($sid); break; //case "editusers": // manage_profile_users($sid); // break; //case "editusers": // manage_profile_users($sid); // break; case "linkplugins": import_plugins($sid, $importplugins, $preenable, $bEnable); break; case "new": new_profile(); break; case "create": $stype = ""; if (intval($user) != -1) { $stype = $user; } elseif (intval($entity) != -1) { $stype = $entity; } if ($stype == "") { $stype = Session::get_session_user(); } create_new_profile($sname, $sdescription, $sautoenable, $stype, $cloneid, $auto_cat_status, $auto_fam_status, $tracker);
if ($argc < 1) { trigger_error('Missing argument in do_hook', E_USER_ERROR); } $hook_name = array_shift($argv); if (!isset($hook_listeners[$hook_name])) { return; } foreach ($hook_listeners[$hook_name] as $func) { $response = call_user_func_array($func, (array) $argv); return $response; } } /** * Look for plugins and perform imports */ function import_plugins() { $plugins_dir = 'inc/plugins'; $contents = scandir($plugins_dir); foreach ($contents as $dir) { if ($dir == '.' || $dir == '..') { continue; } $plugin_file = $plugins_dir . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . $dir . '.plugin.php'; if (file_exists($plugin_file)) { require_once $plugin_file; } } } import_plugins();