Commit graph

1734 commits

Author SHA1 Message Date
Rob Lanphier
c7999388a4 Setting $wgLocalTZoffset based on $wgLocaltimezone, using code that used to
be in a comment in DefaultSettings.  Pair programmed with hashar.
2011-05-15 13:42:10 +00:00
Tim Starling
6fec4e3fde Revert r87635, r87637, r87639, r87643 (MW_MIN_PHP_VERSION etc.): breaks HipHop support. 2011-05-15 13:21:16 +00:00
Bryan Tong Minh
363ebd8a4c Add 'hash' => array( 'class' => 'HashBagOStuff' ) to $wgObjectCaches; greatly speeds up importDump.php 2011-05-15 09:54:31 +00:00
Alexandre Emsenhuber
421948c238 Rewrote the article counting code and related:
* (bug 26033, bug 24754) Added $wgArticleCountMethod to have a more flexible way to define which method to use to define if a page is an article or not and deprecated $wgUseCommaCount. There is now a new 'any' method to count any article that is in a content namespace and not a redirect.
* (bug 11868) If using links to count articles, Article::isCountable() will now use the ParserOutput to check if there's a link instead of checking for the "[[" string. Changed Article::isCountable() to take a stdObject or false for the first parameters. If false is passed, the result will be based on the current article's state (i.e. database). The only call outside of the Article class is in DeleteAction (including extensions).
* Removed this horror of Article::$mGoodAdjustment and Article::$mTotalAdjustment, replaced by the new $created parameter on Article::editUpdates(); simplified Article::createUpdates()
* Updated Import.php to take advantage of the new parameter and make a single call to Article::editUpdates()
2011-05-14 17:11:32 +00:00
Antoine Musso
b45aa4b2c7 bug 28503: add ircs to UrlProtocols in defaultsettings & css 2011-05-14 13:56:13 +00:00
Chad Horohoe
e7c48351b1 (bug 10154) Don't allow user to specify days beyond $wgRCMaxAge 2011-05-13 16:21:39 +00:00
Krinkle
49ce5de7d9 Creating a way to toggle mw.config LEGACY_GLOBALS from LocalSettings (bug 28916).
* I thought a while for a way to somehow get that global variable from php to the start of the main mediaWiki object creation. Considered using a (temporary) global variable and deleting afterwards, but that looked like a hack and wasn't sure about the cross-browser functioning of it. Instead ended up by moving it to the startUp module where other global variables are accessed as well. This seems to work pretty good.

* Can be toggled from LocalSettings by setting $wgLegacyJavaScriptGlobals.
* Changed some usages of mediaWiki to use the global mw alias instead.
2011-05-10 23:17:13 +00:00
Happy-melon
fd34d0354b * Implement MW_VERSION constant in Defines.php and use it in preference to $wgVersion. Defines.php will have been loaded anywhere that DefaultSettings.php has been loaded.
* Move the declaration of $wgFeedClasses from Defines.php to WebStart.php
2011-05-07 14:53:08 +00:00
Sam Reed
29fc7b415f Kill $wgExtraRandompageSQL
Rewrote extension using them to subclass SpecialRandompage
2011-05-06 23:25:57 +00:00
Sam Reed
66f31cc203 Kill $wgAllowUserSkin 2011-05-06 23:18:11 +00:00
Sam Reed
15df9a9d5c Kill off the long deprecated $wgInputEncoding and $wgOutputEncoding globals 2011-05-06 22:09:47 +00:00
Sam Reed
33749b0cad Kill $wgRateLimitsExcludedGroups which was deprecated in 1.13 2011-05-06 21:57:55 +00:00
Sam Reed
f985524076 More versions added to @deprecated tags
Couple of inbound calls fixed up

