Source code & patches: Difference between revisions
Tag: Rollback |
|||
(8 intermediate revisions by one other user not shown) | |||
Line 64: | Line 64: | ||
$wgUploadPath = "{$wgScriptPath}/media"; | $wgUploadPath = "{$wgScriptPath}/media"; | ||
$wgUploadDirectory = "{$IP}/media/" . $domain;<br /> | $wgUploadDirectory = "{$IP}/media/" . $domain;<br /> | ||
|- | |- | ||
|[[Source code & patches/includes/GlobalFunctions.php|includes/GlobalFunctions.php]] | |[[Source code & patches/includes/GlobalFunctions.php|includes/GlobalFunctions.php]] | ||
|support for path (page/subpage) in | |support for path (page/subpage) in the filename | ||
|- | |- | ||
|[[Source code & patches/includes/filerepo/file/File.php|includes/filerepo/file/File.php]] | |[[Source code & patches/includes/filerepo/file/File.php|includes/filerepo/file/File.php]] | ||
|support for path (page/subpage) in | |support for path (page/subpage) in the filename | ||
|- | |- | ||
|[[Source code & patches/includes/upload/UploadBase.php|includes/upload/UploadBase.php]] | |[[Source code & patches/includes/upload/UploadBase.php|includes/upload/UploadBase.php]] | ||
| | | | ||
*support for path (page/subpage) in | *support for path (page/subpage) in the filename | ||
*disable "was-deleted", "duplicate" and "duplicate-archive" warnings | *disable "was-deleted", "duplicate" and "duplicate-archive" warnings | ||
|- | |- | ||
|[[Source code & patches/includes/upload/UploadFromStash.php|includes/upload/UploadFromStash.php]] | |[[Source code & patches/includes/upload/UploadFromStash.php|includes/upload/UploadFromStash.php]] | ||
|support for path (page/subpage) in | |support for path (page/subpage) in the filename | ||
|- | |- | ||
|[[Source code & patches/includes/upload/UploadFromFile.php|includes/upload/UploadFromFile.php]] | |[[Source code & patches/includes/upload/UploadFromFile.php|includes/upload/UploadFromFile.php]] | ||
|support for path (page/subpage) in | |support for path (page/subpage) in the filename | ||
|- | |- | ||
|[[Source code & patches/includes/api/ApiUpload.php|includes/api/ApiUpload.php]] | |[[Source code & patches/includes/api/ApiUpload.php|includes/api/ApiUpload.php]] | ||
|support for path (page/subpage) in | |support for path (page/subpage) in the filename | ||
|- | |- | ||
|[[Source code & patches/img auth.php|img_auth.php]] | |[[Source code & patches/img auth.php|img_auth.php]] | ||
Line 190: | Line 190: | ||
|[[/extensions/SemanticMediaWiki/src/ParserData.php|extensions/SemanticMediaWiki/src/ParserData.php]] | |[[/extensions/SemanticMediaWiki/src/ParserData.php|extensions/SemanticMediaWiki/src/ParserData.php]] | ||
|See here <nowiki>https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/4907</nowiki> The semantic properties were not always updated on page save | |See here <nowiki>https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/4907</nowiki> The semantic properties were not always updated on page save | ||
|} | |} | ||
<br /> | <br /> |
Latest revision as of 16:08, 3 May 2024
MediaWiki and its ecosystem are great software, however they are not always fitted for a professional use (or for the specific approach envisaged by WikiSphere).
Here are a number of patches both to some core files of MediaWiki (mainly to support the upload of files under page and sub-pages), and to some key-extensions as well, typically with the aim to complete and refine their set of features.
All the patches concern the latest stable version of Mediawiki (1.36) and the corresponding version of the extensions, if you want to use one or more of them (some of them could be correlated, so it is recommended to install them as they are grouped below) just copy the entire file content following the related link, do a copy of the existing files on your wiki, and replace them !
Mediawiki[edit | edit source]
Installation[edit | edit source]
file | edits |
---|---|
maintenance/install.php | (added feature) added options "additionaldb" to allow creation of additional databases without replacing exiting LocalSettings.php |
includes/installer/CliInstaller.php | (added feature) implemented the option above |
Skins[edit | edit source]
file | edits |
---|---|
includes/skins/SkinTemplate.php | (added feature) adds class "mw-content_model-" + contentModel in order to correctly display plain text on html pages |
Files/Upload[edit | edit source]
file | edits |
---|---|
LocalSettings.php | $wgUseInstantCommons = false;
$wgIllegalFileChars = ":\\\\"; $wgHashedUploadDirectory = false; $wgWikisphereUploadDisableWarnings = true; $wgUploadPath = "{$wgScriptPath}/media"; $wgUploadDirectory = "{$IP}/media/" . $domain; |
includes/GlobalFunctions.php | support for path (page/subpage) in the filename |
includes/filerepo/file/File.php | support for path (page/subpage) in the filename |
includes/upload/UploadBase.php |
|
includes/upload/UploadFromStash.php | support for path (page/subpage) in the filename |
includes/upload/UploadFromFile.php | support for path (page/subpage) in the filename |
includes/api/ApiUpload.php | support for path (page/subpage) in the filename |
img_auth.php |
Page deleted[edit | edit source]
file | edits |
---|---|
includes/page/Article.php | (added feature) on article deletion, it adds a link towards the parent page if existing |
MsUpload[edit | edit source]
Uploaded files will be saved under the edited page, eg. My page/my_picture.jpg
file | edits |
---|---|
Source code & patches/extensions/MsUpload/resources/MsUpload.js |
|
PageForms[edit | edit source]
file | edits |
---|---|
extensions/PageForms/includes/PF_AutoeditAPI.php |
|
extensions/PageForms/includes/PF_FormPrinter.php |
|
extensions/PageForms/includes/forminputs/PF_TreeInput.php |
|
extensions/PageForms/includes/forminputs/PF_Tree.php | (see above) |
extensions/PageForms/includes/forminputs/WS_ComboBoxInput.php |
|
extensions/PageForms/libs/ext.pf.select2.base.js | (fixed, but to review for general use) the scripts added an empty item as the first option and that was not always the expected behavior |
extensions/PageForms/libs/ext.pf.select2.combobox.js |
|
extensions/PageForms/includes/parserfunctions/PF_FormLink.php | (added feature) parameter "class" in form link button template |
extensions/PageForms/includes/forminputs/PF_OpenLayersInput.php |
|
to-do[edit | edit source]
- PageForms does not handle correctly selects with mapped values, as described here, specifically, instead than allowing options of kind value => label (where the label is visible to the user, and the value the one handled by the form) it only allows options like label => label, and the issue appears both server and client side
SemanticMediaWiki[edit | edit source]
file | edits |
---|---|
extensions/SemanticMediaWiki/src/ParserData.php | See here https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/4907 The semantic properties were not always updated on page save |
SemanticExtraSpecialProperties[edit | edit source]
Extension:Semantic_Extra_Special_Properties
file | edits |
---|---|
extensions/SemanticExtraSpecialProperties/data/definitions.json | commented the alias exif-artist, which causes a conflict with the property:Author, becoming non UserAnnotable |
Scribunto / PageExchange[edit | edit source]
The following edits are necessary to correctly import modules (page content model "Scribunto") through the extension Page_Exchange. (See for instance this package).
file | edits |
---|---|
extensions/Scribunto/includes/common/Hooks.php | (fixed) the function implementing the hook "oncontentHandlerDefaultModelFor" returned true instead than false (false stops the process to determine the page's content model) |
extensions/PageExchange/includes/PXCreatePageJob.php | (fixed) added ScribuntoContent for pages with namespace NS_MODULE |