mirror of
https://github.com/Neetpone/ponepaste.git
synced 2025-03-11 14:10:06 +01:00
fix: fix a couple undefined variable errors
This commit is contained in:
parent
1803631ea9
commit
c7eadd4b0c
2 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ class AbilityHelper {
|
|||
|
||||
return $publicly_visible // Everyone can see public pastes
|
||||
|| ($user !== null && $user->id === $paste->user_id) // Creators of pastes can see their own private pastes
|
||||
|| $user->role >= User::ROLE_MODERATOR; // Moderators and above can see all pastes
|
||||
|| ($user !== null && $user->role >= User::ROLE_MODERATOR); // Moderators and above can see all pastes
|
||||
},
|
||||
'edit' => function(User | null $user, Paste $paste) {
|
||||
return $user !== null
|
||||
|
|
|
@ -155,7 +155,7 @@ $flashes = getFlashes();
|
|||
|
||||
<?php if ($current_user): ?>
|
||||
<div class="hidden" id="js-data-holder" data-user-id="<?= $current_user->id ?>"
|
||||
data-csrf-token="<?= $csrf_token ?>"></div>
|
||||
data-csrf-token="<?= isset($csrf_token) ? $csrf_token : '' ?>"></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="#signin" class="modal modal-fx-fadeInScale">
|
||||
|
|
Loading…
Add table
Reference in a new issue