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
12b8a13b
Commit
12b8a13b
authored
Aug 22, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(model) remove namespace from Constraints type
parent
c85f821c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
BaseField.php
...nse/mvc/app/models/OPNsense/Base/FieldTypes/BaseField.php
+1
-1
Proxy.xml
src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml
+2
-2
TestModel.xml
...vc/tests/app/models/OPNsense/Base/BaseModel/TestModel.xml
+2
-2
No files found.
src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/BaseField.php
View file @
12b8a13b
...
@@ -372,7 +372,7 @@ abstract class BaseField
...
@@ -372,7 +372,7 @@ abstract class BaseField
$constraint
=
$this
->
internalConstraints
[
$name
];
$constraint
=
$this
->
internalConstraints
[
$name
];
if
(
!
empty
(
$constraint
[
'type'
]))
{
if
(
!
empty
(
$constraint
[
'type'
]))
{
try
{
try
{
$constr_class
=
new
\ReflectionClass
(
$constraint
[
'type'
]);
$constr_class
=
new
\ReflectionClass
(
'OPNsense\\Base\\Constraints\\'
.
$constraint
[
'type'
]);
if
(
$constr_class
->
getParentClass
()
->
name
==
'OPNsense\Base\Constraints\BaseConstraint'
)
{
if
(
$constr_class
->
getParentClass
()
->
name
==
'OPNsense\Base\Constraints\BaseConstraint'
)
{
$constraint
[
'name'
]
=
$name
;
$constraint
[
'name'
]
=
$name
;
$constraint
[
'node'
]
=
$this
;
$constraint
[
'node'
]
=
$this
;
...
...
src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml
View file @
12b8a13b
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
<Constraints>
<Constraints>
<check001>
<check001>
<ValidationMessage>
Both throttling parameters should either be filled or empty
</ValidationMessage>
<ValidationMessage>
Both throttling parameters should either be filled or empty
</ValidationMessage>
<type>
OPNsense\Base\Constraints\
AllOrNoneConstraint
</type>
<type>
AllOrNoneConstraint
</type>
<addFields>
<addFields>
<field1>
perHostTrotteling
</field1>
<field1>
perHostTrotteling
</field1>
</addFields>
</addFields>
...
@@ -307,7 +307,7 @@
...
@@ -307,7 +307,7 @@
<Constraints>
<Constraints>
<check001>
<check001>
<ValidationMessage>
Filename should be unique
</ValidationMessage>
<ValidationMessage>
Filename should be unique
</ValidationMessage>
<type>
OPNsense\Base\Constraints\
UniqueConstraint
</type>
<type>
UniqueConstraint
</type>
</check001>
</check001>
</Constraints>
</Constraints>
</filename>
</filename>
...
...
src/opnsense/mvc/tests/app/models/OPNsense/Base/BaseModel/TestModel.xml
View file @
12b8a13b
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<Constraints>
<Constraints>
<check001>
<check001>
<ValidationMessage>
number should be unique
</ValidationMessage>
<ValidationMessage>
number should be unique
</ValidationMessage>
<type>
OPNsense\Base\Constraints\
UniqueConstraint
</type>
<type>
UniqueConstraint
</type>
<addFields>
<addFields>
<field1>
optfield
</field1>
<field1>
optfield
</field1>
</addFields>
</addFields>
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<Constraints>
<Constraints>
<check001>
<check001>
<ValidationMessage>
All fields should contain data or none of them
</ValidationMessage>
<ValidationMessage>
All fields should contain data or none of them
</ValidationMessage>
<type>
OPNsense\Base\Constraints\
AllOrNoneConstraint
</type>
<type>
AllOrNoneConstraint
</type>
<addFields>
<addFields>
<field2>
value2
</field2>
<field2>
value2
</field2>
<field3>
value3
</field3>
<field3>
value3
</field3>
...
...
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