r63605 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63604‎ | r63605 | r63606 >
Date:16:00, 11 March 2010
Author:yaron
Status:deferred
Tags:
Comment:
Tag for version 0.2.4
Modified paths:
  • /tags/extensions/SemanticCompoundQueries/REL_0_2_4 (added) (history)

Diff [purge]

Index: tags/extensions/SemanticCompoundQueries/REL_0_2_4/SCQ_QueryResult.php
@@ -0,0 +1,35 @@
 2+<?php
 3+
 4+if ( !defined( 'MEDIAWIKI' ) ) die();
 5+
 6+/**
 7+ * Subclass of SMWQueryResult - this class was mostly created in order to
 8+ * get around an inconvenient print-request-compatibility check in
 9+ * SMWQueryResult::addRow()
 10+ *
 11+ * @ingroup SemanticCompoundQueries
 12+ * @author Yaron Koren
 13+ */
 14+class SCQQueryResult extends SMWQueryResult {
 15+
 16+ function addResult( $new_result ) {
 17+ // create an array of the pages already in this query result,
 18+ // so that we can check against it to make sure that pages
 19+ // aren't included twice
 20+ $existing_page_names = array();
 21+ while ( $row = $this->getNext() ) {
 22+ if ( $row[0] instanceof SMWResultArray ) {
 23+ $content = $row[0]->getContent();
 24+ $existing_page_names[] = $content[0]->getLongText( SMW_OUTPUT_WIKI );
 25+ }
 26+ }
 27+ while ( ( $row = $new_result->getNext() ) !== false ) {
 28+ $row[0]->display_options = $new_result->display_options;
 29+ $content = $row[0]->getContent();
 30+ $page_name = $content[0]->getLongText( SMW_OUTPUT_WIKI );
 31+ if ( ! in_array( $page_name, $existing_page_names ) )
 32+ $this->m_content[] = $row;
 33+ }
 34+ reset( $this->m_content );
 35+ }
 36+}
