Commit graph

303 commits

Author SHA1 Message Date
Jan Luca Naumann
a9f717e8ed (r54511) Replace global array with hook 2009-08-06 13:40:13 +00:00
Chad Horohoe
90a940cb6b (bug 15209) New hook right after initialization 2009-08-03 22:31:52 +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
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
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
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
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
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
Aaron Schulz
c29b5243ab Improve markpatrolled hook 2008-12-21 08:49:45 +00:00
Aaron Schulz
5a90ec2632 Add EditPageBeforeEditChecks hook for bug 16713 2008-12-20 01:15:40 +00:00