* [ticket#2108] adjust sonar issue page url error.
This commit is contained in:
@@ -296,7 +296,7 @@ class jobModel extends model
|
||||
->fetch();
|
||||
if(!$job) return false;
|
||||
|
||||
if(($this->app->rawModule != 'job' || $this->app->rawMethod != 'exec') && $this->app->rawModule != 'mr' && !empty($job->autoRun)) return false;
|
||||
if(($this->app->rawModule != 'job' || $this->app->rawMethod != 'exec') && !in_array($this->app->rawModule, array('mr', 'sonarqube')) && !empty($job->autoRun)) return false;
|
||||
|
||||
$repo = $this->loadModel('repo')->getByID($job->repo);
|
||||
if(!$repo) return false;
|
||||
|
||||
@@ -376,7 +376,7 @@ class sonarqube extends control
|
||||
*/
|
||||
public function browseIssue(int $sonarqubeID, string $projectKey = '', bool $search = false, string $orderBy = 'severity_desc', int $recPerPage = 100, int $pageID = 1)
|
||||
{
|
||||
$projectKey = str_replace('*', '-', $projectKey);
|
||||
$projectKey = helper::safe64Decode(urldecode($projectKey));
|
||||
if(isset($_POST['keyword']))
|
||||
{
|
||||
$keyword = htmlspecialchars(trim($_POST['keyword']));
|
||||
|
||||
@@ -12,7 +12,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace zin;
|
||||
|
||||
$replaceKey = str_replace('-', '*', $projectKey);
|
||||
$replaceKey = urlencode(helper::safe64Encode($projectKey));
|
||||
$issueList = array();
|
||||
foreach($sonarqubeIssueList as $issue)
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ div
|
||||
setClass('text-md font-bold'),
|
||||
set('data-close-modal', true),
|
||||
$projectName,
|
||||
$qualitygate && hasPriv('instance', 'manage') ? set::href(createLink('sonarqube', 'browseIssue', "sonarqubeID={$sonarqubeID}&project=" . str_replace('-', '*', $projectKey))) : null
|
||||
$qualitygate && hasPriv('instance', 'manage') ? set::href(createLink('sonarqube', 'browseIssue', "sonarqubeID={$sonarqubeID}&project=" . urlencode(helper::safe64Encode($projectKey)))) : null
|
||||
),
|
||||
label
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user