|
@@ 337-351 (lines=15) @@
|
| 334 |
|
/** |
| 335 |
|
* @inheritdoc |
| 336 |
|
*/ |
| 337 |
|
public function onExpansionGroupAddUser(Group $group, $loginAdded) |
| 338 |
|
{ |
| 339 |
|
$group = $group->getName(); |
| 340 |
|
|
| 341 |
|
// User was added to group, need to display all manialinks of the group to this user |
| 342 |
|
if (isset($this->displayeds[$group])) { |
| 343 |
|
foreach ($this->displayeds[$group] as $mlId => $manialink) { |
| 344 |
|
$this->individualQueu[$mlId][$loginAdded] = $manialink; |
| 345 |
|
|
| 346 |
|
if (isset($this->hideIndividualQueu[$mlId]) && isset($this->hideIndividualQueu[$mlId][$loginAdded])) { |
| 347 |
|
unset ($this->hideIndividualQueu[$mlId][$loginAdded]); |
| 348 |
|
} |
| 349 |
|
} |
| 350 |
|
} |
| 351 |
|
} |
| 352 |
|
|
| 353 |
|
/** |
| 354 |
|
* @inheritdoc |
|
@@ 356-370 (lines=15) @@
|
| 353 |
|
/** |
| 354 |
|
* @inheritdoc |
| 355 |
|
*/ |
| 356 |
|
public function onExpansionGroupRemoveUser(Group $group, $loginRemoved) |
| 357 |
|
{ |
| 358 |
|
$group = $group->getName(); |
| 359 |
|
|
| 360 |
|
// User was removed from group, need to hide all manialinks of the group to this user |
| 361 |
|
if (isset($this->displayeds[$group])) { |
| 362 |
|
foreach ($this->displayeds[$group] as $mlId => $manialink) { |
| 363 |
|
$this->hideIndividualQueu[$mlId][$loginRemoved] = $manialink; |
| 364 |
|
|
| 365 |
|
if (isset($this->individualQueu[$mlId]) && isset($this->individualQueu[$mlId][$loginRemoved])) { |
| 366 |
|
unset ($this->individualQueu[$mlId][$loginRemoved]); |
| 367 |
|
} |
| 368 |
|
} |
| 369 |
|
} |
| 370 |
|
} |
| 371 |
|
|
| 372 |
|
/** |
| 373 |
|
* @inheritdoc |