Merge "Make MySQLi work with non-standard port"
[lhc/web/wiklou.git] / includes / api / ApiOpenSearch.php
index 315ace3..f2bf754 100644 (file)
@@ -40,6 +40,7 @@ class ApiOpenSearch extends ApiBase {
                if ( in_array( $format, $allowed ) ) {
                        return $this->getMain()->createPrinterByName( $format );
                }
+
                return $this->getMain()->createPrinterByName( $allowed[0] );
        }
 
@@ -89,10 +90,12 @@ class ApiOpenSearch extends ApiBase {
        }
 
        public function getAllowedParams() {
+               global $wgOpenSearchDefaultLimit;
+
                return array(
                        'search' => null,
                        'limit' => array(
-                               ApiBase::PARAM_DFLT => 10,
+                               ApiBase::PARAM_DFLT => $wgOpenSearchDefaultLimit,
                                ApiBase::PARAM_TYPE => 'limit',
                                ApiBase::PARAM_MIN => 1,
                                ApiBase::PARAM_MAX => 100,
@@ -122,7 +125,7 @@ class ApiOpenSearch extends ApiBase {
        }
 
        public function getDescription() {
-               return 'Search the wiki using the OpenSearch protocol';
+               return 'Search the wiki using the OpenSearch protocol.';
        }
 
        public function getExamples() {