Property changes on: tags/extensions/SemanticCompoundQueries/REL_0_2_4/SCQ_QueryResult.php
___________________________________________________________________
Name: svn:eol-style
137 + native
Index: tags/extensions/SemanticCompoundQueries/REL_0_2_4/SCQ_QueryProcessor.php
@@ -0,0 +1,166 @@
 2+<?php
 3+
 4+if ( !defined( 'MEDIAWIKI' ) ) die();
 5+
 6+/**
 7+ * Class that holds static functions for handling compound queries.
 8+ * This class is heavily based on Semantic MediaWiki's SMWQueryProcessor,
 9+ * and calls that class's functions when possible.
 10+ *
 11+ * @ingroup SemanticCompoundQueries
 12+ * @author Yaron Koren
 13+ */
 14+class SCQQueryProcessor {
 15+
 16+ /**
 17+ * An alternative to explode() - that function won't work here,
 18+ * because we don't want to split the string on all semicolons, just
 19+ * the ones that aren't contained within square brackets
 20+ */
 21+ public static function getSubParams( $param ) {
 22+ $sub_params = array();
 23+ $sub_param = "";
 24+ $uncompleted_square_brackets = 0;
 25+ for ( $i = 0; $i < strlen( $param ); $i++ ) {
 26+ $c = $param[$i];
 27+ if ( ( $c == ';' ) && ( $uncompleted_square_brackets <= 0 ) ) {
 28+ $sub_params[] = trim($sub_param);
 29+ $sub_param = "";
 30+ } else {
 31+ $sub_param .= $c;
 32+ if ( $c == '[' )
 33+ $uncompleted_square_brackets++;
 34+ elseif ( $c == ']' )
 35+ $uncompleted_square_brackets--;
 36+ }
 37+ }
 38+ $sub_params[] = trim($sub_param);
 39+ return $sub_params;
 40+ }
 41+
 42+ /**
 43+ */
 44+ public static function doCompoundQuery( &$parser ) {
 45+ global $smwgQEnabled, $smwgIQRunningNumber;
 46+ if ( $smwgQEnabled ) {
 47+ $smwgIQRunningNumber++;
 48+ $params = func_get_args();
 49+ array_shift( $params ); // we already know the $parser ...
 50+ $other_params = array();
 51+ $query_result = null;
 52+ $results = array();
 53+ foreach ( $params as $param ) {
 54+ // very primitive heuristic - if the parameter
 55+ // includes a square bracket, then it's a
 56+ // sub-query; otherwise it's a regular parameter
 57+ if ( strpos( $param, '[' ) !== false ) {
 58+ $sub_params = SCQQueryProcessor::getSubParams( $param );
 59+ $next_result = SCQQueryProcessor::getQueryResultFromFunctionParams( $sub_params, SMW_OUTPUT_WIKI );
 60+ if (method_exists($next_result, 'getResults')) { // SMW 1.5+
 61+ $results = self::mergeSMWQueryResults($results, $next_result->getResults());
 62+ } else {
 63+ if ( $query_result == null )
 64+ $query_result = new SCQQueryResult( $next_result->getPrintRequests(), new SMWQuery() );
 65+ $query_result->addResult( $next_result );
 66+ }
 67+ } else {
 68+ $parts = explode( '=', $param, 2 );
 69+ if ( count( $parts ) >= 2 ) {
 70+ $other_params[strtolower( trim( $parts[0] ) )] = $parts[1]; // don't trim here, some params care for " "
 71+ }
 72+ }
 73+ }
 74+ if ( is_null($query_result) ) // SMW 1.5+
 75+ $query_result = new SCQQueryResult( $next_result->getPrintRequests(), new SMWQuery(), $results, smwfGetStore() );
 76+ $result = SCQQueryProcessor::getResultFromQueryResult( $query_result, $other_params, null, SMW_OUTPUT_WIKI );
 77+ } else {
 78+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
 79+ $result = smwfEncodeMessages( array( wfMsgForContent( 'smw_iq_disabled' ) ) );
 80+ }
 81+ return $result;
 82+ }
 83+
 84+ static function getQueryResultFromFunctionParams( $rawparams, $outputmode, $context = SMWQueryProcessor::INLINE_QUERY, $showmode = false ) {
 85+ SMWQueryProcessor::processFunctionParams( $rawparams, $querystring, $params, $printouts, $showmode );
 86+ return SCQQueryProcessor::getQueryResultFromQueryString( $querystring, $params, $printouts, SMW_OUTPUT_WIKI, $context );
 87+ }
 88+
 89+ /**
 90+ * Combine two arrays of SMWWikiPageValue objects into one
 91+ */
 92+ static function mergeSMWQueryResults( $result1, $result2 ) {
 93+ if ( $result1 == null ) {
 94+ return $result2;
 95+ }
 96+ $existing_page_names = array();
 97+ foreach ($result1 as $r1) {
 98+ $existing_page_names[] = $r1->getWikiValue();
 99+ }
 100+ foreach ($result2 as $r2) {
 101+ $page_name = $r2->getWikiValue();
 102+ if (! in_array($page_name, $existing_page_names)) {
 103+ $result1[] = $r2;
 104+ }
 105+ }
 106+ return $result1;
 107+ }
 108+
 109+ // this method is an exact copy of SMWQueryProcessor's function,
 110+ // but it needs to be duplicated because there it's protected
 111+ static function getResultFormat( $params ) {
 112+ $format = 'auto';
 113+ if ( array_key_exists( 'format', $params ) ) {
 114+ $format = strtolower( trim( $params['format'] ) );
 115+ global $smwgResultFormats;
 116+ if ( !array_key_exists( $format, $smwgResultFormats ) ) {
 117+ $format = 'auto'; // If it is an unknown format, defaults to list/table again
 118+ }
 119+ }
 120+ return $format;
 121+ }
 122+
 123+ static function getQueryResultFromQueryString( $querystring, $params, $extraprintouts, $outputmode, $context = SMWQueryProcessor::INLINE_QUERY ) {
 124+ wfProfileIn( 'SCQQueryProcessor::getQueryResultFromQueryString' );
 125+ $query = SMWQueryProcessor::createQuery( $querystring, $params, $context, null, $extraprintouts );
 126+ $query_result = smwfGetStore()->getQueryResult( $query );
 127+ $display_options = array();
 128+ foreach ( $params as $key => $value ) {
 129+ // special handling for 'icon' field, since it requires
 130+ // conversion of a name to a URL
 131+ if ( $key == 'icon' ) {
 132+ $icon_title = Title::newFromText( $value );
 133+ $icon_image_page = new ImagePage( $icon_title );
 134+ // method was only added in MW 1.13
 135+ if ( method_exists( 'ImagePage', 'getDisplayedFile' ) ) {
 136+ $icon_url = $icon_image_page->getDisplayedFile()->getURL();
 137+ $display_options['icon'] = $icon_url;
 138+ }
 139+ } else {
 140+ $display_options[$key] = $value;
 141+ }
 142+ if ( method_exists($query_result, 'getResults') ) { // SMW 1.5+
 143+ foreach ($query_result->getResults() as $wiki_page) {
 144+ $wiki_page->display_options = $display_options;
 145+ }
 146+ } else {
 147+ $query_result->display_options = $display_options;
 148+ }
 149+ }
 150+
 151+ wfProfileOut( 'SCQQueryProcessor::getQueryResultFromQueryString' );
 152+ return $query_result;
 153+ }
 154+
 155+ /*
 156+ * Matches getResultFromQueryResult() from SMWQueryProcessor,
 157+ * except that formats of type 'debug' and 'count' aren't handled
 158+ */
 159+ static function getResultFromQueryResult( $res, $params, $extraprintouts, $outputmode, $context = SMWQueryProcessor::INLINE_QUERY, $format = '' ) {
 160+ wfProfileIn( 'SCQQueryProcessor::getResultFromQueryResult' );
 161+ $format = SCQQueryProcessor::getResultFormat( $params );
 162+ $printer = SMWQueryProcessor::getResultPrinter( $format, $context, $res );
 163+ $result = $printer->getResult( $res, $params, $outputmode );
 164+ wfProfileOut( 'SCQQueryProcessor::getResultFromQueryResult' );
 165+ return $result;
 166+ }
 167+}
