MDL-31616 block editing: show in subcontexts does not work on category pages.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Sun, 16 Dec 2012 22:39:07 +0000 (22:39 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Sat, 22 Dec 2012 17:37:49 +0000 (17:37 +0000)
Thanks to Ian David Wild for pointing to the proper fix.

lib/blocklib.php

index cbea8ad..869d75b 100644 (file)
@@ -1285,7 +1285,10 @@ class block_manager {
         } else if ($data = $mform->get_data()) {
             $bi = new stdClass;
             $bi->id = $block->instance->id;
+
+            // This may get overwritten by the special case handling below.
             $bi->pagetypepattern = $data->bui_pagetypepattern;
+            $bi->showinsubcontexts = $data->bui_contexts;
             if (empty($data->bui_subpagepattern) || $data->bui_subpagepattern == '%@NULL@%') {
                 $bi->subpagepattern = null;
             } else {