Add final period to API module descriptions
[lhc/web/wiklou.git] / includes / api / ApiQueryAllCategories.php
index d0ab59e..8a1810b 100644 (file)
@@ -67,8 +67,12 @@ class ApiQueryAllCategories extends ApiQueryGeneratorBase {
                }
 
                $dir = ( $params['dir'] == 'descending' ? 'older' : 'newer' );
-               $from = ( is_null( $params['from'] ) ? null : $this->titlePartToKey( $params['from'] ) );
-               $to = ( is_null( $params['to'] ) ? null : $this->titlePartToKey( $params['to'] ) );
+               $from = ( $params['from'] === null
+                       ? null
+                       : $this->titlePartToKey( $params['from'], NS_CATEGORY ) );
+               $to = ( $params['to'] === null
+                       ? null
+                       : $this->titlePartToKey( $params['to'], NS_CATEGORY ) );
                $this->addWhereRange( 'cat_title', $dir, $from, $to );
 
                $min = $params['min'];
@@ -80,8 +84,9 @@ class ApiQueryAllCategories extends ApiQueryGeneratorBase {
                }
 
                if ( isset( $params['prefix'] ) ) {
-                       $this->addWhere( 'cat_title' .
-                               $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
+                       $this->addWhere( 'cat_title' . $db->buildLike(
+                               $this->titlePartToKey( $params['prefix'], NS_CATEGORY ),
+                               $db->anyString() ) );
                }
 
                $this->addOption( 'LIMIT', $params['limit'] + 1 );
@@ -220,7 +225,7 @@ class ApiQueryAllCategories extends ApiQueryGeneratorBase {
        }
 
        public function getDescription() {
-               return 'Enumerate all categories';
+               return 'Enumerate all categories.';
        }
 
        public function getExamples() {