Skip to content

Commit

Permalink
MDL-50632 filters: Final deprecation of apis deprecated in 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitagarwal committed May 24, 2017
1 parent 590292d commit 8130352
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions lib/filterlib.php
Expand Up @@ -234,20 +234,9 @@ public function filter_string($string, $context) {

/**
* @deprecated Since Moodle 3.0 MDL-50491. This was used by the old text filtering system, but no more.
* @todo MDL-50632 This will be deleted in Moodle 3.2.
* @param context $context the context.
* @return string the hash.
*/
public function text_filtering_hash($context) {
debugging('filter_manager::text_filtering_hash() is deprecated. ' .
'It was an internal part of the old format_text caching, ' .
'and should not have been called from other code.', DEBUG_DEVELOPER);
$filters = $this->get_text_filters($context);
$hashes = array();
foreach ($filters as $filter) {
$hashes[] = $filter->hash();
}
return implode('-', $hashes);
public function text_filtering_hash() {
throw new coding_exception('filter_manager::text_filtering_hash() can not be used any more');
}

/**
Expand Down Expand Up @@ -323,10 +312,7 @@ public function filter_string($string, $context) {
}

public function text_filtering_hash() {
debugging('filter_manager::text_filtering_hash() is deprecated. ' .
'It was an internal part of the old format_text caching, ' .
'and should not have been called from other code.', DEBUG_DEVELOPER);
return '';
throw new coding_exception('filter_manager::text_filtering_hash() can not be used any more');
}
}

Expand Down Expand Up @@ -417,14 +403,9 @@ public function __construct($context, array $localconfig) {

/**
* @deprecated Since Moodle 3.0 MDL-50491. This was used by the old text filtering system, but no more.
* @todo MDL-50632 This will be deleted in Moodle 3.2.
* @return string The class name of the current class
*/
public function hash() {
debugging('moodle_text_filter::hash() is deprecated. ' .
'It was an internal part of the old format_text caching, ' .
'and should not have been called from other code.', DEBUG_DEVELOPER);
return __CLASS__;
throw new coding_exception('moodle_text_filter::hash() can not be used any more');
}

/**
Expand Down

0 comments on commit 8130352

Please sign in to comment.