このコミットが含まれているのは:
テクニカル諏訪子 2020-10-08 10:15:36 +09:00
コミット 7d67c06843
6個のファイルの変更11行の追加8行の削除

ファイルの表示

@ -68,8 +68,10 @@ class Content {
if (count($incomplete) > 0) $err = implode('、', $incomplete).'をご入力下さい。';
// スラッグが既に存在したら、エラーを出て
$sl = DB::table('blg_content')->select('slug')->where('slug', $r->slug)->first();
if ($sl && $sl->slug == $r->slug) $err = 'このスラッグがもう存在しています。';
if (empty($err)) {
$sl = DB::table('blg_content')->select('slug')->where('slug', $r->slug)->first();
if ($sl && $sl->slug == $r->slug) $err = 'このスラッグがもう存在しています。';
}
// エラーがあったら、フォームに戻って。なければ、データベースに保存したり、ページ又はポストへ移転して
if (!empty($err)) return view('pages.site.content.add', ['res' => $res, 'menu' => $this->menu, 'user' => $this->user, 'err' => $err, 'frm' => $frm]);

ファイルの表示

@ -44,8 +44,10 @@ class Game {
if (count($incomplete) > 0) $err = implode('、', $incomplete).'をご入力下さい。';
// スラッグが既に存在したら、エラーを出て
$sl = DB::table('vid_game')->select('slug')->where('slug', $r->slug)->first();
if ($sl && $sl->slug == $r->slug) $err = 'このスラッグがもう存在しています。';
if (empty($err)) {
$sl = DB::table('vid_game')->select('slug')->where('slug', $r->slug)->first();
if ($sl && $sl->slug == $r->slug) $err = 'このスラッグがもう存在しています。';
}
// エラーがあったら、フォームに戻って。なければ、データベースに保存したり、ページ又はポストへ移転して
if (!empty($err)) return view('pages.site.video.game.add', ['res' => $res, 'menu' => $this->menu, 'user' => $this->user, 'err' => $err, 'frm' => $frm]);

ファイルの表示

@ -32,7 +32,7 @@ class Prayer {
$comments = DB::table('blg_comments')->where('video_id', $vid)->orderBy('id', 'asc')->get()->toArray();
$ytslug = explode('?v=', $res->youtube);
$res->ytcomment = $this->getYouTubeCome($ytslug[1]);
$res->ytcomment = (isset($ytslug[1]) ? $this->getYouTubeCome($ytslug[1]) : array());
$res->nicocomment = array();
$res->bccomment = array();

ファイルの表示

@ -26,7 +26,6 @@ Vue.component('delete-game', require('./components/deletegame.vue').default);
Vue.component('discord', require('./components/discord.vue').default);
const app = new Vue({ el: '#app' });
const men = new Vue({ el: '#men' });
/**
* Echo exposes an expressive API for subscribing to channels and listening

ファイルの表示

@ -68,7 +68,7 @@
<script>
export default {
props: { user: Array, slug: '', isvideo: '', comments: Array },
props: { user: Object, slug: '', isvideo: '', comments: Array },
data: function () { return { comment: this.comments, newComment: {}, err: '', loading: true, sending: false } },
computed: {
total: function () {

ファイルの表示

@ -42,7 +42,7 @@
},
watch: { text (x) { localStorage.shotanote = x; } },
methods: {
del () { axios.post('/api/video/del', { slug: this.slug }).then(() => { window.location.href = '/'; }); },
del () { axios.post('/api/video/del', { slug: this.slug }).then(res => { window.location.href = '/video/' + res.data; }); },
onResize: function (x, y, width, height) {
this.x = x
this.y = y