Commit graph

416 commits

Author SHA1 Message Date
Happy-melon
d3f901b029 Merge in Login rewrite, second time lucky. 2009-09-20 20:28:27 +00:00
Alex Z
71a97237b5 Replace the user rename log display for non-existent userpages with a hook (followup to r56251).
Update for Renameuser extension to follow.

Also make docs for LogEventsList::showLogExtract() actually useful
2009-09-14 18:10:13 +00:00
Tomasz Finc
7beb1c39e6 fixing spacing of comments 2009-09-09 21:24:42 +00:00
Tomasz Finc
7fd6e20278 missing an a 2009-09-09 20:54:15 +00:00
Tomasz Finc
abd034bee4 Adding new examples for 0.4 xsd 2009-09-09 19:21:58 +00:00
Brion Vibber
841014ad91 Revert broken rewrite of login forms:
r55990 "* Totally refactor includes/specials/SpecialUserlogin.php:"
r55991 "Followup to r55990 - Remove debugging hack :("
r55994 "Followup to r55990 - rename method to avoid PHP Strict warnings"
r55997 "Follow-up to r55990, per comments:"

Continued reports of breakage with the new version...
Non-vital changes of this magnitude should probably be worked up on a branch to ensure everything's consistent before pushing them to trunk.
2009-09-08 18:40:05 +00:00
Andrew Garrett
1ec4f9dbaa Add "Discussions" option to search when LiquidThreads is active. Includes some fixes to SpecialSearch.php, to allow this sort of change 2009-09-08 11:50:31 +00:00
Roan Kattouw
a369bbd7d9 Update hooks.txt for r55682 2009-09-07 19:29:55 +00:00
Happy-melon
fca012212f * Totally refactor includes/specials/SpecialUserlogin.php:
** Split backend stuff out into includes/Login.php
** Split account creation and login stuff up, into includes/specials/CreateAccount.php and includes/specials/Userlogin.php.
* Reimplement the special pages as subclasses of SpecialPage
* Use HTMLForm to generate the input forms
** Deprecate and delete includes/templates/Userlogin.php, which is horrible and old :D

