Skip to content

Commit

Permalink
MDL-31023 libraries: removed deprecated function and classes from pag…
Browse files Browse the repository at this point in the history
…elib.php
  • Loading branch information
Rajesh Taneja committed Jul 19, 2012
1 parent 3294034 commit afb92f1
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 457 deletions.
1 change: 0 additions & 1 deletion lang/en/debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
$string['modulenotexist'] = '{$a} module doesn\'t exist';
$string['morethanonerecordinfetch'] = 'Found more than one record in fetch() !';
$string['mustbeoveride'] = 'Abstract {$a} method must be overridden.';
$string['noactivityname'] = 'Page object derived from page_generic_activity but did not define $this->activityname';
$string['noadminrole'] = 'No admin role could be found';
$string['noblocks'] = 'No blocks installed!';
$string['nocate'] = 'No categories!';
Expand Down
29 changes: 0 additions & 29 deletions lib/blocklib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1960,35 +1960,6 @@ function blocks_delete_all_on_page($pagetype, $pageid) {
return false;
}

/**
* Dispite what this function is called, it seems to be mostly used to populate
* the default blocks when a new course (or whatever) is created.
*
* @deprecated since 2.0
*
* @param object $page the page to add default blocks to.
* @return boolean success or failure.
*/
function blocks_repopulate_page($page) {
global $CFG;

debugging('Call to deprecated function blocks_repopulate_page. ' .
'Use a more specific method like blocks_add_default_course_blocks, ' .
'or just call $PAGE->blocks->add_blocks()', DEBUG_DEVELOPER);

/// If the site override has been defined, it is the only valid one.
if (!empty($CFG->defaultblocks_override)) {
$blocknames = $CFG->defaultblocks_override;
} else {
$blocknames = $page->blocks_get_default();
}

$blocks = blocks_parse_default_blocks_list($blocknames);
$page->blocks->add_blocks($blocks);

return true;
}

/**
* Get the block record for a particular blockid - that is, a particular type os block.
*
Expand Down
14 changes: 0 additions & 14 deletions lib/deprecatedlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -925,20 +925,6 @@ function current_theme() {
return $PAGE->theme->name;
}

/**
* @todo Remove this deprecated function when no longer used
* @deprecated since Moodle 2.0 - use $PAGE->pagetype instead of the .
*
* @param string $getid used to return $PAGE->pagetype.
* @param string $getclass used to return $PAGE->legacyclass.
*/
function page_id_and_class(&$getid, &$getclass) {
global $PAGE;
debugging('Call to deprecated function page_id_and_class. Please use $PAGE->pagetype instead.', DEBUG_DEVELOPER);
$getid = $PAGE->pagetype;
$getclass = $PAGE->legacyclass;
}

/**
* Prints some red text using echo
*
Expand Down
Loading

0 comments on commit afb92f1

Please sign in to comment.