Commit graph

390 commits

Author SHA1 Message Date
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
Alexandre Emsenhuber
b4ede1bb06 Document "MessageNotInMwNs" hook 2009-05-16 19:32:12 +00:00
Alexandre Emsenhuber
343ddffec5 Don't use $this in hook description since it's a reserved word 2009-05-07 20:15:09 +00:00
Chad Horohoe
0ea3a0c7da Add $this as a parameter to LoadAllMessages. 2009-05-07 18:49:57 +00:00
Alexandre Emsenhuber
19712a49de Follow-up r49790: remove from docs/hooks.txt hooks that were removed from code 2009-04-25 13:50:48 +00:00
Andrew Garrett
155ddf6de4 Branch merge of preferences work branch. Includes fixes for several bugs. WARNING: Breaks some extensions which have not been adapted to use it properly (basically anything not used on Wikimedia). 2009-04-24 01:31:17 +00:00
Charles Melbye
5ac13d1a5b Fixing port error in Memcached docs (Reported by Sean_Colombo in IRC.) 2009-04-23 02:49:44 +00:00
Chad Horohoe
5a64151ed2 (bug 18529) New hook: SoftwareInfo for adding information about the software to Special:Version 2009-04-20 13:05:15 +00:00
Alexandre Emsenhuber
8b5bb8e1bf Document APIQueryUsersTokens and WikiExporter::dumpStableQuery hooks 2009-04-19 15:12:15 +00:00
Emil Podlaszewski
f04ca60561 Added new hook 'MessageCacheReplace' into MessageCache.php. For instance
to allow extensions to update caches in similar way as MediaWiki invalidates
a cached MonoBook sidebar
2009-04-08 14:23:14 +00:00
Roan Kattouw
87a1cd7980 Remove ugly userrights-CentralAuth hack introduced in r48970 and friends:
* Make UserrightsForm::doSaveUserGroups(), addLogEntry() and helpers non-static again so CentralAuth can override them; remove the short-lived UserRightsLogEntry hook
* Let UserrightsForm::fetchUser() return a WikiErrorMsg on failure
* In ApiUserrights, use an instance of the UserrightsPage class rather than calling its methods statically. This also enables interwiki userrights in this module
* Add some messages to ApiBase::$messageMap
2009-03-29 16:39:42 +00:00
Roan Kattouw
549b1688cc Redo r48746 (API userrights, reverted in r48909 and r48910) in a way that doesn't break CentralAuth. Basically, this works around PHP's inability (at least in < 5.3) to override static methods by adding a hook. Changes to CentralAuth in next commit. 2009-03-28 19:08:47 +00:00
Aaron Schulz
fe2717522d (bug 18001) Rollback of null edit should restore flag 2009-03-18 07:55:19 +00:00
Chad Horohoe
2ecdfb37f8 * Add $linkType param to LinkerMakeExternalLink
* Move docs from r48223 to the right place.
2009-03-09 13:55:45 +00:00
Andrew Garrett
808bfafbff Add $attribs as a param to LinkerMakeExternalLink Hook. 2009-03-09 13:21:14 +00:00
Alexandre Emsenhuber
7a5e774a2e rm deprecated note for MagicWordwgVariableIDs hook since it's the only way for an extension to register a new variable 2009-02-10 12:48:58 +00:00
Alexandre Emsenhuber
e58028f9e5 Document UserIsBlockedGlobally hook 2009-01-29 19:48:56 +00:00
Andrew Garrett
9a3c1fcede Branch merge of change-tagging branch with trunk
-- Introduce tagging of individual changes (revisions, logs, and on recentchanges). The tags are customisable, and currently settable by the Abuse Filter and by the TorBlock extension. The tags can be styled on the various pages on which they appear.
-- Introduces a schema change, three new tables (valid_tag, change_tag, and tag_summary).
2009-01-28 19:08:18 +00:00
Jack Phoenix
680b3a56bb adding a new hook from wikia codebase into SpecialWantedpages.php to allow extensions to alter the SQL query 2009-01-19 15:35:15 +00:00
Raimond Spekking
802bdecbeb self revert r45512, r45513 and r45515 for now
Per Brions review on r45512. I need a bit more time to fix it.
2009-01-17 08:56:27 +00:00
Nathaniel Herman
4c9d5a0eb0 Add new hook 'UserLoadFromDatabase' that is called while loading a user from the database. 2009-01-16 23:34:38 +00:00
Aaron Schulz
220c59be9a (bug 16923) New parameter value diff=review for the URL 2009-01-07 21:09:18 +00:00
Raimond Spekking
35383a74e3 * Extend language::getLanguageName to return localized language names if available
* Therefore added a hook to catch them from an extension (successfully tested with the cldr extension (see next commit))
* Add a title tag to the interlanguage box entries. Only added when the title differ from the shwon text.
No change of behaviour until an extension is enabled.
2009-01-07 19:19:25 +00:00
Aaron Schulz
f84ef99841 Expand ArticleRollbackComplete hook to include reverted rev 2009-01-04 12:27:08 +00:00
Brion Vibber
3e69f5237d Revert r44867 "Improve markpatrolled hook"
Incompatible change to existing hook (changing types of parameters passed)
2008-12-23 20:56:19 +00:00
Aaron Schulz
6444714ca6 Avoid extra page_touched query 2008-12-22 07:35:56 +00:00
Aaron Schulz
87fbe10e1f *Replace crappy BeforeWatchlist hook
*Updated LQT accordingly
*Will add flaggedrevs function to this shortly
2008-12-21 21:31:06 +00:00