This changes the syntax of the UserLoginForm and UserCreateForm hooks, and AuthPlugin::modifyUITemplate; they now receive the SpecialPage subclass rather than the template to work with. Update everything I could find in SVN to accommodate this.
2009-09-07 19:00:49 +00:00
Alexandre Emsenhuber
6649743e0b * (bug 19055) maintenance/rebuildrecentchanges.php now purges Special:Recentchanges's RSS and Atom feed cache
Purging cache timestamps should be sufficient since it won't allow cached versions to be used.
Also fix some errors in docs/memcached.txt.
Based on a patch by Jidanni - http://bug-attachment.wikimedia.org/attachment.cgi?id=6187
2009-08-28 18:04:40 +00:00
Bryan Tong Minh
c2033042ee * Code style & commenting on upload functions.
* Move isValidURI from UploadFromUrl to HttpFunctions.
* Made some functions in UploadBase static.
2009-08-26 17:05:24 +00:00
Brion Vibber
aa1740d88d Cleaning up some old PHP 4 object-reference usage in some edit filtering hooks.
There was a mix of uses of the reference and non-uses of the reference. :)
Reverts r53714 and fixes it from the other end by cleaning up the uses to not expect references.
2009-08-21 21:51:29 +00:00
Alex Z
195157b2c2 Re-implement r54638 in a higher-level way. Allows extensions to modify selection criteria for Special:Random or subsititute their own result. 2009-08-17 15:23:51 +00:00
Alexandre Emsenhuber
e14387dccb * maintenance.txt: the execute() method must be public to match Maintenance's one
* design.txt: whitespaces fix
2009-08-16 18:54:18 +00:00
Andrew Garrett
9a29dae0df Customise display of thread search result titles.
* Show the subject, not the title.
* Link to the post in context, not by itself.
2009-08-14 16:06:11 +00:00
Siebrand Mazeland
bdcaf4f7bf Update doc for deprecated 'MagicWordMagicWords': refer to $magicWords instead of LanguageGetMagic hook. 2009-08-14 11:48:40 +00:00
Andrew Garrett
1e9c060ce5 Add DiscussionThreading info to export-0.4.xsd. TODO: Test against real data to make sure I did it right :P 2009-08-14 10:17:06 +00:00
Brion Vibber
86b022c2bd Revert r54638 "Deprecate the $wgExtraRandompageSQL config variable by adding a hook, SpecialRandomBeforeSQL"
If we're going to make a generalizable plug-in point for extensions to supply their own randomization, we shouldn't be exposing it at the point of low-level database operations. The extension should instead be given the chance to pick an item any way it pleases and return a result or set of results to choose from.
2009-08-10 20:44:31 +00:00
Alex Z
1166f4b410 Deprecate the $wgExtraRandompageSQL config variable by adding a hook, SpecialRandomBeforeSQL
This allows extensions more flexibility to modify the query, 
or replace it entirely by setting their own query and returning false
$wgExtraRandompageSQL still retained for back-compat
2009-08-08 19:09:16 +00:00
Jan Luca Naumann
a9f717e8ed (r54511) Replace global array with hook 2009-08-06 13:40:13 +00:00
Tomasz Finc
3cd136d09b Updates for: per-revision delete flags, log exports, and a per-page redirect flag 2009-08-05 18:35:23 +00:00
Chad Horohoe
90a940cb6b (bug 15209) New hook right after initialization 2009-08-03 22:31:52 +00:00
Chad Horohoe
a1c51e18af Merge maintenance-work branch (now with less errors!):
* Docs have been updated to indicate the standard on how to write maintenance scripts (MW.org docs will follow) Have ported vast majority of maintenance scripts to new format. Remaining ones (mostly FiveUpgrade-related) are a bit more tricky. commandLine.inc is untouched for now. Many have gotten code-style updates as well. Deleted .inc files were only used by their .php counterparts, and have been merged into single files.
* (bug 11867) Lock error on redirect table when running orphans.php
* (bug 16322) Allow maintenance scripts to accept DB user/pass over input or params
* (bug 18566) Maintenance script to un/protect pages
* initStats overhaul, now uses class SiteStatsInit. Also fixes bug 18930
2009-08-02 19:35:17 +00:00
Aryeh Gregor
bbbd4b91b4 Add tips to Linux distributors to docs/
After some discussion with Fedora's mediawiki maintainer, I thought this
would be helpful.  Probably it could use improvement in a variety of
ways, but it's a start.
2009-07-28 03:18:54 +00:00
Andrew Garrett
6e5dd5459a Incremental enabling changes to allow searching of LiquidThreads by page and by thread:
* Add three new hooks, XmlDumpWriterOpenPage, ModifyExportQuery and XmlDumpWriterWriteRevision, to WikiExporter class.
* Hook two of these events to add a DiscussionThreading section to XML dumps, containing the parent, ancestor and discussion page to which a post belongs, if it is indeed a LiquidThreads post (as determined by joining on the thread table).
* Deprecate old calling style for Thread constructor, the $children parameter has been unused for yonks.
2009-07-27 17:57:51 +00:00
Chad Horohoe
d0ff1e57ff * (bug 14201) Set $wgDBadminuser/$wgDBadminpassword during setup
* (bug 18768) Remove AdminSettings requirements. Maintenance environment will still load it if it exists, but it's not required for anything
2009-07-23 00:31:37 +00:00
Alexandre Emsenhuber
34342ce7c2 * update UploadComplete hook, the object is now a subclass of UploadBase
* whitespaces fixes
2009-07-21 11:48:52 +00:00
Alex Z
25370b6d0e (bug 19564) Update docs/hooks.txt 2009-07-19 20:03:13 +00:00
Andrew Garrett
e92ce78b5c LiquidThreads updates:
* Overhaul deletion system. Totally remove deletion special page, deletion will now be handled through the standard MediaWiki deletion system. When a thread's "root" is deleted, the thread itself is marked as deleted. When the page is re-undeleted, the thread will be marked as restored.
* Move some class files from Lqt* to simply *.
* Remove HistoryIterator class, pointless.
* Miscellaneous code quality as found.

Includes core changes to pass comment along with ArticleRevisionUndeleted hook.
2009-07-16 15:20:13 +00:00
Michael Dale
aefc40d749 here it is ... the upload-api, script-server, js2 (javascript phase2) branch merge 1st attempt.
Here is a short overview of changes and associated default configuration variables (most everything is off by default) also see ~soon to be updated~: http://www.mediawiki.org/wiki/Media_Projects_Overview

= Upload Improvements =
==Upload API ==
* Based on the early work of Bryan Tong and others it adds the upload option to the api.
* We rewrite Special:Upload page to include use the new refactoring
* Added in token checks in both the SpecialUpload.php page so avoids DOS / xss copy-by-url JavaScript based cross site POST file submissions

== Copy by URL==
$wgAllowCopyUploads = false;
* http class rewrite includes a new http background download see: includes/HttpFunctions.php

* spins off a php process that calls: maintenance/http_session_download.php
* pushes updates to the session and gives the user a progress bar on http copy uploads from other server progress (using js2 upload interface) (if not using the js2 upload interface it does the request in-place but the download is limited to the php ini timeout time)

== Firefogg ==
* Firefogg enables resumable upload by chunks
* progress indicators and conditional invokation (js2 system)
* and of-course client side transcoding.

