Changeset 360

Show
Ignore:
Timestamp:
03/30/08 14:08:35 (5 years ago)
Author:
MDMAN
Message:

update-function added, new version of the file MoreVisitorsPage?.class.php and moreVisitors.tpl

Location:
profile.lastvisitors
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • profile.lastvisitors/files/lib/page/MoreVisitorsPage.class.php

    r358 r360  
    1919        public function readParameters() { 
    2020                parent::readParameters(); 
    21          
     21                 
    2222                if (isset($_GET['profileID'])) $this->profileID = intval($_GET['profileID']); 
    2323         
    24                 // hier werde die Daten von den Besuchern des Profils geladen 
    25                 $sql = "SELECT  * 
    26                         FROM    wcf".WCF_N."_profile_lastvisitors 
    27                         WHERE   profileID = ".$this->profileID."         
    28                         ORDER BY        time DESC 
    29                         LIMIT 0 , ".SHOW_LASTVISITOR_MOREVISITORS_AMOUNT; 
    30                 $result = WCF::getDB()->sendQuery($sql); 
    31                 while ($row = WCF::getDB()->fetchArray($result)) { 
    32                         $this->visitors[] = $row; 
     24                if ($this->profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS == 1 && SHOW_LASTVISITOR == 1 && SHOW_LASTVISITOR_ALLUSERS == 1 || $this->profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS == 1 && SHOW_LASTVISITOR == 1 && SHOW_LASTVISITOR_ALLUSERS != 1 && $this->user->userID == $profileID || $this->profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS == 1 && $this->user->getPermission('admin.profile.lastvisitor.canseeboxes')){ 
     25 
     26                        // hier werde die Daten von den Besuchern des Profils geladen 
     27                        $sql = "SELECT  * 
     28                                FROM    wcf".WCF_N."_profile_lastvisitors 
     29                                WHERE   profileID = ".$this->profileID."         
     30                                ORDER BY        time DESC 
     31                                LIMIT 0 , ".SHOW_LASTVISITOR_MOREVISITORS_AMOUNT; 
     32                        $result = WCF::getDB()->sendQuery($sql); 
     33                        while ($row = WCF::getDB()->fetchArray($result)) { 
     34                                $this->visitors[] = $row; 
     35                        } 
     36                 
     37                        // hier wird der Username des Profilinhabers geladen. 
     38                        $sql = "SELECT username 
     39                                FROM    wcf".WCF_N."_user 
     40                                WHERE   userID = ".$this->profileID; 
     41                        $this->user = WCF::getDB()->getFirstRow($sql); 
    3342                } 
    34                  
    35                 // hier wird der Username des Profilinhabers geladen. 
    36                 $sql = "SELECT username 
    37                         FROM    wcf".WCF_N."_user 
    38                         WHERE   userID = ".$this->profileID; 
    39                 $this->user = WCF::getDB()->getFirstRow($sql); 
     43                else { 
     44                        require_once(WCF_DIR.'lib/system/exception/PermissionDeniedException.class.php'); 
     45                        throw new PermissionDeniedException(); 
     46                }                
    4047        } 
    4148         
  • profile.lastvisitors/package.xml

    r358 r360  
    88                <packagedescription>Shows the last profile visitors in the user profile.</packagedescription> 
    99                <packagedescription language="de"><![CDATA[Mit diesem PlugIn werden die letzten Besucher im Profil angezeigt.]]></packagedescription> 
    10                 <version>1.1.0</version> 
     10                <version>1.1.1</version> 
    1111                <date>2008-03-30</date> 
    1212                <plugin>com.woltlab.wcf</plugin> 
     
    3535                <eventlistener>eventlistener.xml</eventlistener> 
    3636        </instructions> 
     37         
     38        <instructions type="update" fromversion="1.1.0"> 
     39                <files>files.tar</files> 
     40                <templates>templates.tar</templates> 
     41        </instructions> 
    3742</package> 
  • profile.lastvisitors/templates/moreVisitors.tpl

    r358 r360  
    77</head> 
    88<body> 
    9 {if $profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS == 1 && SHOW_LASTVISITOR == 1 && SHOW_LASTVISITOR_ALLUSERS == 1 || $profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS == 1 && SHOW_LASTVISITOR == 1 && SHOW_LASTVISITOR_ALLUSERS != 1 && $this->user->userID == $profileID || $profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS == 1 && $this->user->getPermission('admin.profile.lastvisitor.canseeboxes')} 
    109        <div id="main"> 
    1110                <ul class="breadCrumbs"> 
     
    5453        {@$largeButtons} 
    5554 
    56 {else} 
    57         <br/> 
    58         <p class="error">{lang}wcf.global.error.permissionDenied{/lang}</p> 
    59 {/if} 
    60  
    6155{include file='footer' sandbox=false} 
    6256</body>