Skip to content

Commit

Permalink
Extend conf, new fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Oct 31, 2023
1 parent 0bdf5e3 commit 8bd836c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ajax/reorder.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
$old_order = (int)$_POST['old_order'];
$new_order = (int)$_POST['new_order'];

/** @var DBmysql $DB */
global $DB;

// Retrieve id of field to update
$field_iterator = $DB->request(
[
Expand Down
2 changes: 1 addition & 1 deletion front/commondropdown.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

include "../../../inc/includes.php";
if (preg_match('/[a-z]/i', $_REQUEST['ddtype']) !== 1) {
throw new \RuntimeException(sprintf('Invalid itemtype "%"', $_REQUEST['ddtype']));
throw new \RuntimeException(sprintf('Invalid itemtype "%1$s"', $_REQUEST['ddtype']));
}
$path = PLUGINFIELDS_FRONT_PATH . '/' . $_REQUEST['ddtype'] . '.form.php';
require_once $path;
2 changes: 1 addition & 1 deletion front/commondropdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

include "../../../inc/includes.php";
if (preg_match('/[a-z]/i', $_REQUEST['ddtype']) !== 1) {
throw new \RuntimeException(sprintf('Invalid itemtype "%"', $_REQUEST['ddtype']));
throw new \RuntimeException(sprintf('Invalid itemtype "%1$s"', $_REQUEST['ddtype']));
}
$path = PLUGINFIELDS_FRONT_PATH . '/' . $_REQUEST['ddtype'] . '.php';
require_once $path;
1 change: 1 addition & 0 deletions hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ function plugin_fields_rule_matched($params = [])

switch ($params['sub_type']) {
case "PluginFusioninventoryTaskpostactionRule":
/** @phpstan-ignore-next-line */
$agent = new PluginFusioninventoryAgent();

if (isset($params['input']['plugin_fusioninventory_agents_id'])) {
Expand Down
3 changes: 3 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ parameters:
- setup.php
paths:
- inc
- front
- ajax
- hook.php
scanDirectories:
- ../../inc
- ../../src
Expand Down

0 comments on commit 8bd836c

Please sign in to comment.