Show
Ignore:
Timestamp:
03/08/08 16:07:56 (5 years ago)
Author:
d0nut
Message:

... but allow both to be configured for every group

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • application.register/files/lib/system/event/listener/UserGroupAdministrateMailListener.class.php

    r286 r292  
    1515         
    1616        //data 
    17         protected $enabled; 
     17        protected $displayNotification=0, $emailNotification=0; 
    1818 
    1919        /** 
     
    3838         */ 
    3939        protected function readData() { 
    40                 $sql = "SELECT          COUNT(*) AS c 
    41                         FROM            wcf".WCF_N."_groupapplymail 
    42                         WHERE           groupID = '".intval($this->eventObj->groupID)."' 
    43                         AND             userID = '".WCF::getUser()->userID."'"; 
     40                $sql = "SELECT          displayNotification, 
     41                                        emailNotification 
     42                        FROM            wcf".WCF_N."_group_application_mail 
     43                        WHERE           groupID = ".intval($this->eventObj->groupID)." 
     44                        AND             userID = ".WCF::getUser()->userID; 
    4445                $row = WCF::getDB()->getFirstRow($sql); 
    45                 $this->enabled = intval($row['c']); 
     46                if($row) { 
     47                        $this->displayNotification = intval($row['displayNotification']); 
     48                        $this->emailNotification = intval($row['emailNotification']); 
     49                } 
    4650        } 
    4751 
     
    5256                WCF::getTPL()->assign(array( 
    5357                        'groupID' => $this->eventObj->groupID, 
    54                         'enabled' => $this->enabled, 
     58                        'displayl' => $this->displayNotification, 
     59                        'email' => $this->emailNotification, 
    5560                        'groupType' => $this->eventObj->group->groupType 
    5661                ));