forked from SemanticMediaWiki/SemanticMediaWiki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DefaultSettings.php
2497 lines (2336 loc) · 82.7 KB
/
DefaultSettings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/**
* DO NOT EDIT!
*
* The following default settings are to be used by the extension itself,
* please modify settings in the LocalSettings file.
*
* Most settings should be make between including this file and the call
* to enableSemantics(). Exceptions that need to be set before are
* documented below.
*
* @codeCoverageIgnore
*/
if ( !defined( 'MEDIAWIKI' ) ) {
die( "This file is part of the Semantic MediaWiki extension. It is not a valid entry point.\n" );
}
return [
###
# This is the path to your installation of Semantic MediaWiki as seen on your
# local filesystem. Used against some PHP file path issues.
#
# @since 1.0
##
'smwgIP' => __DIR__ . '/',
#
# @since 2.5
##
'smwgExtraneousLanguageFileDir' => __DIR__ . '/i18n/extra',
'smwgServicesFileDir' => __DIR__ . '/src/Services',
'smwgResourceLoaderDefFiles' => [ 'smw' => __DIR__ . '/res/Resources.php' ],
'smwgMaintenanceDir' => __DIR__ . '/maintenance',
'smwgDir' => __DIR__,
##
###
# Configuration directory
# @see #3506
#
# The maintained directory needs to be writable in order for configuration
# information to be stored persistently and be accessible for Semantic
# MediaWiki throughout its operation.
#
# You may assign the same directory as in `wgUploadDirectory` (e.g
# $smwgConfigFileDir = $wgUploadDirectory;) or select an entire different
# location. The default location is the Semantic MediaWiki extension root.
#
# During its operation it may contain:
# - `.smw.json`
# - `.smw.maintenance.json`
#
# @since 3.0
##
'smwgConfigFileDir' => __DIR__,
##
###
# Upgrade key
#
# This key verifies that a correct upgrade (update.php/setupStore.php) path
# was selected and hereby ensures a consistent DB setup.
#
# Whenever a DB table change occurs, modify the key value (e.g. `smw:20...`)
# to reflect the requirement for the client to follow the processes as
# outlined in the installation manual.
#
# Once the installer is run, the `.smw.json` will be updated and no longer
# cause any exception.
#
# @since 3.0
##
'smwgUpgradeKey' => 'smw:2020-04-18',
##
###
# Content import
#
# Controls the content import directory and version that is expected to be
# imported during the setup process.
#
# For all legitimate files in `smwgImportFileDirs`, the import is initiated
# if the `smwgImportReqVersion` compares with the declared version in the file.
#
# In case `smwgImportReqVersion` is maintained with `false` then the import
# is going to be disabled.
#
# @since 2.5
##
'smwgImportFileDirs' => [ 'smw' => __DIR__ . '/data/import' ],
'smwgImportReqVersion' => 1,
##
###
# List of users for import activities
#
# Users listed here are to be used exclusively for the import task and can
# depending on the specific protection level lock certain content from being
# altered by any other user.
#
# The protection is only enabled when a specific import content has defined
# the `import_performer` with a listed user.
#
# @since 3.2
# @default []
##
'smwgImportPerformers' => [ 'SemanticMediaWikiImporter' ],
##
###
# Allows to ignore the check for whether the extension was correctly enabled
# or not. It will display an error message on `Special:Version` in case it was
# not.
#
# SMW 3.2 added an additional validation to check that `wfLoadExtension(
# 'SemanticMediaWiki')` isn't used given its conflict with `enableSemantics`.
# If the setting is set to `false` then this check is disabled as well.
#
# To ignore the check and suppress the error, set the value to `true`.
#
# @since 3.1
##
'smwgIgnoreExtensionRegistrationCheck' => false,
##
###
# Use another storage backend for Semantic MediaWiki. The default is suitable
# for most uses of SMW.
#
# @since 0.7
##
'smwgDefaultStore' => "SMWSQLStore3",
##
##
# Debug logger role
#
# A role (developer, user, production) defines the detail of information
# (granularity) that are expected to be logged. Roles include:
#
# - `developer` outputs any loggable event produced by SMW
# - `user` outputs certain events deemed important
# - `production` outputs a minimal set of events produced by SMW
#
# Logging only happens in case `$wgDebugLogFile` or `$wgDebugLogGroups`
# are actively maintained.
#
# @see https://www.mediawiki.org/wiki/Manual:How_to_debug#Logging
#
# @since 3.0
# @default production
##
'smwgDefaultLoggerRole' => 'production',
##
###
# Local connection configurations
#
# Allows to modify connection characteristics for providers that are used by
# Semantic MediaWiki.
#
# Changes to these settings should ONLY be made by trained professionals to
# avoid unexpected or unanticipated results when using connection handlers.
#
# Available DB index as provided by MediaWiki:
#
# - DB_REPLICA (1.27.4+)
# - DB_MASTER
#
# @since 2.5.3
##
'smwgLocalConnectionConf' => [
'mw.db' => [
'read' => DB_REPLICA,
'write' => DB_MASTER
],
'mw.db.queryengine' => [
'read' => DB_REPLICA,
'write' => DB_MASTER
]
],
##
###
# Configure SPARQL database connection for Semantic MediaWiki. This is used
# when SPARQL-based features are enabled, e.g. when using SMWSparqlStore as
# the $smwgDefaultStore.
#
# The default class SMWSparqlDatabase works with many databases that support
# SPARQL and SPARQL Update. Three different endpoints (service URLs) are given
# - query (reading queries like SELECT)
# - update (SPARQL Update queries), and
# - data (SPARQL HTTP Protocol for Graph Management).
#
# The query endpoint is necessary, but the update and data endpoints can be
# omitted if not supported.
#
# This will lead to reduced functionality (e.g. the SMWSparqlStore will not
# work if Update is not available). The data endpoint is always optional, but
# in some SPARQL databases this method is more efficient than update.
#
# @since 1.6
##
'smwgSparqlEndpoint' => [
'query' => 'http://localhost:8080/sparql/',
'update' => 'http://localhost:8080/update/',
'data' => 'http://localhost:8080/data/'
],
##
###
#
# The default graph is similar to a database name in relational databases. It
# can be set to any URI (e.g. the main page uri of your wiki with
# " #graph" appended). Leaving the default graph URI empty only works if the
# store is configure to use some default default graph or if it generally
# supports this. Different wikis should normally use different default graphs
# unless there is a good reason to share one graph.
#
# @since 1.7
##
'smwgSparqlDefaultGraph' => '',
##
##
# Sparql repository connector
#
# Identifies a pre-deployed repository connector that is ought to be used together
# with the SPARQLStore.
#
# List of standard connectors ($smwgSparqlCustomConnector will have no effect):
# - '4store'
# - 'blazegraph'
# - 'fuseki'
# - 'sesame'
# - 'virtuoso'
#
# In case `$smwgSparqlRepositoryConnector` is maintained with 'custom',
# the `$smwgSparqlCustomConnector` is expected to contain a custom class
# implementing the ncessary interface (see `SMWSparqlDatabase`).
#
# `$smwgSparqlCustomConnector` is only used for the definition of a custom
# connector.
#
# @since 2.0
# @default default, meaning that the default (aka generic) connector is used
##
'smwgSparqlRepositoryConnector' => 'default',
##
##
# Sparql cutstom connector
#
# In case `$smwgSparqlRepositoryConnector` is maintained with 'custom',
# the `$smwgSparqlCustomConnector` is expected to contain a custom class
# implementing the ncessary interface (see `SMWSparqlDatabase`).
#
# `$smwgSparqlCustomConnector` is only used for the definition of a custom
# connector.
#
# @since 2.0
##
'smwgSparqlCustomConnector' => 'SMWSparqlDatabase',
##
##
# Sparql query features that are expected to be supported by the repository:
#
# - SMW_SPARQL_QF_NONE does not support any features (as required by SPARQL 1.1)
# - SMW_SPARQL_QF_REDI to support finding redirects using inverse property paths,
# can only be used for repositories with full SPARQL 1.1 support (e.g. Fuseki,
# Sesame)
# - SMW_SPARQL_QF_SUBP to resolve subproperties
# - SMW_SPARQL_QF_SUBC to resolve subcategories
#
# - SMW_SPARQL_QF_COLLATION allows to add support for the sorting collation as
# maintained in $smwgEntityCollation. It is not enabled by default as the
# `uca-*` collation generates a UTF-8 string that contains unrecognized
# UTF codepoints that may not be understood by the back-end hence the
# Collator prevents and armors those unrecognized characters by replacing
# them with a ? to avoid a cURL communication failure but of course this
# means that not all elements of the sort string can be transfered to the
# back-end and can therefore cause a sorting distortion for close matches
# as in case of for example "Ennis, Ennis Hill, Ennis Jones, Ennis-Hill,
# Ennis-London"
#
# - SMW_SPARQL_QF_NOCASE to support case insensitive pattern matches
#
# Please check with your repository provider whether SPARQL 1.1 is fully
# supported or not, and if not SMW_SPARQL_QF_NONE should be set.
#
# @since 2.3
##
'smwgSparqlQFeatures' => SMW_SPARQL_QF_REDI | SMW_SPARQL_QF_SUBP | SMW_SPARQL_QF_SUBC,
##
##
# SPARQL respository specific features
#
# - SMW_SPARQL_NONE does not support any features
#
# - SMW_SPARQL_CONNECTION_PING to support the verifcation that a connection
# can be established and allows for an uninterruppted update and query
# process
#
# @since 3.2
##
'smwgSparqlRepositoryFeatures' => SMW_SPARQL_NONE,
##
##
# @see https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/1306
#
# Setting to explicitly force a CURLOPT_HTTP_VERSION for the endpoint communication
# and should not be changed unless an error as in #1306 was encountered.
#
# @see http://curl.haxx.se/libcurl/c/CURLOPT_HTTP_VERSION.html reads "... libcurl
# to use the specific HTTP versions. This is not sensible to do unless you have
# a good reason.""
#
# @since 2.3
# @default false === means to use the default as determined by cURL
##
'smwgSparqlRepositoryConnectorForcedHttpVersion' => false,
##
##
# Property replication exemption list
#
# Listed properties will be exempted from the replication process for a
# registered SPARQL repository.
#
# @since 2.5
# @default array
##
'smwgSparqlReplicationPropertyExemptionList' => [],
##
###
# If you already have custom namespaces on your site, insert
# 'smwgNamespaceIndex' => ???,
# into your LocalSettings.php *before* including this file. The number ??? must
# be the smallest even namespace number that is not in use yet. However, it
# must not be smaller than 100.
#
# @since 1.6
##
# 'smwgNamespaceIndex' => 100,
##
###
# Overwriting the following array, you can define for which namespaces
# the semantic links and annotations are to be evaluated. On other
# pages, annotations can be given but are silently ignored. This is
# useful since, e.g., talk pages usually do not have attributes and
# the like. In fact, is is not obvious what a meaningful attribute of
# a talk page could be. Pages without annotations will also be ignored
# during full RDF export, unless they are referred to from another
# article.
#
# @since 0.7
##
'smwgNamespacesWithSemanticLinks' => [
NS_MAIN => true,
NS_TALK => false,
NS_USER => true,
NS_USER_TALK => false,
NS_PROJECT => true,
NS_PROJECT_TALK => false,
NS_FILE => true,
NS_FILE_TALK => false,
NS_MEDIAWIKI => false,
NS_MEDIAWIKI_TALK => false,
NS_TEMPLATE => false,
NS_TEMPLATE_TALK => false,
NS_HELP => true,
NS_HELP_TALK => false,
NS_CATEGORY => true,
NS_CATEGORY_TALK => false,
],
##
###
# Specifies features supported by the in-page factbox
#
# - SMW_FACTBOX_CACHE to use the main cache to avoid reparsing the content on
# each page view (replaced smwgFactboxUseCache)
#
# - SMW_FACTBOX_PURGE_REFRESH to refresh the faxtbox content on the purge
# event (replaced smwgFactboxCacheRefreshOnPurge)
#
# - SMW_FACTBOX_DISPLAY_SUBOBJECT displays subobject references
#
# - SMW_FACTBOX_DISPLAY_ATTACHMENT displays attachment list
#
# @since 3.0
##
'smwgFactboxFeatures' => SMW_FACTBOX_CACHE | SMW_FACTBOX_PURGE_REFRESH | SMW_FACTBOX_DISPLAY_SUBOBJECT | SMW_FACTBOX_DISPLAY_ATTACHMENT,
###
# This setting allows you to select in which cases you want to have a factbox
# appear below an article and includes the following options:
#
# - SMW_FACTBOX_NONEMPTY show only those factboxes that have some content
# - SMW_FACTBOX_SPECIAL show only if special properties were set
# - SMW_FACTBOX_HIDDEN hide always
# - SMW_FACTBOX_SHOWN show always
#
# @note The Magic Words __SHOWFACTBOX__ and __HIDEFACTBOX__ can be used to
# control Factbox display for individual pages.
#
# @since 0.7
##
'smwgShowFactbox' => SMW_FACTBOX_HIDDEN,
##
###
# Same as $smwgShowFactbox but for the edit mode with same possible values.
#
# @since 1.0
##
'smwgShowFactboxEdit' => SMW_FACTBOX_NONEMPTY,
##
###
# Compact infolink support
#
# Special:Browse, Special:Ask, and Special:SearchByProperty links can contain
# arbitrary text elements and therefore become difficult to transfer when its
# length exceeds a certain character length.
#
# The experimental feature of a compact link will be encoded and compressed to
# ensure that it can be handled more easily when referring to it as an URL
# representation.
#
# It is not expected to be used as a short-url service, yet in some instances
# the generate URL can be comparatively shorter than the plain URL.
#
# The generated link has no security relevance therefore is is not
# cryptographically hashed or secure and should not be seen as such, it is
# foremost to "compact" an URL address.
#
# @since 3.0
# @default true
##
'smwgCompactLinkSupport' => false,
##
###
#
# - SMW_CAT_NONE
#
# - SMW_CAT_REDIRECT: resolves redirects and errors in connection with categories
#
# - SMW_CAT_INSTANCE: Should category pages that use some [[Category:Foo]]
# statement be treated as elements of the category Foo? If disabled, then
# it is not possible to make category pages elements of other categories.
# See also SMW_CAT_HIERARCHY. (was $smwgCategoriesAsInstances)
#
# - SMW_CAT_HIERARCHY: Should a subcategory be considered a hierarchy element
# in the annotation process? If set to true, subcategories will always be
# interpreted as subclasses and automatically annotated with
# `Subcategory of`. (was $smwgUseCategoryHierarchy)
#
# @since 3.0
##
'smwgCategoryFeatures' => SMW_CAT_REDIRECT | SMW_CAT_INSTANCE | SMW_CAT_HIERARCHY,
##
###
# Settings for recurring events, created with the #set_recurring_event parser
# function: the default number of instances defined, if no end date is set,
# and the maximum number that can be defined, regardless of end date.
#
# @since 1.4.3
##
'smwgDefaultNumRecurringEvents' => 100,
'smwgMaxNumRecurringEvents' => 500,
##
###
# Special:Browse related settings
#
# - SMW_BROWSE_NONE
#
# - SMW_BROWSE_TLINK: Should the toolbox of each content page show a link
# to browse the properties of that page using Special:Browse? This is a
# useful way to access properties and it is somewhat more subtle than
# showing a Factbox on every page. (was $smwgToolboxBrowseLink)
#
# - SMW_BROWSE_SHOW_INVERSE: Should the browse view for incoming links show
# the incoming links via its inverses, or shall they be displayed on the
# other side? (was $smwgBrowseShowInverse)
#
# - SMW_BROWSE_SHOW_INCOMING: Should the browse view always show the incoming links
# as well, and more of the incoming values? (was $smwgBrowseShowAll)
#
# - SMW_BROWSE_SHOW_GROUP: Should the browse view create group sections for
# properties that belong to the same property group?
#
# - SMW_BROWSE_SHOW_SORTKEY: Should the sortkey be displayed?
#
# - SMW_BROWSE_USE_API: Whether the browse display is to be generated using
# an API request or not. (was $smwgBrowseByApi)
#
# @since 3.0
##
'smwgBrowseFeatures' => SMW_BROWSE_TLINK | SMW_BROWSE_SHOW_INCOMING | SMW_BROWSE_SHOW_GROUP | SMW_BROWSE_USE_API,
##
###
# Should the search by property special page display nearby results when there
# are only a few results with the exact value? Switch this off if this page has
# performance problems.
#
# @since 2.1 enabled default types, to disable the functionality either set the
# variable to array() or false
##
'smwgSearchByPropertyFuzzy' => [ '_num', '_txt', '_dat', '_mlt_rec' ],
##
###
# Number of results shown in the listings on pages in the Property and Concept
# namespaces as well as other services that require a limit.
#
# If a value of 0 is given, the respective listings are hidden completely.
#
# - `type` used for `Special:Types` (was $smwgTypePagingLimit)
# - `errorlist` used for `Special:ProcessingErrorList`
# - `concept` (was $smwgConceptPagingLimit)
# - `property` (was $smwgPropertyPagingLimit)
#
# Special:Browse
# - `valuelist.outgoingt` outgoing value list count
# - `valuelist.incoming` incoming value list count
#
# @since 3.0
##
'smwgPagingLimit' => [
'type' => 50,
'concept' => 250,
'property' => 20,
'errorlist' => 20,
// Special:Browse
'browse' => [
'valuelist.outgoing' => 30,
'valuelist.incoming' => 20,
]
],
##
###
# Property page to limit the query request for individual values
#
# How many values should at most be displayed for a page on the Property
# page and if large values are desired, consider reducing
# $smwgPropertyPagingLimit for better performance.
#
# @since 1.3
##
'smwgMaxPropertyValues' => 3,
##
###
# Property page list limits
#
# 'subproperty' limit the query request on subproperties
# 'redirect' limit the query request on redirects
# 'error' limit the query request on improper assignments
#
# `false` as value assignment will disable the display of a selected list
#
# @since 3.0
##
'smwgPropertyListLimit' => [
'subproperty' => 25,
'redirect' => 25,
'error' => 10
],
##
###
# Settings for inline queries ({{#ask:...}}) and for semantic queries in
# general. This can especially be used to prevent overly high server-load due
# to complex queries. The following settings affect all queries, wherever they
# occur.
#
# @since 1.0
##
'smwgQEnabled' => true, // (De)activates all query related features and interfaces
'smwgQMaxLimit' => 10000, // Max number of results *ever* retrieved, even when using special query pages.
#
# @since 1.5
##
'smwgIgnoreQueryErrors' => true, // Should queries be executed even if some errors were detected?
// A hint that points out errors is shown in any case.
##
#
# @since 1.0
##
'smwgQSubcategoryDepth' => 10, // Restrict level of sub-category inclusion (steps within category hierarchy)
'smwgQSubpropertyDepth' => 10, // Restrict level of sub-property inclusion (steps within property hierarchy)
// (Use 0 to disable hierarchy-inferencing in queries)
'smwgQDefaultNamespaces' => null, // Which namespaces should be searched by default?
// (value NULL switches off default restrictions on searching -- this is faster)
// Example with namespaces: 'smwgQDefaultNamespaces' => array(NS_MAIN, NS_FILE)
##
# Evaluate #redirects
#
# - SMW_EQ_NONE: Never evaluate #redirects as equality between page names
#
# - SMW_EQ_SOME: Evaluate #redirects as equality between page names, with
# possible performance-relevant restrictions depending on the storage
# engine
#
# - SMW_EQ_FULL: Evaluate #redirects as equality between page names in all
# cases
#
# @since 1.0
# @default: SMW_EQ_SOME
##
'smwgQEqualitySupport' => SMW_EQ_SOME,
##
###
# Sort features
#
# - SMW_QSORT_NONE
#
# - SMW_QSORT: General sort support for query results (was
# $smwgQSortingSupport)
#
# - SMW_QSORT_RANDOM: Random sorting support for query results (was
# $smwgQRandSortingSupport)
#
# - SMW_QSORT_UNCONDITIONAL: Allows an unconditional sort of results even if
# the property doesn't exists as part of the result set (#2823). The option
# isn't implemented for the SPARQLStore and the ElasticStore requires
# the `sort.property.must.exists` to be diabled to reflect the same sorting
# characteristics as with this setting enabled.
#
# @since 3.0
##
'smwgQSortFeatures' => SMW_QSORT | SMW_QSORT_RANDOM,
##
###
# List of comparator characters
#
# Comparators supported by queries with available entries being:
#
# < (smaller than) if $smwStrictComparators is false, it's actually smaller
# than or equal to
# > (greater than) if $smwStrictComparators is false, it's actually bigger
# than or equal to
# ! (unequal to)
# ~ (pattern with '*' as wildcard)
# !~ (not a pattern with '*' as wildcard, only for Type:String, need to be
# placed before ! and ~ to work correctly)
# ≤ (smaller than or equal to)
# ≥ (greater than or equal to)
#
# Extra compartors that in case of an enabled full-text index uses the primary
# LIKE/NLIKE match operation with operators being:
#
# like: to express LIKE use
# nlike: to express NLIKE use
#
# If unsupported comparators are used, they are treated as part of the
# queried value.
#
# @since 1.0
##
'smwgQComparators' => '<|>|!~|!|~|≤|≥|<<|>>|~=|like:|nlike:|in:|not:|phrase:',
##
###
# Sets whether the > and < comparators should be strict or not. If they are strict,
# values that are equal will not be accepted.
#
# @since 1.5.3
##
'smwStrictComparators' => false,
// To be used starting with 3.x (due to misspelling)
'smwgQStrictComparators' => false,
##
###
# Further settings for queries. The following settings affect inline queries
# and querying special pages. Essentially they should mirror the kind of
# queries that should immediately be answered by the wiki, using whatever
# computations are needed.
#
# @since 1.0
##
'smwgQMaxSize' => 16, // Maximal number of conditions in queries, use format=debug for example sizes
'smwgQMaxDepth' => 4, // Maximal property depth of queries, e.g. [[rel::<q>[[rel2::Test]]</q>]] has depth 2
##
###
# Expensive threshold
#
# The threshold defined in seconds denotes the ceiling as to when a #ask or
# #show call is classified as expensive and will count towards the
# $smwgQExpensiveExecutionLimit setting.
#
# @since 3.0
# @default 10
##
'smwgQExpensiveThreshold' => 10,
##
###
# Limit of expensive #ask/#show functions
#
# The limit will count all classified #ask/#show parser functions and restricts
# further use on pages that exceed that limit.
#
# @since 3.0
# @default false (== no limit)
##
'smwgQExpensiveExecutionLimit' => false,
##
###
# The below setting defines which query features should be available by
# default.
#
# Examples:
# only cateory intersections: 'smwgQFeatures' => SMW_CATEGORY_QUERY | SMW_CONJUNCTION_QUERY,
# only single concepts: 'smwgQFeatures' => SMW_CONCEPT_QUERY,
# anything but disjunctions: 'smwgQFeatures' => SMW_ANY_QUERY & ~SMW_DISJUNCTION_QUERY,
# The default is to support all basic features.
#
# @since 1.2
##
'smwgQFeatures' => SMW_PROPERTY_QUERY | SMW_CATEGORY_QUERY | SMW_CONCEPT_QUERY | SMW_NAMESPACE_QUERY | SMW_CONJUNCTION_QUERY | SMW_DISJUNCTION_QUERY,
##
###
# Filter duplicate query segments
#
# Experimental feature that allows to filter duplicate query segments from the
# query build process to eliminate computational effort for segments that
# represent that same query signature.
#
# @since 2.5
# @default: false
##
'smwgQFilterDuplicates' => false,
##
###
# Settings about printout of (especially inline) queries:
#
# @since 1.0
##
'smwgQDefaultLimit' => 50, // Default number of rows returned in a query. Can be increased with limit=num in #ask
'smwgQMaxInlineLimit' => 500, // Max number of rows ever printed in a single inline query on a single page.
'smwgQPrintoutLimit' => 100, // Max number of supported printouts (added columns in result table, ?-statements)
'smwgQDefaultLinking' => 'all', // Default linking behavior. Can be one of "none", "subject" (first column), "all".
#
# @since 2.1
##
'smwgQUpperbound' => 5000, // Max number of rows ever printed in a single inline query on a single page with an offset.
##
###
# Further settings for queries. The following settings affect queries that are
# part of concept pages. These are usually chosen to be les restricted than
# inline queries, since there are two other means for controling their use:
# (1) Concept queries that would not be allowed as normal queries will not be
# executed directly, but can use pre-computed results instead. This is the
# default.
# (2) The whole Concept: namespace can be restricted (using some suitable
# MediaWiki extension) to an experienced user group that may create more
# complex queries responably. Other users can employ thus defined concepts in
# their queries.
##
'smwgQConceptCaching' => CONCEPT_CACHE_HARD, // Which concepts should be displayed only if available from cache?
// CONCEPT_CACHE_ALL -- show concept elements anywhere only if they are cached
// CONCEPT_CACHE_HARD -- show without cache if concept is not harder than permitted inline queries
// CONCEPT_CACHE_NONE -- show all concepts even without any cache
// In any cases, caches will always be used if available.
'smwgQConceptMaxSize' => 20, // Same as $smwgQMaxSize, but for concepts
'smwgQConceptMaxDepth' => 8, // Same as $smwgQMaxDepth, but for concepts
// Same as $smwgQFeatures but for concepts
'smwgQConceptFeatures' => SMW_PROPERTY_QUERY | SMW_CATEGORY_QUERY | SMW_NAMESPACE_QUERY |
SMW_CONJUNCTION_QUERY | SMW_DISJUNCTION_QUERY | SMW_CONCEPT_QUERY,
// Cache life time in minutes. If a concept cache exists but is older than
// this, SMW tries to recompute it, and will only use the cache if this is not
// allowed due to settings above:
'smwgQConceptCacheLifetime' => 24 * 60,
##
##
# Predefined result formats for queries
#
# Array of available formats for formatting queries. Can be redefined in
# the settings to disallow certain formats or to register extension formats.
# To disable a format, do "unset($smwgResultFormats['template'])," Disabled
# formats will be treated like if the format parameter had been omitted. The
# formats 'table' and 'list' are defaults that cannot be disabled. The format
# 'broadtable' should not be disabled either in order not to break Special:ask.
##
'smwgResultFormats' => [
'table' => 'SMW\Query\ResultPrinters\TableResultPrinter',
'broadtable' => 'SMW\Query\ResultPrinters\TableResultPrinter',
'list' => 'SMW\Query\ResultPrinters\ListResultPrinter',
'plainlist' => 'SMW\Query\ResultPrinters\ListResultPrinter',
'ol' => 'SMW\Query\ResultPrinters\ListResultPrinter',
'ul' => 'SMW\Query\ResultPrinters\ListResultPrinter',
'category' => 'SMW\Query\ResultPrinters\CategoryResultPrinter',
'embedded' => 'SMW\Query\ResultPrinters\EmbeddedResultPrinter',
'template' => 'SMW\Query\ResultPrinters\ListResultPrinter',
'count' => 'SMW\Query\ResultPrinters\NullResultPrinter',
'debug' => 'SMW\Query\ResultPrinters\NullResultPrinter',
'feed' => 'SMW\Query\ResultPrinters\FeedExportPrinter',
'csv' => 'SMW\Query\ResultPrinters\CsvFileExportPrinter',
'templatefile' => 'SMW\Query\ResultPrinters\TemplateFileExportPrinter',
'dsv' => 'SMW\Query\ResultPrinters\DsvResultPrinter',
'json' => 'SMW\Query\ResultPrinters\JsonResultPrinter',
'rdf' => 'SMW\Query\ResultPrinters\RdfResultPrinter'
],
##
##
# Predefined aliases for result formats
#
# Array of available aliases for result formats. Can be redefined in
# the settings to disallow certain aliases or to register extension aliases.
# To disable an alias, do "unset($smwgResultAliases['alias'])," Disabled
# aliases will be treated like if the alias parameter had been omitted.
#
# @since 1.8
##
'smwgResultAliases' => [
'feed' => [ 'rss' ],
'templatefile' => [ 'template file' ],
'plainlist' => [ 'plain' ]
],
##
/**
* Affects format=list.
*
* When set to false (the default), format=list will result in lists with HTML markup.
* In this case you can get a plain list via format=plainlist.
*
* To also get plain lists (without HTML markup) when using format=list, set this setting to true.
* In SMW versions older than 3.0 format=list always resulted in a plain list, so this setting allows restoring old behavior.
*
* @since 3.1.2
*/
'smwgPlainList' => false,
##
# Result printer features
#
# - SMW_RF_NONE
# - SMW_RF_TEMPLATE_OUTSEP, #2022 (use the sep parameter as outer separator)
#
# @since 2.3
##
'smwgResultFormatsFeatures' => SMW_RF_TEMPLATE_OUTSEP,
##
###
# Handling of `RemoteRequest` features
#
# - SMW_REMOTE_REQ_SEND_RESPONSE allows Special:Ask to respond to remote requests in
# combination with $smwgQuerySources and the `RemoteRequest`.
#
# - SMW_REMOTE_REQ_SHOW_NOTE shows a note for each remote requests so users are aware
# that results retrieved from an external source.
#
# If `$smwgQuerySources` contains no entries then a remote request to a source
# is not supported and only sources that are available through the setting
# can be selected as remote source.
#
# @since 3.0
# @default: SMW_REMOTE_REQ_SEND_RESPONSE | SMW_REMOTE_REQ_SHOW_NOTE
##
'smwgRemoteReqFeatures' => SMW_REMOTE_REQ_SEND_RESPONSE | SMW_REMOTE_REQ_SHOW_NOTE,
##
###
#
# Predefined list of sources that can return query results
#
# Array of available sources for answering queries. Can be redefined in
# the settings to register new sources (usually an extension will do so
# on installation). Unknown source will be rerouted to the local wiki.
# Note that the basic installation comes with no additional source besides
# the local source (which in turn cannot be disabled or set explicitly).
#
# A query class handler is required to implement the `QueryEngine` interface
# and if it needs to be aware of the store, it should also implement the
# `StoreAware` interface.
#
# @since 1.4.3
##
'smwgQuerySources' => [
// 'local' => '',
// 'mw-wiki-foo' => [ '\SMW\Query\RemoteRequest', 'url' => 'http://example.org/wiki/index.php' ],
],
##
### Default property type
# Undefined properties (those without pages or whose pages have no "has type"
# statement) will be assumed to be of this type. This is an internal type id.
# See the file languages/SMW_LanguageXX.php to find what IDs to use for
# datatpyes in your language. The default corresponds to "Type:Page".
#
# @since 1.1.2
##
'smwgPDefaultType' => '_wpg',
##
###
# The maximal number that SMW will normally display without using scientific exp
# notation. The deafult is rather large since some users have problems understanding
# exponents. Scineitfic applications may prefer a smaller value for concise display.
#
# @since 1.4.3
##
'smwgMaxNonExpNumber' => 1000000000000000,
##
###
# SMW defers some tasks until after a page was edited by using the MediaWiki
# job queueing system (see https://www.mediawiki.org/wiki/Manual:Job_queue).
# For example, when the type of a property is changed, all affected pages will
# be scheduled for (later) update. If a wiki generates too many jobs in this
# way (Special:Statistics and "showJobs.php" can be used to check that), the
# following setting can be used to disable jobs. Note that this will cause some
# parts of the semantic data to get out of date, so that manual modifications
# or the use of SMW_refreshData.php might be needed.
#
# @since 1.1.2
##
'smwgEnableUpdateJobs' => true,
##
###
# JobQueue watchlist
#
# This setting allows to display a personal bar link that shows the queue
# sizes for listed jobs. The information presented is fetched from the
# MediaWiki API and might be slightly inaccurate but should allow to make
# assumptions as to where the system needs attention.
#
# @see https://www.mediawiki.org/wiki/Manual:Job_queue#Special:Statistics
#
# To make this feature available, assign a simple list to the setting as in:
#
# $GLOBALS['smwgJobQueueWatchlist'] = [
# 'smw.update',
# 'smw.parserCachePurge',
# 'smw.fulltextSearchTableUpdate',
# 'smw.changePropagationUpdate'
# ]
#
# Information are not displayed unless a user enables the setting in his or
# her preference setting.
#
# @since 3.0
# @default disabled (empty array)
##
'smwgJobQueueWatchlist' => [],
##
###
# List of enabled special page properties.
#
# - `_MDAT` Modification date is enabled by default for backward compatibility.
# - `_TRANS` Add annotations (language, source etc. ) when a page is
# indentified as translation page (as done by the Translation extension)
# - `_ATTCH_LINK` tracks embedded files and images
#
# Extend array to enable other properties:
# $smwgPageSpecialProperties[ => '_CDAT',
# Or:
# array_merge( $smwgPageSpecialProperties, array( '_CDAT' ) ),
# Or rewrite entire array:
# 'smwgPageSpecialProperties' => array( '_MDAT', '_CDAT' ),
#
# However, DO NOT use `+=' operator! This DOES NOT work:
# $smwgPageSpecialProperties += array( '_MDAT' ),
#
# @since 1.7
##
'smwgPageSpecialProperties' => [ '_MDAT' ],
##