Raimond Spekking has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/76547


Change subject: Change from Windows to Linux line endings
......................................................................

Change from Windows to Linux line endings

Change-Id: Ib25a5f1093bf8cc81e3aa626ac34e7fc69012795
---
M WebPlatformSearchAutocomplete.i18n.php
M WebPlatformSearchAutocomplete.php
M includes/WebPlatformSearchAutocompleteHooks.php
M includes/api/ApiWebplatformSearch.php
4 files changed, 235 insertions(+), 235 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WebPlatformSearchAutocomplete
 refs/changes/47/76547/1

diff --git a/WebPlatformSearchAutocomplete.i18n.php 
b/WebPlatformSearchAutocomplete.i18n.php
index 59e2030..dd5b6e1 100644
--- a/WebPlatformSearchAutocomplete.i18n.php
+++ b/WebPlatformSearchAutocomplete.i18n.php
@@ -1,30 +1,30 @@
-<?php
-/**
- * Internationalization file for the WebPlatformSearchAutocomplete extension.
- *
- * @file
- * @ingroup Extensions
- */
-
-$messages = array();
-
-/** English
- * @author Robert Vogel
- */
-$messages['en'] = array(
-       'webplatformsearchautocomplete-desc' => 'Provides customized 
autocomplete functionality for webplatform.org search',
-);
-
-/** Message documentation (Message documentation)
- * @author Robert Vogel
- */
-$messages['qqq'] = array(
-       'webplatformsearchautocomplete-desc' => 'The extensions description'
-);
-
-/** German (Deutsch)
- * @author Robert Vogel
- */
-$messages['de'] = array(
-       'webplatformsearchautocomplete-desc' => 'Stellt eine speziell 
angepasste AutoComplete Funktionalität für die Suche von webplatform.org bereit'
+<?php
+/**
+ * Internationalization file for the WebPlatformSearchAutocomplete extension.
+ *
+ * @file
+ * @ingroup Extensions
+ */
+
+$messages = array();
+
+/** English
+ * @author Robert Vogel
+ */
+$messages['en'] = array(
+       'webplatformsearchautocomplete-desc' => 'Provides customized 
autocomplete functionality for webplatform.org search',
+);
+
+/** Message documentation (Message documentation)
+ * @author Robert Vogel
+ */
+$messages['qqq'] = array(
+       'webplatformsearchautocomplete-desc' => 'The extensions description'
+);
+
+/** German (Deutsch)
+ * @author Robert Vogel
+ */
+$messages['de'] = array(
+       'webplatformsearchautocomplete-desc' => 'Stellt eine speziell 
angepasste AutoComplete Funktionalität für die Suche von webplatform.org bereit'
 );
\ No newline at end of file
diff --git a/WebPlatformSearchAutocomplete.php 
b/WebPlatformSearchAutocomplete.php
index fb51372..cab05d6 100644
--- a/WebPlatformSearchAutocomplete.php
+++ b/WebPlatformSearchAutocomplete.php
@@ -1,46 +1,46 @@
-<?php
-# Alert the user that this is not a valid entry point to MediaWiki if they try 
to access the special pages file directly.
-if (!defined('MEDIAWIKI')) {
-       echo <<<EOT
-To install my extension, put the following line in LocalSettings.php:
-require_once( 
"$IP/extensions/WebPlatformSearchAutocomplete/WebPlatformSearchAutocomplete.php"
 );
-EOT;
-       exit( 1 );
-}
- 
-$wgExtensionCredits['api'][] = array(
-       'path'           => __FILE__,
-       'name'           => 'WebPlatformSearchAutocomplete',
-       'author'         => '[http://www.hallowelt.biz Hallo Welt! 
Medienwerkstatt GmbH]; Robert Vogel',
-       'url'            => 'http://www.hallowelt.biz',
-       'descriptionmsg' => 'webplatformsearchautocomplete-desc',
-       'version'        => '1.0.0; $Revision: 8194 $',
-);
-
-$dir = dirname(__FILE__) . '/';
- 
-$wgAutoloadClasses['ApiWebPlatformSearch']   = $dir . 
'includes/api/ApiWebplatformSearch.php';
-$wgAutoloadClasses['WebPlatformSearchAutocompleteHooks']   = $dir . 
'includes/WebPlatformSearchAutocompleteHooks.php';
-$wgExtensionMessagesFiles['WebPlatformSearchAutocomplete'] = $dir . 
'WebPlatformSearchAutocomplete.i18n.php';
-
-$wgAPIModules['webplatformsearch'] = 'ApiWebPlatformSearch';
-
-$wgHooks['BeforePageDisplay'][] = 
'WebPlatformSearchAutocompleteHooks::onBeforePageDisplay';
-$wgHooks['UserGetDefaultOptions'][] = 
'WebPlatformSearchAutocompleteHooks::onUserGetDefaultOptions';
-$wgHooks['UserLoadOptions'][] = 
'WebPlatformSearchAutocompleteHooks::onUserLoadOptions';
-$wgHooks['GetPreferences'][] = 
'WebPlatformSearchAutocompleteHooks::onGetPreferences';
-
-$wgResourceModules['ext.WebPlatformSearchAutocomplete'] = array(
-       'scripts'       => array( 
'resources/ext.webPlatformSearchAutocomplete.core.js' ),
-       'styles'        => array( 
'resources/ext.webPlatformSearchAutocomplete.core.css' ),
-       'messages'      => array( 
-                       'searchsuggest-search',
-                       'searchsuggest-containing',
-       ),
-       'dependencies'  => array(
-               'jquery.ui.autocomplete',
-               'jquery.placeholder'
-       ),
-       'localBasePath' => dirname( __FILE__ ),
-       'remoteExtPath' => 'WebPlatformSearchAutocomplete'
+<?php
+# Alert the user that this is not a valid entry point to MediaWiki if they try 
to access the special pages file directly.
+if (!defined('MEDIAWIKI')) {
+       echo <<<EOT
+To install my extension, put the following line in LocalSettings.php:
+require_once( 
"$IP/extensions/WebPlatformSearchAutocomplete/WebPlatformSearchAutocomplete.php"
 );
+EOT;
+       exit( 1 );
+}
+ 
+$wgExtensionCredits['api'][] = array(
+       'path'           => __FILE__,
+       'name'           => 'WebPlatformSearchAutocomplete',
+       'author'         => '[http://www.hallowelt.biz Hallo Welt! 
Medienwerkstatt GmbH]; Robert Vogel',
+       'url'            => 'http://www.hallowelt.biz',
+       'descriptionmsg' => 'webplatformsearchautocomplete-desc',
+       'version'        => '1.0.0; $Revision: 8194 $',
+);
+
+$dir = dirname(__FILE__) . '/';
+ 
+$wgAutoloadClasses['ApiWebPlatformSearch']   = $dir . 
'includes/api/ApiWebplatformSearch.php';
+$wgAutoloadClasses['WebPlatformSearchAutocompleteHooks']   = $dir . 
'includes/WebPlatformSearchAutocompleteHooks.php';
+$wgExtensionMessagesFiles['WebPlatformSearchAutocomplete'] = $dir . 
'WebPlatformSearchAutocomplete.i18n.php';
+
+$wgAPIModules['webplatformsearch'] = 'ApiWebPlatformSearch';
+
+$wgHooks['BeforePageDisplay'][] = 
'WebPlatformSearchAutocompleteHooks::onBeforePageDisplay';
+$wgHooks['UserGetDefaultOptions'][] = 
'WebPlatformSearchAutocompleteHooks::onUserGetDefaultOptions';
+$wgHooks['UserLoadOptions'][] = 
'WebPlatformSearchAutocompleteHooks::onUserLoadOptions';
+$wgHooks['GetPreferences'][] = 
'WebPlatformSearchAutocompleteHooks::onGetPreferences';
+
+$wgResourceModules['ext.WebPlatformSearchAutocomplete'] = array(
+       'scripts'       => array( 
'resources/ext.webPlatformSearchAutocomplete.core.js' ),
+       'styles'        => array( 
'resources/ext.webPlatformSearchAutocomplete.core.css' ),
+       'messages'      => array( 
+                       'searchsuggest-search',
+                       'searchsuggest-containing',
+       ),
+       'dependencies'  => array(
+               'jquery.ui.autocomplete',
+               'jquery.placeholder'
+       ),
+       'localBasePath' => dirname( __FILE__ ),
+       'remoteExtPath' => 'WebPlatformSearchAutocomplete'
 );
