Changeset 1502

Show
Ignore:
Timestamp:
12/28/11 22:54:53 (17 months ago)
Author:
Torben Brodt
Message:

disable gmap if it is disabled in acp, see #687

Location:
g-map
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • g-map/files/lib/page/MapAjaxPage.class.php

    r1442 r1502  
    167167         */ 
    168168        public function show() { 
     169 
     170                // skip 
     171                if(!MODULE_GMAP) { 
     172                        throw new IllegalLinkException(); 
     173                } 
     174         
    169175                parent::show(); 
    170176                 
  • g-map/files/lib/page/MapPage.class.php

    r1301 r1502  
    7979                return $val; 
    8080        } 
     81 
     82        /** 
     83         * @see Page::show() 
     84         */ 
     85        public function show() { 
     86 
     87                // skip 
     88                if(!MODULE_GMAP) { 
     89                        throw new IllegalLinkException(); 
     90                } 
     91         
     92                parent::show(); 
     93        } 
    8194} 
    8295?> 
  • g-map/files/lib/system/event/listener/GMapUserPageListener.class.php

    r1402 r1502  
    2020 
    2121                // skip 
    22                 if(!WCF::getUser()->getPermission('user.profile.gmap.canViewUsers')) { 
     22                if(!MODULE_GMAP || !WCF::getUser()->getPermission('user.profile.gmap.canViewUsers')) { 
    2323                        return; 
    2424                } 
  • g-map/files/lib/system/event/listener/GMapUserProfileEditFormListener.class.php

    r1445 r1502  
    1717         */ 
    1818        public function execute($eventObj, $className, $eventName) { 
     19 
     20                // skip 
     21                if(!MODULE_GMAP) { 
     22                        return; 
     23                } 
     24 
    1925                $this->eventObj = $eventObj; 
    2026                $this->className = $className; 
  • g-map/groupoptions.xml

    r1404 r1502  
    66                        <category name="user.profile.gmap"> 
    77                                <parent>user.profile</parent> 
     8                                <options>module_gmap</options> 
    89                        </category> 
    910                </categories> 
  • g-map/pagemenu.xml

    r1239 r1502  
    99                        <showorder>10</showorder> 
    1010                        <position>header</position> 
     11                        <options>module_gmap</options> 
    1112                </pagemenuitem> 
    1213        </import>