Commit graph

268 commits

Author SHA1 Message Date
Niklas Laxström
4356486697 Always define mwEmbed i18n file. Was not compatible with manual recaching and the performance impact should not matter. 2009-08-11 18:26:14 +00:00
Michael Dale
7dc42bd170 attempt to fix translatewiki script-loader translate issue. 2009-08-11 18:08:12 +00:00
OverlordQ
30e44a06fc Follow up to r54414 and r54356. Hopefully catches all of the edge cases of erroneous input. On a side note, if PHP is configured with too low a limit it can die before it even reaches the code in Setup.php 2009-08-05 01:33:18 +00:00
Benjamin Lees
37a62ba6e1 Followup to r54406: enable/disable functions were being called in the wrong order (thanks, OverlordQ). 2009-08-05 00:59:50 +00:00
Benjamin Lees
69c5d86763 Add missing semicolons 2009-08-04 23:00:30 +00:00
Benjamin Lees
95328fafaf Suppress warnings when trying to raise the memory limit 2009-08-04 22:58:43 +00:00
Chad Horohoe
1d5874a8c7 (bug 16084) Default memory limit should be increased 2009-08-04 02:47:39 +00:00
Brion Vibber
5cf7c777be * (bug 18751) Fix for buggage in profiling setup for some extensions on PHP 5.1
Patch by GreenReaper: http://bug-attachment.wikimedia.org/attachment.cgi?id=6246
2009-07-19 20:21:28 +00:00
Michael Dale
2d5154e634 * addressed r53282#c3209 moved conditional inclusion of $wgExtensionMessages in mwScriptLoader.php to Setup.php
* put a @ in front of get_headers() should hopefully avoid errors where allow_url_fopen=0
* combined $wgPhpCliPath into the similar used $wgPhpCli var
* minor js & example file mwEmbed fixes
2009-07-15 22:41:56 +00:00
Shinjiman
648bfbabc0 * (bug 10837) Introducing the StubUserVariant class to determine the variant variable instead of using this to overrules the user language preference. 2009-05-30 19:49:51 +00:00
Robin Pepermans
45e9b032ec Update per r50782:
* Remove all $wgAllowRealName, check $wgHiddenPrefs instead
* Make $wgAllowUserSkin obsolete too, check $wgHiddenPrefs instead
* And also only call globals if really needed, and remove unused globals
2009-05-24 12:09:15 +00:00
Chad Horohoe
c458e633de (bug 18761) Add setting to hide a list of preferences. 2009-05-19 17:07:46 +00:00
Alexandre Emsenhuber
998f036bec If passing a callback in an array in $wgExtensionFunctions, fix the profile name to not have 'Setup.php-extensions-Array' 2009-05-06 20:02:01 +00:00
Alexandre Emsenhuber
0ec69aed3b * (bug 18009) $wgHooks and $wgExtensionFunctions now support closures
* Whitespaces fixes in includes/Hooks.php
2009-04-06 12:41:20 +00:00
Aaron Schulz
da25eed393 (bug 17180) Disable $wgShowIPinHeader if static caching is enabled 2009-01-27 19:58:26 +00:00
Chad Horohoe
b9987c3c63 (bug 17180) Go ahead and disable $wgShowIPinHeader if we're using $wgUseFileCache. 2009-01-27 19:53:20 +00:00
Brion Vibber
ecf0df92fb Revert r44814 "code style tweaks" -- removal of class_exists check breaks actual maint scripts 2008-12-23 23:34:35 +00:00
Aaron Schulz
7fbd29d170 Code style tweaks 2008-12-19 22:32:36 +00:00
Andrew Garrett
01f9908a0f Configure extension: With DB handler, defer wfConfigureSetup() to a new hook, SetupAfterCache, which, as the name implies, is executed in Setup.php, after caches are initialised.
This avoids some weird issues with Configure and maintenance scripts.
2008-12-10 23:15:50 +00:00
Aaron Schulz
a5b4105921 Tweak check order to be slightly better 2008-12-09 02:55:49 +00:00
Ilmari Karonen
34fb6297cd Step 2 in NS_IMAGE -> NS_FILE transition (bug 44) (WARNING: huge commit).
This is a global search and replace of NS_IMAGE and NS_IMAGE_TALK with NS_FILE and NS_FILE_TALK respectively in all core files, excluding those already updated in step 1 (r44004).
2008-12-01 17:14:30 +00:00
Ilmari Karonen
d247d88f7d (bug 44) make 'Image' and 'Image_talk' compatibility aliases work for all languages, not just English 2008-11-27 20:27:05 +00:00
Tim Starling
90ed80443e (bug 12586) Use wfHostname() everywhere, remove $wguname and $wgNodeName. Use getenv('COMPUTERNAME') on Windows. 2008-10-06 07:30:38 +00:00
Tim Starling
c69d5d46e8 Proposed fix for bug 14944, specifically the reports that some servers do not have en_US.UTF-8. Make the locale configurable via $wgShellLocale. Detect available locales and set $wgShellLocale to an appropriate value on install. Also fixes safe_mode putenv() warnings. RELEASE-NOTES entry will go to 1.13. 2008-09-29 10:19:11 +00:00
Aaron Schulz
e8215b27e4 Add newuser log to core 2008-09-13 00:29:33 +00:00
Chad Horohoe
a469f0dae1 Self-revert 40530, 40531. Too many things still depend on $_GET and $_POST. Needs more cleanup before this can be put in place. 2008-09-08 13:48:07 +00:00
Chad Horohoe
40618e0c3e * Add getCookie() method to WebRequest as a wrapper for $_COOKIE. Updated all instances of $_COOKIE to use this.
* Switch from running fix_magic_quotes() on $_COOKIE and $_GET/$_POST to running it on $this->cookies and $this->data. Should keep us from interfering with other programs that might do the same (and/or trying to start up a second WebRequest object). This partially fixes bug 11558.
* Todo: Do similar things with $_SERVER/$_ENV and switch to a lazy-load style, rather than on every new WebRequest.
2008-09-06 12:38:34 +00:00
Tim Starling
9e103d3dc3 Reverting r40323, as per comments on wikitech-l. Deprecated doesn't mean removed. It doesn't even mean it'll be removed in the future. It just means you shouldn't use it. 2008-09-03 02:28:41 +00:00
Chad Horohoe
85eee307b2 Fully deprecate $wgProxyKey. Has been marked as deprecated since 1.4, but never seems to have been done. Sites with $wgProxyKey set will continue to use the setting (added a fallback in Setup). Fixes bugs 9258 and 12089. 2008-09-02 15:15:54 +00:00
Tim Starling
d3f99b0811 Make it a lot harder to unprotect the MediaWiki namespace. In response to cs.wikinews.org screwup. 2008-08-31 13:03:30 +00:00
Brion Vibber
e2f1a14d9e * $wgAjaxSearch has been removed; use $wgEnableMWSuggest instead.
I never liked the take-over-the-screen UI of the old ajax search; the new suggestion search does the same thing in a more natural, integrated way.
2008-08-20 18:11:59 +00:00
Tim Starling
e3cc5d722f Don't limit setlocale() hack to PHP 5.2.6, as per comment on bug 14944. 2008-08-08 09:37:22 +00:00
Tim Starling
6e0d253f6d Workaround for PHP 5.2.6 escapeshellcmd()/escapeshellarg() bug 2008-08-08 03:32:54 +00:00
Brion Vibber
75b58962c6 Revert r38221, 38238 -- "Add new parser function {{apiurl}}. Also, add new global $wgApiScript because manually constructing the api script's path seemed like a bad idea."
I don't really like this in general; the API isn't meant for the UI and there should be little to no call to link to it from body content.

