Automatically deduplicate root jobs on insertion
[lhc/web/wiklou.git] / includes / specialpage / QueryPage.php
index da752f6..92409cd 100644 (file)
@@ -252,6 +252,17 @@ abstract class QueryPage extends SpecialPage {
                return '';
        }
 
+       /**
+        * Outputs some kind of an informative message (via OutputPage) to let the
+        * user know that the query returned nothing and thus there's nothing to
+        * show.
+        *
+        * @since 1.26
+        */
+       protected function showEmptyText() {
+               $this->getOutput()->addWikiMsg( 'specialpage-empty' );
+       }
+
        /**
         * If using extra form wheely-dealies, return a set of parameters here
         * as an associative array. They will be encoded and added to the paging
@@ -546,7 +557,7 @@ abstract class QueryPage extends SpecialPage {
                        } else {
                                # No results to show, so don't bother with "showing X of Y" etc.
                                # -- just let the user know and give up now
-                               $out->addWikiMsg( 'specialpage-empty' );
+                               $this->showEmptyText();
                                $out->addHTML( Xml::closeElement( 'div' ) );
                                return;
                        }