Make lines short to pass phpcs in 2 files under includes/
[lhc/web/wiklou.git] / includes / Category.php
index e235e4e..3a21e25 100644 (file)
@@ -60,8 +60,6 @@ class Category {
                        return true;
                }
 
-               wfProfileIn( __METHOD__ );
-
                $dbr = wfGetDB( DB_SLAVE );
                $row = $dbr->selectRow(
                        'category',
@@ -70,8 +68,6 @@ class Category {
                        __METHOD__
                );
 
-               wfProfileOut( __METHOD__ );
-
                if ( !$row ) {
                        # Okay, there were no contents.  Nothing to initialize.
                        if ( $this->mTitle ) {
@@ -258,7 +254,6 @@ class Category {
         * @return TitleArray TitleArray object for category members.
         */
        public function getMembers( $limit = false, $offset = '' ) {
-               wfProfileIn( __METHOD__ );
 
                $dbr = wfGetDB( DB_SLAVE );
 
@@ -284,13 +279,12 @@ class Category {
                        )
                );
 
-               wfProfileOut( __METHOD__ );
-
                return $result;
        }
 
        /**
         * Generic accessor
+        * @param string $key
         * @return bool
         */
        private function getX( $key ) {
@@ -317,10 +311,8 @@ class Category {
                        }
                }
 
-               wfProfileIn( __METHOD__ );
-
                $dbw = wfGetDB( DB_MASTER );
-               $dbw->begin( __METHOD__ );
+               $dbw->startAtomic( __METHOD__ );
 
                # Insert the row if it doesn't exist yet (e.g., this is being run via
                # update.php from a pre-1.16 schema).  TODO: This will cause lots and
@@ -360,9 +352,7 @@ class Category {
                        array( 'cat_title' => $this->mName ),
                        __METHOD__
                );
-               $dbw->commit( __METHOD__ );
-
-               wfProfileOut( __METHOD__ );
+               $dbw->endAtomic( __METHOD__ );
 
                # Now we should update our local counts.
                $this->mPages = $result->pages;