Commit graph

526 commits

Author SHA1 Message Date
jeroendedauw
717e93bd81 Adding NamespaceIsMovable hook to isMovable in MWNamespace, much like done in Title::isMovable.
Change-Id: I72c19be541391857aa25ff2433c017e5d63a8ecd
2012-05-11 16:13:30 +02:00
Brion VIBBER
a001ceab01 Merge "[FileRepo] Added hook to let us copy thumbnails into additional places as they are transformed." 2012-04-26 22:56:05 +00:00
Max Semenik
ab4e51863b Make API action=tokens extendable
LocalSettings snippet for testing:

$wgHooks['ApiTokensGetTokenTypes'][] = function( &$hookTypes ) {
	$hookTypes['foo'] = function() { return 'bar'; };
	return true;
};

Change-Id: Idf1f4379e677d21059c1b4e12f80e9d2bafb9897
2012-04-25 12:48:53 +04:00
Aaron
0f19338535 [FileRepo] Added hook to let us copy thumbnails into additional places as they are transformed.
Change-Id: I673faf338e58c8230ab6da5243f921c178c47e97
2012-04-24 11:14:37 -07:00
Simon Walker
6c29ec2921 Add GitViewers hook for extensions to add git viewers to SpecialVersion
This adds a GitViewers hook to GitInfo, and slightly refactors the
$viewers variable to be called through a function so the hook can be
called. This is so extensions can add their own git repository viewer
to the Special:Version git sha field.

Change-Id: Ifc8396984de6a51be85fb63cd9754d57333bde03
2012-04-16 16:57:58 +00:00
Aaron Schulz
770c9d8c2e Renamed "wfShellMaintenanceCmd" function and new, unused, het-deploy, hook
to "wfShellWikiCmd". The old function now remains as a wrapper. The term "maintenance" is too restrictive.

Change-Id: I5c23d6475fd1aca374ee57b89212eee3a0d8cea1
2012-04-04 16:48:55 -07:00
Max Semenik
083d47cc73 (bug 23795) Add parser itself to ParserMakeImageParams hook. 2012-03-09 18:32:03 +00:00
Ryan Kaldari
045772cbbe grammar fix 2012-03-04 19:14:20 +00:00
Daniel Friesen
14b524c118 Add an OutputPage to the EditPage::showEditForm:initial to match the EditPage::showEditForm:fields hook so that people will stop global'ing $wgOut. e.g.: In WikiEditor. 2012-02-15 19:32:36 +00:00
Andrew Garrett
938871aa56 Port (with changes) r110866 to trunk. Reviewed by Brion before commit. 2012-02-13 22:32:44 +00:00
Jeroen De Dauw
6479096233 follow up to r111017, move hook to isAlwatsKnown as per discussion on CR 2012-02-12 23:10:06 +00:00
Alexandre Emsenhuber
129d23aacc Added missing directories to findHooks.php and missing quote in hooks.txt that made LoginAuthenticateAudit show up as undocumented when running findHooks.php 2012-02-12 19:18:36 +00:00
Jeroen De Dauw
6ee113c1e3 follow up to r111017 - added docs 2012-02-09 14:10:59 +00:00
Chad Horohoe
fb9faea302 Revert r103467, r106446 (bug 24464: calling LoginAuthenticateAudit hook more often)
Pretty narrow use case isn't very well defined, and this has *felt wrong* to me since
it was committed in November. Easier to pull for now rather than blocking release.
2012-02-06 22:44:30 +00:00
Siebrand Mazeland
ef9293b1b7 Remove support for the deprecated and no longer used in trunk hook MagicWordMagicWords. 2012-01-18 18:20:50 +00:00
Sam Reed
284d014e37 Update documentation for ImportHandleRevisionXMLTag 2012-01-16 15:49:32 +00:00
Chad Horohoe
f3a6fc1576 Revert r102624, r104262 (user display name stuff). Per CR there isn't consensus on this yet. 2012-01-11 00:53:08 +00:00
Alexandre Emsenhuber
a0e6ccdb07 Made UnwatchArticle, UnwatchArticleComplete, WatchArticle and WatchArticleComplete pass a WikiPage object instead of Article.
There are two extensions (InterwikiIntegration and Syslog) that use these hooks and they don't Article-only methods so they won't break by this change.
2012-01-06 16:28:11 +00:00
Aaron Schulz
1d77bc94c2 * Cleanup for r108175: made if easier for extensions to interact with each other in TitleReadWhitelist hook. A handler can set $whitelisted to true to whitelist the page or it can set it to false and return false (most restrictive wins).
* Added some hook doc comments.
2012-01-06 06:16:05 +00:00
Alexandre Emsenhuber
7b96bc9010 Per request of Aaron Schulz, follow-up r102187: added new 'TitleReadWhitelist' hook to allow extensions to bypass core (and other extensions) checks to allow an user to read the page 2012-01-05 20:29:53 +00:00
Niklas Laxström
3985279f03 Guessing a typo fix, could also be 'is a feed' but neither expression really opens to me 2012-01-04 11:03:33 +00:00
Antoine Musso
434f82e596 ResourceLoaderTestModules doc: better wording
follow r107993
2012-01-04 10:18:49 +00:00
Niklas Laxström
d0f832fd40 Typos, casing. Still don't understand "'qunit' is feed using tests/qunit/QUnitTestResources.php"
Ping r107919
2012-01-04 08:29:58 +00:00
Antoine Musso
c447423593 merge JSTesting branch into trunk
Changed written by Timo and reviewed by Hashar. This should be harmless.

