Commit graph

518 commits

Author SHA1 Message Date
Ryan Schmidt
82d9b72bbd * integrating UniversalEditButton extension into core (enabled by default, set $wgUniversalEditButton = false; in LocalSettings to disable) 2008-10-10 01:15:11 +00:00
Andrew Garrett
d71a1a4b48 (bug 15301) Fix up use of actions in display for permissions errors. 2008-10-06 09:16:20 +00:00
X!
4b2495dda3 (bug 15617)
$wgFeedClassesOutputPage::getHeadLinks() respects $wgFeedClasses, instead of hardcoding rss and atom. 
Patch by Juliano F. Ravasi.
2008-09-16 03:58:18 +00:00
Brion Vibber
5b5f7b30b3 Revert r40837, r40839, r40840 (bug 332 - broken UTF-8)
Char-by-char scan of all output will perform very poorly and fails to address the root problem of bad internal treatment of strings.
2008-09-15 17:51:53 +00:00
Fran Rogers
a7c140b533 Addendum to r40837: only validate/clean the body text, as we can assume the rest of the skin is valid. 2008-09-15 01:27:22 +00:00
Fran Rogers
ad5f1acdb3 Fix for bug #332 - all UTF-8 output is now cleaned of invalid forms as defined by RFC 3629. All output from MediaWiki should now be valid UTF-8 in all circumstances. 2008-09-15 00:42:17 +00:00
Alexandre Emsenhuber
518f7e58b2 and pass the reason too *stab* 2008-09-12 22:24:15 +00:00
Alexandre Emsenhuber
749a722e71 $this is better that $wgOut :P 2008-09-12 22:22:32 +00:00
Chad Horohoe
eaa402d399 Needs mw- prefix. 2008-09-12 22:16:14 +00:00
Chad Horohoe
b7353a746f Add a unique identifier for read-only pages. 2008-09-12 22:00:57 +00:00
Tim Starling
0ff36b8d71 * Generalised OutputPage::checkLastModified() to allow it to easily handle more than three types of modified timestamp. Added OutputPageCheckLastModified hook.
* Flattened out the structure of that function with early returns, to avoid ugly deep nesting.
2008-08-29 08:40:13 +00:00
Brion Vibber
e394f6a2d8 Quick hack to fix the broken hack noted in bug 15301
Use of:
			$action_desc[0] = strtolower($action_desc[0]);
is horrible wrong for a few reasons:

1) The first-byte match fails for all non-ASCII characters -- use lcfirst()!
2) System strtolower() or lcfirst() may not work for UTF-8 or lang-specific issues properly; use $wgLang->lcfirst()
3) You shouldn't be forcing things to lowercase here anyway, you can't know it's correct gramattically.

