Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from Jan 5, 2018

Conversation

Projects
None yet
2 participants
@wawax
Copy link
Member

wawax commented Dec 27, 2017

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

@wawax wawax added the improvement label Dec 27, 2017

@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 Dec 27, 2017

Walid added some commits Dec 27, 2017

Walid

@wawax wawax referenced this pull request Dec 27, 2017

Closed

Remove dead code #2251

@wawax wawax requested review from trasher and orthagh Jan 4, 2018

$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")) {

This comment has been minimized.

@trasher

trasher Jan 4, 2018

Collaborator

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

This comment has been minimized.

@wawax

wawax Jan 4, 2018

Author Member

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.

This comment has been minimized.

@trasher

trasher Jan 4, 2018

Collaborator

OK, thank you for the explanations :)

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

This comment has been minimized.

@trasher

trasher Jan 4, 2018

Collaborator

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

This comment has been minimized.

@wawax

wawax Jan 4, 2018

Author Member

you're right I've reverted this modification

Walid added some commits Jan 4, 2018

Walid
@trasher

trasher approved these changes Jan 4, 2018

Copy link
Collaborator

trasher left a comment

Sounds good to me; jjst see my comments

case 3:

This comment has been minimized.

@trasher

trasher Jan 4, 2018

Collaborator

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

This comment has been minimized.

@wawax

wawax Jan 5, 2018

Author Member

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');

This comment has been minimized.

@trasher

trasher Jan 4, 2018

Collaborator

Another old thing not longer used?

This comment has been minimized.

@wawax

wawax Jan 5, 2018

Author Member

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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

wawax pushed a commit that referenced this pull request Jan 5, 2018

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

* Remove dead code in tasks. 
* Translation for strings that are not yet translated. 
* Use task constants

@wawax wawax deleted the TECLIB:remove_dead_code_discovery branch Jan 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.