Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
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
Kulya
OpnSense
Commits
8a01af34
Commit
8a01af34
authored
Jan 04, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mvc: style sweep
parent
9d39f174
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Routing.php
src/opnsense/mvc/app/library/OPNsense/Core/Routing.php
+2
-2
Plugin.php
src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php
+2
-2
No files found.
src/opnsense/mvc/app/library/OPNsense/Core/Routing.php
View file @
8a01af34
...
@@ -73,7 +73,7 @@ class Routing
...
@@ -73,7 +73,7 @@ class Routing
$this
->
router
->
add
(
'/'
,
array
(
"controller"
=>
'index'
,
"action"
=>
'index'
));
$this
->
router
->
add
(
'/'
,
array
(
"controller"
=>
'index'
,
"action"
=>
'index'
));
$this
->
type
=
$type
;
$this
->
type
=
$type
;
switch
(
$this
->
type
){
switch
(
$this
->
type
)
{
case
"ui"
:
case
"ui"
:
$this
->
router
->
setDefaultNamespace
(
'OPNsense\Core'
);
$this
->
router
->
setDefaultNamespace
(
'OPNsense\Core'
);
break
;
break
;
...
@@ -152,7 +152,7 @@ class Routing
...
@@ -152,7 +152,7 @@ class Routing
foreach
(
$module_configs
as
$module_config
)
{
foreach
(
$module_configs
as
$module_config
)
{
foreach
(
glob
(
$module_config
[
'path'
]
.
"/*.php"
)
as
$filename
)
{
foreach
(
glob
(
$module_config
[
'path'
]
.
"/*.php"
)
as
$filename
)
{
// extract controller name and bind static in routing table
// extract controller name and bind static in routing table
$controller
=
strtolower
(
str_replace
(
'Controller.php'
,
''
,
basename
(
$filename
)));
$controller
=
strtolower
(
str_replace
(
'Controller.php'
,
''
,
basename
(
$filename
)));
$this
->
router
->
add
(
"/
{
$module_name
}
/
{
$controller
}
/:action/"
,
array
(
$this
->
router
->
add
(
"/
{
$module_name
}
/
{
$controller
}
/:action/"
,
array
(
"namespace"
=>
$module_config
[
'namespace'
],
"namespace"
=>
$module_config
[
'namespace'
],
"controller"
=>
$controller
,
"controller"
=>
$controller
,
...
...
src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php
View file @
8a01af34
...
@@ -51,7 +51,7 @@ class Plugin
...
@@ -51,7 +51,7 @@ class Plugin
* @param $priority sort order from low to high
* @param $priority sort order from low to high
* @return null
* @return null
*/
*/
public
function
registerAnchor
(
$name
,
$type
=
"fw"
,
$priority
=
0
,
$placement
=
"tail"
)
public
function
registerAnchor
(
$name
,
$type
=
"fw"
,
$priority
=
0
,
$placement
=
"tail"
)
{
{
$anchorKey
=
sprintf
(
"%s.%s.%08d.%08d"
,
$type
,
$placement
,
$priority
,
count
(
$this
->
anchors
));
$anchorKey
=
sprintf
(
"%s.%s.%08d.%08d"
,
$type
,
$placement
,
$priority
,
count
(
$this
->
anchors
));
$this
->
anchors
[
$anchorKey
]
=
$name
;
$this
->
anchors
[
$anchorKey
]
=
$name
;
...
@@ -64,7 +64,7 @@ class Plugin
...
@@ -64,7 +64,7 @@ class Plugin
* @param $priority sort order from low to high
* @param $priority sort order from low to high
* @return string
* @return string
*/
*/
public
function
anchorToText
(
$types
=
"fw"
,
$placement
=
"tail"
)
public
function
anchorToText
(
$types
=
"fw"
,
$placement
=
"tail"
)
{
{
$result
=
""
;
$result
=
""
;
foreach
(
explode
(
','
,
$types
)
as
$type
)
{
foreach
(
explode
(
','
,
$types
)
as
$type
)
{
...
...
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