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
b27e0269
Commit
b27e0269
authored
Oct 23, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(unittests) previous commit killed the model unit tests
parent
0d4f6eb5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
BaseModel.php
src/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php
+6
-1
No files found.
src/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php
View file @
b27e0269
...
@@ -549,7 +549,12 @@ abstract class BaseModel
...
@@ -549,7 +549,12 @@ abstract class BaseModel
if
(
version_compare
(
$this
->
internal_current_model_version
,
$mig_version
,
'<'
)
&&
if
(
version_compare
(
$this
->
internal_current_model_version
,
$mig_version
,
'<'
)
&&
version_compare
(
$this
->
internal_model_version
,
$mig_version
,
'>='
)
)
{
version_compare
(
$this
->
internal_model_version
,
$mig_version
,
'>='
)
)
{
// execute upgrade action
// execute upgrade action
if
(
!
strstr
(
$filename
,
'/tests/app'
))
{
$mig_classname
=
explode
(
'.'
,
explode
(
'/mvc/app/models'
,
$filename
)[
1
])[
0
];
$mig_classname
=
explode
(
'.'
,
explode
(
'/mvc/app/models'
,
$filename
)[
1
])[
0
];
}
else
{
// unit tests use a different namespace for their models
$mig_classname
=
"/tests"
.
explode
(
'.'
,
explode
(
'/mvc/tests/app/models'
,
$filename
)[
1
])[
0
];
}
$mig_classname
=
str_replace
(
'/'
,
'\\'
,
$mig_classname
);
$mig_classname
=
str_replace
(
'/'
,
'\\'
,
$mig_classname
);
// Phalcon's autoloader uses _ as a directory locator, we need to import these files ourselves
// Phalcon's autoloader uses _ as a directory locator, we need to import these files ourselves
require_once
$filename
;
require_once
$filename
;
...
...
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