Changeset 160
- Timestamp:
- 03/11/08 05:00:59 (9 months ago)
- Files:
-
- trunk/Phergie/Plugin/Abstract/Base.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Phergie/Plugin/Abstract/Base.php
r153 r160 224 224 public function decodeTranslit($text, $charSetFrom = 'UTF-8', $charSetTo = 'ISO-8859-1') { 225 225 $text = html_entity_decode($text, ENT_QUOTES, $charSetFrom); 226 $text = preg_replace('/�*([0-9]+);/me', "$this->codeToUtf(\\1)", $text);227 $text = preg_replace('/�*([a-f0-9]+);/mei', "$this->codeToUtf(hexdec(\\1))", $text);226 $text = preg_replace('/�*([0-9]+);/me', '$this->codeToUtf(\\1)', $text); 227 $text = preg_replace('/�*([a-f0-9]+);/mei', '$this->codeToUtf(hexdec(\\1))', $text); 228 228 229 229 // Use the translit extension if installed else fallback on to basic transliteration … … 234 234 $text = transliterate($text, array('han_transliterate', 'diacritical_remove'), $charSetFrom, $charSetTo); 235 235 } else { 236 $text = strtr($text, '�������������������������� ',236 $text = strtr($text, '��������������������������������������������������������������', 237 237 'AAAAAAACEEEEIIIIDNOOOOOOUUUUYPYaaaaaaaceeeeiiiidnoooooouuuuypy'); 238 238 $text = preg_replace('{[^a-z0-9&|"#\'\{\}()�^!�\[\]$*���%�`~=+:/;.,?><\\ _-]}i', '', $text); … … 507 507 // Silence output calls if the plugin is muted for that source or globally 508 508 $source = trim($arguments[0]); 509 if (($source && $this->muted[$source] || $this->muted['global']) && substr($method, 0, 2) === 'do') { 509 if ((($source && isset($this->muted[$source]) && $this->muted[$source]) || 510 (isset($this->muted['global']) && $this->muted['global'])) && 511 substr($method, 0, 2) === 'do') { 510 512 return false; 511 513 }