Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
d76b79b8
Commit
d76b79b8
authored
Dec 15, 2006
by
Penny Leach
Browse files
added release into required stuff for minupgrade
parent
a5576bd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/upgrade.php
View file @
d76b79b8
...
...
@@ -68,14 +68,17 @@ function check_upgrades($name=null) {
$installing
=
true
;
}
else
if
(
$config
->
version
>
$coreversion
)
{
if
(
isset
(
$config
->
minupgradefrom
)
&&
$coreversion
<
$config
->
minupgradefrom
)
{
throw
new
ConfigSanityException
(
"Must upgrade to
$config->minupgradefrom
first "
.
" (you have
$coreversion
)"
);
$corerelease
=
get_config
(
'release'
);
if
(
isset
(
$config
->
minupgradefrom
)
&&
isset
(
$config
->
minupgraderelease
)
&&
$coreversion
<
$config
->
minupgradefrom
)
{
throw
new
ConfigSanityException
(
"Must upgrade to
$config->minupgradefrom
"
.
"(
$config->minupgraderelease
) first "
.
" (you have
$coreversion
(
$corerelease
)"
);
}
$core
=
new
StdClass
;
$core
->
upgrade
=
true
;
$core
->
from
=
$coreversion
;
$core
->
fromrelease
=
get_config
(
'
release
'
)
;
$core
->
fromrelease
=
$core
release
;
$core
->
to
=
$config
->
version
;
$core
->
torelease
=
$config
->
release
;
$toupgrade
[
'core'
]
=
$core
;
...
...
@@ -151,9 +154,11 @@ function check_upgrades($name=null) {
$toupgrade
[
$pluginkey
]
=
$plugininfo
;
}
else
if
(
$config
->
version
>
$pluginversion
)
{
if
(
isset
(
$config
->
minupgradefrom
)
&&
$pluginversion
<
$config
->
minupgradefrom
)
{
throw
new
ConfigSanityException
(
"Must upgrade to
$config->minupgradefrom
first "
.
" (you have
$pluginversion
)"
);
if
(
isset
(
$config
->
minupgradefrom
)
&&
isset
(
$config
->
minupgraderelease
)
&&
$pluginversion
<
$config
->
minupgradefrom
)
{
throw
new
ConfigSanityException
(
"Must upgrade to
$config->minupgradefrom
"
.
" (
$config->minupgraderelease
) first "
.
" (you have
$pluginversion
(
$pluginrelease
))"
);
}
$plugininfo
=
new
StdClass
;
$plugininfo
->
upgrade
=
true
;
...
...
Write
Preview
Supports
Markdown
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