This whole message output should be redone cleanly; either all the rights info messages should be designed to work in an inline list sentence, or they should be formatted as stand-alone text strings using a <ul> or something.
2008-08-26 18:51:27 +00:00
Chad Horohoe
aa3cfbb54d Remove unused global. 2008-08-22 02:01:31 +00:00
Alexandre Emsenhuber
177b1e264a Tweaks for skins:
* Moved SkinTemplate::addStyle() and related stuff to OutputPage so that it can be used non-SkinTemplate skins and avoid duplication with the actual OutputPage::addStyle() (the two functions have the same format).
* Non-SkinTemplate skins now also load their CSS with <link> tags instead of @import.
* Moved SkinTemplate::setupUserCss() to Skin.
* Merged action=raw&gen=(js|css) for SkinTemplate and non-SkinTemplate skins, renamed functions to Skin::generateUserJs() and Skin::generateUserStyleSheet() and dropped a lot of cascading call which is a bit incomprehensible.
2008-08-21 14:09:57 +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
Aaron Schulz
4dbd311aec Add prependHTML() for extensions to avoid direct field calls 2008-08-11 14:20:37 +00:00
Aaron Schulz
196a9856e4 Add getRevisionId() 2008-08-11 13:23:45 +00:00
Aaron Schulz
b80edb5f27 Another go at extension CSS order 2008-08-10 07:14:08 +00:00
Brion Vibber
5c5195845f Cleanup to r38831 -- don't check _just_ 'rss' and 'atom', take anything. :) 2008-08-08 21:02:52 +00:00
SQL
cfb4c0cf80 Fix bug 15016 - 'Templates used on this page' inconsistent between editing and 'view source'. Implemented it in the same basic way that it's implemented in EditPage.php 2008-08-08 12:23:17 +00:00
Chad Horohoe
c84e9ad4a8 Allow users to override the default site feed. (bug 15040) 2008-08-08 01:41:14 +00:00
Chad Horohoe
ef51f59355 Remove a few unused globals. 2008-08-05 17:48:24 +00:00
Brion Vibber
d676ceaa91 Cleanup to r38608 ("Refactor badaccess-groupX and friends to use User::getGroupsWithPermission().")
* Remove some code duplication
* Fix some errors and plural failures in OutputPage::permissionRequired()
* Make the badaccess messages consistently wikitext now; in last rev they were output in different ways in each usage
2008-08-05 05:32:30 +00:00
Chad Horohoe
01e45b5523 Refactor badaccess-groupX and friends to use User::getGroupsWithPermission().
* Should be a bit cleaner, and remove those ugly ugly switch() statements.
* Two messages are all that's needed here. Badaccess-group0, a generic "Permission denied" when no group is allowed access; and badaccess-groups which takes two parameters of $1 (groups required for access) and $2 (number of group matches, used for {{PLURAL:}}ing the message).
2008-08-05 02:37:28 +00:00
Alexandre Emsenhuber
a07623a49f Remove call to Linker::postParseLinkColour() which is useless and deprecated 2008-08-01 09:22:39 +00:00
Chad Horohoe
acc5f88762 Remove unused $wgServer global. 2008-07-30 03:05:23 +00:00
Aryeh Gregor
918d0a78c5 Move some member variable initialization to the declarations and out of constructors. This is better style and less error-prone: OutputPage::$mIsPrintable was first being set to true and then to false in the constructor, and $mAllowUserJs and $mLinkColours are missing defaults entirely. Also, Tim said there's some lazy-loading or shared memory or something if it's done this way, so it might be a performance boost. 2008-07-25 01:27:51 +00:00
Aryeh Gregor
386fb2ba9c Instead of last commit, use $wgExemptFromUserRobotsControl to control __INDEX__/__NOINDEX__. This defaults to null, which means $wgContentNamespaces. Pages whose namespaces are in the array will be unaffected by __INDEX__/__NOINDEX__. This will prevent serious vandalism, so the feature is again enabled by default (with content namespaces exempted).
As was pointed out, it's probably better anyway that the vandal noindex a page and have nothing turn up in searches if the search engine arrives at that exact time, than to have the vandal replace the page with "ARTICLE SUBJECT IS A POOPY-HEAD" and have that turn up in searches if the search engine arrives at that exact time.  :)  At any rate, this should solve the issue.
2008-07-24 18:02:20 +00:00
Aryeh Gregor
dfee92b5e8 Implement $wgAllowUserRobotsControl to control whether the new __INDEX__ and __NOINDEX__ magic words work. False by default until this is thought out a little better: there are major possibilities for vandalism here. 2008-07-24 17:40:16 +00:00
Aryeh Gregor
9bf022910a (bug 8068) New __INDEX__ and __NOINDEX__ magic words allow control of search engine indexing on a per-article basis. Remarks:
* Currently __INDEX__ will override __NOINDEX__ regardless of their relative positions, due to the way things are written.  Instead, the last one on the page should win.  This should be pretty easy to fix.
* __INDEX__ and __NOINDEX__ override $wgArticleRobotPolicies.  This is almost certainly incorrect, but it's not totally obvious how to fix it, because of the way the code is structured.  Probably not a big deal, but should probably be fixed at some point.
* Anyone can add and remove the magic words, and there's no config option to disable them.  It's not obvious whether this is okay or not.  It would be a one-line change to OutputPage.php to have a config option to ignore the magic words, maybe per-namespace or who knows what.
2008-07-23 19:49:46 +00:00
Aryeh Gregor
650be91fb8 Refactor a bit preparatory to fixing bug 8068: rewrite the robot policy stuff in OutputPage to allow index and follow policy to be set separately. Also now validates input to setRobotPolicy(). And renamed setRobotpolicy to setRobotPolicy, too. If anyone was accessing $mRobotpolicy directly they're out of luck, though. 2008-07-23 19:05:43 +00:00
Brion Vibber
f78f3ee864 Attempt to clean up some of the insanity in creating meta and link tags in the headers.
Values are now escaped consistently, which should be a good thing. :)
2008-07-02 22:52:22 +00:00
Daniel Kinzler
4ae25d6b4c Add hook to replace logic for generating category links. May be used by CategoryTree one day. 2008-07-02 20:02:51 +00:00
Chad Horohoe
b9a18b145f (bug 14687) OutputPage::addStyle() now adds type="text/css" like it should. 2008-06-30 20:00:06 +00:00
Aryeh Gregor
e57e74f071 Put this is getHeadLinks() instead to reduce code duplication. Also, update RELEASE-NOTES. 2008-06-30 01:34:07 +00:00
Danny B
720de799f9 * adding <meta name="generator" content="MediaWiki $wgVersion" /> 2008-06-30 01:26:02 +00:00
Alexandre Emsenhuber
24c5cda521 fix for r36212: take care of the namespace too 2008-06-13 18:52:38 +00:00
Chad Horohoe
d78c937642 (bug 14500) - The sitefeed (RC) shouldn't show up on Recentchanges itself. 2008-06-12 00:51:04 +00:00
Aaron Schulz
5b89d78695 Use nice wfArrayMerge(), rather than piece of shit PHP function that fucks up the result. I was wondering wtf was going on... 2008-06-10 01:25:41 +00:00
Aaron Schulz
299229f4ea * Don't log patrol marking when not relevant
* Use array_merge() for template ID array merge
* Some random refactoring
2008-06-10 00:51:40 +00:00
Andrew Garrett
bc23aede55 Core changes for GlobalBlocking and TorBlock extensions, plus some core refactoring work:
* Instead of saying 'do that' in a permissions error, actually list what the action is (drawn from the right-$1 messages). This isn't perfect - it says you don't have permission to edit pages when 
you can't edit a single page, but it's better than 'do that'.
* Refactor out some code from various block files into Block::formatExpiry and Block::parseExpiryInput.
* Don't display 'you cannot edit special pages' when you're trying to execute, or create an account, or something like that.
* New AbortAutoblock hook (for use in TorBlock extension), which allows extensions to cancel autoblocks.
2008-05-23 10:34:11 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Brion Vibber
610b660d8e Revert r34559 and fix r34542 -- include rightclickedit.js for 'edit on right click' pref, must have forgot to finish it up before commit :D 2008-05-12 23:37:51 +00:00
Brion Vibber
2572507721 * add OutputPage::addScriptFile() for easier adding of JS files, similar to OutputPage::addStyle()
* broke Special:Allmessages-specific JS out of wikibits.js to allmessages.js
2008-05-09 20:18:35 +00:00
Aaron Schulz
31a7332a00 * Add method to append subtitle
* Tweak message
2008-05-03 03:52:33 +00:00
Niklas Laxström
404e0c1a5e * Parse messages in correct language, so plurals and grammar might even work correctly
* Deprecated one unneeded parameter in one message
2008-04-18 06:31:37 +00:00
Alexandre Emsenhuber
5ab197c281 * added call to wfDeprecated() to methods marked as deprecated
* $fname -> __METHOD__
* removed unused declaration of $wgOut in OutputPage::rateLimited()
2008-04-16 13:46:16 +00:00
Robert Stojnić
d6fd8e7c13 Ajax suggestions:
* check in a new ajax suggestion engine (mwsuggest.js) which uses 
  OpenSearch to fetch results (by default via API), this should
  deprecated the old ajaxsearch thingy
* extend PrefixSearchBackend hook to accept multiple namespaces for
  future lucene use (default implementation however can still 
  process only one)
* Added to preferences, also a feature to turn it on/off for every 
  input (disabled atm until I work out browser issues completely)
* WMF wikis probably won't be using API to fetch results, but a 
  custom php wrapper that just forwards the request to appropriate
  lucene daemon, added support for that

SpecialSearch:
* moved stuff out of SpecialSearch to SearchEngine, like snippet
  highlighting and such
* support for additional interwiki results, e.g. title matches
  from other projects shown in a separate box on the right
* todo: interwiki box doesn't have standard prev/next links to 
  avoid clutter and unintuitive interface
* support for related articles
2008-04-15 23:06:28 +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
7f52b43aa8 Add CentralAuth cookies to the XVO header 2008-04-10 08:42:36 +00:00