Update more docs and type hints to use IDatabase
[lhc/web/wiklou.git] / includes / pager / IndexPager.php
index ce6dc50..f0e7f3e 100644 (file)
@@ -182,7 +182,7 @@ abstract class IndexPager extends ContextSource implements Pager {
        /**
         * Get the Database object in use
         *
-        * @return DatabaseBase
+        * @return IDatabase
         */
        public function getDatabase() {
                return $this->mDb;
@@ -196,7 +196,7 @@ abstract class IndexPager extends ContextSource implements Pager {
        public function doQuery() {
                # Use the child class name for profiling
                $fname = __METHOD__ . ' (' . get_class( $this ) . ')';
-               wfProfileIn( $fname );
+               $section = Profiler::instance()->scopedProfileIn( $fname );
 
                // @todo This should probably compare to DIR_DESCENDING and DIR_ASCENDING constants
                $descending = ( $this->mIsBackwards == $this->mDefaultDirection );
@@ -226,8 +226,6 @@ abstract class IndexPager extends ContextSource implements Pager {
 
                $this->preprocessResults( $this->mResult );
                $this->mResult->rewind(); // Paranoia
-
-               wfProfileOut( $fname );
        }
 
        /**
@@ -478,7 +476,6 @@ abstract class IndexPager extends ContextSource implements Pager {
                        $attrs['class'] = "mw-{$type}link";
                }
 
-
                return Linker::linkKnown(
                        $this->getTitle(),
                        $text,