mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 11:46:19 +01:00
MDL-45724 cache: fixed warning structure bug
This commit is contained in:
parent
919dc292b9
commit
ed2de2ecc7
6
cache/admin.php
vendored
6
cache/admin.php
vendored
@ -280,7 +280,11 @@ if (!empty($action) && confirm_sesskey()) {
|
||||
}
|
||||
}
|
||||
|
||||
$notifications = array_merge($notifications, cache_helper::warnings($stores));
|
||||
// Add cache store warnings to the list of notifications.
|
||||
// Obviously as these are warnings they are show as failures.
|
||||
foreach (cache_helper::warnings($stores) as $warning) {
|
||||
$notifications[] = array($warning, false);
|
||||
}
|
||||
|
||||
$PAGE->set_title($title);
|
||||
$PAGE->set_heading($SITE->fullname);
|
||||
|
6
cache/classes/store.php
vendored
6
cache/classes/store.php
vendored
@ -372,11 +372,7 @@ abstract class cache_store implements cache_store_interface {
|
||||
* This should be used to notify things like configuration conflicts etc.
|
||||
* The warnings returned here will be displayed on the cache configuration screen.
|
||||
*
|
||||
* @return array[] Returns an array of arrays with the format:
|
||||
* $notifications = array(
|
||||
* array('This is a success message', true),
|
||||
* array('This is a failure message', false),
|
||||
* );
|
||||
* @return string[] An array of warning strings from the store instance.
|
||||
*/
|
||||
public function get_warnings() {
|
||||
return array();
|
||||
|
2
cache/stores/memcache/lib.php
vendored
2
cache/stores/memcache/lib.php
vendored
@ -589,7 +589,7 @@ class cachestore_memcache extends cache_store implements cache_is_configurable {
|
||||
$host = array_shift($bits);
|
||||
$port = (count($bits)) ? array_shift($bits) : '11211';
|
||||
foreach ($this->servers as $server) {
|
||||
if ($server[0] === $host && $server[1] === $port) {
|
||||
if ($server[0] === $host && $server[1] == $port) {
|
||||
$warnings[] = get_string('sessionhandlerconflict', 'cachestore_memcache', $this->my_name());
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user