Skip to content

Commit

Permalink
MDL-45295 core_block: Removing obsolete method preferred_width()
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Massart committed Dec 9, 2014
1 parent d87bcfb commit 2c2171b
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 41 deletions.
9 changes: 0 additions & 9 deletions blocks/calendar_month/block_calendar_month.php
Expand Up @@ -30,15 +30,6 @@ public function init() {
$this->title = get_string('pluginname', 'block_calendar_month');
}

/**
* Return preferred_width.
*
* @return int
*/
public function preferred_width() {
return 210;
}

/**
* Return the content of this block.
*
Expand Down
4 changes: 0 additions & 4 deletions blocks/course_summary/block_course_summary.php
Expand Up @@ -74,10 +74,6 @@ function hide_header() {
return true;
}

function preferred_width() {
return 210;
}

}


16 changes: 0 additions & 16 deletions blocks/moodleblock.class.php
Expand Up @@ -326,11 +326,6 @@ function _self_test() {
$correct = false;
}

$width = $this->preferred_width();
if (!is_int($width) || $width <= 0) {
$errors[] = 'invalid_width';
$correct = false;
}
return $correct;
}

Expand Down Expand Up @@ -594,17 +589,6 @@ static function get_extra_capabilities() {
return array('moodle/block:view', 'moodle/block:edit');
}

// Methods deprecated in Moodle 2.0 ========================================

/**
* Default case: the block wants to be 180 pixels wide
* @deprecated since Moodle 2.0.
* @return int
*/
function preferred_width() {
return 180;
}

/**
* Can be overridden by the block to prevent the block from being dockable.
*
Expand Down
4 changes: 0 additions & 4 deletions blocks/rss_client/block_rss_client.php
Expand Up @@ -28,10 +28,6 @@ function init() {
$this->title = get_string('pluginname', 'block_rss_client');
}

function preferred_width() {
return 210;
}

function applicable_formats() {
return array('all' => true, 'tag' => false); // Needs work to make it work on tags MDL-11960
}
Expand Down
4 changes: 0 additions & 4 deletions blocks/tag_flickr/block_tag_flickr.php
Expand Up @@ -43,10 +43,6 @@ function instance_allow_multiple() {
return true;
}

function preferred_width() {
return 170;
}

function get_content() {
global $CFG, $USER;

Expand Down
4 changes: 0 additions & 4 deletions blocks/tag_youtube/block_tag_youtube.php
Expand Up @@ -45,10 +45,6 @@ function instance_allow_multiple() {
return true;
}

function preferred_width() {
return 140;
}

function get_content() {
global $CFG;

Expand Down
4 changes: 4 additions & 0 deletions blocks/upgrade.txt
@@ -1,6 +1,10 @@
This files describes API changes in /blocks/* - activity modules,
information provided here is intended especially for developers.

=== 2.9 ===

* The obsolete method preferred_width() was removed.

=== 2.8 ===

* The instance_config_print() function was removed. It was deprecated in
Expand Down

0 comments on commit 2c2171b

Please sign in to comment.