Some ancient code removed as it's been marked deprecated
2011-05-06 21:50:18 +00:00
Chad Horohoe
924b1eef2c Bump trunk version since we've branched 2011-05-06 14:45:25 +00:00
Chad Horohoe
157466dc55 Kill $wgSkinExtensionFunctions. Way back in r4934 when it was introduced, it was near the beginning of Setup.php, and $wgExtensionFunctions was near the end. Thus, they served two different purposes for doing extension setup. Refactoring over time has brought these processes side-by-side and thus the unused (and less-featured) one is getting the axe.
-1 more awful global \o/
2011-05-05 06:29:33 +00:00
Chad Horohoe
9502fbb44d (bug 28343) Kill unused contextlines/contextchars 2011-05-01 21:14:32 +00:00
Roan Kattouw
f56afa36a6 (bug 28738) Implement request splitting in mw.loader so ResourceLoader requests with query strings longer than a certain value are split up. The maximum query string length is configurable, and this behavior is disabled by default. It's needed in rare cases where there is a query string length or GET variable length limit in place that the wiki admin can't raise. 2011-05-01 18:41:42 +00:00
Sam Reed
86a6564c71 Followup r86898, fix $wgProxyScriptPath 2011-04-25 21:18:17 +00:00
Happy-melon
3ef8a83c0a Follow-up r86482: patch to add an index on user_email. Not a problem if this is not run on WMF wikis as long as they don't enable the $wgPasswordResetRoutes['email']. 2011-04-20 15:33:04 +00:00
Happy-melon
399f95577b (bug 13015, bug 18347, bug 18996, bug 20473, bug 23669, bug 28244) separate the password-reset request dialogue from SpecialUserlogin.
* Refactor with all the latest bells and whistles
* Allow wikis to enable resettting by entering an email address (bug 13015).  This is currently an unindexed query, but it is disabled by default so no immediate problem.
* Allow resetting to be disabled entirely (bug 20473).
* Don't send registered users' IP addresses in the emails (bug 18347)
* Check that a user is not globally blocked before letting them send messages (bug 23669)
* Display a more useful error message when an account exists globally but not locally (bug 18996).
2011-04-20 15:27:09 +00:00
Happy-melon
1a80d46370 Rename Special:Resetpass to Special:ChangePassword. "pass" is vague and unintuitive, "reset" is only half of the page's function, and I'd quite like "Special:ResetPassword" for a much cleaner implementation of the 'enter-something-to-be-sent-a-reset-email' interface for bug 28244, bug 13015, etc. Diff looks much worse than it is because I had to update 95 language files... 2011-04-17 20:29:24 +00:00
Brian Wolff
74f16767e7 Merge to trunk everything in img_metadata branch.
Hope I did this in an ok fashion. svn merge --re-integrate was giving me issues
so I just essentially over-wrote my working copy with the version at img_metadata.
2011-04-16 01:23:15 +00:00
Chad Horohoe
efe4525d2c Merge r81448 from REL1_17: reverting RevisionMove feature back out until somebody has the time to work on it again. Reverts r67094 and its followups in trunk: r67099, r67111, r67112, r67115, r67398, r81425, r81427 2011-04-15 23:28:13 +00:00
Chad Horohoe
c4f3fceb0b Revert r77555 and followups r77563, r77572, r78116 (merge DisableAccount to core).
Per CR at the time: this creates a nearly irreversable action that is not nearly well documented enough (even if disabled by default). 

We already have the $wgBlockDisablesLogin kludge in place for this. If we're going to do more work on this idea, it should be well thought out, not another hack.
2011-04-15 22:49:03 +00:00
Chad Horohoe
051cd66e9d Followup r83755: You removed them, you didn't deprecate them (there is a difference). If you're going to remove them, go the whole way rather than having people think they might still work. 2011-04-15 18:06:03 +00:00
Niklas Laxström
aa23859aa0 Added one @since annotation I had to check out 2011-04-14 16:05:59 +00:00
Happy-melon
8779f4b55f r86001, now with less scariness :P I took out the delete action and did purge instead, which is a much more self-contained action-with-a-form. Also implement a few changes suggested by Brion on IRC last night. 2011-04-14 10:38:29 +00:00
Happy-melon
bc4a096805 Revert r86001: Brion says it's too scary :D will recommit in pieces 2011-04-13 23:36:27 +00:00
Happy-melon
6dc8136d12 New infrastructure for actions, as discussed on wikitech-l. Fairly huge commit.
* Actions come in two flavours: the show-a-form-then-do-something-with-the-result (delete, protect, edit, etc) and the just-do-something (watch, rollback, patrol, etc).  Create abstract base classes Action and FormlessAction to support these two cases.  HTMLForm is an integral part of the form-based structure.
* Look mum, no globals!  :D  Fully context-based.
* Implement watch/unwatch, credits and delete actions in the new system as proof-of-concept.  This also gives the delete frontend a much-needed overhaul.
* Stub out the newly-deprecated functions from Article.php.  This already reduces its linecount by about 15%, and there are plenty more actions still to do.
* Centralising actions like this is going to render a lot of hooks type-incompatible.  There's simply nowhere you can put the ArticleConfirmDelete hook, for instance, where it can be passed an OutputPage as the second parameter.  On the other hand, we can implement new hooks like ActionModifyFormFields and ActionBeforeFormDisplay, which can do much prettier stuff to the forms, like adding extra fields the 'right' way.  Update LiquidThreads to use these new hooks where appropriate.
2011-04-13 23:04:07 +00:00
Ryan Kaldari
45700ad87f follow up to r85847 - tokipona projects long dead and gone 2011-04-12 01:27:10 +00:00
Brion Vibber
ff0524b3bc Initial stab at breaking math/texvc out to Math extension.
* (bug 14202) $wgUseTeX has been superseded by the Math extension. To re-enable
  math conversion after upgrading, obtain the Math extension from SVN or from
  http://www.mediawiki.org/wiki/Extension:Math and add to LocalSettings.php:
  require_once "$IP/extensions/Math/Math.php";

