Merge "MessagePoster followup: Dependency and docs"
[lhc/web/wiklou.git] / includes / logging / LogEventsList.php
index e03cf1c..8b28821 100644 (file)
@@ -273,7 +273,7 @@ class LogEventsList extends ContextSource {
                        } else {
                                // Allow extensions to add their own extra inputs
                                $input = '';
-                               wfRunHooks( 'LogEventsListGetExtraInputs', array( $types[0], $this, &$input ) );
+                               Hooks::run( 'LogEventsListGetExtraInputs', array( $types[0], $this, &$input ) );
                                return $input;
                        }
                }
@@ -541,29 +541,9 @@ class LogEventsList extends ContextSource {
                if ( $lim > 0 ) {
                        $pager->mLimit = $lim;
                }
-
-               $knownEmptyResult = false;
-               // Check if we can avoid the DB query all together
-               if ( $page !== '' && !$param['useMaster'] ) {
-                       $title = ( $page instanceof Title ) ? $page : Title::newFromText( $page );
-                       if ( $title ) {
-                               $member = $title->getNamespace() . ':' . $title->getDBkey();
-                               if ( !BloomCache::get( 'main' )->check( wfWikiId(), 'TitleHasLogs', $member ) ) {
-                                       $knownEmptyResult = true;
-                               }
-                       } else {
-                               $knownEmptyResult = true;
-                       }
-               }
-
                // Fetch the log rows and build the HTML if needed
-               if ( $knownEmptyResult ) {
-                       $logBody = '';
-                       $numRows = 0;
-               } else {
-                       $logBody = $pager->getBody();
-                       $numRows = $pager->getNumRows();
-               }
+               $logBody = $pager->getBody();
+               $numRows = $pager->getNumRows();
 
                $s = '';
 
@@ -632,7 +612,7 @@ class LogEventsList extends ContextSource {
                }
 
                /* hook can return false, if we don't want the message to be emitted (Wikia BugId:7093) */
-               if ( wfRunHooks( 'LogEventsListShowLogExtract', array( &$s, $types, $page, $user, $param ) ) ) {
+               if ( Hooks::run( 'LogEventsListShowLogExtract', array( &$s, $types, $page, $user, $param ) ) ) {
                        // $out can be either an OutputPage object or a String-by-reference
                        if ( $out instanceof OutputPage ) {
                                $out->addHTML( $s );