$this->titletxt = $wgTitle->getPrefixedText();
- $tpl->set( "title", $wgOut->getPageTitle() );
+ $title=$wgOut->getPageTitle();
+ $section=$wgRequest->getVal('section');
+ if ($section && $action=="view") {
+ $title .= " " . wfMsg("sectionedit");
+ }
+ $tpl->set( "title", $title );
$tpl->set( "pagetitle", $wgOut->getHTMLTitle() );
$tpl->setRef( "thispage", &$this->thispage );
# an array of edit links by default used for the tabs
function buildContentActionUrls () {
- global $wgTitle, $wgUser, $wgRequest;
+ global $wgTitle, $wgUser, $wgRequest,$wgOut;
$action = $wgRequest->getText( 'action' );
$section = $wgRequest->getText( 'section' );
$oldid = $wgRequest->getVal( 'oldid' );
+ $section = $wgRequest->getVal( 'section' );
+ $sectiontitle = $wgRequest->getVal( 'sectiontitle' );
+ $collapse = $wgOut->getCollapse();
$diff = $wgRequest->getVal( 'diff' );
$content_actions = array();
if ( $wgTitle->userCanEdit() ) {
$oid = ( $oldid && ! isset( $diff ) ) ? "&oldid={$oldid}" : false;
+
+ $sid = $section ? "§ion={$section}" : false;
+ $stl = $sectiontitle ? "§iontitle={$sectiontitle}" : false;
+ if($collapse && !$sid) { $sid="§ion=0";}
$istalk = ( Namespace::isTalk( $wgTitle->getNamespace()) );
$istalkclass = $istalk?' istalk':'';
$content_actions['edit'] = array(
'class' => ((($action == 'edit' or $action == 'submit') and $section != 'new') ? 'selected' : '').$istalkclass,
'text' => wfMsg('edit'),
- 'href' => $this->makeUrl($this->thispage, 'action=edit'.$oid),
+ 'href' => $this->makeUrl($this->thispage, 'action=edit'.$oid.$sid.$stl),
'ttip' => wfMsg('tooltip-edit'),
'akey' => wfMsg('accesskey-edit')
);
}
} else {
$oid = ( $oldid && ! isset( $diff ) ) ? "&oldid={$oldid}" : '';
+ $sid = $section ? "§ion={$section}" : false;
+ $stl = $sectiontitle ? "§iontitle={$sectiontitle}" : false;
+ if($collapse && !$sid) { $sid="§ion=0";}
$content_actions['edit'] = array('class' => ($action == 'edit') ? 'selected' : false,
'text' => wfMsg('viewsource'),
- 'href' => $this->makeUrl($this->thispage, 'action=edit'.$oid),
+ 'href' => $this->makeUrl($this->thispage, 'action=edit'.$oid.$sid.$stl),
'ttip' => wfMsg('tooltip-viewsource'),
'akey' => wfMsg('accesskey-viewsource'));
}