X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FCategory.php;h=53e44d710c931271b6953e99439b5ddf0194c098;hb=62a6a48bd4cde140a2bebde73f882754dfaa273b;hp=6a5eac7b89f7d641bd899ace01d6bb55b7d737ae;hpb=a78b35a36df8ff4c52261e1308b6118009b451f2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Category.php b/includes/Category.php index 6a5eac7b89..53e44d710c 100644 --- a/includes/Category.php +++ b/includes/Category.php @@ -75,11 +75,11 @@ class Category { # Okay, there were no contents. Nothing to initialize. if ( $this->mTitle ) { # If there is a title object but no record in the category table, treat this as an empty category - $this->mID = false; - $this->mName = $this->mTitle->getDBkey(); - $this->mPages = 0; + $this->mID = false; + $this->mName = $this->mTitle->getDBkey(); + $this->mPages = 0; $this->mSubcats = 0; - $this->mFiles = 0; + $this->mFiles = 0; return true; } else { @@ -87,11 +87,11 @@ class Category { } } - $this->mID = $row->cat_id; - $this->mName = $row->cat_title; - $this->mPages = $row->cat_pages; + $this->mID = $row->cat_id; + $this->mName = $row->cat_title; + $this->mPages = $row->cat_pages; $this->mSubcats = $row->cat_subcats; - $this->mFiles = $row->cat_files; + $this->mFiles = $row->cat_files; # (bug 13683) If the count is negative, then 1) it's obviously wrong # and should not be kept, and 2) we *probably* don't have to scan many @@ -179,16 +179,16 @@ class Category { $cat->mName = $title->getDBkey(); # if we have a title object, fetch the category name from there } - $cat->mID = false; + $cat->mID = false; $cat->mSubcats = 0; - $cat->mPages = 0; - $cat->mFiles = 0; + $cat->mPages = 0; + $cat->mFiles = 0; } else { - $cat->mName = $row->cat_title; - $cat->mID = $row->cat_id; + $cat->mName = $row->cat_title; + $cat->mID = $row->cat_id; $cat->mSubcats = $row->cat_subcats; - $cat->mPages = $row->cat_pages; - $cat->mFiles = $row->cat_files; + $cat->mPages = $row->cat_pages; + $cat->mFiles = $row->cat_files; } return $cat; @@ -333,7 +333,7 @@ class Category { ), array( 'cl_to' => $this->mName, 'page_id = cl_from' ), __METHOD__, - 'LOCK IN SHARE MODE' + array( 'LOCK IN SHARE MODE' ) ); $ret = $dbw->update( 'category', @@ -350,9 +350,9 @@ class Category { wfProfileOut( __METHOD__ ); # Now we should update our local counts. - $this->mPages = $result->pages; + $this->mPages = $result->pages; $this->mSubcats = $result->subcats; - $this->mFiles = $result->files; + $this->mFiles = $result->files; return $ret; }