Commit graph

361 commits

Author SHA1 Message Date
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Antoine Musso
b144fcb85d Rename constructors to __constructor 2007-01-20 13:34:31 +00:00
Aryeh Gregor
3ead3cb165 s/\r\n/\n/ 2007-01-15 04:13:12 +00:00
Tim Starling
10728de893 Fixed diff-related regression, tidy accidentally disabled 2007-01-14 17:37:29 +00:00
Andrew Garrett
a355a684c1 Various, 2007-01-12 09:10:30 +00:00
Andrew Garrett
ff67bbdda8 Various tweaks for last commit, including a merge of the functions to determine if an image/page is cascade-protected; message changes, et cetera 2007-01-12 08:37:07 +00:00
Andrew Garrett
1d95a6efa9 Display MULTIPLE culprit pages for cascading protection in the messages. Also improve performance by separating boolean 'is this page affected by a cascading protection' from array 'who are the culprits for this cascading protection' -- both are cached in member variables of the Title object. 2007-01-12 07:31:34 +00:00
Andrew Garrett
283621653b UI stuff for the cascading protection feature - warnings for sysops editing cascading protected pages (including which page the protection has come from), more useful errors for users (including which page the protection has come from), and a note at the top of the protect page when trying to unprotect a page affected by cascading protection to the effect of 'you can't affect the cascading protection here'. 2007-01-12 04:43:33 +00:00
Brion Vibber
c817e9826b remove intrusive debugging line added in r19111 2007-01-11 23:36:05 +00:00
Ilmari Karonen
d726e2d29c make default system messages show on "view source" 2007-01-11 04:13:11 +00:00
Andrew Garrett
b3a8d488a8 Merge from branches/werdna/restrictions-separation (forked at r18959): * Branch page_restrictions column out into its own table, also creating a 'cascading protection' feature, which automagically disallows edits to pages transcluded into a page protected with this new option. Various other code tidiness fixes and refactoring in the log messages of branches/werdna/restrictions-separation. REQUIRES DATABASE SCHEMA UPGRADE 2007-01-10 23:32:38 +00:00
Antoine Musso
f5020768d2 Implements #7667 : allow XHTML namespaces customization. Patch by Evan Miller 2007-01-07 22:31:07 +00:00
Aryeh Gregor
815a3de2bb Revert the conditional un-including of ajax.js from last commit after conversation with brion on IRC. Will someone think of the poor extensions! 2006-12-27 01:17:55 +00:00
Aryeh Gregor
750e7c1f88 RELEASE-NOTES for last commit, and don't load the AJAX framework if we don't need it 2006-12-27 00:22:34 +00:00
Aryeh Gregor
69ea9bcf9b (bug 7169) Use Ajax to watch/unwatch articles. Patch by Dan Li with some modification by me. 2006-12-26 23:53:34 +00:00
Rotem Liss
2f44de3a1a * Renaming the message 'protectedtext' to 'protectedpagetext', to prevent a duplicate display of the second paragraph due to the saved message.
* Update.
2006-12-18 18:28:33 +00:00
Rob Church
86ae8e1fa7 Er, that should be wfMsg()... 2006-12-18 18:26:57 +00:00
Rob Church
5568143318 * Don't show "you can view and copy the source of this page" message for pages which don't exist (and therefore have no source) 2006-12-18 18:17:37 +00:00
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