protected function _uninstall()
 {
     if (framework\Context::getScope()->getID() == 1) {
         Commits::getTable()->drop();
         Files::getTable()->drop();
         IssueLinks::getTable()->drop();
     }
     parent::_uninstall();
 }
示例#2
0
 public function listen_viewissue_panel(framework\Event $event)
 {
     if (framework\Context::getModule('vcs_integration')->getSetting('vcs_mode_' . framework\Context::getCurrentProject()->getID()) == self::MODE_DISABLED) {
         return;
     }
     $links = IssueLink::getCommitsByIssue($event->getSubject(), 3);
     $links_total_count = IssueLinks::getTable()->countByIssueID($event->getSubject()->getID());
     include_component('vcs_integration/viewissue_commits', array('issue' => $event->getSubject(), 'links' => $links, 'links_total_count' => $links_total_count, 'selected_project' => $event->getSubject()->getProject()));
 }
示例#3
0
 private function _populateAffectedIssues()
 {
     if ($this->_issues === null) {
         $issuelinks = tables\IssueLinks::getTable()->getByCommitID($this->_id);
         $issues = array();
         foreach ($issuelinks as $issuelink) {
             if ($issuelink->getIssue() instanceof Issue) {
                 $issues[$issuelink->getIssue()->getId()] = $issuelink->getIssue();
             }
         }
         $this->_issues = $issues;
     }
 }
示例#4
0
 private function _populateAffectedIssues()
 {
     if ($this->_issues == null) {
         $this->_issues = tables\IssueLinks::getTable()->getByCommitID($this->_id);
     }
 }
示例#5
0
 /**
  * Return all issues for a given commit
  * @param \thebuggenie\modules\vcs_integration\entities\Commit $commit
  * @return array
  */
 public static function getIssuesByCommit(Commit $commit)
 {
     return tables\IssueLinks::getTable()->getByCommitID($commit->getID());
 }