Additionally, I believe we're trying to move all new parser functions to the convention of using the # prefix to avoid conflict with the template namespace.
2008-07-30 19:45:35 +00:00
Chad Horohoe
5fb49ecb12 Add new parser function {{apiurl}}. Also, add new global $wgApiScript because manually constructing the api script's path seemed like a bad idea. 2008-07-30 07:46:25 +00:00
Chad Horohoe
0775a89d73 Allow $wgCookiePrefix to be set by the user. Default is false which keeps current behavior in Setup. Fixes bug 14843. 2008-07-21 21:51:51 +00:00
Daniel Friesen
48019ed554 Some missing changes for the $wgShared(DB|Prefix|Tables) setup:
* $wgCookiePrefix:
** Shared stuff should always come before local stuff when setting the cookie prefix (by my count, if you set $wgSharedDB and $wgDBprefix with the old order, even though your usertable is shared, your cookies would be local and logins wouldn't be shared right.
** Because the user table isn't always shared anymore, we only want shared code when $wgSharedTables has 'user' set inside of it.
** We now have $wgSharedPrefix, this should also be accounted for in the cookie prefix.
* updaders.inc: The logic for the $doUser test has changed since the conditions that the user table is shared has changed. Now when $shared is true we only want to $doUser when we have a shared database and 'user' is being shared, otherwise if $shared is false, we only want to $doUser when there is no shared database, or 'user' is not being shared.

Check MediaWiki.org's $wgSharedDB documentation for those on 1.12, I'll post a link there to a patch I maintain for 1.12.
2008-06-30 05:16:38 +00:00
Alexandre Emsenhuber
a75a0d0457 Remove call to wfSeedRandom(), this function does nothing 2008-06-23 17:33:41 +00:00
Niklas Laxström
c175d9f886 * Actually use $wgMessageCacheType for the MessageCache 2008-06-17 08:14:33 +00:00
Tim Starling
c6b902f180 * Reorganised the includes directory, creating subdirectories db, parser and specials
* Wrote a tool to check the integrity of the autoloader class list, fixed some issues that came up.
* Start the autoloader before LocalSettings.php, so that when an extension writer thinks an inefficient one-file special page extension is the way to go, they don't have to use explicit includes to make the class inheritance work. Should continue to work with $IP set in LocalSettings.php as long as $IP is set before extensions are included.
2008-06-16 20:21:26 +00:00
Daniel Friesen
b7f509c7b6 Improve UI for Special:Recentchanges and Special:Recentchangeslinked.
* Allow configuration of the default limit and days links with the variables $wgRCLinkLimits and $wgRCLinkDays.
* When selecting a limit and a days on the special pages, if you use a number not within the default list it will be added to the display.
** The selected limit and days is bolded. (This can be considered the first step for bug 3327)
* Optional other configuration option $wgRCFilterByAge, when enabled the list of days will be filtered so that only links within what $wgRCMaxAge says will be stored in the database will be displayed. Note that this is disabled by default because MediaWiki doesn't quite seam to trim out old entries as quickly as $wgRCMaxAge says it should be and some people appear to use the extra 30days links to display older entries even though $wgRCMaxAge is set to 7days on said wiki.

This should also solve bug 9257.
2008-05-17 16:08:34 +00:00
Daniel Friesen
12e47b7f7b Now that I think about it, we're going to have to set $wgSharedPrefix inside of Setup.php so that it can inherit from a $wgDBprefix inside of LocalSettings.php. 2008-05-07 06:05:26 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Tim Starling
fbfb509df5 * Introduced LBFactory -- an abstract class for configuring database load balancers and connecting to foreign DBs.
* Wrote two concrete implementations. LBFactory_Simple is for general installations. LBFactory_Multi will replace the runtime configuration used on Wikimedia and allow load-balanced connections to any DB. 
* Ported Special:Userrights, CentralAuth and OAI audit to the LBFactory system. 
* Added ForeignDBViaLBRepo, a file repository which uses LBFactory.
* Removed $wgLoadBalancer and $wgAlternateMaster
* Improved the query group concept to allow failover and lag control
* Improved getReaderIndex(), it will now try all servers before waiting, instead of waiting after each.
* Removed the $fail parameter to getConnection(), obsolete. 
* Removed the useless force() function. 
* Abstracted the replication position interface to allow for future non-MySQL support.
* Rearranged Database.php. Added a few debugging features. 
* Removed ancient benet-specific hack from waitForSlave.php
2008-03-30 09:48:15 +00:00
Tim Starling
b6dba5bcfd * Refactored the parser. See my huge entry in RELEASE-NOTES for details.
* Made it possible to configure the parser class being used, via $wgParserConf.
* Moved defines from the top of Parser.php to either class constants or Defines.php
* Added Parser_DiffTest, a differential parser class for regression testing
* Added Parser_OldPP, a parser class which operates like the parser before this commit. I made one breaking change: a bugfix to avoid losing whitespace when adding MWTEMPLATESECTION markers. 
* Made internal tidy work with PHP 5
* Added the ability to supply a hook for template fetching via ParserOptions. This is handy for testing.
* Updated parserTests.txt to account for the various breaking changes I made. Removed a few parser tests that no longer test for anything useful.
2007-11-20 10:55:08 +00:00
Brion Vibber
9be2c3676a Revert r26281 for the moment. Big patch, changes several existing practices. Will want some public testing and more review before taking it to trunk. 2007-10-01 19:50:25 +00:00
Aaron Schulz
4febfc77c2 *Clean up deletion of revisions and remove some gaps
*Allow blocking of users to hide names
*Implement revision deletion for images/deleted files/deleted revs
*Log deletion set off for now
*Add 'hidden' file dir
*Dissallow merging via undelete (which was inefficient and hard to reverse)
*Use restore points and diffs to special:undelete
*Add a special page to merge pages
*Get changeslist to use tables to avoid ugly formatting
*Add logs into RC for rebuildrecentchanges.php
*Add private logs
*List private logs at specialpages
*Tweak/add some deletion and merge messages
2007-10-01 19:38:28 +00:00
Brion Vibber
983e2d0ff7 * (bug 11355) Fix false positives in Safe Mode and other config detection
when boolean settings are disabled with 'Off' via php_admin_value/php_value
2007-09-17 19:44:15 +00:00
Tim Starling
ca76169bbe * Introduced FileRepoStatus -- result class for file repo operations.
* Ported file delete/restore to the filerepo framework. Some user-visible changes in error reporting. 
* $wgSaveDeletedFiles has been removed, the feature is now enabled unconditionally. Added a "deleted" directory for the default location, protected by a .htaccess file and the practical obscurity of content hashes.
* Fixed bug 2735: "Preview" shown in title bar for action=submit on special pages
* Removed "restore" links from the deletion log embedded in Special:Undelete
* Added img_sha1/oi_sha1 fields, preserved through upload, delete and restore
* Referenced the new oi_metadata etc. fields to preserve metadata across upload and delete/restore.
2007-07-22 14:45:12 +00:00
Brion Vibber
336cb46167 Tweaks to the AJAX license preview:
* Rename 'licence' to 'license' for consistency with the rest of the code.
* The preview code was assuming simple templates with no parameters and no subst:s, which failed on most of the selections used now on Commons. Now doing a full pre-save transform and parse on {{$license}}, just as will be done on the final save.
* When selecting 'None' again after another option, the preview pane is now cleared.

A fun 'todo' might be to also pass the currently selected filename, if any, to the license preview. Some of the templates in use attempt to use the current-page-name variables to include a self-link. At the moment using a hardcoded 'Image:Sample.jpg' for the virtual title on the preview rendering.
2007-07-18 19:19:50 +00:00