HomeHelpTrac

Changeset 15852 for tags


Ignore:
Timestamp:
01/08/12 19:26:50 (5 months ago)
Author:
Alexander Trofimov
Message:

Ticket #2717

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/7.0/modules/boonex/forum/classes/Forum.php

    r15617 r15852  
    346346        if (!$allow_edit && $r['user'] == $this->_getLoginUserName()) 
    347347        { 
    348             if ($this->_checkUserPerm ($r['user'], 'own', 'edit', $forum_id) && !$this->_isEditTimeout($r['post_id'])) 
     348            if ($this->_checkUserPerm ($r['user'], 'own', 'edit', $forum_id) && !$this->_isEditTimeout($r['post_id']) && !$t['topic_locked']) 
    349349                $allow_edit = 1; 
    350350        }            
     
    352352        if (!$allow_del && $r['user'] == $this->_getLoginUserName()) 
    353353        { 
    354             if ($this->_checkUserPerm ($r['user'], 'own', 'del', $forum_id) && !$this->_isEditTimeout($r['post_id'])) 
     354            if ($this->_checkUserPerm ($r['user'], 'own', 'del', $forum_id) && !$this->_isEditTimeout($r['post_id']) && !$t['topic_locked']) 
    355355                $allow_del = 1; 
    356356        }            
     
    493493            if (!$allow_edit && $r['user'] == $u) 
    494494            { 
    495                 if ($this->_checkUserPerm ($r['user'], 'own', 'edit', $forum_id) && !$this->_isEditTimeout($r['post_id'])) 
     495                if ($this->_checkUserPerm ($r['user'], 'own', 'edit', $forum_id) && !$this->_isEditTimeout($r['post_id']) && !$t['topic_locked']) 
    496496                    $allow_edit = 1; 
    497497            }            
     
    499499            if (!$allow_del && $r['user'] == $u) 
    500500            { 
    501                 if ($this->_checkUserPerm ($r['user'], 'own', 'del', $forum_id) && !$this->_isEditTimeout($r['post_id'])) 
     501                if ($this->_checkUserPerm ($r['user'], 'own', 'del', $forum_id) && !$this->_isEditTimeout($r['post_id']) && !$t['topic_locked']) 
    502502                    $allow_del = 1; 
    503503            }            
     
    11761176                $when = $this->fdb->getPostWhen ((int)$post_id); 
    11771177                $timeout = $GLOBALS['gConf']['edit_timeout'] - (time() - $when);                     
    1178                 $access = $timeout > 10 ? 'allow' : 'deny'; 
     1178                $access = $timeout > 10 && !$t['topic_locked'] ? 'allow' : 'deny'; 
    11791179            } 
    11801180        } 
     
    12191219            $no_access = false; 
    12201220        if ($no_access && $user == $this->_getLoginUserName()) 
    1221             if ($this->_checkUserPerm ('', 'own', 'edit', $t['forum_id']) && !$this->_isEditTimeout((int)$post_id))  
     1221            if ($this->_checkUserPerm ('', 'own', 'edit', $t['forum_id']) && !$this->_isEditTimeout((int)$post_id) && !$t['topic_locked'])  
    12221222                $no_access = false; 
    12231223         
     
    12721272 
    12731273        $f = $this->fdb->getForumByPostId ($post_id); 
     1274        $aTopic = $this->fdb->getTopic ($topic_id); 
    12741275 
    12751276        if ($this->_checkUserPerm ('', $f['forum_type'], 'del', $f['forum_id']))  
    12761277            $no_access = false; 
    12771278        if ($no_access && ($user = $this->fdb->getPostUser((int)$post_id)) == $this->_getLoginUserName()) 
    1278             if ($this->_checkUserPerm ('', 'own', 'del', $f['forum_id']) && !$this->_isEditTimeout((int)$post_id))  
     1279            if ($this->_checkUserPerm ('', 'own', 'del', $f['forum_id']) && !$this->_isEditTimeout((int)$post_id) && !$aTopic['topic_locked']) 
    12791280                $no_access = false; 
    12801281 
     
    12951296 
    12961297        $this->fdb->deletePost ($post_id); 
    1297  
    1298         $aTopic = $this->fdb->getTopic ($topic_id); 
     1298         
    12991299        $exists = $aTopic ? 1 : 0; 
    13001300 
Note: See TracChangeset for help on using the changeset viewer.