*/
if( defined( "MEDIAWIKI" ) ) {
-# See skin.doc
+# See skin.txt
require_once( 'Linker.php' );
require_once( 'Image.php' );
}
$a['onload'] = $wgOut->getOnloadHandler();
+ if( $wgUser->getOption( 'editsectiononrightclick' ) ) {
+ if( $a['onload'] != '' ) {
+ $a['onload'] .= ';';
+ }
+ $a['onload'] .= 'setupRightClickEdit()';
+ }
return $a;
}
}
function doBeforeContent() {
- global $wgOut, $wgTitle, $wgContLang, $wgSiteNotice;
+ global $wgOut, $wgTitle, $wgContLang;
$fname = 'Skin::doBeforeContent';
wfProfileIn( $fname );
$s .= "</tr>\n</table>\n</div>\n";
$s .= "\n<div id='article'>\n";
- if( $wgSiteNotice ) {
- $s .= "\n<div id='siteNotice'>$wgSiteNotice</div>\n";
+ $notice = wfGetSiteNotice();
+ if( $notice ) {
+ $s .= "\n<div id='siteNotice'>$notice</div>\n";
}
$s .= $this->pageTitle();
$s .= $this->pageSubtitle() ;
if ( $wgOut->isArticleRelated() ) {
if ( $wgTitle->getNamespace() == NS_IMAGE ) {
$name = $wgTitle->getDBkey();
- $image = new Image( $wgTitle->getDBkey() );
+ $image = new Image( $wgTitle );
if( $image->exists() ) {
$link = htmlspecialchars( $image->getURL() );
$style = $this->getInternalLinkAttributes( $link, $name );
global $wgOut, $wgTitle, $wgUser;
$s = '<h1 class="pagetitle">' . htmlspecialchars( $wgOut->getPageTitle() ) . '</h1>';
- if($wgUser->getOption( 'editsectiononrightclick' ) && $wgTitle->userCanEdit()) { $s=$this->editSectionScript($wgTitle, 0,$s);}
return $s;
}