Browse Source

fix removing of last tag in short messages

master
Denis Ryabov 11 years ago
parent
commit
e314117563
  1. 8
      twisterpost.php

8
twisterpost.php

@ -138,9 +138,11 @@ class TwisterPost
$text .= ' #' . $tagText; $text .= ' #' . $tagText;
} }
} }
$text = mb_substr($text, 0, $maxLen + 1); if(mb_strlen($text) > $maxLen) {
$pos = mb_strrpos($text, ' '); $text = mb_substr($text, 0, $maxLen + 1);
$text = mb_substr($text, 0, $pos); $pos = mb_strrpos($text, ' ');
$text = mb_substr($text, 0, $pos);
}
} }
return $text; return $text;

Loading…
Cancel
Save