To enable the feature:
  $wgEnableJavaScriptTest = true;

Then head to:
  [[Special:JavaScriptTest/qunit]]
2012-01-03 18:33:26 +00:00
Daniel Friesen
e96d2d6802 Add RequestContextCreateSkin hook to allow extensions to override the loading of skins. 2012-01-03 01:58:27 +00:00
Krinkle
be12ebf1ab [Core JS] More fixing of global config variable usage
* mw.config is the new way, and global config variable lookups are deprecated

* Based on two phase3-wide quick searches:
-- of " wg": http://toolserver.org/~krinkle/wikimedia-svn-search/view.php?id=321&hash=81700bf7486e4fee3b7bc1f83eb9eba6
-- of "!wg": http://toolserver.org/~krinkle/wikimedia-svn-search/view.php?id=327&hash=47c9d54a7a1d5d58a724dd834585f40d

Related changes:
* Changed some php comments mentioning "wg" variables to include the dollar sign, and a typo when the wf function prefix was meant.
* Removed TODO comment in wikibits.js and made it use the JS equivalent of wfUrlencode, which we have now, mw.util.wikiUrlencode 
* SpecialUpload.php: use OutputPage::addJsConfigVars instead of creating a new script tag through OutputPage::addScript(Skin::makeVariablesScript(..))
* Renamed wgUploadSetup in upload.js and made it local. Not used anywhere in ./trunk/phase3 and ./trunk/extensions
* Fix OutputPage::addJsConfigVars so that it can actually be called with an array instead of two arguments for key/value
* Some minor whitespace/convention stuff around the same line
2011-12-31 21:25:00 +00:00
Alexandre Emsenhuber
921bced830 Revert r106545 and pass a null variable by ref (also updated the documentation) so that the hook is called at the correct moment and after everything is executed.
This is *exactly* the same behaviour as before r88898 since $article was an out parameter to fill $wgArticle correctly.
2011-12-18 14:48:23 +00:00
Brion Vibber
5a6372103a Add BeforePageRedirect hook to OutputPage, allowing extensions to override redirect output.
This is needed by MobileFrontend to normalize some redirects to the mobile site, such as on login.
2011-12-14 00:38:21 +00:00
Daniel Friesen
9d0ee321b6 Introduce a Language::getMessagesFileName hook that will allow extensions to define new language messages files outside of core. 2011-12-12 19:32:59 +00:00
Daniel Friesen
42e8b0a8e7 Replace get{Local,Full,Link,Canonical}URL's $variant argument with a secondary $query argument and treat variant paths like we do action paths. 2011-12-12 19:19:23 +00:00
Tim Starling
3da36a9103 Reverted r92364 (per-namespace permissions).
This is the wrong configuration format for such a feature, and the wrong interface. We already have certain per-namespace permissions in the Title class, and we didn't need to add extra formal parameters to a whole lot of User methods in order to get them. The feature should be implemented wholly in Title, and the concept of user rights should remain relatively simple and easy to understand, and independent of its many applications, i.e. a user either has a right or doesn't. Rights are just a tool for developing access policies; the complexity should be in the caller.

