mirror of
https://github.com/WerySkok/nativegallery.git
synced 2024-11-14 19:19:15 +03:00
fix photo view by photomoderator
This commit is contained in:
parent
ebcfe7720b
commit
0c14aeb391
2 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,7 @@ use \App\Models\User;
|
|||
<th class="c">Никнейм</th>
|
||||
<th class="c">Почта</th>
|
||||
<th class="c">Прямая загрузка</th>
|
||||
<th class="c">Ссылка</th>
|
||||
<th class="c"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -29,6 +30,7 @@ use \App\Models\User;
|
|||
<td class="cs">'.$u['username'].'</td>
|
||||
<td class="cs">'.$u['email'].'</td>
|
||||
<td class="cs">'.$prem.'</td>
|
||||
<td class="cs"><a href="https://'.$_SERVER['SERVER_NAME'].'/author/'.$u['id'].'">https://'.$_SERVER['SERVER_NAME'].'/author/'.$u['id'].'</a></td>
|
||||
<td class="cs"><div class="cmt-submit"><a href="/admin?type=UserEdit&user_id='.$u['id'].'">Редактировать</a></div></td>
|
||||
</tr>';
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ $photo = new \App\Models\Photo($id);
|
|||
if ($photo->i('id') !== null) {
|
||||
$photouser = new \App\Models\User($photo->i('user_id'));
|
||||
if ($photo->i('moderated') === 0) {
|
||||
if ($photo->i('user_id') === Auth::userid()) {
|
||||
if ($photo->i('user_id') === Auth::userid() || $user->i('admin') > 0) {
|
||||
$moderated = true;
|
||||
} else {
|
||||
$moderated = false;
|
||||
|
|
Loading…
Reference in a new issue