Browse Source

fix removing of last tag in short messages

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

2
twisterpost.php

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

Loading…
Cancel
Save