Skip to content
GitLab
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
4192aa11
Commit
4192aa11
authored
Mar 01, 2018
by
Cecilia Vela Gurovic
Committed by
Gerrit Code Review
Mar 01, 2018
Browse files
Merge "Bug 1752389: Undefined property: stdClass::$name on upgrade"
parents
beac4400
a1970027
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/upgrade.php
View file @
4192aa11
...
...
@@ -197,7 +197,7 @@ function check_upgrades($name=null) {
}
}
}
$outofsyncplugins
=
array
();
foreach
(
$plugins
as
$plugin
)
{
$plugintype
=
$plugin
[
0
];
$pluginname
=
$plugin
[
1
];
...
...
@@ -309,7 +309,7 @@ function check_upgrades($name=null) {
$toupgrade
[
$pluginkey
]
=
$plugininfo
;
}
else
if
(
$config
->
version
<
$pluginversion
)
{
$plugindisplayname
=
!
empty
(
$plugindisplayname
)
?
$plugindisplayname
:
$config
->
name
;
$plugindisplayname
=
!
empty
(
$plugindisplayname
)
?
$plugindisplayname
:
(
!
empty
(
$config
->
name
)
?
$config
->
name
:
$pluginpath
)
;
if
(
get_config
(
'productionmode'
))
{
throw
new
ConfigSanityException
(
"Database version of Mahara plugin "
.
$plugindisplayname
.
" "
.
$pluginrelease
.
" ("
.
$pluginversion
.
") is newer "
...
...
@@ -317,13 +317,15 @@ function check_upgrades($name=null) {
.
"Please make sure you have the correct Mahara plugin files in place."
);
}
else
{
define
(
'SITEOUTOFSYNC'
,
$plugindisplayname
)
;
$outofsyncplugins
[]
=
$plugindisplayname
;
}
}
}
if
(
!
empty
(
$outofsyncplugins
))
{
define
(
'SITEOUTOFSYNC'
,
implode
(
', '
,
$outofsyncplugins
));
}
// if we've just asked for one, don't return an array...
if
(
!
empty
(
$name
)){
if
(
!
empty
(
$name
))
{
if
(
count
(
$toupgrade
)
==
1
)
{
$upgrade
=
new
StdClass
;
$upgrade
->
name
=
$name
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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