Whitespace and newline nazi.
このコミットが含まれているのは:
コミット
2a8222b383
|
@ -8,18 +8,29 @@ use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
class CategoryController extends Controller {
|
class CategoryController extends Controller {
|
||||||
public function getCategories() { // /api/rpc/category/getcategories
|
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
|
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
|
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
|
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 {
|
class FileController extends Controller {
|
||||||
public function getAllFiles() { // /api/rpc/file/getallfiles
|
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
|
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
|
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
|
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
|
public function getNewFiles() { // /api/rpc/file/getnewfiles
|
||||||
|
@ -42,10 +53,16 @@ class FileController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFile($id) { // /api/rpc/file/getfile/id
|
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
|
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
|
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
|
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
|
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 {
|
class PermissionController extends Controller {
|
||||||
public function getPermissionsFromModule() { // /api/rpc/permission/getpermissionsfrommodule
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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 {
|
class UserController extends Controller {
|
||||||
public function getUsers() { // /api/rpc/user/getusers
|
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
|
public function getUser($id) { // /api/rpc/user/getuser/id
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<span v-for="item in items">
|
<span v-for="item in items">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<a :href="'/entry/' + item.id">
|
<a :href="'/entry/' + item.id">
|
||||||
<img :src="'/assets/store/' + item.id + '/screens/1.png'" width="100px" height="100px" />
|
<img :src="'/assets/store/' + item.id + '/screens/1.png'" width="100px" height="100px" />
|
||||||
<br />
|
<br />
|
||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</a>
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<a href="/profile/0">
|
<a href="/profile/0">
|
||||||
Name
|
Name
|
||||||
</a>
|
</a>
|
||||||
<br />
|
<br />
|
||||||
Downloads: {{ item.downloads }}
|
Downloads: {{ item.downloads }}
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -25,18 +25,18 @@
|
||||||
name: 'hot-items',
|
name: 'hot-items',
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
items: []
|
items: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
axios.get('/api/rpc/file/gethotfiles').then(data => {
|
axios.get('/api/rpc/file/gethotfiles').then(data => {
|
||||||
data.data.forEach(cb => {
|
data.data.forEach(cb => {
|
||||||
this.items.push({
|
this.items.push({
|
||||||
'id': cb.id,
|
'id': cb.id,
|
||||||
'title': cb.title,
|
'title': cb.title,
|
||||||
'downloads': cb.downloads
|
'downloads': cb.downloads
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,6 @@
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.col {
|
.col {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -1,21 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<span v-for="item in items">
|
<span v-for="item in items">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<a :href="'/entry/' + item.id">
|
<a :href="'/entry/' + item.id">
|
||||||
<img :src="'/assets/store/' + item.id + '/screens/1.png'" width="100px" height="100px" />
|
<img :src="'/assets/store/' + item.id + '/screens/1.png'" width="100px" height="100px" />
|
||||||
<br />
|
<br />
|
||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</a>
|
</a>
|
||||||
<br />
|
<br />
|
||||||
<a href="/profile/0">
|
<a href="/profile/0">
|
||||||
Name
|
Name
|
||||||
</a>
|
</a>
|
||||||
<br />
|
<br />
|
||||||
{{ item.submit_date }}
|
{{ item.submit_date }}
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -26,18 +26,18 @@
|
||||||
name: 'new-items',
|
name: 'new-items',
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
items: []
|
items: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
axios.get('/api/rpc/file/getnewfiles').then(data => {
|
axios.get('/api/rpc/file/getnewfiles').then(data => {
|
||||||
data.data.forEach(cb => {
|
data.data.forEach(cb => {
|
||||||
this.items.push({
|
this.items.push({
|
||||||
'id': cb.id,
|
'id': cb.id,
|
||||||
'title': cb.title,
|
'title': cb.title,
|
||||||
'submit_date': moment.unix(cb.submit_date).format("YYYY/MM/DD")
|
'submit_date': moment.unix(cb.submit_date).format("YYYY/MM/DD")
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,6 @@
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.col {
|
.col {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -8,13 +8,12 @@
|
||||||
<div class="panel-heading">@lang('homepage.newitems')</div>
|
<div class="panel-heading">@lang('homepage.newitems')</div>
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
@if (session('status'))
|
<!-- @if (session('status'))
|
||||||
<div class="alert alert-success">
|
<div class="alert alert-success">
|
||||||
{{ session('status') }}
|
{{ session('status') }}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif -->
|
||||||
|
<new-items />
|
||||||
<new-items />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
|
|
|
@ -64,17 +64,17 @@ Route::get('/api/rpc/user/getuser/{id}', 'UserController@getUser');
|
||||||
// Localization
|
// Localization
|
||||||
Route::get('/js/lang.js', function () {
|
Route::get('/js/lang.js', function () {
|
||||||
$strings = Cache::rememberForever('lang.js', function () {
|
$strings = Cache::rememberForever('lang.js', function () {
|
||||||
$lang = config('app.locale');
|
$lang = config('app.locale');
|
||||||
|
|
||||||
$files = glob(resource_path('lang/' . $lang . '/*.php'));
|
$files = glob(resource_path('lang/' . $lang . '/*.php'));
|
||||||
$strings = [];
|
$strings = [];
|
||||||
|
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
$name = basename($file, '.php');
|
$name = basename($file, '.php');
|
||||||
$strings[$name] = require $file;
|
$strings[$name] = require $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $strings;
|
return $strings;
|
||||||
});
|
});
|
||||||
|
|
||||||
header('Content-Type: text/javascript');
|
header('Content-Type: text/javascript');
|
||||||
|
|
新しいイシューから参照