diff options
author | Andrew Dolgov <[email protected]> | 2017-04-26 20:57:36 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-04-26 20:57:36 +0300 |
commit | 21ce7d9ec02b0bf7c6e0ac7c28bc7c1bb0a841c5 (patch) | |
tree | 2a784cf4c91abe828b42e79a886c2cc0f80df5e2 /plugins/instances/init.php | |
parent | ea79a0e033e40057279a7f464c9464145eedc932 (diff) |
update phpmd ruleset to use (subset) of cleancode
fix various minor issues reported by static analysis
remove redundant php closing tag from several more files
Diffstat (limited to 'plugins/instances/init.php')
-rw-r--r-- | plugins/instances/init.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/instances/init.php b/plugins/instances/init.php index 643475dca..7b65d6d4a 100644 --- a/plugins/instances/init.php +++ b/plugins/instances/init.php @@ -25,6 +25,9 @@ class Instances extends Plugin implements IHandler { $host->add_hook($host::HOOK_UPDATE_TASK, $this); } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ function hook_update_task($args) { _debug("Get linked feeds..."); $this->get_linked_feeds(); @@ -134,6 +137,9 @@ class Instances extends Plugin implements IHandler { return file_get_contents(dirname(__FILE__) . "/instances.js"); } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ function hook_prefs_tabs($args) { if ($_SESSION["access_level"] >= 10 || SINGLE_USER_MODE) { ?><div id="instanceConfigTab" dojoType="dijit.layout.ContentPane" @@ -148,6 +154,9 @@ class Instances extends Plugin implements IHandler { return array_search($method, $csrf_ignored) !== false; } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ function before($method) { if ($_SESSION["uid"]) { if ($_SESSION["access_level"] < 10) { @@ -171,7 +180,7 @@ class Instances extends Plugin implements IHandler { } function add() { - $id = db_escape_string($_REQUEST["id"]); + //$id = db_escape_string($_REQUEST["id"]); $access_url = db_escape_string($_REQUEST["access_url"]); $access_key = db_escape_string($_REQUEST["access_key"]); @@ -449,4 +458,3 @@ class Instances extends Plugin implements IHandler { } } -?> |