Changeset 322

Show
Ignore:
Timestamp:
03/12/08 22:31:38 (5 years ago)
Author:
d0nut
Message:

fixed concept between addresource and clear cache

Location:
groupapplymail/files/lib/system/event/listener
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • groupapplymail/files/lib/system/event/listener/AbstractPageGroupActivityListener.class.php

    r321 r322  
    1919                if(self::$check || WCF::getUser()->userID == 0) return; 
    2020                self::$check = true; 
    21                  
    22                 $data = array(); 
    2321 
    24                 $sql = "SELECT                  * 
    25                         FROM                    wcf".WCF_N."_group_user_notification 
    26                         WHERE                   userID = ".WCF::getUser()->userID; 
    27  
    28                 $result = WCF::getDB()->sendQuery($sql); 
    29                 while ($row = WCF::getDB()->fetchArray($result)) { 
    30                         $data[] = $row; 
    31                 } 
    32                  
    33                 //WCF::getCache()->addResource('groupapplymail',  
    34                 //      WCF_DIR.'cache/cache.groupapplymail.php', 
    35                 //      WCF_DIR.'lib/system/cache/CacheBuilderGroupApplyMail.class.php'); 
     22                WCF::getCache()->addResource('groupapplymail',  
     23                        WCF_DIR.'cache/cache.groupapplymail.php', 
     24                        WCF_DIR.'lib/system/cache/CacheBuilderGroupApplyMail.class.php'); 
    3625                         
    37                 $all = WCF::getCache()->get('groupapplymail'); 
     26                $cache = WCF::getCache()->get('groupapplymail'); 
    3827 
    3928                WCF::getTPL()->assign(array( 
    40                         'groupactions' => $all[WCF::getUser()->userID]; 
     29                        'groupactions' => $cache[WCF::getUser()->userID]; 
    4130                )); 
    4231 
  • groupapplymail/files/lib/system/event/listener/UserGroupApplicationDeleteMailListener.class.php

    r321 r322  
    2222                 
    2323                // update cache 
     24                WCF::getCache()->clear(WBB_DIR.'cache', 'cache.groupapplymail.php'); 
    2425                WCF::getCache()->addResource('groupapplymail',  
    2526                        WCF_DIR.'cache/cache.groupapplymail.php', 
  • groupapplymail/files/lib/system/event/listener/UserGroupApplyMailListener.class.php

    r321 r322  
    4545                if($i > 0) { 
    4646                        // update cache 
     47                        WCF::getCache()->clear(WBB_DIR.'cache', 'cache.groupapplymail.php'); 
    4748                        WCF::getCache()->addResource('groupapplymail',  
    4849                                WCF_DIR.'cache/cache.groupapplymail.php',