Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
07f2b0f5
Commit
07f2b0f5
authored
Nov 21, 2017
by
Robert Lyon
Committed by
Gerrit Code Review
Nov 21, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Bug 1724724: clear caches on site upgrade"
parents
9ec81780
2c8ec618
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
16 deletions
+7
-16
htdocs/admin/cli/upgrade.php
htdocs/admin/cli/upgrade.php
+3
-0
htdocs/admin/upgrade.json.php
htdocs/admin/upgrade.json.php
+0
-3
htdocs/admin/upgrade.php
htdocs/admin/upgrade.php
+2
-13
htdocs/lib/mahara.php
htdocs/lib/mahara.php
+2
-0
No files found.
htdocs/admin/cli/upgrade.php
View file @
07f2b0f5
...
...
@@ -45,6 +45,9 @@ if (empty($upgrades['settings']['toupgradecount'])) {
// Check for issues which would pose problems during upgrade
ensure_upgrade_sanity
();
// Clear all caches
clear_all_caches
();
// Actually perform the upgrade
log_info
(
get_string
(
'cliupgradingmahara'
,
'admin'
));
foreach
(
$upgrades
as
$name
=>
$data
)
{
...
...
htdocs/admin/upgrade.json.php
View file @
07f2b0f5
...
...
@@ -63,9 +63,6 @@ if ($install) {
}
if
(
!
empty
(
$upgrade
))
{
// clear out menu cache to allow upgraded site to remake cached menus
clear_menu_cache
();
if
(
!
empty
(
$upgrade
->
errormsg
))
{
$data
[
'newversion'
]
=
$upgrade
->
torelease
.
' ('
.
$upgrade
->
to
.
')'
;
$data
[
'install'
]
=
false
;
...
...
htdocs/admin/upgrade.php
View file @
07f2b0f5
...
...
@@ -98,19 +98,8 @@ $successicon = 'icon icon-check text-success left';
$failureicon
=
'icon icon-exclamation-triangle left'
;
$warningicon
=
'icon icon-exclamation-triangle left'
;
// Remove all files in the dwoo cache
require_once
(
'file.php'
);
$basedir
=
get_config
(
'dataroot'
)
.
'dwoo/compile/'
;
$dh
=
new
DirectoryIterator
(
$basedir
);
foreach
(
$dh
as
$themedir
)
{
if
(
$themedir
->
isDot
())
continue
;
$themedirname
=
$basedir
.
$themedir
->
getFilename
();
rmdirr
(
$themedirname
);
clearstatcache
();
check_dir_exists
(
$themedirname
);
}
// Clear all caches.
clear_all_caches
();
$loadingstring
=
json_encode
(
get_string
(
'upgradeloading'
,
'admin'
));
$installsuccessstring
=
json_encode
(
get_string
(
'installsuccess'
,
'admin'
));
...
...
htdocs/lib/mahara.php
View file @
07f2b0f5
...
...
@@ -5130,6 +5130,8 @@ function clear_all_caches($clearsessiondirs = false) {
}
}
clearstatcache
();
handle_event
(
'clearcaches'
,
array
());
$result
=
true
;
...
...
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