X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FCategory.php;h=6104b8a65aecf90ea4a02362956d775bb2150891;hb=c26c3ba1a56bd84471bafba089d1b36a098e7855;hp=629962d2a95fe123a89955d1f70b711829ba04b9;hpb=d19826aa35b206847a568a4b2c1c9ffaa615fca5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Category.php b/includes/Category.php index 629962d2a9..6104b8a65a 100644 --- a/includes/Category.php +++ b/includes/Category.php @@ -119,9 +119,9 @@ class Category { /** * Factory function. * - * @param array $name A category name (no "Category:" prefix). It need + * @param string $name A category name (no "Category:" prefix). It need * not be normalized, with spaces replaced by underscores. - * @return mixed Category, or false on a totally invalid name + * @return Category|bool Category, or false on a totally invalid name */ public static function newFromName( $name ) { $cat = new self(); @@ -328,7 +328,7 @@ class Category { $dbw = wfGetDB( DB_MASTER ); # Avoid excess contention on the same category (T162121) $name = __METHOD__ . ':' . md5( $this->mName ); - $scopedLock = $dbw->getScopedLockAndFlush( $name, __METHOD__, 1 ); + $scopedLock = $dbw->getScopedLockAndFlush( $name, __METHOD__, 0 ); if ( !$scopedLock ) { return false; }