Merge "Move ApiQueryRecentChanges::parseRCType to static method on RecentChange"
[lhc/web/wiklou.git] / includes / OutputPage.php
index 16e070c..0f3612a 100644 (file)
@@ -1748,13 +1748,7 @@ class OutputPage extends ContextSource {
         */
        public function parseInline( $text, $linestart = true, $interface = false ) {
                $parsed = $this->parse( $text, $linestart, $interface );
-
-               $m = array();
-               if ( preg_match( '/^<p>(.*)\n?<\/p>\n?/sU', $parsed, $m ) ) {
-                       $parsed = $m[1];
-               }
-
-               return $parsed;
+               return Parser::stripOuterParagraph( $parsed );
        }
 
        /**
@@ -3275,13 +3269,13 @@ $templates
                                        'rel' => 'alternate',
                                        'type' => 'application/x-wiki',
                                        'title' => $msg,
-                                       'href' => $this->getTitle()->getLocalURL( 'action=edit' )
+                                       'href' => $this->getTitle()->getEditURL(),
                                ) );
                                // Alternate edit link
                                $tags['alternative-edit'] = Html::element( 'link', array(
                                        'rel' => 'edit',
                                        'title' => $msg,
-                                       'href' => $this->getTitle()->getLocalURL( 'action=edit' )
+                                       'href' => $this->getTitle()->getEditURL(),
                                ) );
                        }
                }