Skip to content

Commit 8e0ccf2

Browse files
committed
fix for marketplace and clean code
1 parent a8584b4 commit 8e0ccf2

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

inc/autoreport.class.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ class PluginReportsAutoReport {
5252

5353
function __construct($title='') {
5454

55-
preg_match('@/plugins/(.*)/report/(.*)/@', $_SERVER['SCRIPT_NAME'], $regs);
56-
$this->plug = $regs[1];
57-
$this->name = $regs[2];
55+
56+
preg_match('@/(plugins|marketplace)/(.*)/report/(.*)/@', $_SERVER['SCRIPT_NAME'], $regs);
57+
$this->plug = $regs[2];
58+
$this->name = $regs[3];
5859
includeLocales($this->name, $this->plug);
5960
$this->setTitle($title);
6061
}

inc/function.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,3 @@ function getUrgencyLabelsArray() {
152152
"5" => Ticket::getUrgencyName(5)];
153153
}
154154

155-
156-
function getReportConfigPage($plugin,$report_name) {
157-
return "/plugins/$plugin/report/$report_name/".$report_name.".config".".php";
158-
}

inc/profile.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ function getTabNameForItem(CommonGLPI $item, $withtemplate=0) {
347347
'name' => ['LIKE', 'plugin_reports_%'],
348348
'rights' => 1]]);
349349
foreach ($query as $data_nb) {
350+
toolbox::logdebug("data", $data_nb);
350351
$nb = $data_nb['cpt'];
351352
}
352353
}

0 commit comments

Comments
 (0)