Skip to content

Commit

Permalink
Fix for Editing Submitted Articles on PHP 8
Browse files Browse the repository at this point in the history
For issue #1132
  • Loading branch information
eSilverStrike committed Jun 24, 2022
1 parent 0bdb16c commit b39d99e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions system/classes/article.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -594,11 +594,17 @@ public function loadFromDatabase($sid, $mode = 'edit')
if (!isset($story['owner_id'])) {
$story['owner_id'] = 1;
}
$access = SEC_hasAccess(
$story['owner_id'], $story['group_id'],
$story['perm_owner'], $story['perm_group'],
$story['perm_members'], $story['perm_anon']
);

if ($mode === 'editsubmission') {
// Submissions have no permissions stored with record
$access = 3;
} else {
$access = SEC_hasAccess(
$story['owner_id'], $story['group_id'],
$story['perm_owner'], $story['perm_group'],
$story['perm_members'], $story['perm_anon']
);
}

//$this->_access = min($access, SEC_hasTopicAccess($this->_tid));
//$this->_access = min($access, TOPIC_hasMultiTopicAccess('article', $sid));
Expand Down

0 comments on commit b39d99e

Please sign in to comment.