r24127 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24126‎ | r24127 | r24128 >
Date:19:08, 15 July 2007
Author:aaron
Status:old
Tags:
Comment:
*Exclude last word when truncating bio for list display
Modified paths:
  • /trunk/extensions/ConfirmAccount/ConfirmAccount_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmAccount/ConfirmAccount_body.php
@@ -587,7 +587,10 @@
588588 htmlspecialchars($row->acr_email) . $econf.'</td></tr>';
589589 # Truncate this, blah blah...
590590 $bio = substr( htmlspecialchars($row->acr_bio), 0, 500 );
591 - $bio = strlen($bio) < strlen($row->acr_bio) ? "$bio . . ." : $bio;
 591+ if( strlen($bio) < strlen($row->acr_bio) ) {
 592+ $bio = substr( $bio, 0, strrpos($bio,' ') );
 593+ $bio .= " . . .";
 594+ }
592595
593596 $r .= '<tr><td><strong>'.wfMsg('confirmaccount-bio').'</strong></td><td width=\'100%\'><i>'.$bio.'</i></td></tr>';
594597 $r .= '</table></li>';

Status & tagging log