Skip to content

Commit

Permalink
MDL-31023 Libraries: removed legacypageobject usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajesh Taneja committed Jul 19, 2012
1 parent afb92f1 commit 11ad98f
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions lib/pagelib.php
Expand Up @@ -312,14 +312,6 @@ class moodle_page {
*/
protected $_periodicrefreshdelay = null;

/**
* @var stdClass This is simply to improve backwards compatibility. If old
* code relies on a page class that implements print_header, or complex logic
* in user_allowed_editing then we stash an instance of that other class here,
* and delegate to it in certain situations.
*/
protected $_legacypageobject = null;

/**
* @var array Associative array of browser shortnames (as used by check_browser_version)
* and their minimum required versions
Expand Down Expand Up @@ -792,9 +784,6 @@ public function user_can_edit_blocks() {
* @return bool
*/
public function user_allowed_editing() {
if ($this->_legacypageobject) {
return $this->_legacypageobject->user_allowed_editing();
}
return has_any_capability($this->all_editing_caps(), $this->_context);
}

Expand Down Expand Up @@ -1158,9 +1147,6 @@ public function set_url($url, array $params = null) {
if (is_null($this->_pagetype)) {
$this->initialise_default_pagetype($shorturl);
}
if (!is_null($this->_legacypageobject)) {
$this->_legacypageobject->set_url($url, $params);
}
}

/**
Expand Down

0 comments on commit 11ad98f

Please sign in to comment.