Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
22e11b4e
Unverified
Commit
22e11b4e
authored
Jul 11, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CS: PSR1/2
parent
1d2a3df4
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
23 additions
and
19 deletions
+23
-19
DeleteModuleCommand.php
Modules/Core/Console/DeleteModuleCommand.php
+4
-1
DownloadModuleCommand.php
Modules/Core/Console/DownloadModuleCommand.php
+7
-4
ThemeAssets.php
Modules/Core/Console/Installers/Scripts/ThemeAssets.php
+1
-1
Downloader.php
Modules/Core/Downloader/Downloader.php
+3
-1
MediaMultipleDirective.php
Modules/Media/Blade/MediaMultipleDirective.php
+1
-1
MediaSingleDirective.php
Modules/Media/Blade/MediaSingleDirective.php
+1
-1
2016_01_26_102307_update_icon_column_on_menuitems_table.php
...16_01_26_102307_update_icon_column_on_menuitems_table.php
+1
-1
SidebarExtender.php
Modules/Page/Sidebar/SidebarExtender.php
+0
-2
TaggableTrait.php
Modules/Tag/Traits/TaggableTrait.php
+2
-2
TranslationController.php
...ranslation/Http/Controllers/Api/TranslationController.php
+0
-1
PermissionsRemoverTest.php
Modules/User/Tests/Permissions/PermissionsRemoverTest.php
+1
-1
SentinelUserRepositoryTest.php
Modules/User/Tests/SentinelUserRepositoryTest.php
+0
-1
config.php
Modules/Workshop/Config/config.php
+2
-2
No files found.
Modules/Core/Console/DeleteModuleCommand.php
View file @
22e11b4e
...
@@ -5,8 +5,8 @@ namespace Modules\Core\Console;
...
@@ -5,8 +5,8 @@ namespace Modules\Core\Console;
use
Illuminate\Console\Command
;
use
Illuminate\Console\Command
;
use
Illuminate\Filesystem\Filesystem
;
use
Illuminate\Filesystem\Filesystem
;
use
Modules\User\Permissions\PermissionsRemover
;
use
Modules\User\Permissions\PermissionsRemover
;
use
Symfony\Component\Console\Input\InputOption
;
use
Symfony\Component\Console\Input\InputArgument
;
use
Symfony\Component\Console\Input\InputArgument
;
use
Symfony\Component\Console\Input\InputOption
;
class
DeleteModuleCommand
extends
Command
class
DeleteModuleCommand
extends
Command
{
{
...
@@ -50,6 +50,7 @@ class DeleteModuleCommand extends Command
...
@@ -50,6 +50,7 @@ class DeleteModuleCommand extends Command
}
}
if
(
$this
->
confirm
(
"Are you sure you wish to delete the [
$module
] module
{
$extra
}
?"
)
===
false
)
{
if
(
$this
->
confirm
(
"Are you sure you wish to delete the [
$module
] module
{
$extra
}
?"
)
===
false
)
{
$this
->
info
(
'Nothing was deleted'
);
$this
->
info
(
'Nothing was deleted'
);
return
;
return
;
}
}
...
@@ -57,11 +58,13 @@ class DeleteModuleCommand extends Command
...
@@ -57,11 +58,13 @@ class DeleteModuleCommand extends Command
if
(
$this
->
finder
->
exists
(
$modulePath
)
===
false
)
{
if
(
$this
->
finder
->
exists
(
$modulePath
)
===
false
)
{
$this
->
error
(
'This module does not exist'
);
$this
->
error
(
'This module does not exist'
);
return
;
return
;
}
}
if
(
is_core_module
(
$module
)
===
true
)
{
if
(
is_core_module
(
$module
)
===
true
)
{
$this
->
error
(
'You cannot remove a core module.'
);
$this
->
error
(
'You cannot remove a core module.'
);
return
;
return
;
}
}
...
...
Modules/Core/Console/DownloadModuleCommand.php
View file @
22e11b4e
...
@@ -4,8 +4,8 @@ namespace Modules\Core\Console;
...
@@ -4,8 +4,8 @@ namespace Modules\Core\Console;
use
Illuminate\Console\Command
;
use
Illuminate\Console\Command
;
use
Modules\Core\Downloader\Downloader
;
use
Modules\Core\Downloader\Downloader
;
use
Symfony\Component\Console\Input\InputOption
;
use
Symfony\Component\Console\Input\InputArgument
;
use
Symfony\Component\Console\Input\InputArgument
;
use
Symfony\Component\Console\Input\InputOption
;
use
Symfony\Component\Process\Process
;
use
Symfony\Component\Process\Process
;
class
DownloadModuleCommand
extends
Command
class
DownloadModuleCommand
extends
Command
...
@@ -39,6 +39,7 @@ class DownloadModuleCommand extends Command
...
@@ -39,6 +39,7 @@ class DownloadModuleCommand extends Command
$downloader
->
download
(
$this
->
argument
(
'name'
));
$downloader
->
download
(
$this
->
argument
(
'name'
));
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
$this
->
output
->
writeln
(
"<error>
{
$e
->
getMessage
()
}
</error>"
);
$this
->
output
->
writeln
(
"<error>
{
$e
->
getMessage
()
}
</error>"
);
return
;
return
;
}
}
...
@@ -46,7 +47,7 @@ class DownloadModuleCommand extends Command
...
@@ -46,7 +47,7 @@ class DownloadModuleCommand extends Command
$composer
=
$this
->
findComposer
();
$composer
=
$this
->
findComposer
();
$commands
=
[
$commands
=
[
$composer
.
' dump-autoload'
,
$composer
.
' dump-autoload'
,
];
];
if
(
$this
->
option
(
'migrations'
)
===
true
||
$this
->
option
(
'demo'
)
===
true
)
{
if
(
$this
->
option
(
'migrations'
)
===
true
||
$this
->
option
(
'demo'
)
===
true
)
{
$commands
[]
=
"php artisan module:migrate
$name
"
;
$commands
[]
=
"php artisan module:migrate
$name
"
;
...
@@ -100,6 +101,7 @@ class DownloadModuleCommand extends Command
...
@@ -100,6 +101,7 @@ class DownloadModuleCommand extends Command
if
(
str_contains
(
$package
,
'/'
)
===
false
)
{
if
(
str_contains
(
$package
,
'/'
)
===
false
)
{
throw
new
\Exception
(
'You need to use vendor/name structure'
);
throw
new
\Exception
(
'You need to use vendor/name structure'
);
}
}
return
studly_case
(
substr
(
strrchr
(
$package
,
'/'
),
1
));
return
studly_case
(
substr
(
strrchr
(
$package
,
'/'
),
1
));
}
}
...
@@ -110,9 +112,10 @@ class DownloadModuleCommand extends Command
...
@@ -110,9 +112,10 @@ class DownloadModuleCommand extends Command
*/
*/
protected
function
findComposer
()
protected
function
findComposer
()
{
{
if
(
file_exists
(
getcwd
()
.
'/composer.phar'
))
{
if
(
file_exists
(
getcwd
()
.
'/composer.phar'
))
{
return
'"'
.
PHP_BINARY
.
'" composer.phar'
;
return
'"'
.
PHP_BINARY
.
'" composer.phar'
;
}
}
return
'composer'
;
return
'composer'
;
}
}
}
}
Modules/Core/Console/Installers/Scripts/ThemeAssets.php
View file @
22e11b4e
...
@@ -5,7 +5,7 @@ namespace Modules\Core\Console\Installers\Scripts;
...
@@ -5,7 +5,7 @@ namespace Modules\Core\Console\Installers\Scripts;
use
Illuminate\Console\Command
;
use
Illuminate\Console\Command
;
use
Modules\Core\Console\Installers\SetupScript
;
use
Modules\Core\Console\Installers\SetupScript
;
class
ThemeAssets
implements
SetupScript
class
ThemeAssets
implements
SetupScript
{
{
/**
/**
* Fire the install script
* Fire the install script
...
...
Modules/Core/Downloader/Downloader.php
View file @
22e11b4e
...
@@ -53,6 +53,7 @@ class Downloader
...
@@ -53,6 +53,7 @@ class Downloader
if
(
$this
->
finder
->
isDirectory
(
$directory
)
===
true
)
{
if
(
$this
->
finder
->
isDirectory
(
$directory
)
===
true
)
{
$this
->
output
->
writeln
(
"<error>The folder [Modules/
{
$this
->
extractPackageNameFrom
(
$package
)
}
] already exists.</error>"
);
$this
->
output
->
writeln
(
"<error>The folder [Modules/
{
$this
->
extractPackageNameFrom
(
$package
)
}
] already exists.</error>"
);
return
;
return
;
}
}
...
@@ -99,7 +100,7 @@ class Downloader
...
@@ -99,7 +100,7 @@ class Downloader
$progress
->
setFormat
(
'[%bar%] %elapsed:6s%'
);
$progress
->
setFormat
(
'[%bar%] %elapsed:6s%'
);
$response
=
(
new
Client
)
->
get
(
$latestVersionUrl
,
[
$response
=
(
new
Client
)
->
get
(
$latestVersionUrl
,
[
'progress'
=>
function
(
$downloadTotal
,
$downloadedBytes
,
$uploadTotal
,
$uploadedBytes
)
use
(
$progress
)
{
'progress'
=>
function
(
$downloadTotal
,
$downloadedBytes
,
$uploadTotal
,
$uploadedBytes
)
use
(
$progress
)
{
$progress
->
advance
();
$progress
->
advance
();
},
},
]);
]);
...
@@ -159,6 +160,7 @@ class Downloader
...
@@ -159,6 +160,7 @@ class Downloader
if
(
str_contains
(
$package
,
'/'
)
===
false
)
{
if
(
str_contains
(
$package
,
'/'
)
===
false
)
{
throw
new
\Exception
(
'You need to use vendor/name structure'
);
throw
new
\Exception
(
'You need to use vendor/name structure'
);
}
}
return
studly_case
(
substr
(
strrchr
(
$package
,
'/'
),
1
));
return
studly_case
(
substr
(
strrchr
(
$package
,
'/'
),
1
));
}
}
...
...
Modules/Media/Blade/MediaMultipleDirective.php
View file @
22e11b4e
...
@@ -31,7 +31,7 @@ class MediaMultipleDirective
...
@@ -31,7 +31,7 @@ class MediaMultipleDirective
view
()
->
composer
(
$view
,
PartialAssetComposer
::
class
);
view
()
->
composer
(
$view
,
PartialAssetComposer
::
class
);
$zone
=
$this
->
zone
;
$zone
=
$this
->
zone
;
$name
=
$this
->
name
?:
ucwords
(
str_replace
(
'_'
,
' '
,
$this
->
zone
));
$name
=
$this
->
name
?:
ucwords
(
str_replace
(
'_'
,
' '
,
$this
->
zone
));
if
(
$this
->
entity
!==
null
)
{
if
(
$this
->
entity
!==
null
)
{
...
...
Modules/Media/Blade/MediaSingleDirective.php
View file @
22e11b4e
...
@@ -31,7 +31,7 @@ class MediaSingleDirective
...
@@ -31,7 +31,7 @@ class MediaSingleDirective
view
()
->
composer
(
$view
,
PartialAssetComposer
::
class
);
view
()
->
composer
(
$view
,
PartialAssetComposer
::
class
);
$zone
=
$this
->
zone
;
$zone
=
$this
->
zone
;
$name
=
$this
->
name
?:
ucwords
(
str_replace
(
'_'
,
' '
,
$this
->
zone
));
$name
=
$this
->
name
?:
ucwords
(
str_replace
(
'_'
,
' '
,
$this
->
zone
));
if
(
$this
->
entity
!==
null
)
{
if
(
$this
->
entity
!==
null
)
{
...
...
Modules/Menu/Database/Migrations/2016_01_26_102307_update_icon_column_on_menuitems_table.php
View file @
22e11b4e
...
@@ -25,7 +25,7 @@ class UpdateIconColumnOnMenuitemsTable extends Migration
...
@@ -25,7 +25,7 @@ class UpdateIconColumnOnMenuitemsTable extends Migration
public
function
down
()
public
function
down
()
{
{
Schema
::
table
(
'menu__menuitems'
,
function
(
Blueprint
$table
)
{
Schema
::
table
(
'menu__menuitems'
,
function
(
Blueprint
$table
)
{
$table
->
string
(
'icon'
)
->
default
(
''
)
->
nullable
(
false
)
->
change
();
$table
->
string
(
'icon'
)
->
default
(
''
)
->
nullable
(
false
)
->
change
();
});
});
}
}
}
}
Modules/Page/Sidebar/SidebarExtender.php
View file @
22e11b4e
...
@@ -2,11 +2,9 @@
...
@@ -2,11 +2,9 @@
namespace
Modules\Page\Sidebar
;
namespace
Modules\Page\Sidebar
;
use
Maatwebsite\Sidebar\Badge
;
use
Maatwebsite\Sidebar\Group
;
use
Maatwebsite\Sidebar\Group
;
use
Maatwebsite\Sidebar\Item
;
use
Maatwebsite\Sidebar\Item
;
use
Maatwebsite\Sidebar\Menu
;
use
Maatwebsite\Sidebar\Menu
;
use
Modules\Page\Repositories\PageRepository
;
use
Modules\User\Contracts\Authentication
;
use
Modules\User\Contracts\Authentication
;
class
SidebarExtender
implements
\Maatwebsite\Sidebar\SidebarExtender
class
SidebarExtender
implements
\Maatwebsite\Sidebar\SidebarExtender
...
...
Modules/Tag/Traits/TaggableTrait.php
View file @
22e11b4e
...
@@ -137,8 +137,8 @@ trait TaggableTrait
...
@@ -137,8 +137,8 @@ trait TaggableTrait
$tag
=
$this
->
createTagsModel
()
->
where
(
'namespace'
,
$this
->
getEntityClassName
())
$tag
=
$this
->
createTagsModel
()
->
where
(
'namespace'
,
$this
->
getEntityClassName
())
->
with
(
'translations'
)
->
with
(
'translations'
)
->
whereHas
(
'translations'
,
function
(
Builder
$q
)
use
(
$name
)
{
->
whereHas
(
'translations'
,
function
(
Builder
$q
)
use
(
$name
)
{
$q
->
where
(
'slug'
,
$this
->
generateTagSlug
(
$name
));
$q
->
where
(
'slug'
,
$this
->
generateTagSlug
(
$name
));
})
->
first
();
})
->
first
();
if
(
$tag
===
null
)
{
if
(
$tag
===
null
)
{
$tag
=
new
Tag
([
$tag
=
new
Tag
([
...
...
Modules/Translation/Http/Controllers/Api/TranslationController.php
View file @
22e11b4e
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
namespace
Modules\Translation\Http\Controllers\Api
;
namespace
Modules\Translation\Http\Controllers\Api
;
use
Cartalyst\Sentinel\Laravel\Facades\Sentinel
;
use
Cartalyst\Sentinel\Laravel\Facades\Sentinel
;
use
Illuminate\Database\Eloquent\Collection
;
use
Illuminate\Database\Eloquent\Collection
;
use
Illuminate\Http\Request
;
use
Illuminate\Http\Request
;
...
...
Modules/User/Tests/Permissions/PermissionsRemoverTest.php
View file @
22e11b4e
...
@@ -28,7 +28,7 @@ class PermissionsRemoverTest extends BaseUserTestCase
...
@@ -28,7 +28,7 @@ class PermissionsRemoverTest extends BaseUserTestCase
$this
->
user
->
create
([
$this
->
user
->
create
([
'email'
=>
'n.widart@gmail.com'
,
'email'
=>
'n.widart@gmail.com'
,
'password'
=>
'demo1234'
,
'password'
=>
'demo1234'
,
'permissions'
=>
[
'dashboard.index'
=>
true
,
'user.users.index'
=>
true
,
'user.users.create'
=>
true
,]
'permissions'
=>
[
'dashboard.index'
=>
true
,
'user.users.index'
=>
true
,
'user.users.create'
=>
true
,]
,
]);
]);
$this
->
app
->
config
->
set
(
'asgard.user.permissions'
,
[
$this
->
app
->
config
->
set
(
'asgard.user.permissions'
,
[
'user.users'
=>
[
'user.users'
=>
[
...
...
Modules/User/Tests/SentinelUserRepositoryTest.php
View file @
22e11b4e
...
@@ -156,7 +156,6 @@ class SentinelUserRepositoryTest extends BaseUserTestCase
...
@@ -156,7 +156,6 @@ class SentinelUserRepositoryTest extends BaseUserTestCase
'password'
=>
'demo1234'
,
'password'
=>
'demo1234'
,
],
[
'User'
]);
],
[
'User'
]);
$hasher
=
app
(
'sentinel.hasher'
);
$hasher
=
app
(
'sentinel.hasher'
);
$this
->
assertTrue
(
$hasher
->
check
(
'demo1234'
,
$userOne
->
password
));
$this
->
assertTrue
(
$hasher
->
check
(
'demo1234'
,
$userOne
->
password
));
...
...
Modules/Workshop/Config/config.php
View file @
22e11b4e
...
@@ -7,12 +7,12 @@ return [
...
@@ -7,12 +7,12 @@ return [
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| You can specify place from which you would like to use stubs.
| You can specify place from which you would like to use stubs.
| e.g. "Modules/<module-name>/Resources/views/stubs"
| e.g. "Modules/<module-name>/Resources/views/stubs"
| Only the customized stubs need to be in this folder.
| Only the customized stubs need to be in this folder.
| All other stubs will be loaded from Workshop Module folder.
| All other stubs will be loaded from Workshop Module folder.
| No custom stubs folder: null
| No custom stubs folder: null
*/
*/
'custom-stubs-folder'
=>
null
,
'custom-stubs-folder'
=>
null
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Custom Sidebar Class
| Custom Sidebar Class
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment