Commit graph

343 commits

Author SHA1 Message Date
Andrew Garrett
4332912e7e Include the block ID in blockedtext. This way, users can get themselves unblocked without revealing their IP addresses. 2006-12-13 05:44:46 +00:00
Brion Vibber
a7dfa5da71 * (bug 8148) Handle non-removable output buffers gracefully when cleaning
buffers for HTTP 304 responses, StreamFile, and Special:Export.
  Duplicated code merged into wfResetOutputBuffers() and wfClearOutputBuffers()
2006-12-11 01:51:21 +00:00
Tim Starling
439f59fb7b * Added redirect to section feature. Use it wisely.
* Added a configuration variable allowing the "break out of framesets" feature to be switched on and off. Off by default -- there's all sorts of flashy frameset gadgets around, outright abuse is more rare, especially for small default installs.
* Refactored URL fragment handling.
* Made Title::secureAndSplit() slightly more legible.
* Refactored makeGlobalVariablesScript() -- it's not particularly convenient or maintainable to pass all global variables through the template array. The array is there for BC, not flexibility.
2006-12-08 06:09:15 +00:00
Ilmari Karonen
e0b9a317ed Use Title::newMainPage() in various places instead of calling
wfMsgForContent( 'mainpage' ) directly.  Also add release notes
for previous commit.
2006-12-03 00:22:14 +00:00
Nick Jenkins
74ea267553 Prevent the following strict-standards warnings - i.e. when running with error_logging(E_ALL | E_STRICT); - which seems to disable the yucky "@" operator, as well as maxing out the pedantry of warnings. Nothing major found, just nice to be as explicit and as forward-compatible as possible.
* Strict Standards: Undefined index: switch in includes/Parser.php on line 3849
* Strict Standards: Undefined index: ref in includes/Parser.php on line 3818
* Strict Standards: Non-static method OutputPage::setEncodings() should not be called statically in index.php on line 11
* Strict Standards: Only variables should be assigned by reference in includes/Skin.php on line 888
* Strict Standards: Non-static method Title::newFromURL() should not be called statically in includes/SpecialContributions.php on line 178
* Strict Standards: Only variables should be assigned by reference in includes/GlobalFunctions.php on line 2054
* Strict Standards: Undefined index:  contributions-summary in languages/Language.php on line 764
* Strict Standards: Undefined index:  trackbackhtml in skins/MonoBook.php on line 86
* Strict Standards: Undefined index:  blockip in skins/MonoBook.php on line 204
* Strict Standards: Undefined index:  tagline in skins/MonoBook.php on line 261
* Strict Standards: Undefined index: uselang in includes/SkinTemplate.php on line 1159
* Strict Standards: Non-static method CoreParserFunctions::plural() cannot be called statically in includes/Parser.php on line 2902
* Strict Standards: Undefined offset:  0 in includes/SkinTemplate.php on line 196
* Strict Standards: Undefined index:  USE INDEX in includes/Database.php on line 1015
* Strict Standards: Undefined index:  image_tests in includes/Parser.php on line 3488
* Strict Standards: Undefined offset:  0 in includes/Parser.php on line 3507
* Strict Standards: Non-static method ChangesList::newFromUser() should not be called statically in includes/SpecialWatchlist.php on line 361
* Strict Standards: Non-static method RecentChange::newFromCurRow() should not be called statically in includes/SpecialWatchlist.php on line 367
* Strict Standards: is_a(): Deprecated. Please use the instanceof operator in includes/Exception.php on line 168
* Strict Standards: Non-static method LogPage::logName() should not be called statically in includes/SpecialContributions.php on line 325
* Strict Standards: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in maintenance/commandLine.inc on line 191
* Strict Standards: Undefined index:  meatball in languages/Language.php on line 234
* Strict Standards: rmdir(/tmp/mwParser-2108164586-images/thumb): Directory not empty in maintenance/parserTests.inc on line 605
* Cleaning out some new temp files left over by parserTests (there were one or two straggler dirs/files that would persist after the test run ended, due to new tests being added over time)
* Strict Standards: Non-static method CoreParserFunctions::special() cannot be called statically in includes/Parser.php on line 2902
* Strict Standards: Declaration of ListUsersPage::preprocessResults() should be compatible with that of QueryPage::preprocessResults() in includes/SpecialListusers.php on line 38
* Strict Standards: Only variables should be passed by reference in includes/SpecialBlockip.php on line 175
* Strict Standards: Skin::include_once(skins/Standard.deps.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in includes/Skin.php on line 121
* Strict Standards: Declaration of ApiMain::getResult() should be compatible with that of ApiBase::getResult() in includes/api/ApiMain.php on line 35
* Strict Standards: is_a(): Deprecated. Please use the instanceof operator in includes/WikiError.php on line 63
* Strict Standards: Non-static method WikiError::isError() should not be called statically in includes/SpecialImport.php on line 64
* Strict Standards: Non-static method ImportStreamSource::newFromInterwiki() should not be called statically in includes/SpecialImport.php on line 58<b
* Strict Standards: Only variables should be assigned by reference in includes/SpecialUndelete.php on line 501
* Strict Standards: Non-static method Image::newFromName() should not be called statically in thumb.php on line 56
* Strict Standards: Non-static method CoreParserFunctions::numberoffiles() cannot be called statically in includes/Parser.php on line 2902
* Strict Standards: Non-static method CoreParserFunctions::statisticsFunction() should not be called statically in includes/CoreParserFunctions.php on line 139
* Strict Standards: Non-static method CoreParserFunctions::isRaw() should not be called statically in includes/CoreParserFunctions.php on line 128
* Strict Standards: Non-static method CoreParserFunctions::grammar() cannot be called statically in includes/Parser.php on line 2902
* Strict Standards: Undefined offset:  1 in includes/SpecialMIMEsearch.php on line 130
* Strict Standards: Undefined index:  recentchangeslinked in skins/MonoBook.php on line 184
* Strict Standards: Declaration of DumpNotalkFilter::pass() should be compatible with that of DumpFilter::pass() in includes/Export.php on line 612
* Strict Standards: Declaration of DumpNamespaceFilter::pass() should be compatible with that of DumpFilter::pass() in includes/Export.php on line 665
* Strict Standards: Non-static method ImportStreamSource::newFromUpload() should not be called statically in includes/SpecialImport.php on line 46
* Strict Standards: Undefined offset:  5 in includes/Sanitizer.php on line 396
* Strict Standards: Undefined index:  wikidbUserName in includes/SpecialUserlogin.php on line 562
* Strict Standards: Only variables should be assigned by reference in includes/api/ApiQueryBase.php on line 95
* Strict Standards: Only variables should be assigned by reference in includes/api/ApiQueryBase.php on line 116
* Strict Standards: Only variables should be assigned by reference in includes/api/ApiQueryWatchlist.php on line 128
* Strict Standards: Undefined property:  stdClass::$rc_id in includes/api/ApiQueryBase.php on line 131
* Strict Standards: Undefined property:  stdClass::$rc_last_oldid in includes/api/ApiQueryBase.php on line 164
* Strict Standards: Undefined property:  stdClass::$rc_moved_to_ns in includes/api/ApiQueryBase.php on line 285
* Strict Standards: Undefined property:  stdClass::$rc_patrolled in includes/api/ApiQueryBase.php on line 176
* Strict Standards: Undefined index:  comment in includes/api/ApiFeedWatchlist.php on line 85
* Strict Standards: Undefined offset:  0 in includes/Skin.php on line 302
* Strict Standards: Non-static method User::SetupSession() should not be called statically in includes/SpecialUserlogin.php on line 15

... There are certain to be other things too, so this is not intended to be comprehensive, rather the above just stops most of the notifications I observed.
2006-11-29 05:45:03 +00:00
Tim Starling
b1cd1b035c Fixed inefficient use of array_keys() introduced by Nick in r17880. If this is setting off alarms, then fix the alarms. 2006-11-25 17:11:58 +00:00
Nick Jenkins
14c53b728f Code housekeeping stuff (and barring any stuff-ups on my behalf, there should be no changes in behaviour whatsoever after this) -
* removing some unused global declarations.
* removing or commenting out or adding comments for unused local vars.
* Adding one or two local var declarations.
* Declaring $matches array passed to preg_match() / preg_match_all() as array() before using [not required, just have a slight preference for the explicitness].
* remove one or two pass-by-reference function declarations where the value is not modified.
* Adding some braces to if-else blocks.
* In Parser.php, stripstrate is now an object rather than an array as per r17820, so we no longer need ask for a reference to it (as in "$x =& $this->mStripState;"), and in fact it's probably just simpler to get rid of $x altogether.
* Moving some preg regexes from "" quoting to '' quoting to stop static analyzer whinging about bad escape sequences.

... up to "LinksUpdate.php" in the includes/ directory.
2006-11-23 08:25:56 +00:00
Aryeh Gregor
a14bf886d0 Clean up last commit: OutputPage::formatTemplates + EditPage::formatTemplates -> Linker::formatTemplates. 2006-11-17 03:42:23 +00:00
Aryeh Gregor
4f08c1e655 (bug 7918) "Templates used on this page" is now shown for read-only pages. 2006-11-17 03:32:12 +00:00
Tim Starling
36ed0cd96c Reverting 17479/17480, breaks subclassing of Linker methods by skins. See my comment on bug 7405. 2006-11-08 07:12:03 +00:00
Nick Jenkins
fa239349f2 * (bug 7405) Make Linker methods static. Patch by Dan Li. 2006-11-08 05:21:15 +00:00
Aryeh Gregor
889ef5eab6 Add some documentation to OutputPage.php and specify public/private for most of its member functions (practically all public anyway). And replace one gratuitous use of strcmp with good old ===. 2006-11-07 05:37:31 +00:00
Brion Vibber
28dcfc2603 * (bug 1109) Correct fix for compressed 304 responses when additional output
buffers have been installed within the compression handler
2006-11-05 22:23:17 +00:00
Tim Starling
a3b490d2c4 * Made special page names case-insensitive and localisable. Care has been taken to maintain backwards compatibility.
* Used special page subpages in a few more places, instead of query parameters
2006-10-30 06:25:31 +00:00
Brion Vibber
3af8ce82b9 * Added global $wgStyleVersion to centralize bumping CSS and JS file versions
for cache-friendly style and script updating
2006-10-13 21:48:19 +00:00
Rotem Liss
8b3ab25dea (bug 6927) User login requested if not allowed to read 2006-09-06 17:19:43 +00:00
Rob Church
370e18703c * (bug 7144) Don't "return to main" from OutputPage::loginToUse() if the the user can't read the main page in the first place 2006-08-31 17:15:30 +00:00
Brion Vibber
293c3ceca2 * (bug 7109) Fix Atom feed version number in header links
http://bugzilla.wikimedia.org/attachment.cgi?id=2268&action=view
2006-08-29 11:43:56 +00:00
Tim Starling
da174ad7c4 Refactored parser output handling slightly, and added a hook function, to allow extensions to easily pass data through the parser cache. 2006-08-24 17:05:52 +00:00
Mark Bergsma
8167b89e08 (bug 7098) Add an option to disable/enable sending of HTTP ETag headers,
as it seems to result in broken behaviour in combination with Squid 2.6
(disabled by default).
2006-08-24 15:14:38 +00:00
Domas Mituzas
36518b8c7b replace header() with $wgRequest->response()->header() 2006-08-14 18:18:35 +00:00
Rotem Liss
f416088419 Displaying all the groups with the permission, not only the first defined one, in OutputPage::permissionRequired; patch by Simetrical ( http://bugzilla.wikimedia.org/attachment.cgi?id=2205&action=view ), with several changes. 2006-08-08 18:08:46 +00:00
Rob Church
4061d9dc43 * Consistent use of spacing
* Escape message text before echoing it as raw HTML
2006-08-08 16:45:22 +00:00
Rotem Liss
d0be50c4bc (bug 769) OutputPage::permissionRequired() should suggest groups with the needed permission 2006-08-08 16:33:10 +00:00
Rotem Liss
241676caf2 Removing the last references to OutputPage::sysopRequired() and OutputPage::developerRequired() (mostly using OutputPage::permissionRequired(), but in one case - reverting of a protected image - OutputPage::readOnlyPage is better), and throwing an exception when calling them; removing two useless comments. 2006-08-08 13:58:25 +00:00
Daniel Kinzler
6a64a7eaee Separated ajax search box features from core ajax framework.
Note that ajax search is currently broken (some issue with message parsing)
2006-07-30 10:53:22 +00:00
Tim Starling
43b2fb56b6 Merged localisation-work branch:
* Made lines from initialiseMessages() appear as list items during installation
* Moved the bulk of the localisation data from the Language*.php files to the Messages*.php files. Deleted most of the Languages*.php files.
* Introduced "stub global" framework to provide deferred initialisation of core modules. 
* Removed placeholder values for $wgTitle and $wgArticle, these variables will now be null during the initialisation process, until they are set by index.php or another entry point.
* Added DBA cache type, for BDB-style caches. 
* Removed custom date format functions, replacing them with a format string in the style of PHP's date(). Used string identifiers instead of integer identifiers, in both the language files and user preferences. Migration should be transparent in most cases.
* Simplified the initialisation API for LoadBalancer objects.
* Removed the broken altencoding feature.
* Moved default user options and toggles from Language to User. Language objects are still able to define default preference overrides and extra user toggles, via a slightly different interface.
* Don't include the date option in the parser cache rendering hash unless $wgUseDynamicDates is enabled.
* Merged LanguageUtf8 with Language. Removed LanguageUtf8.php. 
* Removed inclusion of language files from the bottom of Language.php. This is now consistently done from Language::factory(). 
* Add the name of the executing maintenance script to the debug log. Start the profiler during maintenance scripts.
* Added "serialized" directory, for storing precompiled data in serialized form.
2006-07-26 07:15:39 +00:00
Tim Starling
5fae7ad49b Made OutputPage::tryParserCache() use addParserOutputNoText(), this fixes {{DISPLAYTITLE:}} and any similar entity. Added accessor for the subtitle in ParserOutput. 2006-07-24 05:25:12 +00:00
Domas Mituzas
3d09e823c0 add profiling hooks at quite critical place (accounting parser usage by skin) 2006-07-16 08:16:58 +00:00
Domas Mituzas
16d11c1bdd add statistics hook for parser cache statistics... 2006-07-15 19:36:06 +00:00
Antoine Musso
65290ec3b6 Fix ugly hack. Assume PHP5 does a nice job with references. 2006-07-11 17:46:30 +00:00
Antoine Musso
ab8b197963 Some new strictness with PHP5 2006-07-11 14:03:17 +00:00
Brion Vibber
ffb37bdfff * Don't put empty-page message into view-source when page text is blank 2006-07-07 22:15:44 +00:00
Rob Church
a2c80fa4db (bug 4990) Show page source to blocked users on edits, or their modified version if blocked during an edit 2006-06-24 20:58:10 +00:00
Tim Starling
8752794cc4 Check for bad title in returnToMain() 2006-06-23 06:53:05 +00:00
Tim Starling
982637b93a Added check for newlines in redirects as a paranoia guard against header injection in PHP<5.1.2. Removed OutputPage::addHeader(), has been non-functioning for as long as I can remember. 2006-06-23 03:56:03 +00:00
Tim Starling
f464fa0e84 Saner handling of title objects in OutputPage::returnToMain() 2006-06-21 16:28:04 +00:00
Brion Vibber
6c6b3b8083 Temporarily revert 14847; makes incompatible changes to message strings. 2006-06-20 18:20:58 +00:00
Rotem Liss
1fb3d373a9 * Using the "returnto" in the login link in additional messages, and creating a function (Linker::loginLink) to create it.
* Removing "whitelistreadtitle" and "whitelistreadtext", which seem to be unused.
* Removing the self login link in the create account not allowed screen, as it is not useful.
* Fixing "loginreqlink" in Hebrew.
* Fixing various small bugs about these error pages.
2006-06-20 16:08:38 +00:00
Brion Vibber
74dbd01ed0 Clean up after r14751:
* No longer spews "uninitialized variable" notice all over output during category preview
* Don't alter global configuration variables when there's no reason to
Note that __NOGALLERY__ still isn't respected on preview (was this even tested?)
2006-06-13 18:35:11 +00:00
Magnus Manske
7f2155fa9e Bug 6031 (feature request for __NOGALLERY__ on category pages) fixed 2006-06-13 11:37:09 +00:00
Tim Starling
02547dac72 Removed most exit() calls from the MediaWiki core, by replacing them with either a throw or by classic error checking. OutputPage::fatalError() and similar functions are deprecated, use either OutputPage::showFatalError() to return control or throw new FatalError() to relinquish it. Backwards compatibility of all interfaces has been maintained, thus extensions should continue to work and can be ported at a later date. 2006-06-07 06:40:24 +00:00
Domas Mituzas
e2ae8925ff AutoLoad Math.php 2006-06-06 10:00:53 +00:00
Brion Vibber
0a26267688 Revert to r14512; domas introduced massive breakage with incomplete experimental changes. They will be recommitted when they work. :) 2006-06-01 08:19:02 +00:00
Domas Mituzas
bda0b8e104 Use AutoLoader to load classes:
* remove require_once() throughout whole code, yet left in few places
* move global functions in HttpUtils, ProxyTools, Credits to class methods
* php5 only: __autoload() now used, combined with class->file map and require()
* move initialization of $wgValidSkinNames to Skin::getSkinNames()
* few more changes that will surely break stuff.
2006-06-01 07:22:49 +00:00
Niklas Laxström
bd24bf4fb4 * Reverting BiDi changes because there were some problems left 2006-05-31 20:39:14 +00:00
Niklas Laxström
c59b619ff8 * (bug 6100) BiDi: different directionality for user interface and wiki content (core parts of the patch) 2006-05-31 15:19:40 +00:00
Brion Vibber
ce8edcc565 Fixes to input validation and output escaping for user preferences.
Inserting a newline into some improperly filtered option strings could be used to overwrite other pref values, bypassing their input validation. Any newlines now get filtered out at User::setOption as a final line of defence.
There were a few HTML injection bugs, but none appear to be exploitable, as prefs can only be set if you already control the account.
Bug found by gmaxwell.
2006-05-15 09:45:14 +00:00
Antoine Musso
74cb4a7d21 fname in debug statement 2006-05-12 22:45:52 +00:00
Antoine Musso
ba44ee48f9 function name in debug output for OutputPage::checkLastModified 2006-05-12 22:38:58 +00:00