Show
Ignore:
Timestamp:
07/18/08 23:36:22 (5 years ago)
Author:
MDMAN
Message:

newnew version added for application.register

Files:
1 modified

Legend:

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

    r510 r604  
    1616         */ 
    1717        public function execute($eventObj, $className, $eventName) { 
    18                 $sql = "SELECT wcf".WCF_N."_group_application.* FROM wcf".WCF_N."_group_application 
    19                                 LEFT JOIN wcf".WCF_N."_group_application_notification 
    20                                 ON wcf".WCF_N."_group_application.applicationID = wcf".WCF_N."_group_application_notification.applicationID 
    21                                 AND wcf".WCF_N."_group_application_notification.userID = ".WCF::getUser()->userID." 
    22                                 WHERE wcf".WCF_N."_group_application_notification.applicationID IS NULL 
    23                                 AND wcf".WCF_N."_group_application.groupID IN ( 
    24                                                                 SELECT  groupID 
    25                                                                 FROM    wcf".WCF_N."_group_leader 
    26                                                                 WHERE   userID = ".WCF::getUser()->userID." 
    27                                                                 ) 
    28                                 AND wcf".WCF_N."_group_application.applicationStatus = 0 
    29                                 "; 
     18                 
     19                if (APPLICATION_INFO_ENABLE == 1) { 
     20                         
     21                        $sql = "SELECT wcf".WCF_N."_group_application.* FROM wcf".WCF_N."_group_application 
     22                                        LEFT JOIN wcf".WCF_N."_group_application_notification 
     23                                        ON wcf".WCF_N."_group_application.applicationID = wcf".WCF_N."_group_application_notification.applicationID 
     24                                        AND wcf".WCF_N."_group_application_notification.userID = ".WCF::getUser()->userID." 
     25                                        WHERE wcf".WCF_N."_group_application_notification.applicationID IS NULL 
     26                                        AND wcf".WCF_N."_group_application.groupID IN ( 
     27                                                                        SELECT  groupID 
     28                                                                        FROM    wcf".WCF_N."_group_leader 
     29                                                                        WHERE   userID = ".WCF::getUser()->userID." 
     30                                                                        ) 
     31                                        AND wcf".WCF_N."_group_application.applicationStatus = 0 
     32                                        "; 
    3033 
    31                 $res = WCF::getDB()->sendQuery($sql); 
    32                 $count = WCF::getDB()->countRows($res); 
     34                        $res = WCF::getDB()->sendQuery($sql); 
     35                        $count = WCF::getDB()->countRows($res); 
    3336 
    34                 if ($count >= 1){ 
    35                 //Hier werden die Variablen im Template registriert 
    36                         WCF::getTPL()->assign(array( 
     37                        if ($count >= 1){ 
     38                        //Hier werden die Variablen im Template registriert 
     39                                WCF::getTPL()->assign(array( 
    3740                 'count' => $count, 
    38             )); 
    39         //Hier wird das Template in dem Platzhalter userMessages integriert. 
    40                         if (strpos(WCF::getTPL()->get('userMessages'), WCF::getTPL()->fetch('applicationRegister')) === false) { 
    41                                 WCF::getTPL()->append('userMessages', WCF::getTPL()->fetch('applicationRegister')); 
     41                )); 
     42                //Hier wird das Template in dem Platzhalter userMessages integriert. 
     43                                if (strpos(WCF::getTPL()->get('userMessages'), WCF::getTPL()->fetch('applicationRegister')) === false) { 
     44                                        WCF::getTPL()->append('userMessages', WCF::getTPL()->fetch('applicationRegister')); 
     45                                } 
    4246                        } 
    43  
    4447                } 
    45  
    4648        } 
    47  
    4849} 
    4950?>