diff options
author | Evan Prodromou <evan@status.net> | 2010-05-21 16:47:57 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-05-21 16:47:57 -0400 |
commit | 6d8e01ad13dd9bc9e149f43a1eb88671d4737f4d (patch) | |
tree | 12f8b318971d1a1eebbb318e3c19142a56dce444 /plugins/DirectionDetector/DirectionDetectorPlugin.php | |
parent | 8a2144aeed2e338ef1b21425b9387086790aa820 (diff) | |
parent | bbfd6eff0c69f038d151d3bf6c8bf9b45a64716f (diff) |
Merge branch 'master' of gitorious.org:statusnet/mainline
Diffstat (limited to 'plugins/DirectionDetector/DirectionDetectorPlugin.php')
-rw-r--r-- | plugins/DirectionDetector/DirectionDetectorPlugin.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/DirectionDetector/DirectionDetectorPlugin.php b/plugins/DirectionDetector/DirectionDetectorPlugin.php index 303e60d5f..34c511e21 100644 --- a/plugins/DirectionDetector/DirectionDetectorPlugin.php +++ b/plugins/DirectionDetector/DirectionDetectorPlugin.php @@ -38,7 +38,7 @@ class DirectionDetectorPlugin extends Plugin { * @param object $notice notice is going to be saved */ public function onStartNoticeSave(&$notice){ - if(self::isRTL($notice->content)) + if(!preg_match('/<span class="rtl">/', $notice->rendered) && self::isRTL($notice->content)) $notice->rendered = '<span class="rtl">'.$notice->rendered.'</span>'; return true; } @@ -48,7 +48,7 @@ class DirectionDetectorPlugin extends Plugin { * * @param */ - public function onEndShowStatusNetStyles(&$xml){ + public function onEndShowStatusNetStyles($xml){ $xml->element('style', array('type' => 'text/css'), 'span.rtl {display:block;direction:rtl;text-align:right;float:right;width:490px;} .notice .author {float:left}'); } /** @@ -102,7 +102,7 @@ class DirectionDetectorPlugin extends Plugin { * * Returns false if the input string isn't a valid UTF-8 octet sequence. */ - private static function utf8ToUnicode(&$str){ + private static function utf8ToUnicode($str){ $mState = 0; // cached expected number of octets after the current octet // until the beginning of the next UTF8 character sequence $mUcs4 = 0; // cached Unicode character |