* Finish task #47232.

This commit is contained in:
liyuchun
2022-01-13 17:22:05 +08:00
parent 4bf49c5da7
commit e0b65585d7
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -189,7 +189,9 @@ class sonarqube extends control
{
if($confirm != 'yes') die(js::confirm($this->lang->sonarqube->confirmDeleteProject, inlink('deleteProject', "sonarqubeID=$sonarqubeID&projectKey=$projectKey&confirm=yes")));
$reponse = $this->sonarqube->apiDeleteProject($sonarqubeID, $projectKey);
/* Fix error when request type is PATH_INFO and the tag name contains '-'.*/
$projectKey = str_replace('*', '-', $projectKey);
$reponse = $this->sonarqube->apiDeleteProject($sonarqubeID, $projectKey);
if(isset($reponse->errors)) return print(js::alert($reponse->errors[0]->msg));
+3 -1
View File
@@ -58,7 +58,9 @@
<td class='text' title='<?php echo substr($sonarqubeProject->lastAnalysisDate, 0, 10);?>'><?php echo substr($sonarqubeProject->lastAnalysisDate, 0, 10);?></td>
<td class='c-actions text-left'>
<?php
if(common::hasPriv('sonarqube', 'deleteProject')) echo html::a($this->createLink('sonarqube', 'deleteProject', "sonarqubeID=$sonarqubeID&project=$sonarqubeProject->key"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->sonarqube->deleteProject}' class='btn'");
/* Fix error when request type is PATH_INFO and the project key contains '-'.*/
$projectKey = str_replace('-', '*', $sonarqubeProject->key);
if(common::hasPriv('sonarqube', 'deleteProject')) echo html::a($this->createLink('sonarqube', 'deleteProject', "sonarqubeID=$sonarqubeID&project=$projectKey"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->sonarqube->deleteProject}' class='btn'");
?>
</td>
</tr>