The revert was mostly done by hand, since there were a lot of conflicts. I tried to preserve the gist of conflicting changes in r102187 and r102873. The test changes are not simple reverts, rather I just edited out the per-namespace tests. I reverted the followups r92589 and r104310.
2011-12-12 06:03:01 +00:00
Aaron Schulz
6dcefd735f Added LoggableUserIPData hook to hooks.txt and made CheckUser handle it. This is needed for bug 32925. 2011-12-09 20:13:31 +00:00
Aaron Schulz
dcbe8e7dd3 FU r101117: removed cURL thumb handler code and made thumb_handler.php a thin wrapper around thumb.php
* Moved original URL fetching code and parameter extraction code to thumb.php
* Made use of local repo URL and hash settings to avoid extra config code
* This makes it easy to add hooks for extensions/config to alter behavoir (ExtractThumbParameters hook added)
* Added FileRepo::getHashLevels()
2011-12-08 03:43:07 +00:00
Daniel Friesen
fba28f5233 Followup r104688, reintroduce the full PathRouter code now that the bug with url encoded paths is fixed. 2011-11-30 15:12:19 +00:00
Brion Vibber
73b6bd244a Revert r104274, r104284, r104285 -- breaks special pages on non-english 2011-11-28 19:55:49 +00:00
Sam Reed
f3839fe71f Added "ApiGetDescription" hook 2011-11-28 15:33:28 +00:00
Bryan Tong Minh
e7e9ad5f43 Follow-up r92364: Update hooks documentation 2011-11-26 21:31:22 +00:00
Daniel Friesen
63e93db2d8 Implement path routing code.
- Makes extending paths with extensions simpler.
- Should fix bug 32621 by parsing paths based on pattern weight rather than pattern order.
2011-11-26 16:29:25 +00:00
Brion Vibber
fa78b0a3d4 tweak hook doc; followup r103762 2011-11-23 00:56:45 +00:00
Sam Reed
8e9b597894 * (bug 24765) User tool links edit hook
Original patch by "biolizard", updated to not use $this in static, and added relevant documentation
2011-11-20 15:16:54 +00:00
Mark A. Hershberger
8eb1dd2944 Adapt and re-apply Michael Newton's patch from Bug 24464 - Execute
LoginAuthenticateAudit hook more often.

Also updated release notes.
2011-11-17 15:16:03 +00:00
Alexandre Emsenhuber
c35b82a036 * Factorise common code in ImagePage::delete() and allow normal page deletion if $wgUploadMaintenance is true
* Moved $wgUploadMaintenance check after permissions and read only, so that the user doesn't think the error is temporary if he both doesn't have the permission and $wgUploadMaintenance is true
* Show normal error page when $wgUploadMaintenance and added a message for the error title
* Moved watchlist updating to FileDeletForm::execute(), it has nothing to do in doDelete() (would also be executed for api requests, etc.)
* Added $user parameter to FileDeletForm::doDelete() to pass the user doing the action
* Use WikiPage instead of Article
2011-11-15 18:08:34 +00:00
Aaron Schulz
f00af516ab Changed new LocalFilePurgeThumbnails hook arguments and updated wmf/swift.php to actually work for archived file thumbs. 2011-11-15 02:20:08 +00:00
Daniel Friesen
44ab4a9448 Add a new User::getDisplayName() to return the name that should be displayed in the interface.
Add a UserDisplayName hook to allow extensions to give custom display names for users.
Add a $wgRealNameInInterface to use the real name of a user as the display name.
To start of the first use of the display name functionality tweak SkinTemplate to declare the userdisplayname and use it inside of personal_urls.
2011-11-10 06:55:21 +00:00
Aaron Schulz
eabb7d1638 Updated docs for r101896 2011-11-04 15:05:00 +00:00
Bryan Tong Minh
eac3d58b44 Per comments on r99911 move $wgMaxImageArea check back to normaliseParams(). Added hook BitmapHandlerCheckImageArea to override the area check. I'm not very happy with this overly specific hook, but I don't see a clear way to obtain the functionallity required otherwise.
Remove the width and height params from BitmapHandler::getImageArea(). There is really no reason for them to be there.
2011-11-02 20:48:50 +00:00
Roan Kattouw
698f9e9c00 Revert r101488, breaks parser test. Add a comment explaining why there is no caching currently being done, and document the fact that the hook is called a zillion times in hooks.txt 2011-11-01 16:25:26 +00:00
Alexandre Emsenhuber
41e944bac2 Some cleanup to ProtectionForm:
* When the user doesn't have permission to protect/unprotect the page, display a page with the title set to "View protection level for ...", then the permissions errors and the current protection levels. Except for the title, this was already the case for permissions errors, but when the database was read-only this was throwing an exception due to the change in OutputPage::readOnlyPage()  
* Moved check for NS_MEDIAWIKI a level up, so that is it also catched on page save, and make the output in such case much more user friendly
* Changed edit token to be salted with array( 'protect', 'page name' ) (as for action=watch)
* Allow extensions to return false in ProtectionForm::save hook for consistency with other hooks and in that case fill the error message with 'hookaborted' if the extension does not provide an customised error message.
* Changed ProtectionForm::show() to accept an array of message name and its parameters in addition of a string with raw HTML and converted calls to use the new method. This also means that ProtectionForm::save can use this 
* Removed the setSubtitle() call for the 'formerror' message in case of error since it's overriden by the "back link"
2011-11-01 15:45:52 +00:00
Roan Kattouw
a0a775a9b4 Followup r101354: pass $this to the PreferencesGetLegend hook so the callee will have a ContextSource to work with 2011-10-31 13:19:38 +00:00
Roan Kattouw
b2b8ea70db Introduce the PreferencesGetLegend hook. I need this to customize the labels of <fieldset>s in the preferences for the Gadgets extension in the RL2 branch and I can't think of a cleaner way to do this. 2011-10-31 12:36:51 +00:00