Unverified Commit 3eb6ab46 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(simpleplugin) Call update on all tabs instead of only current one.

Calling update method is usually cheap, and tabs may update in reaction
 to changes in other tabs, so it’s better to update all tabs instead of
 only last and current ones. It will improve behavior of webservice as
 well.

issue #6159
Showing with 3 additions and 4 deletions
+3 -4
...@@ -241,12 +241,11 @@ class simpleTabs implements FusionDirectoryDialog ...@@ -241,12 +241,11 @@ class simpleTabs implements FusionDirectoryDialog
public function update (): bool public function update (): bool
{ {
if (($this->last != $this->current) && ($this->last != '')) { /* Call update on all tabs as they may react to changes in other tabs */
$this->by_object[$this->last]->update(); foreach ($this->by_object as $key => $obj) {
  • :warning: Remove this unused "$key" local variable. :blue_book:

    By sonar gitlab-ci on 2021-04-27T09:10:50 (imported from GitLab)

Please register or sign in to reply
$obj->update();
} }
$this->by_object[$this->current]->update();
return TRUE; return TRUE;
} }
......
  • SonarQube analysis reported 1 issue

    • :warning: 1 major

    Watch the comments in this conversation to review them.

    By sonar gitlab-ci on 2021-04-27T09:10:51 (imported from GitLab)

Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment