Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Remove broken legacy code
......................................................................

Remove broken legacy code

Change-Id: I825043a3c631b659992a763d28075715d61533c1
---
M WikibaseQuery.php
D src/Wikibase/Query/QueryHandler.php
2 files changed, 2 insertions(+), 99 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQuery 
refs/changes/10/76510/1

diff --git a/WikibaseQuery.php b/WikibaseQuery.php
index 58072b7..8ed7d29 100644
--- a/WikibaseQuery.php
+++ b/WikibaseQuery.php
@@ -87,8 +87,8 @@
 // @codeCoverageIgnoreEnd
 
 call_user_func( function() {
-       global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgHooks, 
$wgWBRepoSettings;
-       global $wgExtraNamespaces, $wgContentHandlers, $wgAPIModules;
+       global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgHooks;
+       global $wgAPIModules;
 
        $wgExtensionCredits['wikibase'][] = array(
                'path' => __DIR__,
@@ -131,22 +131,6 @@
 
                return true;
        };
-
-       $wgWBRepoSettings['entityPrefixes']['y'] = 'query';
-
-       define( 'CONTENT_MODEL_WIKIBASE_QUERY', "wikibase-query" );
-
-       $wgHooks['FormatAutocomments'][] = array( 
'Wikibase\Autocomment::onFormat', array( CONTENT_MODEL_WIKIBASE_QUERY, 
"wikibase-query" ) );
-
-       $wgContentHandlers[CONTENT_MODEL_WIKIBASE_QUERY] = 
'\Wikibase\Query\QueryHandler';
-
-       define( 'WB_NS_QUERY', 124 );
-       define( 'WB_NS_QUERY_TALK', 125 );
-
-       $wgExtraNamespaces[WB_NS_QUERY] = 'Query';
-       $wgExtraNamespaces[WB_NS_QUERY_TALK] = 'Query_talk';
-
-       $wgWBRepoSettings['entityNamespaces'][CONTENT_MODEL_WIKIBASE_QUERY] = 
WB_NS_QUERY;
 } );
 
 \Wikibase\Query\DIC\ExtensionAccess::setRegistryBuilder( function() {
diff --git a/src/Wikibase/Query/QueryHandler.php 
b/src/Wikibase/Query/QueryHandler.php
deleted file mode 100644
index a20fc6d..0000000
--- a/src/Wikibase/Query/QueryHandler.php
+++ /dev/null
@@ -1,81 +0,0 @@
-<?php
-
-namespace Wikibase\Query;
-
-use Title;
-use ParserOutput;
-use Wikibase\EntityFactory;
-use Wikibase\EntityHandler;
-
-/**
- * Content handler for Wikibase items.
- *
- * 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
- *
- * @since 0.1
- *
- * @file
- * @ingroup WikibaseRepo
- *
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw < [email protected] >
- */
-class QueryHandler extends EntityHandler {
-
-       public function __construct() {
-               parent::__construct( CONTENT_MODEL_WIKIBASE_QUERY );
-       }
-
-       /**
-        * @see EntityHandler::getContentClass
-        *
-        * @since 0.1
-        *
-        * @return string
-        */
-       protected function getContentClass() {
-               return '\Wikibase\Query\QueryContent';
-       }
-
-       /**
-        * @return array
-        */
-       public function getActionOverrides() {
-               return array(
-                       'history' => '\Wikibase\Query\HistoryQueryAction',
-                       'view' => '\Wikibase\Query\ViewQueryAction',
-                       'edit' => '\Wikibase\Query\EditQueryAction',
-                       'submit' => '\Wikibase\Query\SubmitQueryAction',
-               );
-       }
-
-       /**
-        * @see ContentHandler::unserializeContent
-        *
-        * @since 0.1
-        *
-        * @param string $blob
-        * @param null|string $format
-        *
-        * @return QueryContent
-        */
-       public function unserializeContent( $blob, $format = null ) {
-               $entity = EntityFactory::singleton()->newFromBlob( 
QueryEntity::ENTITY_TYPE, $blob, $format );
-               return QueryContent::newFromQuery( $entity );
-       }
-
-}
-

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I825043a3c631b659992a763d28075715d61533c1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQuery
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>

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

Reply via email to