Whitespace and newline nazi.

このコミットが含まれているのは:
テクニカル諏訪子 2018-01-24 15:58:21 +01:00
コミット 2a8222b383
9個のファイルの変更141行の追加82行の削除

ファイルの表示

@ -8,18 +8,29 @@ use Illuminate\Support\Facades\Log;
class CategoryController extends Controller {
public function getCategories() { // /api/rpc/category/getcategories
return DB::table('str_category')->select('*')->get();
return DB::table('str_category')
->select('*')
->get();
}
public function getCategory($id) { // /api/rpc/category/getcategory/1
return DB::table('str_category')->select('*')->where('id', $id)->get();
return DB::table('str_category')
->select('*')
->where('id', $id)
->get();
}
public function getCategoryParent($id) { // /api/rpc/category/getcategoryparent/1
return DB::table('str_category')->select('parent_id')->where('id', $id)->get();
return DB::table('str_category')
->select('parent_id')
->where('id', $id)
->get();
}
public function getCategoryMinScreenshots($id) { // /api/rpc/category/getcategoryminscrot/1
return DB::table('str_category')->select('min_screenshots')->where('id', $id)->get();
return DB::table('str_category')
->select('min_screenshots')
->where('id', $id)
->get();
}
}

ファイルの表示

@ -8,19 +8,30 @@ use Illuminate\Support\Facades\Log;
class FileController extends Controller {
public function getAllFiles() { // /api/rpc/file/getallfiles
return DB::table('str_file')->select('*')->get();
return DB::table('str_file')
->select('*')
->get();
}
public function getAllApprovedFiles() { // /api/rpc/file/getallapprovedfiles
return DB::table('str_file')->select('*')->where('isApproved', 1)->get();
return DB::table('str_file')
->select('*')
->where('isApproved', 1)
->get();
}
public function getAllBrokenFiles() { // /api/rpc/file/getallbrokenfiles
return DB::table('str_file')->select('*')->where('isBroken', 1)->get();
return DB::table('str_file')
->select('*')
->where('isBroken', 1)
->get();
}
public function getAllPendingFiles() { // /api/rpc/file/getallpendingfiles
return DB::table('str_file')->select('*')->where('isApproved', 0)->get();
return DB::table('str_file')
->select('*')
->where('isApproved', 0)
->get();
}
public function getNewFiles() { // /api/rpc/file/getnewfiles
@ -42,10 +53,16 @@ class FileController extends Controller {
}
public function getFile($id) { // /api/rpc/file/getfile/id
return DB::table('str_file')->select('*')->where('id', $id)->get();
return DB::table('str_file')
->select('*')
->where('id', $id)
->get();
}
public function getFilesInCategory($cat_id) { // /api/rpc/file/getfilesincategory/cat_id
return DB::table('str_file')->select('*')->where('cat_id', $cat_id)->get();
return DB::table('str_file')
->select('*')
->where('cat_id', $cat_id)
->get();
}
}

ファイルの表示

@ -16,14 +16,23 @@ class OwnerController extends Controller {
}
public function getOwner($id) { // /api/rpc/owner/getowner/id
return DB::table('str_owners')->select('*')->where('id', $id)->get();
return DB::table('str_owners')
->select('*')
->where('id', $id)
->get();
}
public function getOwnerFile($file_id) { // /api/rpc/owner/getownerfile/id
return DB::table('str_owners')->select('*')->where('file_id', $file_id)->get();
return DB::table('str_owners')
->select('*')
->where('file_id', $file_id)
->get();
}
public function getOwnerUser($user_id) { // /api/rpc/owner/getowneruser/id
return DB::table('str_owners')->select('*')->where('user_id', $user_id)->get();
return DB::table('str_owners')
->select('*')
->where('user_id', $user_id)
->get();
}
}

ファイルの表示

@ -8,34 +8,55 @@ use Illuminate\Support\Facades\Log;
class PermissionController extends Controller {
public function getPermissionsFromModule() { // /api/rpc/permission/getpermissionsfrommodule
return DB::table('usr_perm_module')->select('*')->get();
return DB::table('usr_perm_module')
->select('*')
->get();
}
public function getPermissionFromModule($id) { // /api/rpc/permission/getpermissionsfrommodule/id
return DB::table('usr_perm_module')->select('*')->where('id', $id)->get();
return DB::table('usr_perm_module')
->select('*')
->where('id', $id)
->get();
}
public function getStorePermissions() { // /api/rpc/permission/getstorepermissions
return DB::table('str_permissions')->select('*')->get();
return DB::table('str_permissions')
->select('*')
->get();
}
public function getStorePermissionGroup($id) { // /api/rpc/permission/getstorepermissiongroup/id
return DB::table('str_permissions')->select('*')->where('id', $id)->get();
return DB::table('str_permissions')
->select('*')
->where('id', $id)
->get();
}
public function getStorePermissionUser($id) { // /api/rpc/permission/getstorepermissionuser/id
return DB::table('str_user_permissions')->select('*')->where('id', $id)->get();
return DB::table('str_user_permissions')
->select('*')
->where('id', $id)
->get();
}
public function getUserPermissions() { // /api/rpc/permission/getuserpermissions
return DB::table('usr_permissions')->select('*')->get();
return DB::table('usr_permissions')
->select('*')
->get();
}
public function getUserPermissionGroup($id) { // /api/rpc/permission/getuserpermissiongroup/id
return DB::table('usr_permissions')->select('*')->where('id', $id)->get();
return DB::table('usr_permissions')
->select('*')
->where('id', $id)
->get();
}
public function getUserPermissionUser($id) { // /api/rpc/permission/getuserpermissionuser/id
return DB::table('usr_user_permissions')->select('*')->where('id', $id)->get();
return DB::table('usr_user_permissions')
->select('*')
->where('id', $id)
->get();
}
}

