/** * Initialize controller */ public function Initialize() { parent::Initialize(); if (empty($this->params['hashbase'])) { $this->params['hashbase'] = 'HEAD'; } }
/** * Initialize controller */ public function Initialize() { parent::Initialize(); if (empty($this->params['page'])) { $this->params['page'] = 0; } }
/** * Initialize controller */ public function Initialize() { parent::Initialize(); if (!empty($this->params['output']) && $this->params['output'] == 'jstip') { $this->DisableLogging(); } }
/** * Initialize controller */ public function Initialize() { parent::Initialize(); if (!$this->config->GetValue('search')) { throw new GitPHP_SearchDisabledException(); } if (empty($this->params['hash'])) { $this->params['hash'] = 'HEAD'; } if (empty($this->params['page'])) { $this->params['page'] = 0; } if (!isset($this->params['searchtype'])) { $this->params['searchtype'] = GitPHP_Controller_Search::CommitSearch; } if ($this->params['searchtype'] == GitPHP_Controller_Search::FileSearch) { if (!$this->config->GetValue('filesearch')) { throw new GitPHP_SearchDisabledException(true); } } if ($this->params['searchtype'] !== GitPHP_Controller_Search::AuthorSearch && $this->params['searchtype'] !== GitPHP_Controller_Search::CommitterSearch && $this->params['searchtype'] !== GitPHP_Controller_Search::CommitSearch && $this->params['searchtype'] !== GitPHP_Controller_Search::FileSearch) { throw new GitPHP_InvalidSearchTypeException(); } if (!isset($this->params['search']) || strlen($this->params['search']) < 2) { throw new GitPHP_SearchLengthException(2); } }
/** * Initialize controller */ public function Initialize() { parent::Initialize(); if (!$this->Plain()) { if ($this->DiffMode(isset($this->params['diffmode']) ? $this->params['diffmode'] : '') == GitPHP_Controller_DiffBase::SideBySideDiff) { $this->params['sidebyside'] = true; } } }
/** * Initialize controller */ public function Initialize() { parent::Initialize(); if (!$this->config->GetValue('graphs')) { throw new Exception('Graphing has been disabled'); } $this->preserveWhitespace = true; $this->DisableLogging(); }
/** * Initialize controller */ public function Initialize() { parent::Initialize(); if (!$this->config->GetValue('graphs')) { throw new Exception('Graphing has been disabled'); } if (empty($this->params['graphtype'])) { $this->params['graphtype'] = 'commitactivity'; } }
/** * Initialize controller */ public function Initialize() { parent::Initialize(); if (empty($this->params['hashbase'])) { $this->params['hashbase'] = 'HEAD'; } if (!empty($this->params['output']) && $this->params['output'] == 'js') { $this->DisableLogging(); } }
/** * Initialize controller */ public function Initialize() { $this->multiProject = true; parent::Initialize(); if ($this->userList && $this->userList->GetCount() > 0) { if (!$this->config->GetValue('showrestrictedprojects') || isset($this->params['opml']) && $this->params['opml'] === true || isset($this->params['txt']) && $this->params['txt'] === true) { $this->projectList->FilterByUser(!empty($_SESSION['gitphpuser']) ? $_SESSION['gitphpuser'] : null); } } if (empty($this->params['sort'])) { $this->params['sort'] = 'project'; } }
/** * Initialize controller */ public function Initialize() { parent::Initialize(); $this->preserveWhitespace = true; $this->DisableLogging(); }