This is an initial stab, and a few things remain to be cleaned up:
* messages need to be moved from core to extension
* MW_MATH_* constants should be moved to the extension from core
* old back-compat math names interfaces using those constants should be removed from message files
* classic edit toolbar's math button should be added from the extension (or else dropped) -- currently there's not a clean hook, but could do it by JS
* couple of things like the 'armourMath' function on Language & LanguageConverter may want to be redone just as an unconditional, if that's simpler.

Setting $wgUseTeX alone will no longer have any affect. The var's still there for the moment as a few bits still need to be fully moved out from core.
2011-04-09 00:39:40 +00:00
Tim Starling
7bb50c630a The beginnings of HipHop compiled mode support. It works now for parser cache hits.
* Work around HipHop issue 314 (volatile broken) and issue 308 (no compilation detection) by adding some large and ugly compilation detection code to WebStart.php and doMaintenance.php.
* Provide an MW_COMPILED constant which can be used to detect compiled mode throughout the codebase.
* Introduced wfIsHipHop(), which detects either compiled or interpreted mode. Used this to work around unusual eval() return value in eval.php.
* Work around lack of ini_get() in Maintenance.php, by duplicating wfIsHipHop(). 
* In Maintenance::shouldExecute(), accept "include" as an inclusion function name, since all kinds of inclusion give this string in HipHop.
* Introduced new class MWInit, which provides some static functions in the pre-autoloader environment.
* Introduced MWInit::compiledPath(), which provides a relative path for invoking a compiled file, and MWInit::interpretedPath(), which provides an absolute path for interpreting a PHP file. Used these new functions in the appropriate places.
* When we are running compiled code, don't include files which would generate duplicate class, function or constant definitions. Documented the new requirements on the contents of Defines.php and UtfNormalDefines.php.
* In HipHop compiled mode, it's not possible to have executable code in the same file as a class definition. 
  ** Moved MimeMagic initialisation to the constructor.
  ** Moved Namespace.php global variable initialisation to Setup.php.
  ** Moved MemcachedSessions.php initialisation to the caller in GlobalFunctions.php.
  ** Moved Sanitizer.php constants and global variables to static class members. Introduced an accessor function for the attribs regex, as a new place to put code formerly at file level. 
  ** Moved Language.php initialisation of $wgLanguageNames to Language::getLanguageNames(). Removed the global variable, marked "private" since forever.

* In two places: don't use error_log() with type=3 to append to a file, HipHop doesn't support it. Use file_put_contents() with FILE_APPEND instead.
* Work around the terrible breakage of class_exists() by using MWInit::classExists() instead in various places. In WebInstaller::getPageByName(), the class_exists() was marked with a fixme comment already, so I replaced it with an autoloader solution.
2011-04-04 12:59:55 +00:00
Chad Horohoe
583e3487b8 Revert r64853 (add $wgLogAutocreatedAccounts to enable/disable account autocreation logging, bug 19161). Per the *extremely lengthy* discussion that is still ongoing, this fails to solve the underlying problem and has undesired side-effects.
I don't know what the proper solution is (other than introducing user preferences, like bug 28369 suggests, is not the answer)...but the status quo of what we had is better than this half-assed solution that *nobody* likes.
2011-04-01 15:57:20 +00:00
Aryeh Gregor
d04d904743 Document what settings are disabled by $wgHtml5
Bug 28350.
2011-04-01 14:50:29 +00:00
Brian Wolff
1111518f51 (bug 28242) Make url's of the form http://mediawiki.org/wiki/w:Somewhere_on_pedia give a 301 (permenant) redirect instead of a 302.
This is to make google when indexing a page like http://mediawiki.org/wiki/w:Somewhere_on_pedia to report its target, not the
original url as the url of the page. This only affects urls where the (local) interwiki target is directly in the url.
Pages that contain #Redirect[[w:Somewhere_on_pedia]] will still use 302 (Temporary) redirects since such pages are by
no means permenantly redirected.

