+
+ # "Post a comment" link
+ if( ( $title->isTalkPage() || $this->getSkin()->getOutput()->showNewSectionLink() ) && $action != 'edit' && !$wpPreview )
+ $s .= '<br />' . Linker::link(
+ $title,
+ wfMsg( 'postcomment' ),
+ array(),
+ array(
+ 'action' => 'edit',
+ 'section' => 'new'
+ )
+ );
+
+ /**
+ * Watching could cause problems in edit mode:
+ * if user edits article, then loads "watch this article" in background and then saves
+ * article with "Watch this article" checkbox disabled, the article is transparently
+ * unwatched. Therefore we do not show the "Watch this page" link in edit mode.
+ */
+ if ( $this->data['loggedin'] && $articleExists ) {
+ if( $action != 'edit' && $action != 'submit' ) {
+ $s .= $sep . $this->watchThisPage();
+ }
+ if ( $title->userCan( 'edit' ) )
+ $s .= $sep . $this->moveThisPage();
+ }
+ if ( $this->getSkin()->getUser()->isAllowed( 'delete' ) && $articleExists ) {
+ $s .= $sep . $this->deleteThisPage() .
+ $sep . $this->protectThisPage();
+ }
+ $s .= $sep . $this->talkLink();
+ if( $articleExists && $action != 'history' ) {
+ $s .= $sep . $this->historyLink();
+ }
+ $s .= $sep . $this->whatLinksHere();
+
+ if( $this->getSkin()->getOutput()->isArticleRelated() ) {
+ $s .= $sep . $this->watchPageLinksLink();
+ }
+
+ if (
+ NS_USER == $title->getNamespace() ||
+ $title->getNamespace() == NS_USER_TALK
+ ) {
+
+ $id = User::idFromName( $title->getText() );
+ $ip = User::isIP( $title->getText() );
+
+ if( $id || $ip ){
+ $s .= $sep . $this->userContribsLink();
+ }
+ if( $this->getSkin()->showEmailUser( $id ) ) {
+ $s .= $sep . $this->emailUserLink();
+ }
+ }
+ $s .= "\n<br /><hr class='sep' />";
+ }
+
+ if( UploadBase::isEnabled() && UploadBase::isAllowed( $this->getSkin()->getUser() ) === true ) {
+ $s .= $this->getUploadLink() . $sep;
+ }
+
+ $s .= Linker::specialLink( 'Specialpages' );
+
+ global $wgSiteSupportPage;
+ if( $wgSiteSupportPage ) {
+ $s .= "\n<br /><a href=\"" . htmlspecialchars( $wgSiteSupportPage ) .
+ '" class="internal">' . wfMsg( 'sitesupport' ) . '</a>';