Merge branch 'wip-MDL-37474-m25' of git://github.com/samhemelryk/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 29 Jan 2013 00:32:09 +0000 (01:32 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 29 Jan 2013 00:32:09 +0000 (01:32 +0100)
1  2 
cache/locallib.php

diff --combined cache/locallib.php
@@@ -401,11 -401,8 +401,11 @@@ class cache_config_writer extends cache
       * @param bool $coreonly If set to true only core definitions will be updated.
       */
      public static function update_definitions($coreonly = false) {
 -        $config = self::instance();
 +        $factory = cache_factory::instance();
 +        $factory->updating_started();
 +        $config = $factory->create_config_instance(true);
          $config->write_definitions_to_cache(self::locate_definitions($coreonly));
 +        $factory->updating_finished();
      }
  
      /**
@@@ -698,6 -695,10 +698,10 @@@ abstract class cache_administration_hel
                  array(
                      'text' => get_string('editmappings', 'cache'),
                      'url' => new moodle_url('/cache/admin.php', array('action' => 'editdefinitionmapping', 'sesskey' => sesskey()))
+                 ),
+                 array(
+                     'text' => get_string('purge', 'cache'),
+                     'url' => new moodle_url('/cache/admin.php', array('action' => 'purgedefinition', 'sesskey' => sesskey()))
                  )
              );
          }
              }
              $actions[] = array(
                  'text' => get_string('purge', 'cache'),
-                 'url' => new moodle_url($baseurl, array('action' => 'purge'))
+                 'url' => new moodle_url($baseurl, array('action' => 'purgestore'))
              );
          }
          return $actions;