Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions formats/datatables/SearchPanes.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ public function __construct( $datatables ) {
* @return array
*/
public function getSearchPanes( $printRequests, $searchPanesOptions ) {
if ( $this->datatables->store instanceof \SMW\SPARQLStore\SPARQLStore ) {
// we got a SPARQLStore, which is not subclass of SQLStore
// dirty hack to access the private member baseStore, which is an instance of SQLStore
// this can be simplified once SPARQLStore is refactored to make this member public
// see https://github.com/SemanticMediaWiki/SemanticResultFormats/issues/827
$closure = \Closure::bind( function &( \SMW\SPARQLStore\SPARQLStore $class ) {
return $class->baseStore;
}, null, \SMW\SPARQLStore\SPARQLStore::class );
$this->datatables->store = &$closure( $this->datatables->store );
}
$this->queryEngineFactory = new QueryEngineFactory( $this->datatables->store );
$this->connection = $this->datatables->store->getConnection( 'mw.db.queryengine' );
$this->queryFactory = new QueryFactory();
Expand Down
Loading