Beispiel #1
0
 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');
         }
     }
 }
Beispiel #2
0
 public function __construct()
 {
     $this->bugzilla = Bugzilla::instance(Kohana::config('workermgmt'));
     parent::__construct();
 }
Beispiel #3
0
 /**
  * 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);
         }
     }
 }