* @return string
*/
public function imageHistoryLine( $iscur, $file ) {
- global $wgUser, $wgLang;
+ global $wgUser, $wgLang, $wgContLang;
$timestamp = wfTimestamp( TS_MW, $file->getTimestamp() );
$img = $iscur ? $file->getName() : $file->getArchiveName();
$row .= htmlspecialchars( $usertext );
}
}
- $row .= '</td><td>';
+ $row .= '</td>';
// Don't show deleted descriptions
if ( $file->isDeleted( File::DELETED_COMMENT ) ) {
- $row .= '<span class="history-deleted">' . wfMsgHtml( 'rev-deleted-comment' ) . '</span>';
+ $row .= '<td><span class="history-deleted">' . wfMsgHtml( 'rev-deleted-comment' ) . '</span></td>';
} else {
- $row .= Linker::commentBlock( $description, $this->title );
+ $row .= '<td dir="' . $wgContLang->getDir() . '">' . Linker::commentBlock( $description, $this->title ) . '</td>';
}
- $row .= '</td>';
$rowClass = null;
wfRunHooks( 'ImagePageFileHistoryLine', array( $this, $file, &$row, &$rowClass ) );
# not for special pages or file pages AND only when viewing AND if the page exists
# (or is in MW namespace, because that has default content)
if( !in_array( $this->getTitle()->getNamespace(), array( NS_SPECIAL, NS_FILE ) ) &&
- in_array( $action, array( 'view', 'render', 'print' ) ) &&
+ in_array( $action, array( 'view', 'render', 'print', 'historysubmit' ) ) &&
( $this->getTitle()->exists() || $this->getTitle()->getNamespace() == NS_MEDIAWIKI ) ) {
$pageLang = $this->getTitle()->getPageLanguage();
$realBodyAttribs = array( 'lang' => $pageLang->getCode(), 'dir' => $pageLang->getDir(),