Skip to content

Commit

Permalink
moodle_page: MDL-12212 eliminate page::edit_always
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhunt committed May 6, 2009
1 parent ad52c04 commit d7f688d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
9 changes: 1 addition & 8 deletions lib/blocklib.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ function blocks_print_group(&$page, &$pageblocks, $position) {
$obj = $instance->obj;
}

$editalways = $page->edit_always();
$editalways = false;


if (($isediting && empty($instance->pinned)) || !empty($editalways)) {
Expand Down Expand Up @@ -827,13 +827,6 @@ function blocks_get_pinned($page) {
global $DB;

$visible = true;

if (method_exists($page,'edit_always')) {
if ($page->edit_always()) {
$visible = false;
}
}

$select = "pagetype = ?";
$params = array($page->pagetype);

Expand Down
7 changes: 0 additions & 7 deletions lib/pagelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -777,15 +777,8 @@ function init_quick($data) {
function init_full() {
$this->full_init_done = true;
}


// is this page always editable, regardless of anything else?
function edit_always() {
return (has_capability('moodle/site:manageblocks', get_context_instance(CONTEXT_SYSTEM)) && defined('ADMIN_STICKYBLOCKS'));
}
}


/**
* Class that models the behavior of a moodle course
*
Expand Down

0 comments on commit d7f688d

Please sign in to comment.