Add index on logging.log_user_text
[lhc/web/wiklou.git] / includes / Article.php
index 1619e09..821c32e 100644 (file)
@@ -1201,10 +1201,15 @@ class Article implements Page {
 
                wfRunHooks( 'ShowMissingArticle', array( $this ) );
 
+               // Give extensions a chance to hide their (unrelated) log entries
+               $logTypes = array( 'delete', 'move' );
+               $conds = array( "log_action != 'revision'" );
+               wfRunHooks( 'Article::MissingArticleConditions', array( &$conds, $logTypes ) );
+
                # Show delete and move logs
-               LogEventsList::showLogExtract( $outputPage, array( 'delete', 'move' ), $this->getTitle(), '',
+               LogEventsList::showLogExtract( $outputPage, $logTypes, $this->getTitle(), '',
                        array( 'lim' => 10,
-                               'conds' => array( "log_action != 'revision'" ),
+                               'conds' => $conds,
                                'showIfEmpty' => false,
                                'msgKey' => array( 'moveddeleted-notice' ) )
                );
@@ -1473,7 +1478,6 @@ class Article implements Page {
         */
        public function render() {
                $this->getContext()->getOutput()->setArticleBodyOnly( true );
-               $this->getContext()->getOutput()->enableSectionEditLinks( false );
                $this->view();
        }
 
@@ -1548,8 +1552,8 @@ class Article implements Page {
                }
 
                if ( $request->wasPosted() && $user->matchEditToken( $request->getVal( 'wpEditToken' ),
-                       array( 'delete', $this->getTitle()->getPrefixedText() ) ) )
-               {
+                       array( 'delete', $this->getTitle()->getPrefixedText() ) )
+               {
                        # Flag to hide all contents of the archived revisions
                        $suppress = $request->getVal( 'wpSuppress' ) && $user->isAllowed( 'suppressrevision' );