Changeset 343

Show
Ignore:
Timestamp:
03/21/08 18:56:19 (5 years ago)
Author:
d0nut
Message:

bugfixes for group apply mail listener

Location:
groupapplymail/files/lib/system
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • groupapplymail/files/lib/system/cache/CacheBuilderGroupApplyMail.class.php

    r321 r343  
    1717                $data = array(); 
    1818 
    19                 $sql = "SELECT          * 
     19                $sql = "SELECT          notification.* 
    2020                        FROM            wcf".WCF_N."_group_user_option opt 
    2121                        NATURAL JOIN    wcf".WCF_N."_group_user_notification notification 
     
    2525                        $id = $row['userID']; 
    2626                        unset($row['userID']); 
    27                         $data[$id] = $row; 
     27                        if(!isset($data[$id])) { 
     28                                $data[$id] = array(); 
     29                        } 
     30                        $data[$id][] = $row; 
    2831                } 
    2932 
  • groupapplymail/files/lib/system/event/listener/AbstractPageGroupActivityListener.class.php

    r341 r343  
    2828                if(isset($cache[WCF::getUser()->userID])) { 
    2929                        WCF::getTPL()->assign(array( 
    30                                 'groupactions' => $cache[WCF::getUser()->userID] 
     30                                'activities' => $cache[WCF::getUser()->userID] 
    3131                        )); 
    3232 
  • groupapplymail/files/lib/system/event/listener/UserGroupApplicationDeleteMailListener.class.php

    r341 r343  
    2121                WCF::getDB()->sendQuery($sql); 
    2222                 
    23                 // update cache 
    24                 WCF::getCache()->clear(WBB_DIR.'cache', 'cache.groupapplymail.php'); 
    25                 WCF::getCache()->addResource('groupapplymail',  
    26                         WCF_DIR.'cache/cache.groupapplymail.php', 
    27                         WCF_DIR.'lib/system/cache/CacheBuilderGroupApplyMail.class.php'); 
    28  
    2923                $sql = "INSERT INTO     wcf".WCF_N."_group_user_notification  
    3024                                        (userID, groupID, foreignID, messageType, slot1, slot2) 
     
    4640                        )"; 
    4741                WCF::getDB()->sendQuery($sql); 
     42                 
     43                // update cache 
     44                WCF::getCache()->clear(WCF_DIR.'cache', 'cache.groupapplymail.php', true); 
    4845        } 
    4946} 
  • groupapplymail/files/lib/system/event/listener/UserGroupApplyMailListener.class.php

    r322 r343  
    4343                } 
    4444                 
    45                 if($i > 0) { 
    46                         // update cache 
    47                         WCF::getCache()->clear(WBB_DIR.'cache', 'cache.groupapplymail.php'); 
    48                         WCF::getCache()->addResource('groupapplymail',  
    49                                 WCF_DIR.'cache/cache.groupapplymail.php', 
    50                                 WCF_DIR.'lib/system/cache/CacheBuilderGroupApplyMail.class.php'); 
    51                 } 
     45                // update cache 
     46                WCF::getCache()->clear(WCF_DIR.'cache', 'cache.groupapplymail.php', true); 
    5247                 
    5348                // enable user language 
     
    6257                $applicationID = $this->eventObj->group->groupID == 6 ? $this->eventObj->applicationID : "0"; 
    6358         
    64                 $sql = "INSERT INTO     wcf".WCF_N."_group_user_notification 
     59                $sql = "REPLACE INTO    wcf".WCF_N."_group_user_notification 
    6560                                        (userID, groupID, foreignID, messageType, slot1) 
    6661                        VALUES          (