Skip to content

Commit

Permalink
Extra content in the settings for broadcast format are now accounted …
Browse files Browse the repository at this point in the history
…for.
  • Loading branch information
Andrew Ellis committed Aug 10, 2011
1 parent 6c0e628 commit 410061b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/social/service.php
Expand Up @@ -169,8 +169,15 @@ public function format_content($post, $format) {
$format = apply_filters(Social::$prefix . 'broadcast_format', $format);
$format = apply_filters(Social::$prefix . $this->service . '_broadcast_format', $format);


$_format = $format;
$available = $this->max_broadcast_length();
foreach (Social::broadcast_tokens() as $token => $description) {
$_format = str_replace($token, '', $_format);
}
$available = $available - strlen($_format);

$_format = explode(' ', $format);
$available = $this->max_broadcast_length() - count($format);
foreach (Social::broadcast_tokens() as $token => $description) {
$content = '';
switch ($token) {
Expand Down

0 comments on commit 410061b

Please sign in to comment.