* [ticket#2108] adjust sonar issue page url error.

This commit is contained in:
caoyanyi
2025-05-23 15:35:52 +08:00
committed by 刘刚
parent 2f77bec6c3
commit c375f65ece
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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']));
+1 -1
View File
@@ -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)
{
+1 -1
View File
@@ -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
(