Property changes on: tags/extensions/SemanticCompoundQueries/REL_0_2_4/SCQ_QueryProcessor.php
___________________________________________________________________
Name: svn:eol-style
1168 + native
Index: tags/extensions/SemanticCompoundQueries/REL_0_2_4/SemanticCompoundQueries.i18n.magic.php
@@ -0,0 +1,23 @@
 2+<?php
 3+
 4+$magicWords = array();
 5+
 6+$magicWords['en'] = array(
 7+ 'compound_query' => array( 0, 'compound_query' ),
 8+);
 9+
 10+$magicWords['ar'] = array(
 11+ 'compound_query' => array( '0', 'استعلام_مركب', 'compound_query' ),
 12+);
 13+
 14+$magicWords['arz'] = array(
 15+ 'compound_query' => array( '0', 'استعلام_مركب', 'compound_query' ),
 16+);
 17+
 18+$magicWords['nds-nl'] = array(
 19+ 'compound_query' => array( '0', 'samen-estelde_zeukopdrach', 'samengestelde_zoekopdracht', 'compound_query' ),
 20+);
 21+
 22+$magicWords['nl'] = array(
 23+ 'compound_query' => array( '0', 'samengestelde_zoekopdracht', 'compound_query' ),
 24+);
Property changes on: tags/extensions/SemanticCompoundQueries/REL_0_2_4/SemanticCompoundQueries.i18n.magic.php
___________________________________________________________________
Name: svn:keywords
125 + Id
Name: svn:eol-style
226 + native
Index: tags/extensions/SemanticCompoundQueries/REL_0_2_4/SemanticCompoundQueries.i18n.php
@@ -0,0 +1,296 @@
 2+<?php
 3+/**
 4+ * Internationalisation file for SemanticCompoundQueries extension.
 5+ *
 6+ * @addtogroup Extensions
 7+ */
 8+
 9+// FIXME: Can be enabled when new style magic words are used (introduced in r52503)
 10+// require_once( dirname( __FILE__ ) . '/SemanticCompoundQueries.i18n.magic.php' );
 11+
 12+$messages = array();
 13+
 14+/** English
 15+ * @author Yaron Koren
 16+ */
 17+$messages['en'] = array(
 18+ 'semanticcompoundqueries-desc' => 'A parser function that displays multiple semantic queries at the same time',
 19+);
 20+
 21+/** Message documentation (Message documentation)
 22+ * @author Fryed-peach
 23+ * @author Purodha
 24+ */
 25+$messages['qqq'] = array(
 26+ 'semanticcompoundqueries-desc' => '{{desc}}',
 27+);
 28+
 29+/** Arabic (العربية)
 30+ * @author Meno25
 31+ */
 32+$messages['ar'] = array(
 33+ 'semanticcompoundqueries-desc' => 'دالة محلل تعرض استعلامات دلالية متعددة في نفس الوقت',
 34+);
 35+
 36+/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца))
 37+ * @author EugeneZelenko
 38+ * @author Jim-by
 39+ */
 40+$messages['be-tarask'] = array(
 41+ 'semanticcompoundqueries-desc' => 'Функцыя парсэра, якая паказвае шматлікія сэмантычныя запыты ў адзін час',
 42+);
 43+
 44+/** Breton (Brezhoneg)
 45+ * @author Fulup
 46+ */
 47+$messages['br'] = array(
 48+ 'semanticcompoundqueries-desc' => "Un arc'hwel eus ar parser a ziskwel meur a reked ereadurel war un dro",
 49+);
 50+
 51+/** Bosnian (Bosanski)
 52+ * @author CERminator
 53+ */
 54+$messages['bs'] = array(
 55+ 'semanticcompoundqueries-desc' => 'Parserska funkcija koja prikazuje više semantičkih upita u isto vrijeme',
 56+);
 57+
 58+/** German (Deutsch)
 59+ * @author Purodha
 60+ */
 61+$messages['de'] = array(
 62+ 'semanticcompoundqueries-desc' => 'Eine Parserfunktion, die mehrere semantische Abfragen zugleich anzuzeigen erlaubt',
 63+);
 64+
 65+/** Lower Sorbian (Dolnoserbski)
 66+ * @author Michawiki
 67+ */
 68+$messages['dsb'] = array(
 69+ 'semanticcompoundqueries-desc' => 'Parserowa funkcija, kótaraž rownocasnje zwobraznjujo někotare semantiske wótpšašanja',
 70+);
 71+
 72+/** Greek (Ελληνικά)
 73+ * @author Omnipaedista
 74+ */
 75+$messages['el'] = array(
 76+ 'semanticcompoundqueries-desc' => 'Μια λεξιαναλυτική συνάρτηση που προβάλλει πολλαπλά σημασιολογικά αιτήματα ταυτόχρονα',
 77+);
 78+
 79+/** Spanish (Español)
 80+ * @author Crazymadlover
 81+ */
 82+$messages['es'] = array(
 83+ 'semanticcompoundqueries-desc' => 'Una función analizadora que muestra múltiples consultas semánticas al mismo tiempo',
 84+);
 85+
 86+/** Finnish (Suomi)
 87+ * @author Centerlink
 88+ * @author Crt
 89+ */
 90+$messages['fi'] = array(
 91+ 'semanticcompoundqueries-desc' => 'Jäsennintoiminto, joka näyttää useita semanttisia kyselyjä samaan aikaan.',
 92+);
 93+
 94+/** French (Français)
 95+ * @author IAlex
 96+ */
 97+$messages['fr'] = array(
 98+ 'semanticcompoundqueries-desc' => 'Une fonction du parseur qui affiche plusieurs requêtes sémantiques en même temps',
 99+);
 100+
 101+/** Galician (Galego)
 102+ * @author Toliño
 103+ */
 104+$messages['gl'] = array(
 105+ 'semanticcompoundqueries-desc' => 'Unha función analítica que mostra varias pescudas semánticas ao mesmo tempo',
 106+);
 107+
 108+/** Swiss German (Alemannisch)
 109+ * @author Als-Holder
 110+ */
 111+$messages['gsw'] = array(
 112+ 'semanticcompoundqueries-desc' => 'E Parserfunktion, wu erlaubt, mehreri semantischi Abfroge uf eimol aazzeige',
 113+);
 114+
 115+/** Hebrew (עברית)
 116+ * @author Rotemliss
 117+ */
 118+$messages['he'] = array(
 119+ 'semanticcompoundqueries-desc' => 'הוראת מפענח המציגה מספר שאילתות סמנטיות בעת ובעונה אחת',
 120+);
 121+
 122+/** Hiligaynon (Ilonggo)
 123+ * @author Tagimata
 124+ */
 125+$messages['hil'] = array(
 126+ 'semanticcompoundqueries-desc' => 'Ang parser panksiyon nga nagapakita sang multiple semantik pamangkotanon sa parehas nga tiyempo',
 127+);
 128+
 129+/** Upper Sorbian (Hornjoserbsce)
 130+ * @author Michawiki
 131+ */
 132+$messages['hsb'] = array(
 133+ 'semanticcompoundqueries-desc' => 'Parserowa funkcija, kotraž wjacore semantiske wotprašowanja nadobo zwobrazuje',
 134+);
 135+
 136+/** Hungarian (Magyar)
 137+ * @author Glanthor Reviol
 138+ */
 139+$messages['hu'] = array(
 140+ 'semanticcompoundqueries-desc' => 'Egyszerre több szemantikus lekérdezést megjelenítő elemzőfüggvény',
 141+);
 142+
 143+/** Interlingua (Interlingua)
 144+ * @author McDutchie
 145+ */
 146+$messages['ia'] = array(
 147+ 'semanticcompoundqueries-desc' => 'Un function syntactic que presenta plure consultas semantic al mesme tempore',
 148+);
 149+
 150+/** Indonesian (Bahasa Indonesia)
 151+ * @author Bennylin
 152+ */
 153+$messages['id'] = array(
 154+ 'semanticcompoundqueries-desc' => 'Fungsi parser untuk menampilkan beberapa kueri semantik secara bersamaan',
 155+);
 156+
 157+/** Italian (Italiano)
 158+ * @author Gianfranco
 159+ */
 160+$messages['it'] = array(
 161+ 'semanticcompoundqueries-desc' => 'Una funzione di parsing che mostra più query semantiche contemporaneamente',
 162+);
 163+
 164+/** Japanese (日本語)
 165+ * @author Fryed-peach
 166+ */
 167+$messages['ja'] = array(
 168+ 'semanticcompoundqueries-desc' => '複数の意味的クエリーを一度に表示するパーサー関数',
 169+);
 170+
 171+/** Ripoarisch (Ripoarisch)
 172+ * @author Purodha
 173+ */
 174+$messages['ksh'] = array(
 175+ 'semanticcompoundqueries-desc' => 'En Paaser_Funkßuhn öm ettlijje semantesche Froore op eijmohl aanzezeije.',
 176+);
 177+
 178+/** Luxembourgish (Lëtzebuergesch)
 179+ * @author Robby
 180+ */
 181+$messages['lb'] = array(
 182+ 'semanticcompoundqueries-desc' => 'Eng Parserfonctioun déi et erlaabt méi semantesch Ufroe mateneen ze weisen',
 183+);
 184+
 185+/** Macedonian (Македонски)
 186+ * @author Bjankuloski06
 187+ */
 188+$messages['mk'] = array(
 189+ 'semanticcompoundqueries-desc' => 'Парсерска функција која прикажува повеќе семантички барања истовремено',
 190+);
 191+
 192+/** Dutch (Nederlands)
 193+ * @author Siebrand
 194+ */
 195+$messages['nl'] = array(
 196+ 'semanticcompoundqueries-desc' => 'Een parserfunctie die meerdere semantische zoekopdrachten op hetzelfde moment kan weergeven',
 197+);
 198+
 199+/** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
 200+ * @author Nghtwlkr
 201+ */
 202+$messages['no'] = array(
 203+ 'semanticcompoundqueries-desc' => 'En tolkefunksjon som viser flere semantiske spørringer samtidig',
 204+);
 205+
 206+/** Occitan (Occitan)
 207+ * @author Cedric31
 208+ */
 209+$messages['oc'] = array(
 210+ 'semanticcompoundqueries-desc' => "Una foncion del parser qu'aficha mai d'una requèsta semanticas a l'encòp",
 211+);
 212+
 213+/** Polish (Polski)
 214+ * @author Sp5uhe
 215+ */
 216+$messages['pl'] = array(
 217+ 'semanticcompoundqueries-desc' => 'Funkcja parsera wyświetlająca różnorodne znaczeniowo zapytania w tym samym czasie',
 218+);
 219+
 220+/** Piedmontese (Piemontèis)
 221+ * @author Dragonòt
 222+ */
 223+$messages['pms'] = array(
 224+ 'semanticcompoundqueries-desc' => 'Na fonsion dël parser che a visualisa vàire antërogassion semàntiche al midem temp',
 225+);
 226+
 227+/** Portuguese (Português)
 228+ * @author Hamilton Abreu
 229+ * @author Waldir
 230+ */
 231+$messages['pt'] = array(
 232+ 'semanticcompoundqueries-desc' => 'Uma função de análise gramatical que mostra várias consultas semânticas em simultâneo',
 233+);
 234+
 235+/** Brazilian Portuguese (Português do Brasil)
 236+ * @author Eduardo.mps
 237+ */
 238+$messages['pt-br'] = array(
 239+ 'semanticcompoundqueries-desc' => 'Uma função analisadora que exibe múltiplas consultas semânticas ao mesmo tempo',
 240+);
 241+
 242+/** Tarandíne (Tarandíne)
 243+ * @author Joetaras
 244+ */
 245+$messages['roa-tara'] = array(
 246+ 'semanticcompoundqueries-desc' => "'Na funziona de analisi ca visualizze le inderrogazziune semandiche multiple jndr'à 'u stesse mumende",
 247+);
 248+
 249+/** Russian (Русский)
 250+ * @author Александр Сигачёв
 251+ */
 252+$messages['ru'] = array(
 253+ 'semanticcompoundqueries-desc' => 'Функция парсера, показывающая несколько семантических запросов за один раз',
 254+);
 255+
 256+/** Slovak (Slovenčina)
 257+ * @author Helix84
 258+ */
 259+$messages['sk'] = array(
 260+ 'semanticcompoundqueries-desc' => 'Funkcia syntaktického analyzátora, ktorá zobrazuje viaceré sémantické požiadavky naraz',
 261+);
 262+
 263+/** Serbian Cyrillic ekavian (Српски (ћирилица))
 264+ * @author Михајло Анђелковић
 265+ */
 266+$messages['sr-ec'] = array(
 267+ 'semanticcompoundqueries-desc' => 'Парсер-функција која приказује више семантичких захтева истовремено',
 268+);
 269+
 270+/** Serbian Latin ekavian (Srpski (latinica))
 271+ * @author Liangent
 272+ */
 273+$messages['sr-el'] = array(
 274+ 'semanticcompoundqueries-desc' => 'Parser-funkcija koja prikazuje više semantičkih zahteva istovremeno',
 275+);
 276+
 277+/** Swedish (Svenska)
 278+ * @author Boivie
 279+ */
 280+$messages['sv'] = array(
 281+ 'semanticcompoundqueries-desc' => 'En parserfunktion som visar flera semantiska frågor på samma gång',
 282+);
 283+
 284+/** Turkish (Türkçe)
 285+ * @author Vito Genovese
 286+ */
 287+$messages['tr'] = array(
 288+ 'semanticcompoundqueries-desc' => 'Birden fazla anlamsal sorguyu aynı anda görüntüleyen bir ayrıştırıcı fonksiyon',
 289+);
 290+
 291+/** Vietnamese (Tiếng Việt)
 292+ * @author Minh Nguyen
 293+ */
 294+$messages['vi'] = array(
 295+ 'semanticcompoundqueries-desc' => 'Hàm cú pháp hiển thị nhiều truy vấn ngữ nghĩa cùng lúc',
 296+);
 297+
