### Eclipse Workspace Patch 1.0
#P moodle
Index: lib/weblib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/weblib.php,v
retrieving revision 1.970.2.143
diff -u -r1.970.2.143 weblib.php
--- lib/weblib.php 18 Aug 2009 04:29:11 -0000 1.970.2.143
+++ lib/weblib.php 30 Aug 2009 23:10:07 -0000
@@ -2168,7 +2168,6 @@
$lang = current_language();
$emoticonstring = $CFG->emoticons;
static $e = array();
- static $img = array();
static $emoticons = null;
if (is_null($emoticons)) {
@@ -2182,42 +2181,23 @@
}
}
-
- if (empty($img[$lang])) { /// After the first time this is not run again
+ if (empty($e[$lang])) { /// After the first time this is not run again
$e[$lang] = array();
- $img[$lang] = array();
foreach ($emoticons as $emoticon => $image){
$alttext = get_string($image, 'pix');
$alttext = preg_replace('/^\[\[(.*)\]\]$/', '$1', $alttext); /// Clean alttext in case there isn't lang string for it.
- $e[$lang][] = $emoticon;
- $img[$lang][] = '
';
+ $imgstr = '
';
+ $e[$lang][] = new filterobject($emoticon,$imgstr,'',false,false,'');
}
}
- // Exclude from transformations all the code inside ',
+ '', '');
+ $text = filter_phrases($text, $e[$lang], $ignoretagsopen, $ignoretagsclose,true);
- // Take out all the