Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Remove dead code in tasks. Translation strings that are not yet trans… #2394

Merged
merged 5 commits into from
Jan 5, 2018

Conversation

wawax
Copy link

@wawax wawax commented Dec 27, 2017

  • Clean unused methods
  • Use constants for tasks related states
  • Translate hardcoded strings in tasks logs

@wawax wawax added this to the 9.1+2.0 milestone Dec 27, 2017
@wawax wawax self-assigned this Dec 27, 2017
@wawax wawax requested a review from ddurieux December 27, 2017 14:48
@wawax wawax mentioned this pull request Dec 27, 2017
@wawax wawax requested review from trasher and orthagh January 4, 2018 09:40
$pfImportExport = new PluginFusioninventorySnmpmodelImportExport();
$errors .= $pfImportExport->import_netdiscovery($a_CONTENT, $p_DEVICEID);
if (isset($a_CONTENT['AGENT']['END'])) {
if ((isset($a_CONTENT['DICO'])) AND ($a_CONTENT['DICO'] == "REQUEST")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really do not know how to be sure this is still used

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was an old behavior of the agent:it had an auto update mechanism for network discovery mapping file. If the agent had a outdated version, the server would send a message to stop the process. Next time, the server would send the new file to the agent and the process could continue.
If was complicated and frustrating for the user, it has been removed a long time ago.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, thank you for the explanations :)

$pfAgentmodule = new PluginFusioninventoryAgentmodule();
$array1 = $pfAgentmodule->getAgentsCanDo(strtoupper($module));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum... Maybe the original way was better for perfs

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right I've reverted this modification

Copy link
Contributor

@trasher trasher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me; jjst see my comments


case 3:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is also something that is no longer used now?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this taskjoblog state has never been used...

@@ -530,19 +447,18 @@ function dropdownAction($myname, $actiontype, $method, $actiontypeid, $value=0,
* @return array [id integed agent id] => $name value agent name
*/
function getAgents($module) {

$array = [];
$array[".1"] = " ".__('Auto managenement dynamic of agents', 'fusioninventory');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another old thing not longer used?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it was an old task feature that has been deprecated during the task rework

@wawax wawax merged commit 833b23f into fusioninventory:glpi9.2 Jan 5, 2018
wawax pushed a commit that referenced this pull request Jan 5, 2018
#2394)

* Remove dead code in tasks. 
* Translation for strings that are not yet translated. 
* Use task constants
@wawax wawax deleted the remove_dead_code_discovery branch January 9, 2018 12:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants