示例#1
0
 /**
  * Check settings of Redmine.
  * 
  * @param  int    $version 
  * @access public
  * @return void
  */
 public function checkRedmine($version)
 {
     helper::import('./converter/redmine.php');
     $converter = new redmineConvertModel();
     /* Check it. */
     $checkInfo['db'] = $converter->connectDB();
     $checkInfo['path'] = $converter->checkPath();
     $this->view->trackers = $this->dao->dbh($converter->sourceDBH)->select('id, name')->from('trackers')->fetchAll('id');
     $this->view->statuses = $this->dao->dbh($converter->sourceDBH)->select('id, name')->from('issue_statuses')->fetchAll('id');
     $this->view->pries = $this->dao->dbh($converter->sourceDBH)->select('id, name')->from('enumerations')->where('type')->eq('IssuePriority')->fetchAll('id');
     /* Compute the checking result. */
     $result = 'pass';
     if (!is_object($checkInfo['db']) or !$checkInfo['path']) {
         $result = 'fail';
     }
     $this->app->loadLang('bug');
     $this->app->loadLang('story');
     $this->app->loadLang('task');
     $this->view->aimTypeList['bug'] = 'bug';
     $this->view->aimTypeList['task'] = 'task';
     $this->view->aimTypeList['story'] = 'story';
     /* Assign. */
     $this->view->version = $version;
     $this->view->source = 'Redmine';
     $this->view->result = $result;
     $this->view->checkInfo = $checkInfo;
     $this->display();
 }
示例#2
0
 public function __construct($issueType)
 {
     parent::__construct();
     $this->issueType = $issueType;
 }