[Mediawiki-l] Edit link in returnto
Javier Bezos
jbezos at fundeu.es
Tue Mar 18 10:00:54 UTC 2008
Hi all,
I'm trying to add an edit link in the returnto message, after
logging in, but until now I've found no solution without patching
OutputPage. I've tried tags and magic words out, but they get
expanded before $1 is replaced by its value. Is it possible to
add it without hacking a MadiaWiki file?
Javier
PS. BTW, the code is the following:
public function addReturnTo( $title ) {
global $wgUser; // Wikilengua: añadido parámetro con edit.
if ( $title != 'Portada' and $wgUser->isLoggedIn() ) { // O
isAllowed('edit')?
$elink = ' (' . $wgUser->getSkin()->makeLinkObj( $title, 'editar',
'action=edit' ) . ')';
} else {
$elink = '';
}
$link = wfMsg( 'returnto', $wgUser->getSkin()->makeLinkObj( $title ) .
$elink );
$this->addHtml( "<p>{$link}</p>\n" );
}
More information about the MediaWiki-l
mailing list