Changeset 411

Show
Ignore:
Timestamp:
04/07/08 17:00:24 (5 years ago)
Author:
MDMAN
Message:

bugfixes in profile.lastvisitors

Location:
profile.lastvisitors
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • profile.lastvisitors/de-informal.xml

    r385 r411  
    1 <?xml version="1.0" encoding="ISO-8859-1"?> 
     1<?xml version="1.0" encoding="UTF-8"?> 
    22<!DOCTYPE language SYSTEM "http://www.woltlab.com/DTDs/language.dtd"> 
    33<language languagecode="de"> 
  • profile.lastvisitors/de.xml

    r385 r411  
    1 <?xml version="1.0" encoding="ISO-8859-1"?> 
     1<?xml version="1.0" encoding="UTF-8"?> 
    22<!DOCTYPE language SYSTEM "http://www.woltlab.com/DTDs/language.dtd"> 
    33<language languagecode="de"> 
  • profile.lastvisitors/en.xml

    r385 r411  
    1 <?xml version="1.0" encoding="ISO-8859-1"?> 
     1<?xml version="1.0" encoding="UTF-8"?> 
    22<!DOCTYPE language SYSTEM "http://www.woltlab.com/DTDs/language.dtd"> 
    33<language languagecode="en"> 
  • profile.lastvisitors/files/lib/page/MoreVisitorsPage.class.php

    r370 r411  
    2020                parent::readParameters(); 
    2121                 
    22                 if (isset($_GET['profileID'])) $this->profileID = intval($_GET['profileID']); 
     22                if (isset($_GET['userID'])) $this->profileID = intval($_GET['userID']); 
    2323         
    2424                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 && WCF::getUser()->userID == $this->profileID || $this->profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS == 1 && WCF::getUser()->getPermission('admin.profile.lastvisitor.canseeboxes')){ 
  • profile.lastvisitors/files/lib/page/MoreVisitorsTabPage.class.php

    r370 r411  
    1616        public $user = array(); 
    1717        public $visitorCount = 0; 
    18  
    19         /** 
    20          * Creates a new UserPage object. 
    21          */ 
    22         public function __construct() { 
    23                 if (WCF::getUser()->userID) { 
    24                         $this->sqlSelects .= 'myBlacklist.blackUserID, myWhitelist.whiteUserID,'; 
    25                         $this->sqlJoins .=      ' LEFT JOIN wcf'.WCF_N.'_user_blacklist myBlacklist 
    26                                                         ON (myBlacklist.userID = '.WCF::getUser()->userID.' AND myBlacklist.blackUserID = user.userID) '. 
    27                                                 ' LEFT JOIN wcf'.WCF_N.'_user_whitelist myWhitelist 
    28                                                         ON (myWhitelist.userID = '.WCF::getUser()->userID.' AND myWhitelist.whiteUserID = user.userID) '; 
    29                 } 
    30                                  
    31                 parent::__construct(); 
    32         } 
    33          
    34         /** 
    35          * @see Page::readParameters() 
    36          */ 
     18        public $userID = 0; 
     19                 
    3720        public function readParameters() { 
    3821                parent::readParameters(); 
    3922                 
    40                 if (isset($_REQUEST['userID'])) $this->userID = intval($_REQUEST['userID']); 
    41                  
    42                 require_once(WCF_DIR.'lib/data/user/UserProfile.class.php'); 
    43                 $this->user = new UserProfile($this->userID, null, null, null, $this->sqlSelects, $this->sqlJoins); 
    44                  
    45                 if (!$this->user->userID) { 
     23                if (isset($_REQUEST['userID'])) $this->profileID = intval($_REQUEST['userID']); 
     24 
     25                if ($this->profileID == 0) { 
    4626                        require_once(WCF_DIR.'lib/system/exception/IllegalLinkException.class.php'); 
    4727                        throw new IllegalLinkException(); 
    4828                } 
    49         } 
    50          
    51         public function readData() { 
    52                 parent::readData(); 
    53                  
    54                 if (isset($_REQUEST['userID'])) $this->profileID = intval($_REQUEST['userID']); 
    55           
     29 
    5630                if ($this->profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS_ONTAB == 1 && SHOW_LASTVISITOR == 1 && SHOW_LASTVISITOR_ALLUSERS == 1 || $this->profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS_ONTAB == 1 && SHOW_LASTVISITOR == 1 && SHOW_LASTVISITOR_ALLUSERS != 1 && $this->user->userID == $profileID || $this->profileID > 0 && SHOW_LASTVISITOR_MOREVISITORS_ONTAB == 1 && $this->user->getPermission('admin.profile.lastvisitor.canseeboxes')){ 
    5731 
     
    9670        public function show() { 
    9771                require_once(WCF_DIR.'lib/page/util/menu/UserProfileMenu.class.php'); 
    98                 UserProfileMenu::getInstance()->userID = $this->userID; 
     72                UserProfileMenu::getInstance()->userID = $this->profileID; 
    9973                UserProfileMenu::getInstance()->setActiveMenuItem('wcf.user.profile.menu.link.profile.lastvisitor'); 
    10074                 
  • profile.lastvisitors/templates/moreVisitorsTab.tpl

    r385 r411  
    2424        <img src="{@RELATIVE_WCF_DIR}icon/userProfileL.png" alt="" /> 
    2525        <div class="headlineContainer"> 
    26                 <h2> {lang}wcf.user.option.profile.lastvisitor.moretitle{/lang}</h2> 
    27                 <p>{lang}wcf.user.option.profile.lastvisitor.moretitle.description{/lang}</p> 
     26                <h2> {lang}wcf.user.option.profile.lastvisitor.moretabtitle{/lang}</h2> 
     27                <p>{lang}wcf.user.option.profile.lastvisitor.moretabtitle.description{/lang}</p> 
    2828        </div> 
    2929</div> 
     
    7777                         
    7878                        {if $additionalContents1|isset}{@$additionalContents1}{/if} 
    79  
    80                         {cycle values='container-1,container-2' print=false advance=false}                                       
     79                                         
     80                        {cycle values='container-1,container-2' print=false advance=false} 
    8181                        <div class="userProfileContent"> 
    8282                                <div class="border"> 
     
    8585                                                <h3 class="containerContent">{lang}wcf.user.profile.lastvisitors.tabcontenttitle{/lang}</h3> 
    8686                                        </div> 
     87 
    8788                                        {foreach from=$visitors item='user'}     
    8889                                                <div class="{cycle}">                                            
    8990                                                        <div class="fieldTitle"><a href="index.php?page=User&userID={$user.userID}{@SID_ARG_2ND}">{$user.username}</a></div> 
    90                                                         <div class="fieldValue">{@$user.time|time}</div>                                                 
     91                                                        <div class="fieldValue">{@$user.time|time}</div> 
    9192                                                </div>   
    92                                         {/foreach}                               
     93                                        {/foreach} 
     94                                                                                 
    9395                                </div> 
    9496                        </div>