|
@@ 296-310 (lines=15) @@
|
| 293 |
|
/** |
| 294 |
|
* @inheritdoc |
| 295 |
|
*/ |
| 296 |
|
public function onExpansionGroupAddUser(Group $group, $loginAdded) |
| 297 |
|
{ |
| 298 |
|
$group = $group->getName(); |
| 299 |
|
|
| 300 |
|
// User was added to group, need to display all manialinks of the group to this user |
| 301 |
|
if (isset($this->displayeds[$group])) { |
| 302 |
|
foreach ($this->displayeds[$group] as $mlId => $manialink) { |
| 303 |
|
$this->individualQueu[$mlId][$loginAdded] = $manialink; |
| 304 |
|
|
| 305 |
|
if (isset($this->hideIndividualQueu[$mlId]) && isset($this->hideIndividualQueu[$mlId][$loginAdded])) { |
| 306 |
|
unset ($this->hideIndividualQueu[$mlId][$loginAdded]); |
| 307 |
|
} |
| 308 |
|
} |
| 309 |
|
} |
| 310 |
|
} |
| 311 |
|
|
| 312 |
|
/** |
| 313 |
|
* @inheritdoc |
|
@@ 315-329 (lines=15) @@
|
| 312 |
|
/** |
| 313 |
|
* @inheritdoc |
| 314 |
|
*/ |
| 315 |
|
public function onExpansionGroupRemoveUser(Group $group, $loginRemoved) |
| 316 |
|
{ |
| 317 |
|
$group = $group->getName(); |
| 318 |
|
|
| 319 |
|
// User was removed from group, need to hide all manialinks of the group to this user |
| 320 |
|
if (isset($this->displayeds[$group])) { |
| 321 |
|
foreach ($this->displayeds[$group] as $mlId => $manialink) { |
| 322 |
|
$this->hideIndividualQueu[$mlId][$loginRemoved] = $manialink; |
| 323 |
|
|
| 324 |
|
if (isset($this->individualQueu[$mlId]) && isset($this->individualQueu[$mlId][$loginRemoved])) { |
| 325 |
|
unset ($this->individualQueu[$mlId][$loginRemoved]); |
| 326 |
|
} |
| 327 |
|
} |
| 328 |
|
} |
| 329 |
|
} |
| 330 |
|
|
| 331 |
|
/** |
| 332 |
|
* @inheritdoc |