fix bug when showing texture whose uploader was deleted

This commit is contained in:
printempw 2016-11-06 13:22:27 +08:00
parent a77e87288a
commit a51c55f4d8
2 changed files with 7 additions and 6 deletions

View File

@ -95,15 +95,13 @@
<h3 class="box-title">首页配置</h3>
</div><!-- /.box-header -->
<form method="post">
<input type="hidden" name="option" value="adapter">
<input type="hidden" name="option" value="homepage">
<div class="box-body">
<?php
if (isset($_POST['home_pic_url'])) {
if (!isset($_POST['show_footer_copyright'])) $_POST['show_footer_copyright'] = '0';
if (isset($_POST['option']) && $_POST['option'] == "homepage") {
Option::set('home_pic_url', $_POST['home_pic_url']);
Option::set('show_footer_copyright', $_POST['show_footer_copyright']);
Option::set('copyright_text', $_POST['copyright_text']);
echo '<div class="callout callout-success">设置已保存。</div>';
} ?>
<table class="table">

View File

@ -75,8 +75,11 @@
</tr>
<tr>
<td>{{ trans('skinlib.show.uploader') }}</td>
<?php $uploader = app('users')->get($texture->uploader); ?>
@if ($uploader = app('users')->get($texture->uploader))
<td><a href="{{ url('skinlib?filter=user&uid='.$uploader->uid) }}&sort=time">{{ $uploader->getNickName() }}</a></td>
@else
<td><a href="#">{{ trans('general.unexistent-user') }}</a></td>
@endif
</tr>
<tr>
<td>{{ trans('skinlib.show.upload-at') }}</td>