示例#1
0
 private function getView()
 {
     if (empty($_REQUEST['a'])) {
         $_REQUEST['a'] = 'summary';
     } else {
         if ($_REQUEST['a'] === 'blobdiff' && isset($_REQUEST['jenkins']) && $_REQUEST['jenkins'] === 'true') {
             $this->inverseURLArgumentsForGitPhpDiff();
         }
     }
     set_time_limit(300);
     $_GET['a'] = $_REQUEST['a'];
     $_REQUEST['group_id'] = $this->repository->getProjectId();
     $_REQUEST['repo_id'] = $this->repository->getId();
     $_REQUEST['repo_name'] = $this->repository->getFullName();
     $_GET['p'] = $_REQUEST['repo_name'] . '.git';
     $_REQUEST['repo_path'] = $this->repository->getPath();
     $_REQUEST['project_dir'] = $this->repository->getProject()->getUnixName();
     $_REQUEST['git_root_path'] = $this->repository->getGitRootPath();
     $_REQUEST['action'] = 'view';
     $this->preSanitizeRequestForGitphp();
     if (empty($_REQUEST['noheader'])) {
         echo '<div id="gitphp" class="plugin_git_gitphp">';
     }
     include $this->getGitPhpIndexPath();
     if (empty($_REQUEST['noheader'])) {
         echo '</div>';
     }
 }
示例#2
0
 /**
  * Configure gitphp output
  * 
  * @param GitRepository $repository
  */
 public function getView($repository)
 {
     include_once 'common/include/Codendi_HTMLPurifier.class.php';
     if (empty($_REQUEST['a'])) {
         $_REQUEST['a'] = 'summary';
     }
     set_time_limit(300);
     $_GET['a'] = $_REQUEST['a'];
     $_REQUEST['group_id'] = $this->groupId;
     $_REQUEST['repo_id'] = $repository->getId();
     $_REQUEST['repo_name'] = $repository->getFullName();
     $_GET['p'] = $_REQUEST['repo_name'] . '.git';
     $_REQUEST['repo_path'] = $repository->getPath();
     $_REQUEST['project_dir'] = $repository->getProject()->getUnixName();
     $_REQUEST['git_root_path'] = $repository->getGitRootPath();
     $_REQUEST['action'] = 'view';
     if (empty($_REQUEST['noheader'])) {
         //echo '<hr>';
         echo '<div id="gitphp">';
     }
     include $this->getGitPhpIndexPath();
     if (empty($_REQUEST['noheader'])) {
         echo '</div>';
     }
 }