Skip to content

Commit

Permalink
Merge pull request #2 from andyjdavis/MDLSITE-3076_upgrade_error
Browse files Browse the repository at this point in the history
MDLSITE-3076 removed the debugging call triggered during upgrade errors
  • Loading branch information
danpoltawski committed Dec 10, 2014
2 parents 663ca27 + d6a3a14 commit 5b01be5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion filter.php
Expand Up @@ -142,7 +142,9 @@ public function filter($text, array $options = array()) {
$filter = new filterobject($search, $matches[1], $matches[3], $this->casesensitive, $this->fullmatch, $matches[2]);
$emoticonslist[$lang][$search] = $filter;
} else {
debugging("Invalid emoticon imagename detected ({$emoticon->imagename})");
// MDLSITE-3076 - This occurs during upgrade on some servers for an unknown reason.
// Allow it to silently fail as the filter still works.
//debugging("Invalid emoticon imagename detected ({$emoticon->imagename})");
}
}

Expand Down
7 changes: 7 additions & 0 deletions tests/filter_test.php
Expand Up @@ -66,6 +66,13 @@ public function test_filter_skypeicons() {
' src="http://www.example.com/moodle/theme/image.php/_s/clean/filter_skypeicons/1/angel" />',
'<b>(angel)</b>' => '<b><img class="emoticon" alt="angel" title="angel"'.
' src="http://www.example.com/moodle/theme/image.php/_s/clean/filter_skypeicons/1/angel" /></b>',
// Check these three work as they have some sort of issue - MDLSITE-3076.
'(phone)' => '<img class="emoticon" alt="phone" title="phone"'.
' src="http://www.example.com/moodle/theme/image.php/_s/clean/filter_skypeicons/1/phone" />',
'(pizza)' => '<img class="emoticon" alt="pizza" title="pizza"'.
' src="http://www.example.com/moodle/theme/image.php/_s/clean/filter_skypeicons/1/pizza" />',
'(puke)' => '<img class="emoticon" alt="puke" title="puke"'.
' src="http://www.example.com/moodle/theme/image.php/_s/clean/filter_skypeicons/1/puke" />',

// Specially in the link texts they must be working (note this is different from default's filter_phrases()
// behaviour, we are overriding ignore-tags.
Expand Down

0 comments on commit 5b01be5

Please sign in to comment.