\ No newline at end of file
diff --git a/includes/WebPlatformSearchAutocompleteHooks.php 
b/includes/WebPlatformSearchAutocompleteHooks.php
index c8fbc0a..6edf501 100644
--- a/includes/WebPlatformSearchAutocompleteHooks.php
+++ b/includes/WebPlatformSearchAutocompleteHooks.php
@@ -1,48 +1,48 @@
-<?php
-
-class WebPlatformSearchAutocompleteHooks {
-       /**
-        * 
-        * @param OutputPage $out
-        * @param SkinTemplate $skin
-        * @return bool Always true to keep hook running
-        */
-       public static function onBeforePageDisplay( &$out, &$skin ) {
-               if( $out->getUser()->getOption( 'wpddisablesuggest', false ) ) 
return true;
-               $out->addModules( 'ext.WebPlatformSearchAutocomplete' );
-               return true;
-       }
-
-       /**
-        * 
-        * @param array $defaultOptions
-        * @return boolean
-        */
-       public static function onUserGetDefaultOptions( &$defaultOptions ) {
-               $defaultOptions['disablesuggest'] = true;
-               return true;
-       }
-       
-       /**
-        * 
-        * @param type $user
-        * @param array $options
-        * @return boolean
-        */
-       public static function onUserLoadOptions( $user, &$options ) {
-               $options['disablesuggest'] = true;
-               return true;
-       }
-       
-       /**
-        * 
-        * @param type $user
-        * @param type $preferences
-        * @return boolean
-        */
-       public static function onGetPreferences( $user, &$preferences ) {
-               $preferences['wpddisablesuggest'] = 
$preferences['disablesuggest'];
-               unset($preferences['disablesuggest']);
-               return true;
-       }
+<?php
+
+class WebPlatformSearchAutocompleteHooks {
+       /**
+        * 
+        * @param OutputPage $out
+        * @param SkinTemplate $skin
+        * @return bool Always true to keep hook running
+        */
+       public static function onBeforePageDisplay( &$out, &$skin ) {
+               if( $out->getUser()->getOption( 'wpddisablesuggest', false ) ) 
return true;
+               $out->addModules( 'ext.WebPlatformSearchAutocomplete' );
+               return true;
+       }
+
+       /**
+        * 
+        * @param array $defaultOptions
+        * @return boolean
+        */
+       public static function onUserGetDefaultOptions( &$defaultOptions ) {
+               $defaultOptions['disablesuggest'] = true;
+               return true;
+       }
+       
+       /**
+        * 
+        * @param type $user
+        * @param array $options
+        * @return boolean
+        */
+       public static function onUserLoadOptions( $user, &$options ) {
+               $options['disablesuggest'] = true;
+               return true;
+       }
+       
+       /**
+        * 
+        * @param type $user
+        * @param type $preferences
+        * @return boolean
+        */
+       public static function onGetPreferences( $user, &$preferences ) {
+               $preferences['wpddisablesuggest'] = 
$preferences['disablesuggest'];
+               unset($preferences['disablesuggest']);
+               return true;
+       }
 }
\ No newline at end of file
diff --git a/includes/api/ApiWebplatformSearch.php 
b/includes/api/ApiWebplatformSearch.php
index 4083d7e..2db15ad 100644
--- a/includes/api/ApiWebplatformSearch.php
+++ b/includes/api/ApiWebplatformSearch.php
@@ -1,114 +1,114 @@
-<?php
-/**
- *
- *
- * Created on Sep 17, 2012
- *
- * API module for MediaWiki's WebPlatformSearchAutocomplete extension
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-/**
- * @ingroup WebPlatformSearchAutocomplete
- */
-class ApiWebPlatformSearch extends ApiBase {
-
-       public function __construct( $main, $action ) {
-               parent::__construct( $main, $action );
-       }
-
-       public function getCustomPrinter() {
-               return $this->getMain()->createPrinterByName( 'json' );
-       }
-
-       public function execute() {
-               global $wgSearchSuggestCacheExpiry, 
$wgWebPlatformSearchAutocompleteSearchCategories;
-               $params = $this->extractRequestParams();
-
-               $search = $params['term'];
-               $hits   = array();
-
-               // Open search results may be stored for a very long time
-               $this->getMain()->setCacheMaxAge( $wgSearchSuggestCacheExpiry );
-               $this->getMain()->setCacheMode( 'public' );
-               
-               $db = $this->getDB( DB_SLAVE );
-               $res = $db->select(
-                       'page',
-                       'page_title',
-                       array(
-                               'page_namespace' => NS_MAIN,
-                               'page_title'.$db->buildLike(
-                                       $db->anyString(),
-                                       /*'/'.*/$search,
-                                       $db->anyString()
-                               ),
-                               'page_is_redirect' => 0,
-                       ),
-                       __METHOD__,
-                       array(
-                               'LIMIT' => 50,
-                               'ORDER BY' => 'page_title'
-                       )
-               );
-
-               foreach( $res as $row ) {
-                       $titleParts = explode( '/', $row->page_title );
-                       $hit = new stdClass();
-                       $hit->label = str_replace( '_', ' ', basename( 
$row->page_title ) );
-                       $hit->fullTitle = $row->page_title;
-                       $hit->category = str_replace( '_', ' ', strtoupper( 
$titleParts[0] ) );
-                       $hits[] = $hit;
-               }
-
-               // Set top level elements
-               $result = $this->getResult();
-               $result->addValue( null, 'result', $hits );
-       }
-
-       public function getAllowedParams() {
-               return array(
-                       'term' => null,
-               );
-       }
-
-       public function getParamDescription() {
-               return array(
-                       'term' => 'Search string'
-               );
-       }
-
-       public function getDescription() {
-               return 'Search the webplatform.org wiki';
-       }
-
-       public function getExamples() {
-               return array(
-                       'api.php?action=webplatformsearch&term=Te'
-               );
-       }
-
-       public function getHelpUrls() {
-               return 'https://www.webplatform.org';
-       }
-
-       public function getVersion() {
-               return __CLASS__ . ': $Id: ApiWebplatformSearch.php 8232 
2013-01-18 13:14:32Z rvogel $';
-       }
-}
+<?php
+/**
+ *
+ *
+ * Created on Sep 17, 2012
+ *
+ * API module for MediaWiki's WebPlatformSearchAutocomplete extension
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @ingroup WebPlatformSearchAutocomplete
+ */
+class ApiWebPlatformSearch extends ApiBase {
+
+       public function __construct( $main, $action ) {
+               parent::__construct( $main, $action );
+       }
+
+       public function getCustomPrinter() {
+               return $this->getMain()->createPrinterByName( 'json' );
+       }
+
+       public function execute() {
+               global $wgSearchSuggestCacheExpiry, 
$wgWebPlatformSearchAutocompleteSearchCategories;
+               $params = $this->extractRequestParams();
+
+               $search = $params['term'];
+               $hits   = array();
+
+               // Open search results may be stored for a very long time
+               $this->getMain()->setCacheMaxAge( $wgSearchSuggestCacheExpiry );
+               $this->getMain()->setCacheMode( 'public' );
+               
+               $db = $this->getDB( DB_SLAVE );
+               $res = $db->select(
+                       'page',
+                       'page_title',
+                       array(
+                               'page_namespace' => NS_MAIN,
+                               'page_title'.$db->buildLike(
+                                       $db->anyString(),
+                                       /*'/'.*/$search,
+                                       $db->anyString()
+                               ),
+                               'page_is_redirect' => 0,
+                       ),
+                       __METHOD__,
+                       array(
+                               'LIMIT' => 50,
+                               'ORDER BY' => 'page_title'
+                       )
+               );
+
+               foreach( $res as $row ) {
+                       $titleParts = explode( '/', $row->page_title );
+                       $hit = new stdClass();
+                       $hit->label = str_replace( '_', ' ', basename( 
$row->page_title ) );
+                       $hit->fullTitle = $row->page_title;
+                       $hit->category = str_replace( '_', ' ', strtoupper( 
$titleParts[0] ) );
+                       $hits[] = $hit;
+               }
+
+               // Set top level elements
+               $result = $this->getResult();
+               $result->addValue( null, 'result', $hits );
+       }
+
+       public function getAllowedParams() {
+               return array(
+                       'term' => null,
+               );
+       }
+
+       public function getParamDescription() {
+               return array(
+                       'term' => 'Search string'
+               );
+       }
+
+       public function getDescription() {
+               return 'Search the webplatform.org wiki';
+       }
+
+       public function getExamples() {
+               return array(
+                       'api.php?action=webplatformsearch&term=Te'
+               );
+       }
+
+       public function getHelpUrls() {
+               return 'https://www.webplatform.org';
+       }
+
+       public function getVersion() {
+               return __CLASS__ . ': $Id: ApiWebplatformSearch.php 8232 
2013-01-18 13:14:32Z rvogel $';
+       }
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/76547
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib25a5f1093bf8cc81e3aa626ac34e7fc69012795
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WebPlatformSearchAutocomplete
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to