Fix Bug 38811

Special:UnusedProperties was not checking if a property is special (pre-defined in SMW). This is fixed now, and thus the datatype information for unused special properties shows correctly and the standard tooltip is given. The formatting code for special properties is copied from Special:Properties, so the formatting will be the same as it is there.

The change depends on the recent updates done to fix Bug 33610.

Patch set 2: Also make a small change in the Proeprty datavalue to make sure that the CSS styles for highlighting special properties are really included whenever they are needed. Fixes the missing italics for special properties in all Special pages that list properties.

Change-Id: I0a49c1dae5e27ca12dd52e00fff6c3df1d0b006f
Better fix for Bug 39392

Changed the behaviour to be as follows:
* if linking is enabled ("link=all", default), URLs will be made into an explicit link using [ ] in wiki and <a> in HTML
* if linking is disabled or outputformat "empty" is used (#- or simply #), then URLs will be returned as plain strings in wiki and HTML; in wiki this will mean that the URL will still be linked if MW is configured to link such strings automatically (default)
* if the new outputformat "nowiki" is used (#nowiki), then the URL string will be escaped to prevent MW from making a link of it, so it appears as a plain string in HTML and wiki alike; this changes the string so that it is no longer a valid URL

All of this only applies to URL values that can be linked at all (MW knows protocol). URLs that are not linkable in MW are always returned as plain strings in all contexts.

Change-Id: If3a91ea6f9fc988e156b64850e428ecbae096228
Rewritten SQLStore3 writing methods

This is a rewrite of large parts of SMW_SQLStore3_Writers.php. The only methods that are almost unaffected are the ones related to cahning titles and processing redirects (may appear changed in diff since they have been moved to the end).

This change should fix the property statistics computation. It also prepares an acurate semantic diff implementation later on.

Main changes/key points:
* Cleaned up code, splitting everything into smaller methods with a clear task.
* Changed writing workflow to compute a full diff of table rows before writing anything
* The new writing code deletes only the table rows that are really obsolete, and inserts only those that are added. If a change only deletes or adds one value, then this is all that will be done.
* The property statistics are updeated by comparing the real DB contents to the new contents that is to be written. No higher-level data structures or SMW objects are invloved.
* There is no longer a separate delete method. To delete all data, we update it to be empty. This ensures that all necessary updates really happen whenever the store is changed (since there are fewer methods that change the store at all).
* The new code has no issues with input errors or redirects any more.
* The code is now properly documented.

Patch set 2: Small change.
* Improve some details in method design (e.g. pass a table object where a table name was passed).
* Improve the construction of DELETE conditions for (supposed) performance gain.
* Fix a few typos in inline comments.
* Call freeResult() on a DB result where this had been forgotten.

Change-Id: I78596341b4427604c31b6d3b15acd894e47ccec0
Store3: tablenames, usage count init, style

This complex change prepares SQLStore3 for release. After updating, you *must* delete and recreate all Store3 tables, e.g., as follows:

* first run "php SMW_refreshData.php -b SMWSQLStore3 -fp" to recreate tables and initialise property pages,
* then run "php SMW_refreshData.php -b SMWSQLStore3" again to refresh all normal pages.

This will not affect the functionality of Store2, if still used.

The change does three things:

* Change the names of the tables formerly known as smw_ids, smw_conccache, smw_stats (the first two are used by Store2 already; the last was just not very well named and easy to update with the rest); the new names are smw_object_ids, smw_concept_cache, smw_prop_stats. The rename of smw_ids is the reason why a normal setup+refresh will not do.
* Update the batch computation of usage counts (in SMW_SQLStore3_SetupHandlers.php); the old computation counted only values of a property that are stored in the table that the property uses *now* to store its data, missing uses in other tables (e.g., due to new special tables being created or due to plain type changes)
* The maintenance script SMW_resetStats.php is removed since its job is now done by SMW_setup.php (its old code was outdated anyway)
* The broken maintenance script SMW_migration.php is disabled, printing a message on what to do instead.
* Many smaller style improvements, especially in documentation.

The change depends on the recent writer change, since it is not possible to separate this.

Change-Id: I1a163ac23121c373fb9ef5c93eb1a50ed33d85a6
Localisation updates from http://translatewiki.net.

Change-Id: I9142556c012c5e277fe254dcd981aab8e5812068
Merge "Localisation updates from http://translatewiki.net."
Merge "Rewritten SQLStore3 writing methods"
Merge "Store3: tablenames, usage count init, style"
Merge "Fix Bug 38811"
Merge "Better fix for Bug 39392"
Merge branch 'master' into 1.9.x

Change-Id: If2bcc593f13ca2c153ff888a43d63edb3fe1e318