Property changes on: tags/extensions/SemanticCompoundQueries/REL_0_2_4/SemanticCompoundQueries.i18n.php
___________________________________________________________________
Name: svn:keywords
1298 + Id
Name: svn:eol-style
2299 + native
Index: tags/extensions/SemanticCompoundQueries/REL_0_2_4/SemanticCompoundQueries.php
@@ -0,0 +1,46 @@
 2+<?php
 3+/**
 4+ * Initialization file for SemanticCompoundQueries
 5+ *
 6+ * @file
 7+ * @ingroup SemanticCompoundQueries
 8+ * @author Yaron Koren
 9+ */
 10+
 11+if ( !defined( 'MEDIAWIKI' ) ) die();
 12+
 13+define( 'SCQ_VERSION', '0.2.4' );
 14+
 15+$wgExtensionCredits['parserhook'][] = array(
 16+ 'path' => __FILE__,
 17+ 'name' => 'Semantic Compound Queries',
 18+ 'version' => SCQ_VERSION,
 19+ 'author' => 'Yaron Koren',
 20+ 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries',
 21+ 'descriptionmsg' => 'semanticcompoundqueries-desc',
 22+);
 23+
 24+$wgExtensionMessagesFiles['SemanticCompoundQueries'] = dirname( __FILE__ ) . '/SemanticCompoundQueries.i18n.php';
 25+
 26+
 27+$wgHooks['ParserFirstCallInit'][] = 'scqgRegisterParser';
 28+// FIXME: Can be removed when new style magic words are used (introduced in r52503)
 29+$wgHooks['LanguageGetMagic'][] = 'scqgLanguageGetMagic';
 30+
 31+$scqIP = $IP . '/extensions/SemanticCompoundQueries';
 32+$wgAutoloadClasses['SCQQueryProcessor'] = $scqIP . '/SCQ_QueryProcessor.php';
 33+$wgAutoloadClasses['SCQQueryResult'] = $scqIP . '/SCQ_QueryResult.php';
 34+
 35+function scqgRegisterParser( &$parser ) {
 36+ $parser->setFunctionHook( 'compound_query', array( 'SCQQueryProcessor', 'doCompoundQuery' ) );
 37+ return true; // always return true, in order not to stop MW's hook processing!
 38+}
 39+
 40+// FIXME: Can be removed when new style magic words are used (introduced in r52503)
 41+function scqgLanguageGetMagic( &$magicWords, $langCode = "en" ) {
 42+ switch ( $langCode ) {
 43+ default:
 44+ $magicWords['compound_query'] = array ( 0, 'compound_query' );
 45+ }
 46+ return true;
 47+}
