/** * @param $repo CodeRepository|String */ function __construct($repo) { parent::__construct($repo); global $wgRequest; $path = $wgRequest->getVal('path'); if ($path != '') { $this->mPath = self::pathsToArray($path); } else { $this->mPath = array(); } $this->mAuthor = $wgRequest->getText('author'); $this->mStatus = $wgRequest->getText('status'); if ($this->mAuthor) { $this->filters[] = wfMsg('code-revfilter-cr_author', $this->mAuthor); } if ($this->mStatus) { $this->filters[] = wfMsg('code-revfilter-cr_status', $this->mStatus); } if (count($this->filters)) { global $wgLang; $this->mAppliedFilter = $wgLang->listToText($this->filters); } else { $this->mAppliedFilter = null; } }
function __construct($repo) { global $wgRequest, $IP; parent::__construct($repo); $this->mPath = htmlspecialchars(trim($wgRequest->getVal('path'))); if (strlen($this->mPath) && $this->mPath[0] !== '/') { $this->mPath = "/{$this->mPath}"; // make sure this is a valid path } $this->mPath = preg_replace('/\\/$/', '', $this->mPath); // kill last slash $this->mStartRev = $wgRequest->getIntOrNull('startrev'); $this->mEndRev = $wgRequest->getIntOrNull('endrev'); }
function __construct($repo) { parent::__construct($repo); }
/** * @static * @param string $status * @param CodeView $view * @return string */ static function buildStatusList($status, $view) { $states = CodeRevision::getPossibleStates(); $out = ''; foreach ($states as $state) { $out .= Xml::option($view->statusDesc($state), $state, $status === $state); } return $out; }