- Timestamp:
- 01/08/12 19:26:50 (5 months ago)
- File:
-
- 1 edited
-
tags/7.0/modules/boonex/forum/classes/Forum.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/7.0/modules/boonex/forum/classes/Forum.php
r15617 r15852 346 346 if (!$allow_edit && $r['user'] == $this->_getLoginUserName()) 347 347 { 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']) 349 349 $allow_edit = 1; 350 350 } … … 352 352 if (!$allow_del && $r['user'] == $this->_getLoginUserName()) 353 353 { 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']) 355 355 $allow_del = 1; 356 356 } … … 493 493 if (!$allow_edit && $r['user'] == $u) 494 494 { 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']) 496 496 $allow_edit = 1; 497 497 } … … 499 499 if (!$allow_del && $r['user'] == $u) 500 500 { 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']) 502 502 $allow_del = 1; 503 503 } … … 1176 1176 $when = $this->fdb->getPostWhen ((int)$post_id); 1177 1177 $timeout = $GLOBALS['gConf']['edit_timeout'] - (time() - $when); 1178 $access = $timeout > 10 ? 'allow' : 'deny';1178 $access = $timeout > 10 && !$t['topic_locked'] ? 'allow' : 'deny'; 1179 1179 } 1180 1180 } … … 1219 1219 $no_access = false; 1220 1220 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']) 1222 1222 $no_access = false; 1223 1223 … … 1272 1272 1273 1273 $f = $this->fdb->getForumByPostId ($post_id); 1274 $aTopic = $this->fdb->getTopic ($topic_id); 1274 1275 1275 1276 if ($this->_checkUserPerm ('', $f['forum_type'], 'del', $f['forum_id'])) 1276 1277 $no_access = false; 1277 1278 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']) 1279 1280 $no_access = false; 1280 1281 … … 1295 1296 1296 1297 $this->fdb->deletePost ($post_id); 1297 1298 $aTopic = $this->fdb->getTopic ($topic_id); 1298 1299 1299 $exists = $aTopic ? 1 : 0; 1300 1300
Note: See TracChangeset
for help on using the changeset viewer.