Completed
Push — master ( 7b9b22...6b6f7b )
by mw
149:46 queued 114:56
created

DefaultSettings.php (6 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/**
4
 * DO NOT EDIT!
5
 *
6
 * The following default settings are to be used by the extension itself,
7
 * please modify settings in the LocalSettings file.
8
 *
9
 * Most settings should be make  between including this file and the call
10
 * to enableSemantics(). Exceptions that need to be set before are
11
 * documented below.
12
 *
13
 * @codeCoverageIgnore
14
 */
15
if ( !defined( 'MEDIAWIKI' ) ) {
16
  die( "This file is part of the Semantic MediaWiki extension. It is not a valid entry point.\n" );
17
}
18
19
return array(
20
21
	###
22
	# This is the path to your installation of Semantic MediaWiki as seen on your
23
	# local filesystem. Used against some PHP file path issues.
24
	# If needed, you can also change this path in LocalSettings.php after including
25
	# this file.
26
	##
27
	'smwgIP' => dirname( __FILE__ ) . '/',
28
	'smwgExtraneousLanguageFileDir' => __DIR__ . '/i18n/extra',
29
	##
30
31
	###
32
	# Semantic MediaWiki's operational state
33
	#
34
	# It is expected that enableSemantics() is used to enable SMW otherwise it is
35
	# disabled by default. disableSemantics() will also set the state to disabled.
36
	#
37
	# @since 2.4
38
	##
39
	'smwgSemanticsEnabled' => false,
40
	##
41
42
	###
43
	# CompatibilityMode is to force SMW to work with other extensions that may impact
44
	# performance in an unanticipated way or may contain potential incompatibilities.
45
	#
46
	# @since 2.4
47
	##
48
	'smwgEnabledCompatibilityMode' => false,
49
	##
50
51
	###
52
	# Use another storage backend for Semantic MediaWiki. The default is suitable
53
	# for most uses of SMW.
54
	##
55
	'smwgDefaultStore' => "SMWSQLStore3",
56
	##
57
58
	###
59
	# Configure SPARQL database connection for Semantic MediaWiki. This is used
60
	# when SPARQL-based features are enabled, e.g. when using SMWSparqlStore as
61
	# the $smwgDefaultStore.
62
	#
63
	# The default class SMWSparqlDatabase works with many databases that support
64
	# SPARQL and SPARQL Update. Three different endpoints (service URLs) are given
65
	# for query (reading queries like SELECT), update (SPARQL Update queries), and
66
	# data (SPARQL HTTP Protocol for Graph Management). The query endpoint is
67
	# necessary, but the update and data endpoints can be omitted if not supported.
68
	# This will lead to reduced functionality (e.g. the SMWSparqlStore will not
69
	# work if Update is not available). The data endpoint is always optional, but
70
	# in some SPARQL databases this method is more efficient than update.
71
	#
72
	# The default graph is similar to a database name in relational databases. It
73
	# can be set to any URI (e.g. the main page uri of your wiki with
74
	# "	#graph" appended). Leaving the default graph URI empty only works if the
75
	# store is configure to use some default default graph or if it generally
76
	# supports this. Different wikis should normally use different default graphs
77
	# unless there is a good reason to share one graph.
78
	##
79
	'smwgSparqlDatabase' => 'SMWSparqlDatabase',
80
	'smwgSparqlQueryEndpoint' => 'http://localhost:8080/sparql/',
81
	'smwgSparqlUpdateEndpoint' => 'http://localhost:8080/update/',
82
	'smwgSparqlDataEndpoint' => 'http://localhost:8080/data/',
83
	'smwgSparqlDefaultGraph' => '',
84
	##
85
86
	##
87
	# SparqlDBConnectionProvider
88
	#
89
	# Identifies a database connector that ought to be used together with the
90
	# SPARQLStore
91
	#
92
	# List of standard connectors ($smwgSparqlDatabase will have no effect)
93
	# - 'fuseki'
94
	# - 'virtuoso'
95
	# - '4store'
96
	# - 'sesame'
97
	# - 'generic'
98
	#
99
	# With 2.0 it is suggested to assign the necessary connector to
100
	# $smwgSparqlDatabaseConnector in order to avoid arbitrary class assignments in
101
	# $smwgSparqlDatabase (which can change in future releases without further notice).
102
	#
103
	# In case $smwgSparqlDatabaseConnector = 'custom' is maintained, $smwgSparqlDatabase
104
	# is expected to contain a custom class connector where $smwgSparqlDatabase is only
105
	# to be sued for when a custom database connector is necessary.
106
	#
107
	# $smwgSparqlDatabaseConnector = 'custom' is set as legacy configuration to allow for
108
	# existing (prior 2.0) customizing to work without changes.
109
	#
110
	# @since 2.0
111
	##
112
	'smwgSparqlDatabaseConnector' => 'custom',
113
	##
114
115
	##
116
	# Sparql query features that are expected to be supported by the repository:
117
	#
118
	# - SMW_SPARQL_QF_NONE does not support any features (as required by SPARQL 1.1)
119
	# - SMW_SPARQL_QF_REDI to support finding redirects using inverse property paths,
120
	#   can only be used for repositories with full SPARQL 1.1 support (e.g. Fuseki,
121
	#   Sesame)
122
	# - SMW_SPARQL_QF_SUBP to resolve subproperties
123
	# - SMW_SPARQL_QF_SUBC to resolve subcategories
124
	#
125
	# Please check with your repository provider whether SPARQL 1.1 is fully
126
	# supported or not, and if not SMW_SPARQL_QF_NONE should be set.
127
	#
128
	# @since 2.3
129
	##
130
	'smwgSparqlQFeatures' => SMW_SPARQL_QF_REDI | SMW_SPARQL_QF_SUBP | SMW_SPARQL_QF_SUBC,
131
	##
132
133
	##
134
	# @see https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/1306
135
	#
136
	# Setting to explicitly force a CURLOPT_HTTP_VERSION for the endpoint communication
137
	# and should not be changed unless an error as in 	#1306 was encountered.
138
	#
139
	# @see http://curl.haxx.se/libcurl/c/CURLOPT_HTTP_VERSION.html reads "... libcurl
140
	# to use the specific HTTP versions. This is not sensible to do unless you have
141
	# a good reason.""
142
	#
143
	# @since 2.3
144
	# @default false === means to use the default as determined by cURL
145
	##
146
	'smwgSparqlRepositoryConnectorForcedHttpVersion' => false,
147
	##
148
149
	###
150
	# Setting this option to true before including this file to enable the old
151
	# Type: namespace that SMW used up to version 1.5.*. This should only be
152
	# done to make the pages of this namespace temporarily accessible in order to
153
	# move their content to other pages. If the namespace is not registered, then
154
	# existing pages in this namespace cannot be found in the wiki.
155
	##
156
	'smwgHistoricTypeNamespace' => false,
157
	##
158
159
	###
160
	# If you already have custom namespaces on your site, insert
161
	#    	'smwgNamespaceIndex' => ???,
162
	# into your LocalSettings.php *before* including this file. The number ??? must
163
	# be the smallest even namespace number that is not in use yet. However, it
164
	# must not be smaller than 100.
165
	##
166
	# 'smwgNamespaceIndex' => 100,
167
	##
168
169
	###
170
	# Overwriting the following array, you can define for which namespaces
171
	# the semantic links and annotations are to be evaluated. On other
172
	# pages, annotations can be given but are silently ignored. This is
173
	# useful since, e.g., talk pages usually do not have attributes and
174
	# the like. In fact, is is not obvious what a meaningful attribute of
175
	# a talk page could be. Pages without annotations will also be ignored
176
	# during full RDF export, unless they are referred to from another
177
	# article.
178
	##
179
	'smwgNamespacesWithSemanticLinks' => array(
180
		NS_MAIN => true,
181
		NS_TALK => false,
182
		NS_USER => true,
183
		NS_USER_TALK => false,
184
		NS_PROJECT => true,
185
		NS_PROJECT_TALK => false,
186
		NS_IMAGE => true,
187
		NS_IMAGE_TALK => false,
188
		NS_MEDIAWIKI => false,
189
		NS_MEDIAWIKI_TALK => false,
190
		NS_TEMPLATE => false,
191
		NS_TEMPLATE_TALK => false,
192
		NS_HELP => true,
193
		NS_HELP_TALK => false,
194
		NS_CATEGORY => true,
195
		NS_CATEGORY_TALK => false,
196
	),
197
	##
198
199
	###
200
	# This setting allows you to select in which cases you want to have a factbox
201
	# appear below an article. Note that the Magic Words __SHOWFACTBOX__ and
202
	# __HIDEFACTBOX__ can be used to control Factbox display for individual pages.
203
	# Other options for this setting include:
204
	##
205
	// 	'smwgShowFactbox' => SMW_FACTBOX_NONEMPTY, 	# show only those factboxes that have some content
206
	// 	'smwgShowFactbox' => SMW_FACTBOX_SPECIAL 	# show only if special properties were set
207
	'smwgShowFactbox' => SMW_FACTBOX_HIDDEN, 	# hide always
208
	// 	'smwgShowFactbox' => SMW_FACTBOX_SHOWN,  	# show always, buggy and not recommended
209
	##
210
211
	###
212
	# Same as $smwgShowFactbox but for edit mode and same possible values.
213
	##
214
	'smwgShowFactboxEdit' => SMW_FACTBOX_NONEMPTY,
215
	##
216
217
	###
218
	# Should the toolbox of each content page show a link to browse the properties
219
	# of that page using Special:Browse? This is a useful way to access properties
220
	# and it is somewhat more subtle than showing a Factbox on every page.
221
	##
222
	'smwgToolboxBrowseLink' => true,
223
	##
224
225
	###
226
	# Should warnings be displayed in wikitexts right after the problematic input?
227
	# This affects only semantic annotations, not warnings that are displayed by
228
	# inline queries or other features.
229
	##
230
	'smwgInlineErrors' => true,
231
	##
232
233
	###
234
	# Should SMW consider MediaWiki's subcategory hierarchy in querying? If set to
235
	# true, subcategories will always be interpreted like subclasses. For example,
236
	# if A is a subcategory of B then a query for all elements of B will also yield
237
	# all elements of A. If this setting is disabled, then subclass relationships
238
	# can still be given explicitly by using the property "subcategory of" on some
239
	# category page. Only if the setting is false will such annotations be shown in
240
	# the factbox (if enabled).
241
	##
242
	'smwgUseCategoryHierarchy' => true,
243
	##
244
245
	###
246
	# Should category pages that use some [[Category:Foo]] statement be treated as
247
	# elements of the category Foo? If disabled, then it is not possible to make
248
	# category pages elements of other categories. See also the above setting
249
	# $smwgUseCategoryHierarchy.
250
	##
251
	'smwgCategoriesAsInstances' => true,
252
	##
253
254
	###
255
	# InText annotation to support "links in value"
256
	#
257
	# SMW_LINV_OBFU (2.5+)
0 ignored issues
show
Unused Code Comprehensibility introduced by
43% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
258
	#
259
	# Parse [[SomeProperty::Foo [[link]] in [[Bar::AnotherValue]]]] annotation
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
260
	# using a non-PCRE approach and hereby avoids potential PHP crashes caused
261
	# by PCRE OOM.
262
	#
263
	# SMW_LINV_PCRE (1.3+)
0 ignored issues
show
Unused Code Comprehensibility introduced by
43% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
264
	#
265
	# Should SMW accept inputs like [[property::Some [[link]] in value]]? If
266
	# enabled, this may lead to PHP crashes (!) when very long texts are used as
267
	# values. This is due to limitations in the library PCRE that PHP uses for
268
	# pattern matching. The provoked PHP crashes will prevent requests from being
269
	# completed -- usually clients will receive server errors ("invalid response")
270
	# or be offered to download "index.php". It might be okay to enable this if
271
	# such problems are not observed in your wiki.
272
	#
273
	# To enable this feature use either SMW_LINV_PCRE (for BC) or SMW_LINV_OBFU.
274
	#
275
	# @since 1.3
276
	# @default false
277
	##
278
	'smwgLinksInValues' => false,
279
	##
280
281
	###
282
	# Settings for recurring events, created with the 	#set_recurring_event parser
283
	# function: the default number of instances defined, if no end date is set,
284
	# and the maximum number that can be defined, regardless of end date.
285
	##
286
	'smwgDefaultNumRecurringEvents' => 100,
287
	'smwgMaxNumRecurringEvents' => 500,
288
	##
289
290
	###
291
	# Should the browse view for incoming links show the incoming links via its
292
	# inverses, or shall they be displayed on the other side?
293
	##
294
	'smwgBrowseShowInverse' => false,
295
	##
296
297
	###
298
	# Should the browse view always show the incoming links as well, and more of
299
	# the incoming values?
300
	##
301
	'smwgBrowseShowAll' => true,
302
	##
303
304
	###
305
	# Whether the browse display is to be generated using an API request or not.
306
	#
307
	# @since 2.5
308
	##
309
	'smwgBrowseByApi' => true,
310
	##
311
312
	###
313
	# Should the search by property special page display nearby results when there
314
	# are only a few results with the exact value? Switch this off if this page has
315
	# performance problems.
316
	#
317
	# @since 2.1 enabled default types, to disable the functionality either set the
318
	# variable to array() or false
319
	##
320
	'smwgSearchByPropertyFuzzy' => array( '_num', '_txt', '_dat', '_mlt_rec' ),
321
	##
322
323
	###
324
	# Number results shown in the listings on pages in the namespaces Property,
325
	# Type, and Concept. If a value of 0 is given, the respective listings are
326
	# hidden completely.
327
	##
328
	'smwgTypePagingLimit' => 200,   // same number as for categories
329
	'smwgConceptPagingLimit' => 200, // same number as for categories
330
	'smwgPropertyPagingLimit' => 25, // use smaller value since property lists need more space
331
	##
332
333
	###
334
	# Property page to limit the query request for individual values
335
	#
336
	# How many values should at most be displayed for a page on the  Property
337
	# page and if large values are desired, consider reducing
338
	# $smwgPropertyPagingLimit for better performance.
339
	#
340
	# @since 1.3
341
	##
342
	'smwgMaxPropertyValues' => 3,
343
	##
344
345
	###
346
	# Property page to limit the query request on subproperties
347
	#
348
	# @since 2.5
349
	##
350
	'smwgSubPropertyListLimit' => 25,
351
	##
352
353
	###
354
	# Property page to limit the query request on redirects
355
	#
356
	# @since 2.5
357
	##
358
	'smwgRedirectPropertyListLimit' => 25,
359
	##
360
361
	###
362
	# Settings for inline queries ({{#ask:...}}) and for semantic queries in
363
	# general. This can especially be used to prevent overly high server-load due
364
	# to complex queries. The following settings affect all queries, wherever they
365
	# occur.
366
	##
367
	'smwgQEnabled' => true,   // (De)activates all query related features and interfaces
368
	'smwgQMaxLimit' => 10000, // Max number of results *ever* retrieved, even when using special query pages.
369
	'smwgIgnoreQueryErrors' => true, // Should queries be executed even if some errors were detected?
370
										// A hint that points out errors is shown in any case.
371
372
	'smwgQSubcategoryDepth' => 10,  // Restrict level of sub-category inclusion (steps within category hierarchy)
373
	'smwgQSubpropertyDepth' => 10,  // Restrict level of sub-property inclusion (steps within property hierarchy)
374
										// (Use 0 to disable hierarchy-inferencing in queries)
375
	'smwgQEqualitySupport' => SMW_EQ_SOME, // Evaluate 	#redirects as equality between page names, with possible
376
												// performance-relevant restrictions depending on the storage engine
377
	// 	'smwgQEqualitySupport' => SMW_EQ_FULL, // Evaluate 	#redirects as equality between page names in all cases
378
	// 	'smwgQEqualitySupport' => SMW_EQ_NONE, // Never evaluate 	#redirects as equality between page names
379
	'smwgQSortingSupport' => true, // (De)activate sorting of results.
380
	'smwgQRandSortingSupport' => true, // (De)activate random sorting of results.
381
	'smwgQDefaultNamespaces' => null, // Which namespaces should be searched by default?
382
										// (value NULL switches off default restrictions on searching -- this is faster)
383
										// Example with namespaces: 	'smwgQDefaultNamespaces' => array(NS_MAIN, NS_IMAGE),
384
385
	###
386
	# List of comparator characters supported by queries, separated by '|', for use in a regex.
387
	#
388
	# Available entries:
389
	#  	< (smaller than) if $smwStrictComparators is false, it's actually smaller than or equal to
390
	#  	> (greater than) if $smwStrictComparators is false, it's actually bigger than or equal to
391
	#  	! (unequal to)
392
	#  	~ (pattern with '*' as wildcard, only for Type:String)
393
	#  	!~ (not a pattern with '*' as wildcard, only for Type:String, need to be placed before ! and ~ to work correctly)
394
	#  	≤ (smaller than or equal to)
395
	#  	≥ (greater than or equal to)
396
	#
397
	# If unsupported comparators are used, they are treated as part of the queried value
398
	#
399
	##
400
	'smwgQComparators' => '<|>|!~|!|~|≤|≥|<<|>>',
401
	##
402
403
	###
404
	# Sets whether the > and < comparators should be strict or not. If they are strict,
405
	# values that are equal will not be accepted.
406
	##
407
	'smwStrictComparators' => false,
408
409
	// To be used starting with 3.x (due to misspelling)
410
	'smwgStrictComparators' => false,
411
	##
412
413
	###
414
	# Further settings for queries. The following settings affect inline queries
415
	# and querying special pages. Essentially they should mirror the kind of
416
	# queries that should immediately be answered by the wiki, using whatever
417
	# computations are needed.
418
	##
419
	'smwgQMaxSize' => 16, // Maximal number of conditions in queries, use format=debug for example sizes
420
	'smwgQMaxDepth' => 4, // Maximal property depth of queries, e.g. [[rel::<q>[[rel2::Test]]</q>]] has depth 2
421
	##
422
423
	### The below setting defines which query features should be available by default.
424
	# Examples:
425
	# only cateory intersections: 	'smwgQFeatures' => SMW_CATEGORY_QUERY | SMW_CONJUNCTION_QUERY,
426
	# only single concepts:       	'smwgQFeatures' => SMW_CONCEPT_QUERY,
427
	# anything but disjunctions:  	'smwgQFeatures' => SMW_ANY_QUERY & ~SMW_DISJUNCTION_QUERY,
428
	# The default is to support all basic features.
429
	##
430
	'smwgQFeatures' => SMW_PROPERTY_QUERY | SMW_CATEGORY_QUERY | SMW_CONCEPT_QUERY | SMW_NAMESPACE_QUERY | SMW_CONJUNCTION_QUERY | SMW_DISJUNCTION_QUERY,
431
	##
432
433
	###
434
	# Settings about printout of (especially inline) queries:
435
	##
436
	'smwgQDefaultLimit' => 50,      // Default number of rows returned in a query. Can be increased with limit=num in 	#ask
437
	'smwgQMaxInlineLimit' => 500,   // Max number of rows ever printed in a single inline query on a single page.
438
	'smwgQUpperbound' => 5000,      // Max number of rows ever printed in a single inline query on a single page.
439
	'smwgQPrintoutLimit'  => 100,   // Max number of supported printouts (added columns in result table, ?-statements)
440
	'smwgQDefaultLinking' => 'all', // Default linking behavior. Can be one of "none", "subject" (first column), "all".
441
	##
442
443
	###
444
	# Further settings for queries. The following settings affect queries that are
445
	# part of concept pages. These are usually chosen to be les restricted than
446
	# inline queries, since there are two other means for controling their use:
447
	# (1) Concept queries that would not be allowed as normal queries will not be
448
	# executed directly, but can use pre-computed results instead. This is the
449
	# default.
450
	# (2) The whole Concept: namespace can be restricted (using some suitable
451
	# MediaWiki extension) to an experienced user group that may create more
452
	# complex queries responably. Other users can employ thus defined concepts in
453
	# their queries.
454
	##
455
	'smwgQConceptCaching' => CONCEPT_CACHE_HARD, // Which concepts should be displayed only if available from cache?
456
		// CONCEPT_CACHE_ALL   -- show concept elements anywhere only if they are cached
457
		// CONCEPT_CACHE_HARD  -- show without cache if concept is not harder than permitted inline queries
458
		// CONCEPT_CACHE_NONE  -- show all concepts even without any cache
459
		// In any cases, caches will always be used if available.
460
	'smwgQConceptMaxSize' => 20, // Same as $smwgQMaxSize, but for concepts
461
	'smwgQConceptMaxDepth' => 8, // Same as $smwgQMaxDepth, but for concepts
462
463
	// Same as $smwgQFeatures but for concepts
464
	'smwgQConceptFeatures' => SMW_PROPERTY_QUERY | SMW_CATEGORY_QUERY | SMW_NAMESPACE_QUERY |
465
								SMW_CONJUNCTION_QUERY | SMW_DISJUNCTION_QUERY | SMW_CONCEPT_QUERY,
466
467
	// Cache life time in minutes. If a concept cache exists but is older than
468
	// this, SMW tries to recompute it, and will only use the cache if this is not
469
	// allowed due to settings above:
470
	'smwgQConceptCacheLifetime' => 24 * 60,
471
	##
472
473
	### Predefined result formats for queries
474
	# Array of available formats for formatting queries. Can be redefined in
475
	# the settings to disallow certain formats or to register extension formats.
476
	# To disable a format, do "unset($smwgResultFormats['template'])," Disabled
477
	# formats will be treated like if the format parameter had been omitted. The
478
	# formats 'table' and 'list' are defaults that cannot be disabled. The format
479
	# 'broadtable' should not be disabled either in order not to break Special:ask.
480
	##
481
	'smwgResultFormats' => array(
482
		'table'      => 'SMW\TableResultPrinter',
483
		'list'       => 'SMW\ListResultPrinter',
484
		'ol'         => 'SMW\ListResultPrinter',
485
		'ul'         => 'SMW\ListResultPrinter',
486
		'broadtable' => 'SMW\TableResultPrinter',
487
		'category'   => 'SMW\CategoryResultPrinter',
488
		'embedded'   => 'SMW\EmbeddedResultPrinter',
489
		'template'   => 'SMW\ListResultPrinter',
490
		'count'      => 'SMW\ListResultPrinter',
491
		'debug'      => 'SMW\ListResultPrinter',
492
		'feed'       => 'SMW\FeedResultPrinter',
493
		'csv'        => 'SMW\CsvResultPrinter',
494
		'dsv'        => 'SMW\DsvResultPrinter',
495
		'json'       => 'SMW\JsonResultPrinter',
496
		'rdf'        => 'SMW\RdfResultPrinter'
497
	),
498
	##
499
500
	### Predefined aliases for result formats
501
	# Array of available aliases for result formats. Can be redefined in
502
	# the settings to disallow certain aliases or to register extension aliases.
503
	# To disable an alias, do "unset($smwgResultAliases['alias'])," Disabled
504
	# aliases will be treated like if the alias parameter had been omitted.
505
	##
506
	'smwgResultAliases' => array( 'feed' => array( 'rss' ) ),
507
	##
508
509
	### Predefined sources for queries
510
	# Array of available sources for answering queries. Can be redefined in
511
	# the settings to register new sources (usually an extension will do so
512
	# on installation). Unknown source will be rerouted to the local wiki.
513
	# Note that the basic installation comes with no additional source besides
514
	# the local source (which in turn cannot be disabled or set explicitly).
515
	# Set a new store like this: $smwgQuerySources['freebase' => "SMWFreebaseStore",
516
	##
517
	'smwgQuerySources' => array(
518
	//	'local'      => '',
519
	),
520
	##
521
522
	### Default property type
523
	# Undefined properties (those without pages or whose pages have no "has type"
524
	# statement) will be assumed to be of this type. This is an internal type id.
525
	# See the file languages/SMW_LanguageXX.php to find what IDs to use for
526
	# datatpyes in your language. The default corresponds to "Type:Page".
527
	##
528
	'smwgPDefaultType' => '_wpg',
529
	##
530
531
	###
532
	# Settings for OWL/RDF export
533
	##
534
	'smwgAllowRecursiveExport' => false, // can normal users request recursive export?
535
	'smwgExportBacklinks' => true, // should backlinks be included by default?
536
	// global $smwgNamespace,                     // The Namespace of exported URIs.
537
	// 	'smwgNamespace' => "http://example.org/id/", // Will be set automatically if
538
	// nothing is given, but in order to make pretty URIs you will need to set this
539
	// to something nice and adapt your Apache configuration appropriately. This is
540
	// done, e.g., on semanticweb.org, where URIs are of the form
541
	// http://semanticweb.org/id/FOAF
542
	##
543
544
	###
545
	# The maximal number that SMW will normally display without using scientific exp
546
	# notation. The deafult is rather large since some users have problems understanding
547
	# exponents. Scineitfic applications may prefer a smaller value for concise display.
548
	##
549
	'smwgMaxNonExpNumber' => 1000000000000000,
550
	##
551
552
	###
553
	# SMW defers some tasks until after a page was edited by using the MediaWiki
554
	# job queueing system (see http://www.mediawiki.org/wiki/Manual:Job_queue).
555
	# For example, when the type of a property is changed, all affected pages will
556
	# be scheduled for (later) update. If a wiki generates too many jobs in this
557
	# way (Special:Statistics and "showJobs.php" can be used to check that), the
558
	# following setting can be used to disable jobs. Note that this will cause some
559
	# parts of the semantic data to get out of date, so that manual modifications
560
	# or the use of SMW_refreshData.php might be needed.
561
	##
562
	'smwgEnableUpdateJobs' => true,
563
	##
564
565
	### List of enabled special page properties.
566
	# Modification date (_MDAT) is enabled by default for backward compatibility.
567
	# Extend array to enable other properties:
568
	#     $smwgPageSpecialProperties[ => '_CDAT',
569
	# Or:
570
	#     array_merge( $smwgPageSpecialProperties, array( '_CDAT' ) ),
571
	# Or rewrite entire array:
572
	#     	'smwgPageSpecialProperties' => array( '_MDAT', '_CDAT' ),
573
	# However, DO NOT use `+=' operator! This DOES NOT work:
574
	#     $smwgPageSpecialProperties += array( '_MDAT' ),
575
	##
576
	'smwgPageSpecialProperties' => array( '_MDAT' ),
577
	##
578
579
	###
580
	# Properties (usually given as internal ids or DB key versions of property
581
	# titles) that are relevant for declaring the behavior of a property P on a
582
	# property page in the sense that changing their values requires that all
583
	# pages that use P must be processed again. For example, if _PVAL (allowed
584
	# values) for a property change, then pages must be processed again. This
585
	# setting is not normally changed by users but by extensions that add new
586
	# types that have their own additional declaration properties.
587
	##
588
	'smwgDeclarationProperties' => array( '_PVAL', '_LIST', '_PVAP', '_PVUC', '_PDESC', '_PPLB' ),
589
	##
590
591
	###
592
	# By default, DataTypes (Date, URL etc.) are registered with a corresponding
593
	# property of the same name to match the expected semantics. Yet, users can
594
	# decide to change the behaviour by exempting listed DataTypes from the property
595
	# registration process.
596
	#
597
	# @since 2.5
598
	##
599
	'smwgDataTypePropertyExemptionList' => array(
600
		'Record',
601
		'Reference'
602
	),
603
	##
604
605
	// some default settings which usually need no modification
606
607
	###
608
	# -- FEATURE IS DISABLED --
609
	# Setting this to true allows to translate all the labels within
610
	# the browser GIVEN that they have interwiki links.
611
	##
612
	'smwgTranslate' => false,
613
	##
614
615
	###
616
	# -- FEATURE IS DISABLED --
617
	# If you want to import ontologies, you need to install RAP,
618
	# a free RDF API for PHP, see
619
	#     http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/
620
	# The following is the path to your installation of RAP
621
	# (the directory where you extracted the files to) as seen
622
	# from your local filesystem. Note that ontology import is
623
	# highly experimental at the moment, and may not do what you
624
	# extect.
625
	##
626
	// 	'smwgRAPPath' => $smwgIP . 'libs/rdfapi-php',
627
	// 	'smwgRAPPath' => '/another/example/path/rdfapi-php',
628
	##
629
630
	###
631
	# If the following is set to true, it is possible to initiate the repairing
632
	# or updating of all wiki data using the interface on Special:SMWAdmin.
633
	#
634
	# @deprecated since 2.5, use $smwgAdminFeatures
635
	##
636
	'smwgAdminRefreshStore' => true,
637
	##
638
639
	###
640
	# List of Special:SemanticMediaWiki (or Special:SMWAdmin) features
641
	#
642
	# - SMW_ADM_REFRESH: to initiate the repairing or updating of all wiki data
643
	# - SMW_ADM_SETUP: restrict to "Database installation and upgrade"
644
	# - SMW_ADM_DISPOSAL: restrict access to the "Object ID lookup and disposal"
645
	#   feature and the "Outdated entities disposal"
646
	# - SMW_ADM_PSTATS: Property statistics update
647
	# - SMW_ADM_FULLT:
648
	#
649
	# @sine 2.5
650
	##
651
	'smwgAdminFeatures' => SMW_ADM_REFRESH | SMW_ADM_SETUP | SMW_ADM_DISPOSAL | SMW_ADM_PSTATS | SMW_ADM_FULLT,
652
	##
653
654
	###
655
	# Sets whether or not the 'printouts' textarea should have autocompletion
656
	# on property names.
657
	##
658
	'smwgAutocompleteInSpecialAsk' => true,
659
	##
660
661
	###
662
	# Sets whether or not to refresh the pages of which semantic data is stored.
663
	# Introduced in SMW 1.5.6
664
	##
665
	'smwgAutoRefreshSubject' => true,
666
	##
667
668
	###
669
	# Sets Semantic MediaWiki object cache and is used to track temporary
670
	# changes in SMW
671
	#
672
	# @see http://www.mediawiki.org/wiki/$wgMainCacheType
673
	#
674
	# @since 1.9
675
	##
676
	'smwgCacheType' => CACHE_ANYTHING,  // To be removed with 3.0 use $smwgMainCacheType
677
	'smwgMainCacheType' => CACHE_ANYTHING, // Isn't used yet
678
	##
679
680
	###
681
	# Separate cache type to allow for adding a more responsive cache layer
682
	# (redis, riak) when requesting value lookups from the SQLStore.
683
	#
684
	# CACHE_NONE = disabled, uses the standard SQLStore DB access for all
685
	# lookups
686
	#
687
	# @since 2.3 (experimental)
0 ignored issues
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
688
	#
689
	# @default: CACHE_NONE, users need to actively enable it in order
690
	# to make use of it
691
	##
692
	'smwgValueLookupCacheType' => CACHE_NONE,
693
	##
694
695
	###
696
	# Declares a lifetime of a cached item for `smwgValueLookupCacheType` until it
697
	# is removed if not invalidated before.
698
	#
699
	# @since 2.3
700
	##
701
	'smwgValueLookupCacheLifetime' => 60 * 60 * 24 * 7, // a week
702
	##
703
704
	##
705
	# Features expected to be enabled in CachedValueLookupStore
706
	#
707
	# Flags that declare a enable/disable state of a supported functionality. If a
708
	# feature is disabled then a connection is always established to the standard
709
	# Repository/DB backend.
710
	#
711
	# The settings are only relevant for cases where `smwgValueLookupCacheType` is
712
	# set.
713
	#
714
	# - SMW_VL_SD: corresponds to Store::getSemanticData
715
	# - SMW_VL_PL: corresponds to Store::getProperties
716
	# - SMW_VL_PV: corresponds to Store::getPropertyValues
717
	# - SMW_VL_PS: corresponds to Store::getPropertySubjects
718
	#
719
	# @since 2.3
720
	#
721
	# @default: all features are enabled
722
	##
723
	'smwgValueLookupFeatures' => SMW_VL_SD | SMW_VL_PL | SMW_VL_PV | SMW_VL_PS,
724
	##
725
726
	###
727
	# An array containing cache related settings used within Semantic MediaWiki
728
	# and requires $smwgCacheType be set otherwise caching will have no effect.
729
	#
730
	# - smwgWantedPropertiesCache Enable to serve wanted properties from cache
731
	# - smwgWantedPropertiesCacheExpiry Number of seconds before the cache expires
732
	#
733
	# - smwgUnusedPropertiesCache Enable to serve unused properties from cache
734
	# - smwgUnusedPropertiesCacheExpiry Number of seconds before the cache expires
735
	#
736
	# - smwgPropertiesCache Enable to serve properties from cache
737
	# - smwgPropertiesCacheExpiry Number of seconds before the cache expires
738
	#
739
	# - smwgStatisticsCache Enable to serve statistics from cache
740
	# - smwgStatisticsCacheExpiry Number of seconds before the cache expires
741
	#
742
	# @since 1.9
743
	##
744
	'smwgCacheUsage' => array(
745
		'smwgWantedPropertiesCache' => true,
746
		'smwgWantedPropertiesCacheExpiry' => 3600,
747
		'smwgUnusedPropertiesCache' => true,
748
		'smwgUnusedPropertiesCacheExpiry' => 3600,
749
		'smwgPropertiesCache' => true,
750
		'smwgPropertiesCacheExpiry' => 3600,
751
		'smwgStatisticsCache' => true,
752
		'smwgStatisticsCacheExpiry' => 3600,
753
	),
754
	##
755
756
	###
757
	# Sets whether or not to refresh semantic data in the store when a page is
758
	# manually purged
759
	#
760
	# @since 1.9
761
	#
762
	# @requires  $smwgCacheType be set
763
	# @default true
764
	##
765
	'smwgAutoRefreshOnPurge' => true,
766
	##
767
768
	###
769
	# Sets whether or not to refresh semantic data in the store when a page was
770
	# moved
771
	#
772
	# @since 1.9
773
	#
774
	# @requires  $smwgCacheType be set
775
	# @default true
776
	##
777
	'smwgAutoRefreshOnPageMove' => true,
778
	##
779
780
	##
781
	# List of user-defined fixed properties
782
	#
783
	# Listed properties are managed by its own fixed table (instad of a
784
	# shared one) to allow for sharding large datasets with value assignments.
785
	#
786
	# The type definition is talen from the property page `[[Has type::...]]` and
787
	# by default (if no type is defined) then the `smwgPDefaultType` is returned.
788
	#
789
	# Any change to the property type requires to run the `setupStore.php` script
790
	# or `Special:SMWAdmin` table update.
791
	#
792
	# 'smwgFixedProperties' => array(
793
	#		'Age',
794
	#		'Has population'
795
	# ),
796
	#
797
	# @see https://semantic-mediawiki.org/wiki/Fixed_properties
798
	# @since 1.9
799
	#
800
	# @default array()
801
	##
802
	'smwgFixedProperties' => array(),
803
804
	###
805
	# Sets a threshold value for when a property is being highlighted as "hardly
806
	# begin used" on Special:Properties
807
	#
808
	# @since 1.9
809
	#
810
	# default = 5
811
	##
812
	'smwgPropertyLowUsageThreshold' => 5,
813
	##
814
815
	###
816
	# Hide properties where the usage count is zero on Special:Properties
817
	#
818
	# @since 1.9
819
	#
820
	# default = true (legacy behaviour)
821
	##
822
	'smwgPropertyZeroCountDisplay' => true,
823
	##
824
825
	###
826
	# Sets whether or not a factbox content should be stored in cache. This will
827
	# considerable improve page response time as non-changed page content will
828
	# not cause re-parsing of factbox content and instead is served directly from
829
	# cache while only a new revision will trigger to re-parse the factbox.
830
	#
831
	# If smwgFactboxUseCache is set false (equals legacy behaviour) then every page
832
	# request will bind the factbox to be re-parsed.
833
	#
834
	# @since 1.9
835
	#
836
	# @requires $smwgCacheType be set
837
	# @default true
838
	##
839
	'smwgFactboxUseCache' => true,
840
	##
841
842
	###
843
	# Sets whether or not a cached factbox should be invalidated on an action=purge
844
	# event
845
	#
846
	# If set false the factbox cache will be only reset after a new page revision
847
	# but if set true each purge request (no new page revision) will invalidate
848
	# the factbox cache
849
	#
850
	# @since 1.9
851
	#
852
	# @requires $smwgCacheType be set
853
	# @default true
854
	##
855
	'smwgFactboxCacheRefreshOnPurge' => true,
856
	##
857
858
	###
859
	# This option enables to omit categories (marked with __HIDDENCAT__) from
860
	# the annotation process.
861
	#
862
	# If a category is updated of either being hidden or visible, pages need to
863
	# be refreshed to ensure that the StoreUpdater can make use of the changed
864
	# environment.
865
	#
866
	# @since 1.9
867
	# @default true (true = legacy behaviour, false = not to show hidden categories)
868
	##
869
	'smwgShowHiddenCategories' => true,
870
	##
871
872
	###
873
	# QueryProfiler related setting to enable/disable specific monitorable profile
874
	# data
875
	#
876
	# @note If these settings are changed, please ensure to run update.php/rebuildData.php
877
	#
878
	# - smwgQueryProfiler can be set false itself allowing it to disable its
879
	# functionality but it may impact secondary processes that rely on profile
880
	# information to be available (Notification system etc.)
881
	#
882
	# - smwgQueryDurationEnabled to record query duration (the time
883
	# between the query result selection and output its)
884
	#
885
	# False will disabled the query profiler (not recommended)
886
	#
887
	# @since 1.9
888
	##
889
	'smwgQueryProfiler' => array(
890
		'smwgQueryDurationEnabled' => false,
891
	),
892
	##
893
894
	###
895
	# Enables SMW specific annotation and content processing for listed SpecialPages
896
	#
897
	# @since 1.9
898
	##
899
	'smwgEnabledSpecialPage' => array( 'Ask' ),
900
	##
901
902
	###
903
	# Search engine to fall back to in case SMWSearch is used as custom search
904
	# engine but is unable to interpret the search term as an SMW query
905
	#
906
	# Leave as null to select the default search engine for the selected database
907
	# type (e.g. SearchMySQL, SearchPostgres or SearchOracle), or set to a class
908
	# name to override to a custom search engine.
909
	#
910
	# @since 2.1
911
	##
912
	'smwgFallbackSearchType' => null,
913
	##
914
915
	###
916
	# If enabled it will display help information on the edit page to support users
917
	# unfamiliar with SMW when extending page content.
918
	#
919
	# @since 2.1
920
	##
921
	'smwgEnabledEditPageHelp' => true,
922
	##
923
924
	###
925
	# Various MediaWiki update operations in MW 1.26+ started to use DeferredUpdates
926
	# and to ensure that the Store update follows in queue of updates made to a page
927
	# this setting should be enabled by default for MW 1.26 onwards.
928
	#
929
	# It will improve page responsiveness for purge and move action significantly.
930
	#
931
	# @since 2.4
932
	##
933
	'smwgEnabledDeferredUpdate' => true,
934
	##
935
936
	###
937
	# Improves performance for selected Job operations that can be executed in a deferred
938
	# processing mode (or asynchronous to the current transaction) as those (if enabled)
939
	# are send as request to a dispatcher in order for them to be decoupled from the
940
	# initial transaction.
941
	#
942
	# @since 2.3
943
	##
944
	'smwgEnabledHttpDeferredJobRequest' => true,
945
	##
946
947
	###
948
	# Query dependency and parser cache invalidation
949
	#
950
	# If enabled it will store dependencies for queries allowing it to purge
951
	# the ParserCache on subjects with embedded queries that contain altered entities.
952
	#
953
	# The setting requires to run `update.php` (it creates an extra table). Also
954
	# as noted in 	#1117, `SMW\ParserCachePurgeJob` should be scheduled accordingly.
955
	#
956
	# Requires `smwgEnabledHttpDeferredJobRequest` to be set true.
957
	#
958
	# @since 2.3 (experimental)
0 ignored issues
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
959
	# @default false
960
	##
961
	'smwgEnabledQueryDependencyLinksStore' => false,
962
	##
963
964
	###
965
	# Relates to `smwgEnabledQueryDependencyLinksStore` and defines property keys
966
	# to be excluded from the dependency detection.
967
	#
968
	# For example, to avoid a purge process being triggered for each altered subobject
969
	# '_SOBJ' is excluded from the processing but it will not exclude any properties
970
	# defined by a subobject (given that it is not part of an extended exclusion list).
971
	#
972
	# `_MDAT` is excluded to avoid a purge on each page edit with a `Modification date`
973
	# change that would otherwise trigger a dependency update.
974
	#
975
	# '_ASKDU' changes to the duration of a query should not trigger an update of
976
	# possible query dependencies (as this has no bearing on the result list).
977
	#
978
	# @since 2.3 (experimental)
0 ignored issues
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
979
	##
980
	'smwgQueryDependencyPropertyExemptionlist' => array( '_MDAT', '_SOBJ', '_ASKDU' ),
981
	##
982
983
	###
984
	# Listed properties are marked as affiliate, meaning that when an alteration to
985
	# a property value occurs query dependencies for the related entity are recorded
986
	# as well. For example, _DTITLE is most likely such property where a change would
987
	# normally not be reflected in query results (as it not directly linked to a
988
	# query) but when added as an affiliated, changes to its content will be
989
	# handled as if it is linked to an embedded entity.
990
	#
991
	# @since 2.4 (experimental)
992
	##
993
	'smwgQueryDependencyAffiliatePropertyDetectionlist' => array(),
994
	##
995
996
	###
997
	# The setting is introduced the keep backwards compatibility with existing Rdf/Turtle
998
	# exports. The `aux` marker is expected only used to be used for selected properties
999
	# to generate a helper value and not for any other predefined property.
1000
	#
1001
	# Any property that does not explicitly require an auxiliary value (such `_dat`/
1002
	# `_geo` type values) now uses its native as condition descriptor (`Has_subobject`
1003
	# instead of `Has_subobject-23aux`)
1004
	#
1005
	# For SPARQL repository users that don't want to run an a  `rebuildData.php`,
1006
	# the setting has to be TRUE.
1007
	#
1008
	# This BC setting is planned to vanish with 3.x.
1009
	#
1010
	# @since 2.3
1011
	##
1012
	'smwgExportBCAuxiliaryUse' => false,
1013
	##
1014
1015
	##
1016
	# The preferred form is to use canonical identifiers (Category:, Property:)
1017
	# instead of localized names to ensure that RDF/Query statements are language
1018
	# agnostic and do work even after the site/content language changes.
1019
	#
1020
	# This BC setting is planned to vanish with 3.x.
1021
	#
1022
	# @since 2.3
1023
	##
1024
	'smwgExportBCNonCanonicalFormUse' => false,
1025
	##
1026
1027
	##
1028
	# The strict mode is to help to remove ambiguity during the annotation [[ ... :: ... ]]
1029
	# parsing process.
1030
	#
1031
	# The default interpretation (strict) is to find a single triple such as
1032
	# [[property::value:partOfTheValue::alsoPartOfTheValue]] where in case the strict
1033
	# mode is disabled multiple properties can be assigned using a
1034
	# [[property1::property2::value]] notation but may cause value strings to be
1035
	# interpret unanticipated in case of additional colons.
1036
	#
1037
	# @since 2.3
1038
	# @default true
1039
	##
1040
	'smwgEnabledInTextAnnotationParserStrictMode' => true,
1041
	##
1042
1043
	##
1044
	# Features or restrictions for specific DataValue types
1045
	#
1046
	# - SMW_DV_NONE
1047
	#
1048
	# - SMW_DV_PROV_REDI (PropertyValue) If a property is redirected to a different
1049
	# target (Foo -> Bar) then follow it by default in order to allow query results
1050
	# to be displayed equivalent for both queries without having to adjust
1051
	# (or change) a query. This flag is mainly provided to restore backwards
1052
	# compatibility where behaviour is not expected to be altered, nevertheless it is
1053
	# recommended that the setting is enabled to improve user friendliness in terms
1054
	# of query execution.
1055
	#
1056
	# - SMW_DV_MLTV_LCODE (MonolingualTextValue) is to require a language code in order
1057
	# for a DV to be completed otherwise a MLTV can operate without a language code
1058
	#
1059
	# - SMW_DV_PVAP (Allows pattern) to allow regular expression pattern matching
1060
	# when `Allows pattern` property is assigned to user-defined property
1061
	#
1062
	# - SMW_DV_WPV_DTITLE (WikiPageValue) is to allow requesting a lookup for a display
1063
	# title and if present will be used as caption for the invoked subject
1064
	#
1065
	# - SMW_DV_PROV_DTITLE (PropertyValue) in combination with SMW_DV_WPV_DTITLE, If
1066
	# enabled it will attempt to resolve a property label by matching it against a
1067
	# possible assigned property "Display title of" value. For example, property
1068
	# "Foo" has "Display title of" "hasFoolishFoo" where "hasFoolishFoo" is being
1069
	# resolved as "Foo" when creating annotations. Currently, this uses an
1070
	# uncached lookup and therefore is disabled by default to avoid a possible
1071
	# performance impact (which has not been established or analyzed).
1072
	#
1073
	# - SMW_DV_PVUC (Uniqueness constraint) to specify that a property can only
1074
	# assign a value that is unique in its literal representation (the state of
1075
	# uniqueness for a value is established by the fact that it is assigned before
1076
	# any other value of the same representation to a property).
1077
	#
1078
	# - SMW_DV_TIMEV_CM (TimeValue) to indicate the CalendarModel if is not a
1079
	# CM_GREGORIAN
1080
	#
1081
	# - SMW_DV_NUMV_USPACE (Number/QuantityValue) to preserve spaces within
1082
	# unit labels
1083
	#
1084
	# - SMW_DV_PPLB to support the use of preferred property labels
1085
	#
1086
	# - SMW_DV_PROV_LHNT (PropertyValue) to output a <sup>p</sup> hint marker on
1087
	# properties that use a preferred label
1088
	#
1089
	# @since 2.4
1090
	##
1091
	'smwgDVFeatures' => SMW_DV_PROV_REDI | SMW_DV_MLTV_LCODE | SMW_DV_PVAP | SMW_DV_WPV_DTITLE | SMW_DV_TIMEV_CM | SMW_DV_PPLB | SMW_DV_PROV_LHNT,
1092
	##
1093
1094
	##
1095
	# Fulltext search support
1096
	#
1097
	# If enabled, it will store text elements using a separate table in order for
1098
	# the SQL back-end to use the special fulltext index operations provided by
1099
	# the SQL engine.
1100
	#
1101
	# - Tested with MySQL/MariaDB
1102
	# - Tested with SQLite
1103
	#
1104
	# @since 2.5
1105
	# @default: false
1106
	##
1107
	'smwgEnabledFulltextSearch' => false,
1108
	##
1109
1110
	##
1111
	# Throttle index updates
1112
	#
1113
	# The objective is to postpone an update by relying on a deferred process that
1114
	# runs the index update decoupled from the storage back-end update.
1115
	#
1116
	# In case `smwgFulltextDeferredUpdate` and `	'smwgEnabledDeferredUpdate']` are
1117
	# both enabled then the updater will try to open a new request and posting instructions
1118
	# to execute the `SearchTableUpdateJob` immediately in background. If the request
1119
	# cannot be executed then the `SearchTableUpdateJob` will be enqueued and requires
1120
	# `runJobs.php` to schedule the index table update.
1121
	#
1122
	# If a user wants to push updates to the updater immediately then this setting needs
1123
	# to be disabled but by disabling this setting update lag may increase due to having
1124
	# the process being executed synchronously to the wikipage update.
1125
	#
1126
	# @since 2.5
1127
	# @default: true
1128
	##
1129
	'smwgFulltextDeferredUpdate' => true,
1130
	##
1131
1132
	##
1133
	# Fulltext search table options
1134
	#
1135
	# This setting directly influences how a ft table is created therefore change
1136
	# the content with caution.
1137
	#
1138
	# - MySQL version 5.5 or later with only MyISAM and InnoDB storage engines
1139
	# to support full-text search (according to sources)
1140
	#
1141
	# - MariaDB full-text indexes can be used only with MyISAM and Aria tables,
1142
	# from MariaDB 10.0.5 with InnoDB tables and from MariaDB 10.0.15
1143
	# with Mroonga tables (according to sources)
1144
	#
1145
	# - SQLite FTS3 has been available since version 3.5, FTS4 were added with
1146
	# version 3.7.4, and FTS5 is available with version 3.9.0 (according to
1147
	# sources), The setting allows to specify extra arguments after the module
1148
	# engine such as array( 'FTS4', 'tokenize=porter' ).
1149
	#
1150
	# It is possible to extend the option description (MySQL 5.7+)  with
1151
	# 'mysql' => array( 'ENGINE=MyISAM, DEFAULT CHARSET=utf8', 'WITH PARSER ngram' )
1152
	#
1153
	# @since 2.5
1154
	##
1155
	'smwgFulltextSearchTableOptions' => array(
1156
		'mysql'  => array( 'ENGINE=MyISAM, DEFAULT CHARSET=utf8' ),
1157
		'sqlite' => array( 'FTS4' )
1158
	),
1159
	##
1160
1161
	##
1162
	# Exempted properties
1163
	#
1164
	# List of property keys for which index and fulltext match operations are
1165
	# exempted because there are either insignificant, mostly represent single
1166
	# terms, or contain other characteristics that make them non preferable when
1167
	# searching via the fulltext index.
1168
	#
1169
	# Listed properties will use the standard LIKE/NLIKE match operation when used
1170
	# in connection with the ~/!~ expression.
1171
	#
1172
	# @since 2.5
1173
	##
1174
	'smwgFulltextSearchPropertyExemptionList' => array(
1175
		'_ASKFO', '_ASKST', '_IMPO', '_LCODE', '_UNIT', '_CONV',
1176
		'_TYPE', '_ERRT', '_INST', '_ASK', '_INST', '_SOBJ'
1177
	),
1178
	##
1179
1180
	##
1181
	# List of indexable DataTypes
1182
	#
1183
	# - SMW_FT_BLOB property values of type Blob (Text)
1184
	# - SMW_FT_URI property values of type URI
1185
	# - SMW_FT_WIKIPAGE property values of type Page
1186
	#
1187
	# SMW_FT_WIKIPAGE has not been added as default value as no performance
1188
	# impact analysis is available as to how indexing and search performance would
1189
	# be affected by a wiki with a large pool of pages (10K+) or extended page
1190
	# type value assignments on a full-text index.
1191
	#
1192
	# Enabling SMW_FT_WIKIPAGE will support the same search features (case
1193
	# insensitivity, phrase matching etc.) as available for Text or URI values
1194
	# when searches are executed using the ~/!~.
1195
	#
1196
	# @since 2.5
1197
	# @default: SMW_FT_BLOB | SMW_FT_URI
1198
	##
1199
	'smwgFulltextSearchIndexableDataTypes' => SMW_FT_BLOB | SMW_FT_URI,
1200
	##
1201
1202
	##
1203
	# Describes the minimum word/token length to help to decide whether MATCH or LIKE
1204
	# operators are to be used for a condition statement.
1205
	#
1206
	# For MySQL it is expected it corresponds to either innodb_ft_min_token_size or
1207
	# ft_min_word_len
1208
	#
1209
	# @since 2.5
1210
	##
1211
	'smwgFulltextSearchMinTokenSize' => 3,
1212
	##
1213
1214
	##
1215
	# To detect a possible language candidate from an indexable text element.
1216
	#
1217
	# TextCatLanguageDetector, a large list of languages does have a detrimental
1218
	# influence on the performance when trying to detect a language from a free text.
1219
	#
1220
	# Stopwords are only applied after language detection has been enabled.
1221
	#
1222
	# @see https://github.com/wikimedia/wikimedia-textcat
1223
	#
1224
	# @since 2.5
1225
	# @default empty list (language detection is disabled by default)
1226
	##
1227
	'smwgFulltextLanguageDetection' => array(
1228
	//	'TextCatLanguageDetector' => array( 'en', 'de', 'fr', 'es', 'ja', 'zh' )
1229
	//	'CdbNGramLanguageDetector' => array( 'en', 'de', 'fr', 'es', 'ja', 'zh' )
1230
	),
1231
	##
1232
1233
	##
1234
	# MySQL's "Global Transaction Identifier" will create issues when executing
1235
	# queries that rely on temporary tables, according to the documentation "... the
1236
	# operations listed here cannot be used ... CREATE TEMPORARY TABLE statements
1237
	# inside transactions".
1238
	#
1239
	# MySQL Global transaction identifier is a unique transaction ID assigned to
1240
	# every transaction that happens in the MySQL database.
1241
	#
1242
	# Issue is encountered when @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1
1243
	#
1244
	# @see https://dev.mysql.com/doc/refman/5.6/en/replication-options-gtids.html
1245
	# @see https://support.software.dell.com/kb/184275
1246
	#
1247
	# This setting (if enabled) will force an auto commit operation for temporary
1248
	# tables to avoid the described limitation.
1249
	#
1250
	# @since 2.5
1251
	# @default false
1252
	##
1253
	'smwgQTemporaryTablesAutoCommitMode' => false,
1254
	##
1255
1256
	###
1257
	# Support to store a computed subject list that were fetched from the QueryEngine
1258
	# (not the string result generated from a result printer) and improve general
1259
	# page-loading time for articles that contain embedded queries and decrease
1260
	# server load on query requests.
1261
	#
1262
	# It is recommended that `smwgEnabledQueryDependencyLinksStore` is enabled to make
1263
	# use of automatic query results cache eviction.
1264
	#
1265
	# @since 2.5 (experimental)
1266
	#
1267
	# @default: CACHE_NONE (== that this feature is disabled)
1268
	##
1269
	'smwgQueryResultCacheType' => CACHE_NONE,
1270
	##
1271
1272
	###
1273
	# Specifies the lifetime of embedded query and their results fetched from a
1274
	# QueryEngine for when `smwgQueryResultCacheType` is enabled.
1275
	#
1276
	# @since 2.5
1277
	##
1278
	'smwgQueryResultCacheLifetime' => 60 * 60 * 24 * 7, // a week
1279
	##
1280
1281
	###
1282
	# Specifies the lifetime of non-embedded queries (Special:Ask, API etc.) and their
1283
	# results that are fetched from a QueryEngine for when `smwgQueryResultCacheType` is
1284
	# enabled.
1285
	#
1286
	# This setting can also be used to minimize a possible DoS vector by preventing
1287
	# an advisory to make unlimited query requests from either Special:Ask or the
1288
	# API that may lock the DB due to complex query answering and instead being
1289
	# rerouted to the cache once a result has been computed.
1290
	#
1291
	# @note Non-embedded queries cannot not be tracked using the `QueryDependencyLinksStore`
1292
	# (subject is being missing that would identify the entity) therefore
1293
	# an auto-purge mechanism as in case of an embedded entity is not possible hence
1294
	# the lifetime should be carefully selected to provide the necessary means for a
1295
	# user and the application.
1296
	#
1297
	# 0/false as setting to disable caching of non-embedded queries.
1298
	#
1299
	# @since 2.5
1300
	##
1301
	'smwgQueryResultNonEmbeddedCacheLifetime' => 60 * 10, // 10 min
1302
	##
1303
1304
	###
1305
	# Enables the manual refresh for embedded queries when the action=purge event is
1306
	# triggered.
1307
	#
1308
	# @since 2.5
1309
	##
1310
	'smwgQueryResultCacheRefreshOnPurge' => true,
1311
	##
1312
1313
);
1314