|
Revision 745, 0.7 kB
(checked in by MDMAN, 4 years ago)
|
|
Snowfall-PlugIn? becomes Version 1.0.7
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | require_once(WCF_DIR.'lib/system/event/EventListener.class.php'); |
|---|
| 3 | |
|---|
| 4 | /* |
|---|
| 5 | * removes the category and menuItem from the UserCPMenu |
|---|
| 6 | * beseitigt im UserCP die Schneefall-PlugIn Optionen, falls entweder das PlugIn generell abgeschaltet |
|---|
| 7 | * wurde, oder die Benutzergruppe keine Rechte besitzt. |
|---|
| 8 | */ |
|---|
| 9 | class UserCPMenuSnowfallListener implements EventListener |
|---|
| 10 | { |
|---|
| 11 | public function execute($eventObj, $className, $eventName) |
|---|
| 12 | { |
|---|
| 13 | if (SNOWFALL_AKTIV == 0 || WCF::getUser()->getPermission('user.snowfall.activation.canseesnow') == 0) |
|---|
| 14 | { |
|---|
| 15 | foreach ($eventObj->options as $id => $option) |
|---|
| 16 | { |
|---|
| 17 | if ($option['categoryName'] == 'settings.display.snowfall') |
|---|
| 18 | unset($eventObj->options[$id]); |
|---|
| 19 | } |
|---|
| 20 | } |
|---|
| 21 | } |
|---|
| 22 | } |
|---|
| 23 | ?> |
|---|