= Script Server =
$wgEnableScriptLoader = false;
* off by default if $wgEnableScriptLoader is turned on script files are grouped, gziped, cached etc.
for more info see: http://www.mediawiki.org/wiki/Extension:ScriptLoader

* Includes some early skin js include fixes (skin/script system still lots of love)
* Includes a "javascript class autoloader" this is packaged into mwEmbed so that the mwEmbed library can work in stand alone mode (while retaining localization and script serving) (one such application is the make page for firefogg.org : http://www.firefogg.org/make/index.html  )
* The file that contains the autojavascript loading classes is: js2/php/jsAutoloadLocalClasses.php
* One can use this auto class loading dependency system with extensions and add-ons but I need to better document that.

= js2 system  / mwEmbed=
$wgEnableJS2system = false

* includes initial rewrite towards more jquery based javascript code
* especially for the Special:Upload page.
* Also the edit page include support for the "add-media-wizard"
* includes dependency loader for javascript that optionally takes advantage of the script-loader
* remote embedding of javascript interfaces (like embedding video, or commons media searching)

* $wgDebugJavaScript = false; .. .this variable lets you always get "always fresh javascript". When used with the script-loader it does not minify the script-loader output.

= mwEmbed =
* Will commit a separate patch to oggHandler that conditionally outputs  <video tag> to use the new javascript video player.
** mv_embed player includes: play-head, volume control, remote embedding, oggz-chop support across plugins.
* add-media-wizard adds easy inserts of media to pages (with import)

== jQuery==
* we include a base install of jQuery, jQuery ui and some plugins.
* all the javascript classes are in the scriptloader so its easy to load any set of jquery ui components that you may need using the script-server. You get a callback so you can then execute js with dependencies loaded.

== other stuff ==
there is a bit more code in js2 that pertains to sequence editing, timed text display and basic image editing. We include a base import of pixastic-lib & pixastic-editor... will work with the pixastic developer to try and ensure upstream compatibility on our usage of the library for in-browser photo and sequence manipulation.
2009-07-14 23:52:14 +00:00
ThomasV
ac0bb2fec8 documenting EditPage::importFormData 2009-07-08 18:47:46 +00:00
Roan Kattouw
cf0a94df6d Fix up hook docs for SkinTemplateNavigation 2009-07-08 17:59:08 +00:00
Roan Kattouw
438a3d3bbb Document EditPageBeforeEditToolbar hook 2009-07-07 16:45:12 +00:00
Andrew Garrett
23a9f934a9 remove conflict markers 2009-07-07 14:32:52 +00:00
Andrew Garrett
717af5aaea Make warnings for special page alias errors useful 2009-07-07 14:27:58 +00:00
Trevor Parscal
b81342aa88 Added documentation for VectorTemplateToolboxEnd 2009-07-06 23:35:01 +00:00
Niklas Laxström
f3ae962093 Encoding issues are not this unseen of... 2009-07-06 22:24:37 +00:00
Trevor Parscal
0d0a41ddcf Fixed bugs in the data structure of the result of buildNavigationUrls including internationalized messages as keys (#19304), lack of documentation for the SkinTemplateNavigation hook (#19522) and an issue with an XML ID being ca-main_talk rather than ca-talk mentioned in #19471 2009-07-06 21:22:40 +00:00
Tim Starling
23cfebd3d2 * Introduced a new system for localisation caching. The system is based around fast fetches of individual messages, minimising memory overhead and startup time in the typical case. It handles both core messages (formerly in Language.php) and extension messages (formerly in MessageCache.php). Profiling indicates a significant win for average throughput.
* The serialized message cache, which would have been redundant, has been removed. Similar performance characteristics can be achieved with $wgLocalisationCacheConf['manualRecache'] = true;
* Added a maintenance script rebuildLocalisationCache.php for offline rebuilding of the localisation cache.
* Extension i18n files can now contain any of the variables which can be set in Messages*.php. It is possible, and recommended, to use this feature instead of the hooks for special page aliases and magic words. 
* $wgExtensionAliasesFiles, LanguageGetMagic and LanguageGetSpecialPageAliases are retained for backwards compatibility. $wgMessageCache->addMessages() and related functions have been removed. wfLoadExtensionMessages() is a no-op and can continue to be called for b/c. 
* Introduced $wgCacheDirectory as a default location for the various local caches that have accumulated. Suggested $IP/cache as a good place for it in the default LocalSettings.php and created this directory with a deny-all .htaccess.
* Patched Exception.php to avoid using the message cache when an exception is thrown from within LocalisationCache, since this tends to fail horribly.
* Removed Language::getLocalisationArray(), Language::loadLocalisation(), Language::load()
* Fixed FileDependency::__sleep()
* In Cdb.php, fixed newlines in debug messages

In MessageCache::get(): 
* Replaced calls to $wgContLang capitalisation functions with plain PHP functions, reducing the typical case from 99us to 93us. Message cache keys are already documented as being restricted to ASCII.
* Implemented a more efficient way to filter out bogus language codes, reducing the "foo/en" case from 430us to 101us
* Optimised wfRunHooks() in the typical do-nothing case, from ~30us to ~3us. This reduced MessageCache::get() typical case time from 93us to 38us.
* Removed hook MessageNotInMwNs to save an extra 3us per cache hit. Reimplemented the only user (LocalisationUpdate) using the new hook LocalisationCacheRecache.
2009-06-28 07:11:43 +00:00
Chad Horohoe
8f11162800 (bug 19157) createAndPromote error on bad password
* Tweak User::isValidPassword() and hook. Return a STRING msg key on failure, not false. Updated all callers to handle this
* Split too-short/match username errors for clarity
* Update docs, messages.
* Merge fix for bug from maintenance-work branch
2009-06-27 16:53:27 +00:00
Brion Vibber
644cccdf39 Prepping for site default overrides of copyright/TOS statements for Wikimedia
sites with updated CC-BY-SA license... Messages now available in 
WikimediaMessages extension for localization:
* wikimedia-copyright - page footer
* wikimedia-copyrightwarning - edit page, above summary/save button
* wikimedia-editpage-tos-summary - edit page, below summary/save button & above edittools

Initial English defaults are taken from
http://meta.wikimedia.org/wiki/Licensing_update/Implementation

Ariel's search for other copyright-related messages looks fairly clean,
so we should be good here for now as $wgRightsText/$wgRightsUrl are
already updated.

Messages are overridden using new hooks, which can also be used to switch the
messages based on title or namespace -- this may be desirable for sites such
as mediawiki.org which keep some namespaces PD etc.

Use of the overridden messages by WikimediaMessages is switched in when
$wgRightsUrl is set to 'http://creativecommons.org/licenses/by-sa/3.0/'
2009-06-24 16:49:28 +00:00
Brion Vibber
1c9773bd01 Revert r52336 "Merge maintenance-work branch:"
Seems to have broken a bunch of stuff. Don't commit giant non-critical changes that break Setup.php and all maint scripts. Thanks!
2009-06-24 02:49:24 +00:00
Chad Horohoe
59b60fc311 Merge maintenance-work branch:
* (bug 16322) Allow maint scripts to accept DB user/pass over input or params if no AdminSettings.php
* (bug 18768) Remove AdminSettings.php from MediaWiki core
* (bug 19157) createAndPromote error on bad password
* (bug 14201) Create AdminSettings.php during wiki installation, in the same way as LocalSettings.php
* Introduce new Maintenance class framework and port a good number of scripts over; the ones that are left are a little more complicated. Read the docs.
* Not deleting "unused" files yet, don't want to break everything at once :)
2009-06-24 02:02:37 +00:00
Ryan Schmidt
2da101ba2c * Remove the two hooks introduced in r52082
* Remove the unused UserrightsChangeableGroups hook introduced in r39368 (1.14)
* Fix typo in Special:ListGroupRights introduced in r52083
* Prevent duplicate key display in Special:ListGroupRights (new behavior: if a permission is both assigned and revoked from a group, it only displays as revoked).
* Fix $wgRevokePermissions handling, it now runs after every group permission has been assigned in order to revoke the permission properly.
2009-06-18 14:47:18 +00:00
Ryan Schmidt
003a5f3431 * (bug 17014) Blocked users can no longer use Special:UserRights if they do
not have the 'userrights' permission.
* Add hook 'UserrightsGetCheckboxes' to give extensions the ability to modify
  the arrangement of checkboxes on the Special:UserRights form
* Add hook 'UserrightsSaveUserGroups' to give extensions the ability to modify
  the groups being added and removed last-minute.
2009-06-18 02:13:42 +00:00
Andrew Garrett
8139c8a066 Block password resets from globally blocked IP addresses 2009-06-16 17:10:17 +00:00
Alexandre Emsenhuber
9dbfd93927 * break lines at 80 chars
* spacing consistency
2009-05-28 17:05:09 +00:00
Andrew Garrett
3192644753 Fix bug 18947 LiquidThreads thread renaming silently fails if user is not allowed to move pages.
It now fails gracefully, but really I'd like to be able to disable that subject bar altogether instead of letting users change it only to be told off.
2009-05-28 12:32:43 +00:00
Shinjiman
54396bab19 * (bug 18698) Renaming non entry point maintenance scripts from .inc.php to .inc
patch by Karun Dambiec
2009-05-23 19:26:05 +00:00
Alexandre Emsenhuber
19eda34276 fix for r50667: consistency with other hooks: removed "* " before params 2009-05-16 19:35:03 +00:00