Property changes on: tags/extensions/SemanticCompoundQueries/REL_0_2_4/SemanticCompoundQueries.php
___________________________________________________________________
Name: svn:eol-style
148 + native
Index: tags/extensions/SemanticCompoundQueries/REL_0_2_4/README
@@ -0,0 +1,48 @@
 2+Semantic Compound Queries Extension
 3+
 4+ Version 0.2.4
 5+ Yaron Koren
 6+
 7+This is free software licensed under the GNU General Public License. Please
 8+see http://www.gnu.org/copyleft/gpl.html for further details, including the
 9+full text and terms of the license.
 10+
 11+== Overview ==
 12+
 13+Semantic Compound Queries is an extension to MediaWiki that defines a
 14+parser function, '#compound_query', that displays the results of the
 15+equivalent of multiple Semantic MediaWiki #ask queries at the same time.
 16+The syntax of #compound_query resembles that of #ask, but with more than
 17+one query, and with the elements of each sub-query delimited by semicolons
 18+instead of pipes. Elements that are common across all sub-queries, like
 19+'format=' and 'width=' (for maps) should be placed after all sub-queries.
 20+
 21+A sample call to #compound query, which retrieves both biographies, along
 22+with their subject; and fiction books, along with their author; is:
 23+
 24+{{#compound_query:[[Category:Books]][[Has gentre::Biography]];?Covers subject=Subject
 25+ |[[Category:Books]][[Has genre::Fiction]];?Has author=Author
 26+ |format=list}}
 27+
 28+
 29+For more information, see the extension homepage at:
 30+http://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries
 31+
 32+== Requirements ==
 33+
 34+This version of the Semantic Compound Queries extension requires MediaWiki 1.8
 35+or higher and Semantic MediaWiki 1.2 or higher.
 36+
 37+== Installation ==
 38+
 39+To install the extension, place the entire 'SemanticCompoundQueries' directory
 40+within your MediaWiki 'extensions' directory, then add the following
 41+line to your 'LocalSettings.php' file:
 42+
 43+ require_once( "$IP/extensions/SemanticCompoundQueries/SCQ_Settings.php" );
 44+
 45+== Contact ==
 46+
 47+Comments, questions, suggestions and bug reports are welcome, and can
 48+be placed on the Talk page for the extension, or sent to Yaron at
 49+yaron57@gmail.com.
Property changes on: tags/extensions/SemanticCompoundQueries/REL_0_2_4/README
___________________________________________________________________
Name: svn:eol-style
150 + native

Status & tagging log