Skip to content

Commit

Permalink
fix for marketplace and clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
yllen committed Sep 15, 2022
1 parent a8584b4 commit 8e0ccf2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
7 changes: 4 additions & 3 deletions inc/autoreport.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ class PluginReportsAutoReport {

function __construct($title='') {

preg_match('@/plugins/(.*)/report/(.*)/@', $_SERVER['SCRIPT_NAME'], $regs);
$this->plug = $regs[1];
$this->name = $regs[2];

preg_match('@/(plugins|marketplace)/(.*)/report/(.*)/@', $_SERVER['SCRIPT_NAME'], $regs);
$this->plug = $regs[2];
$this->name = $regs[3];
includeLocales($this->name, $this->plug);
$this->setTitle($title);
}
Expand Down
4 changes: 0 additions & 4 deletions inc/function.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,3 @@ function getUrgencyLabelsArray() {
"5" => Ticket::getUrgencyName(5)];
}


function getReportConfigPage($plugin,$report_name) {
return "/plugins/$plugin/report/$report_name/".$report_name.".config".".php";
}
1 change: 1 addition & 0 deletions inc/profile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ function getTabNameForItem(CommonGLPI $item, $withtemplate=0) {
'name' => ['LIKE', 'plugin_reports_%'],
'rights' => 1]]);
foreach ($query as $data_nb) {
toolbox::logdebug("data", $data_nb);
$nb = $data_nb['cpt'];
}
}
Expand Down

0 comments on commit 8e0ccf2

Please sign in to comment.