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
9cf468ad
Commit
9cf468ad
authored
May 12, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mvc: three more of those count() thingies
(cherry picked from commit
84a99758
)
parent
4c627928
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
8 deletions
+5
-8
ControllerBase.php
...ense/mvc/app/controllers/OPNsense/Base/ControllerBase.php
+2
-3
InterfaceController.php
...trollers/OPNsense/Diagnostics/Api/InterfaceController.php
+2
-4
ACL.php
src/opnsense/mvc/app/models/OPNsense/Core/ACL.php
+1
-1
No files found.
src/opnsense/mvc/app/controllers/OPNsense/Base/ControllerBase.php
View file @
9cf468ad
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
/**
/**
* Copyright (C) 2015 Deciso B.V.
* Copyright (C) 2015 Deciso B.V.
*
* All rights reserved.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* Redistribution and use in source and binary forms, with or without
...
@@ -25,8 +24,8 @@
...
@@ -25,8 +24,8 @@
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* POSSIBILITY OF SUCH DAMAGE.
*
*/
*/
namespace
OPNsense\Base
;
namespace
OPNsense\Base
;
use
OPNsense\Core\Config
;
use
OPNsense\Core\Config
;
...
@@ -200,7 +199,7 @@ class ControllerBase extends ControllerRoot
...
@@ -200,7 +199,7 @@ class ControllerBase extends ControllerRoot
$this
->
view
->
menuSystem
=
$menu
->
getItems
(
"/ui"
.
$this
->
router
->
getRewriteUri
());
$this
->
view
->
menuSystem
=
$menu
->
getItems
(
"/ui"
.
$this
->
router
->
getRewriteUri
());
// set theme in ui_theme template var, let template handle its defaults (if there is no theme).
// set theme in ui_theme template var, let template handle its defaults (if there is no theme).
if
(
$cnf
->
object
()
->
theme
!=
null
&&
!
empty
(
$cnf
->
object
()
->
theme
)
&&
if
(
$cnf
->
object
()
->
theme
->
count
()
>
0
&&
!
empty
(
$cnf
->
object
()
->
theme
)
&&
is_dir
(
'/usr/local/opnsense/www/themes/'
.
(
string
)
$cnf
->
object
()
->
theme
)
is_dir
(
'/usr/local/opnsense/www/themes/'
.
(
string
)
$cnf
->
object
()
->
theme
)
)
{
)
{
$this
->
view
->
ui_theme
=
$cnf
->
object
()
->
theme
;
$this
->
view
->
ui_theme
=
$cnf
->
object
()
->
theme
;
...
...
src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/Api/InterfaceController.php
View file @
9cf468ad
<?php
<?php
/**
/**
* Copyright (C) 2016 Deciso B.V.
* Copyright (C) 2016 Deciso B.V.
*
* All rights reserved.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* Redistribution and use in source and binary forms, with or without
...
@@ -24,10 +24,8 @@
...
@@ -24,10 +24,8 @@
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* POSSIBILITY OF SUCH DAMAGE.
*
*/
*/
namespace
OPNsense\Diagnostics\Api
;
namespace
OPNsense\Diagnostics\Api
;
use
\OPNsense\Base\ApiControllerBase
;
use
\OPNsense\Base\ApiControllerBase
;
...
@@ -45,7 +43,7 @@ class InterfaceController extends ApiControllerBase
...
@@ -45,7 +43,7 @@ class InterfaceController extends ApiControllerBase
// collect interface names
// collect interface names
$intfmap
=
array
();
$intfmap
=
array
();
$config
=
Config
::
getInstance
()
->
object
();
$config
=
Config
::
getInstance
()
->
object
();
if
(
$config
->
interfaces
!=
null
)
{
if
(
$config
->
interfaces
->
count
()
>
0
)
{
foreach
(
$config
->
interfaces
->
children
()
as
$key
=>
$node
)
{
foreach
(
$config
->
interfaces
->
children
()
as
$key
=>
$node
)
{
$intfmap
[(
string
)
$node
->
if
]
=
!
empty
((
string
)
$node
->
descr
)
?
(
string
)
$node
->
descr
:
$key
;
$intfmap
[(
string
)
$node
->
if
]
=
!
empty
((
string
)
$node
->
descr
)
?
(
string
)
$node
->
descr
:
$key
;
}
}
...
...
src/opnsense/mvc/app/models/OPNsense/Core/ACL.php
View file @
9cf468ad
...
@@ -135,7 +135,7 @@ class ACL
...
@@ -135,7 +135,7 @@ class ACL
// gather user / group data from config.xml
// gather user / group data from config.xml
$config
=
Config
::
getInstance
()
->
object
();
$config
=
Config
::
getInstance
()
->
object
();
if
(
$config
->
system
!=
null
)
{
if
(
$config
->
system
->
count
()
>
0
)
{
foreach
(
$config
->
system
->
children
()
as
$key
=>
$node
)
{
foreach
(
$config
->
system
->
children
()
as
$key
=>
$node
)
{
if
(
$key
==
'user'
)
{
if
(
$key
==
'user'
)
{
$this
->
legacyUsers
[
$node
->
name
->
__toString
()]
=
array
();
$this
->
legacyUsers
[
$node
->
name
->
__toString
()]
=
array
();
...
...
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