ファイルの表示

@ -10,7 +10,9 @@ use Illuminate\Support\Facades\Log;
class UserController extends Controller {
public function getUsers() { // /api/rpc/user/getusers
return DB::table('for_users')->select('*')->get();
return DB::table('for_users')
->select('*')
->get();
}
public function getUser($id) { // /api/rpc/user/getuser/id

ファイルの表示

@ -1,21 +1,21 @@
<template>
<div class="container">
<div class="row">
<span v-for="item in items">
<div class="col-md-2">
<a :href="'/entry/' + item.id">
<img :src="'/assets/store/' + item.id + '/screens/1.png'" width="100px" height="100px" />
<br />
{{ item.title }}
</a>
<br />
<a href="/profile/0">
Name
</a>
<br />
Downloads: {{ item.downloads }}
</div>
</span>
<span v-for="item in items">
<div class="col-md-2">
<a :href="'/entry/' + item.id">
<img :src="'/assets/store/' + item.id + '/screens/1.png'" width="100px" height="100px" />
<br />
{{ item.title }}
</a>
<br />
<a href="/profile/0">
Name
</a>
<br />
Downloads: {{ item.downloads }}
</div>
</span>
</div>
</div>
</template>
@ -25,18 +25,18 @@
name: 'hot-items',
data: function () {
return {
items: []
items: []
}
},
created: function () {
axios.get('/api/rpc/file/gethotfiles').then(data => {
data.data.forEach(cb => {
this.items.push({
'id': cb.id,
'title': cb.title,
'downloads': cb.downloads
});
});
data.data.forEach(cb => {
this.items.push({
'id': cb.id,
'title': cb.title,
'downloads': cb.downloads
});
});
})
}
}
@ -44,6 +44,6 @@
<style>
.col {
text-align: center;
text-align: center;
}
</style>

ファイルの表示

@ -1,21 +1,21 @@
<template>
<div class="container">
<div class="row">
<span v-for="item in items">
<div class="col-md-2">
<a :href="'/entry/' + item.id">
<img :src="'/assets/store/' + item.id + '/screens/1.png'" width="100px" height="100px" />
<br />
{{ item.title }}
</a>
<br />
<a href="/profile/0">
Name
</a>
<br />
{{ item.submit_date }}
</div>
</span>
<span v-for="item in items">
<div class="col-md-2">
<a :href="'/entry/' + item.id">
<img :src="'/assets/store/' + item.id + '/screens/1.png'" width="100px" height="100px" />
<br />
{{ item.title }}
</a>
<br />
<a href="/profile/0">
Name
</a>
<br />
{{ item.submit_date }}
</div>
</span>
</div>
</div>
</template>
@ -26,18 +26,18 @@
name: 'new-items',
data: function () {
return {
items: []
items: []
}
},
created: function () {
axios.get('/api/rpc/file/getnewfiles').then(data => {
data.data.forEach(cb => {
this.items.push({
'id': cb.id,
'title': cb.title,
'submit_date': moment.unix(cb.submit_date).format("YYYY/MM/DD")
});
});
data.data.forEach(cb => {
this.items.push({
'id': cb.id,
'title': cb.title,
'submit_date': moment.unix(cb.submit_date).format("YYYY/MM/DD")
});
});
})
}
}
@ -45,6 +45,6 @@
<style>
.col {
text-align: center;
text-align: center;
}
</style>

ファイルの表示

@ -8,13 +8,12 @@
<div class="panel-heading">@lang('homepage.newitems')</div>
<div class="panel-body">
@if (session('status'))
<!-- @if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
</div>
@endif
<new-items />
@endif -->
<new-items />
</div>
</div>
<div class="panel panel-default">

ファイルの表示

@ -64,17 +64,17 @@ Route::get('/api/rpc/user/getuser/{id}', 'UserController@getUser');
// Localization
Route::get('/js/lang.js', function () {
$strings = Cache::rememberForever('lang.js', function () {
$lang = config('app.locale');
$lang = config('app.locale');
$files = glob(resource_path('lang/' . $lang . '/*.php'));
$strings = [];
$files = glob(resource_path('lang/' . $lang . '/*.php'));
$strings = [];
foreach ($files as $file) {
$name = basename($file, '.php');
$strings[$name] = require $file;
}
foreach ($files as $file) {
$name = basename($file, '.php');
$strings[$name] = require $file;
}
return $strings;
return $strings;
});
header('Content-Type: text/javascript');