Also clarify docs on $wgDisableHardRedirects since the setting confused me.

See also google's spiel on 301 redirects http://www.google.com/support/webmasters/bin/answer.py?answer=93633
2011-03-26 21:06:37 +00:00
Antoine Musso
83fd8e8d90 php 5.2.3+ allow us to pass full method names
reverts 83878 , per CR
2011-03-26 12:43:04 +00:00
Brian Wolff
2d64c69910 (follow-up 79778) Make $wgLang->truncate function consider the length of the ... (ellipsis message) in the truncation length.
The length of this message varries by localization, so the previous solution of telling truncate to truncate 5 bytes
less than needed is not good since this will be too little or too much.

Updated places where its used. Some places I left as is, as it looked like the new behaviour would work fine for them to.
(for example, the autosummary feature - it was cutting off at 200 bytes, which is no where near 250 limit, so I presume that
was for asethic reasons rather then to fit as much in before the db limit).

Will do another commit for extension callers in a moment.
2011-03-24 02:54:11 +00:00
Sam Reed
f65dde3bf8 Adding some type documentation to some well used globals 2011-03-24 00:48:22 +00:00
Chad Horohoe
a91085048f (bug 26866) remove trackback user right from DefaultSettings.php 2011-03-22 13:57:11 +00:00
Roan Kattouw
45f9da8ad7 (bug 27336) Add $wgJobTypesExcludedFromDefaultQueue for job types that aren't supposed to be run by 'normal' job runners. Modified patch by Michael Dale 2011-03-20 16:52:57 +00:00
Roan Kattouw
43993f1fd6 (bug 27641) purgeThumbnails should support exclusion of expensive files. Add $wgExcludeFromThumbnailPurge and don't purge thumbnails whose extension is in that array when the files they belong to are purged with action=purge. Committing patch by Michael Dale with small coding style tweaks 2011-03-20 16:38:08 +00:00
Sam Reed
7f604b9a6c Also remove message as followup to r84133 2011-03-17 15:18:19 +00:00
Sam Reed
4f1eb6c0b0 Another old version checking thing 2011-03-16 22:48:47 +00:00
Sam Reed
d25b872f76 Kill off some more old version checking stuffs 2011-03-16 22:38:17 +00:00
Happy-melon
f050fabd6b Complete the trinity of blocking frontend interfaces by rewriting SpecialIpblocklist:
* Move and rename to SpecialBlockList
* Use an HTMLForm in GET mode for the options form
* Use TablePager to organise the results more nicely
* Standardise the filtration for IPs and IP ranges, so looking at blocks for a range will now also show rangeblocks which contain the range
* General tidy up
2011-03-14 16:09:44 +00:00
Roan Kattouw
47d5ad564b Followup r83885: implement maximum line length and statement termination (each statement on its own line) in JavaScriptMinifier. Also add globals for these things and update minify.php for these new config vars. 2011-03-14 13:24:30 +00:00
Roan Kattouw
2ecfa43f08 Fix r83140: 'ObjectCache::newAnything' is not a valid callback, use array( 'ObjectCache', 'newAnything' ) . Apparently this explodes in some versions of PHP but not in others 2011-03-14 10:27:24 +00:00
Happy-melon
0a8a3b452c Further massive rewrite of the blocking frontend: spin out unblocking into a new SpecialUnblock.php. This leaves IPBlockList as, astonishingly enough, a list of blocks... :D 2011-03-13 21:33:52 +00:00
Antoine Musso
d73b375870 setting servername with an IPv6 request must ensure we have both brackets
On lighttpd 1.4.28, the SERVER_NAME CGI variable is truncated at the first
colon. This makes it return an incorrect value for SERVER_NAME when the user
make the request to an IPv6, it outputs something like [2001.

This patch make sure we have either both opening and closing brackets or no
brackets at all (hence the 'xor' boolean check).

+ipv6
2011-03-13 18:31:00 +00:00
Happy-melon
b2d91f90e4 Follow-up r83786: update references in SpecialPage::getTitleFor() and friends to point to 'Block' rather than 'Blockip'; should fix errors on translatewiki. 2011-03-12 23:22:34 +00:00