Skip to content
Browse files

MDL-28161 precreate htmlpurifier dir when resetting caches

Includes sloppy whitespace fix.
  • Loading branch information...
1 parent 9a49e60 commit 05299908b402103390f2038ea8ba664b6003383a @skodak skodak committed with stronk7
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/moodlelib.php
View
8 lib/moodlelib.php
@@ -1192,6 +1192,10 @@ function purge_all_caches() {
// make sure cache dir is writable, throws exception if not
make_upload_directory('cache');
+ // hack: this script may get called after the purifier was initialised,
+ // but we do not want to verify repeatedly this exists in each call
+ make_upload_directory('cache/htmlpurifier');
+
clearstatcache();
}
@@ -7628,10 +7632,10 @@ function check_browser_version($brand, $version = null) {
}
/**
- * Returns whether a device/browser combination is mobile, tablet, legacy, default or the result of
+ * Returns whether a device/browser combination is mobile, tablet, legacy, default or the result of
* an optional admin specified regular expression. If enabledevicedetection is set to no or not set
* it returns default
- *
+ *
* @return string device type
*/
function get_device_type() {

0 comments on commit 0529990

Please sign in to comment.
Something went wrong with that request. Please try again.