Permalink
Browse files

MDL-27829 blocks: improved backwards compatibility for blocks set to …

…display on page types we dont allow the user to select anymore
  • Loading branch information...
1 parent 800688b commit 096928c79e4ed6f0145de4099b06cbeb6dbc9b62 @andyjdavis andyjdavis committed Jun 30, 2011
Showing with 5 additions and 2 deletions.
  1. +4 −1 blocks/edit_form.php
  2. +1 −1 lang/en/pagetype.php
View
@@ -135,7 +135,10 @@ function definition() {
// Pushing block's existing page type pattern
$pagetypestringname = 'page-'.str_replace('*', 'x', $this->block->instance->pagetypepattern);
if (get_string_manager()->string_exists($pagetypestringname, 'pagetype')) {
- $pagetyelist[$this->block->instance->pagetypepattern] = get_string($pagetypestringname, 'pagetype');
+ $pagetypelist[$this->block->instance->pagetypepattern] = get_string($pagetypestringname, 'pagetype');
+ } else {
+ //as a last resort we could put the page type pattern in the select box
+ //however this causes mod-data-view to be added if the only option available is mod-data-*
}
}
}
View
@@ -16,7 +16,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * Strings for component 'pagetype', language 'en', branch 'MOODLE_20_STABLE'
+ * Strings for component 'pagetype', language 'en'
*
* @package pagetype
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}

0 comments on commit 096928c

Please sign in to comment.