Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -203,12 +203,7 @@ |
204 | 204 | $tpl->set( 'isarticle', $out->isArticle() ); |
205 | 205 | |
206 | 206 | $tpl->setRef( "thispage", $this->thispage ); |
207 | | - $subpagestr = $this->subPageSubtitle(); |
208 | | - $tpl->set( |
209 | | - 'subtitle', !empty($subpagestr)? |
210 | | - '<span class="subpages">'.$subpagestr.'</span>'.$out->getSubtitle(): |
211 | | - $out->getSubtitle() |
212 | | - ); |
| 207 | + |
213 | 208 | $undelete = $this->getUndeleteLink(); |
214 | 209 | $tpl->set( |
215 | 210 | "undelete", !empty($undelete)? |
— | — | @@ -416,7 +411,8 @@ |
417 | 412 | if ( $nt ) { |
418 | 413 | $language_urls[] = array( |
419 | 414 | 'href' => $nt->getFullURL(), |
420 | | - 'text' => ($wgContLang->getLanguageName( $nt->getInterwiki()) != ''?$wgContLang->getLanguageName( $nt->getInterwiki()) : $l), |
| 415 | + 'text' => $wgContLang->getLanguageName( $nt->getInterwiki() ) != '' ? |
| 416 | + $wgContLang->getLanguageName( $nt->getInterwiki()) : $l, |
421 | 417 | 'class' => $class |
422 | 418 | ); |
423 | 419 | } |
— | — | @@ -435,6 +431,12 @@ |
436 | 432 | $content_actions = $this->buildContentActionUrls(); |
437 | 433 | $tpl->setRef('content_actions', $content_actions); |
438 | 434 | |
| 435 | + $subpagestr = $this->subPageSubtitle(); |
| 436 | + $tpl->set( |
| 437 | + 'subtitle', !empty($subpagestr) ? |
| 438 | + '<span class="subpages">'.$subpagestr.'</span>'.$out->getSubtitle() : $out->getSubtitle() |
| 439 | + ); |
| 440 | + |
439 | 441 | // XXX: attach this from javascript, same with section editing |
440 | 442 | if($this->iseditable && $wgUser->getOption("editondblclick") ) |
441 | 443 | { |
— | — | @@ -652,7 +654,7 @@ |
653 | 655 | wfProfileIn( __METHOD__ ); |
654 | 656 | |
655 | 657 | global $wgUser, $wgRequest; |
656 | | - $action = $wgRequest->getText( 'action' ); |
| 658 | + $action = $wgRequest->getText( 'action', 'view' ); |
657 | 659 | $section = $wgRequest->getText( 'section' ); |
658 | 660 | $content_actions = array(); |
659 | 661 | |
— | — | @@ -696,12 +698,26 @@ |
697 | 699 | 'href' => $this->mTitle->getLocalUrl( 'action=edit§ion=new' ) |
698 | 700 | ); |
699 | 701 | } |
| 702 | + # Give notice if this page is locked for others |
| 703 | + if( ($action == 'view' || $action == 'purge') && $this->mTitle->isProtected( 'edit' ) ) { |
| 704 | + $wgOut->appendSubtitle( "<span class='plainlinks'>" . |
| 705 | + wfMsgExt('protected-sub-allowed',array('parse'),$this->mTitle->getFullUrl('action=protect')) . |
| 706 | + "</span>" |
| 707 | + ); |
| 708 | + } |
700 | 709 | } elseif ( $this->mTitle->exists() || $this->mTitle->isAlwaysKnown() ) { |
701 | 710 | $content_actions['viewsource'] = array( |
702 | 711 | 'class' => ($action == 'edit') ? 'selected' : false, |
703 | 712 | 'text' => wfMsg('viewsource'), |
704 | 713 | 'href' => $this->mTitle->getLocalUrl( $this->editUrlOptions() ) |
705 | 714 | ); |
| 715 | + # Give notice if this page is locked |
| 716 | + if( ($action == 'view' || $action == 'purge') && $this->mTitle->isProtected( 'edit' ) ) { |
| 717 | + $wgOut->appendSubtitle( "<span class='plainlinks'>" . |
| 718 | + wfMsgExt('protected-sub-disallowed',array('parseinline'),$this->mTitle->getFullUrl('action=protect')) . |
| 719 | + "</span>" |
| 720 | + ); |
| 721 | + } |
706 | 722 | } |
707 | 723 | wfProfileOut( __METHOD__."-edit" ); |
708 | 724 | |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2126,7 +2126,6 @@ |
2127 | 2127 | You can narrow down the view by selecting a log type, the user name (case-sensitive), or the affected page (also case-sensitive).', |
2128 | 2128 | 'logempty' => 'No matching items in log.', |
2129 | 2129 | 'log-title-wildcard' => 'Search titles starting with this text', |
2130 | | -'logshowhide-patrol' => '$1 patrol log', |
2131 | 2130 | |
2132 | 2131 | # Special:AllPages |
2133 | 2132 | 'allpages' => 'All pages', |
— | — | @@ -2998,11 +2997,12 @@ |
2999 | 2998 | 'markedaspatrollederror-noautopatrol' => 'You are not allowed to mark your own changes as patrolled.', |
3000 | 2999 | |
3001 | 3000 | # Patrol log |
3002 | | -'patrol-log-page' => 'Patrol log', |
3003 | | -'patrol-log-header' => 'This is a log of patrolled revisions.', |
3004 | | -'patrol-log-line' => 'marked $1 of $2 patrolled $3', |
3005 | | -'patrol-log-auto' => '(automatic)', |
3006 | | -'patrol-log-diff' => 'r$1', # only translate this message to other languages if you have to change it |
| 3001 | +'patrol-log-page' => 'Patrol log', |
| 3002 | +'patrol-log-header' => 'This is a log of patrolled revisions.', |
| 3003 | +'patrol-log-line' => 'marked $1 of $2 patrolled $3', |
| 3004 | +'patrol-log-auto' => '(automatic)', |
| 3005 | +'patrol-log-diff' => 'r$1', # only translate this message to other languages if you have to change it |
| 3006 | +'logshowhide-patrol' => '$1 patrol log', |
3007 | 3007 | |
3008 | 3008 | # Image deletion |
3009 | 3009 | 'deletedrevision' => 'Deleted old revision $1', |
— | — | @@ -3728,4 +3728,8 @@ |
3729 | 3729 | |
3730 | 3730 | #Put all regex fragments above this line. Leave this line exactly as it is</pre>', |
3731 | 3731 | |
| 3732 | +# Unknown messages |
| 3733 | +'protected-sub-allowed' => "Some users '''cannot edit this page''' because it has been [$1 restricted] to prevent editing", |
| 3734 | +'protected-sub-disallowed' => "You '''cannot edit this page''' because it has been [$1 restricted] to prevent editing", |
| 3735 | + |
3732 | 3736 | ); |