Merge "Deprecate no longer used Skin::getCommonStylePath."
[lhc/web/wiklou.git] / includes / api / ApiQuerySearch.php
index 6f08e69..ed6c3cb 100644 (file)
  * @file
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-       // Eclipse helper - will be ignored in production
-       require_once( 'ApiQueryBase.php' );
-}
-
 /**
  * Query module to perform full text search within wiki titles and content
  *
@@ -285,6 +280,63 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                );
        }
 
+       public function getResultProperties() {
+               return array(
+                       '' => array(
+                               'ns' => 'namespace',
+                               'title' => 'string'
+                       ),
+                       'snippet' => array(
+                               'snippet' => 'string'
+                       ),
+                       'size' => array(
+                               'size' => 'integer'
+                       ),
+                       'wordcount' => array(
+                               'wordcount' => 'integer'
+                       ),
+                       'timestamp' => array(
+                               'timestamp' => 'timestamp'
+                       ),
+                       'score' => array(
+                               'score' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
+                       ),
+                       'titlesnippet' => array(
+                               'titlesnippet' => 'string'
+                       ),
+                       'redirecttitle' => array(
+                               'redirecttitle' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
+                       ),
+                       'redirectsnippet' => array(
+                               'redirectsnippet' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
+                       ),
+                       'sectiontitle' => array(
+                               'sectiontitle' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
+                       ),
+                       'sectionsnippet' => array(
+                               'sectionsnippet' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
+                       ),
+                       'hasrelated' => array(
+                               'hasrelated' => 'boolean'
+                       )
+               );
+       }
+
        public function getDescription() {
                return 'Perform a full text search';
        }
@@ -305,7 +357,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
        }
 
        public function getHelpUrls() {
-               return 'http://www.mediawiki.org/wiki/API:Search';
+               return 'https://www.mediawiki.org/wiki/API:Search';
        }
 
        public function getVersion() {