public function __construct() { parent::__construct(); Kohana::config_load('workermgmt'); $this->profiler = IN_DEV_MODE ? new Profiler() : null; $requested_area = strtolower(Router::$controller . "::" . Router::$method); if (!in_array($requested_area, $this->non_authed_areas)) { // run authentication if (!Bugzilla::instance(Kohana::config('workermgmt'))->authenticated()) { url::redirect('login'); } } }
public function __construct() { $this->bugzilla = Bugzilla::instance(Kohana::config('workermgmt')); parent::__construct(); }
/** * Submit these bug types using the validated from data * * @param array $bugs_to_file Must be known values of Bugzilla * i.e. Bugzilla::BUG_NEWHIRE_SETUP, Bugzilla::BUG_HR_CONTRACTOR, ... * @param array $form_input The validated form input */ private function file_these(array $bugs_to_file, $form_input) { $bugzilla = Bugzilla::instance(kohana::config('workermgmt')); foreach ($bugs_to_file as $bug_to_file) { $filing = $bugzilla->newhire_filing($bug_to_file, $form_input); if ($filing['error_message'] !== null) { client::messageSend($filing['error_message'], E_USER_ERROR); } else { client::messageSend($filing['success_message'], E_USER_NOTICE); } } }