Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 21... Línea 21...
21
 * @package    core
21
 * @package    core
22
 * @copyright  2010 Petr Skoda {@link http://skodak.org}
22
 * @copyright  2010 Petr Skoda {@link http://skodak.org}
23
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24
 */
24
 */
Línea -... Línea 25...
-
 
25
 
-
 
26
define('IGNORE_COMPONENT_CACHE', true);
25
 
27
 
26
require_once('../config.php');
28
require_once('../config.php');
Línea 27... Línea 29...
27
require_once($CFG->libdir.'/adminlib.php');
29
require_once($CFG->libdir.'/adminlib.php');
28
 
30
 
Línea 40... Línea 42...
40
    // Valid request. Purge, and redirect the user back to where they came from.
42
    // Valid request. Purge, and redirect the user back to where they came from.
41
    if (isset($data->all)) {
43
    if (isset($data->all)) {
42
        purge_caches();
44
        purge_caches();
43
        $message = get_string('purgecachesfinished', 'admin');
45
        $message = get_string('purgecachesfinished', 'admin');
44
    } else {
46
    } else {
-
 
47
        // When passing selected options, ensure each is cast to boolean for strict comparison.
-
 
48
        purge_caches(array_map(
-
 
49
            fn($option) => (bool) $option,
45
        purge_caches($data->purgeselectedoptions);
50
            $data->purgeselectedoptions,
-
 
51
        ));
46
        $message = get_string('purgeselectedcachesfinished', 'admin');
52
        $message = get_string('purgeselectedcachesfinished', 'admin');
47
    }
53
    }
Línea 48... Línea 54...
48
 
54
 
49
} else if ($confirm && confirm_sesskey()) {
55
} else if ($confirm && confirm_sesskey()) {