moodle_page: MDL-12212 eliminate the two different interpretations of

pagetype
This commit is contained in:
tjhunt 2009-05-06 08:41:02 +00:00
parent d529807a65
commit e88462a055
9 changed files with 39 additions and 11 deletions

View file

@ -902,7 +902,7 @@ function blocks_get_by_page_pinned($page) {
function blocks_get_by_page($page) {
global $DB;
$blocks = $DB->get_records_select('block_instance', "pageid = ? AND pagetype = ?",
$blocks = $DB->get_records_select('block_instance', "pageid = ? AND ? LIKE (" . $DB->sql_concat('pagetype', "'%'") . ")",
array($page->get_id(), $page->pagetype), 'position, weight');
$positions = $page->blocks_get_positions();