Commit graph

520 commits

Author SHA1 Message Date
Victor Vasiliev
ffe44db3e3 * Invalidate cache of pages that includes images via redirects on upload 2008-04-12 18:06:57 +00:00
Aaron Schulz
54f8710556 force index, per domas 2008-04-10 17:55:12 +00:00
Aaron Schulz
4ab60836ef Add __METHOD__ 2008-04-10 17:49:59 +00:00
Brion Vibber
784d10e4d3 Kill a bunch of '=&' references for LinkCache, ParserCache, and MimeMagic singletons.
This is an old PHP 4-ism; only needed today if you want to be able to replace the singleton with another object by using the reference as an lval. :)
Killing them because they annoy me.
2008-04-09 18:23:34 +00:00
Aaron Schulz
a4f2485c44 More performance tweaks 2008-04-09 16:32:14 +00:00
Aaron Schulz
aed9d4b912 ...really get rid of link color query spam 2008-04-09 05:21:00 +00:00
Aaron Schulz
e0244bc08c Some cleanup per brion 2008-04-08 21:00:02 +00:00
Aaron Schulz
f981d3597d Remove cruft from earlier testing 2008-04-08 20:38:51 +00:00
Aaron Schulz
71297a6934 Consistency 2008-04-08 20:36:27 +00:00
Aaron Schulz
a17762266f * Add redirect and size fields to title. Add accessors.
* Add newFromRow() function for Titles to optionally avoid some queries on accessor use
* Make linkbatch and some things that directly use linkcache select len/redirect fields along with the rest all in one query. This avoids query spam for link coloring.
2008-04-08 20:34:09 +00:00
Aryeh Gregor
b9a8ffba8b Actually, revert r32370. It might be a good idea, but it breaks the UserGetRights hook (more than it already is). Could use some more thought. 2008-03-24 13:47:16 +00:00
Aryeh Gregor
73c025c25c Moving some optimization code into User::isAllowed instead of higher up in Title.php. Also, adding a comment so that people maybe aren't going to randomly remove it without thinking what it does. ;) 2008-03-24 13:40:45 +00:00
Aryeh Gregor
d9cfc81174 There's no reason to put the shortcut above wfRunHooks(). If it's an extension that's the problem, fix the extension. 2008-03-23 15:35:05 +00:00
Domas Mituzas
4955b7b8fb I actually quite liked that shortcut. 2008-03-22 09:51:36 +00:00
Robert Leverington
c64647c119 Remove debugging code. 2008-03-22 09:27:43 +00:00
Robert Leverington
a61054f150 Partially reverting r29721, this causes a massive flaw in the userCan hook -- breaking a variety of extensions that rely on it -- due to the
circumvention of logic. Reccomend backport to 1.12 branch.
2008-03-22 09:14:20 +00:00
Brion Vibber
503daa7239 * (bug 6813) Don't break HTML validator when using trackbacks 2008-03-22 00:20:39 +00:00
Brion Vibber
deb2045611 * (bug 12294) Namespace class renamed to MWNamespace for PHP 5.3 compatibility
* PHP 5.3 compatibility fix for wfRunHooks() called with no parameters

An autoloaded 'Namespace' class alias is retained for compatibility with
extensions which haven't updated to the new class name... however they too
will break on PHP 5.3. Yay!
2008-03-21 23:13:34 +00:00
Huji
ab2b37135f (bug 13137) Bots to edit protected pages
For the record: A previous effort to fix this (r31247) failed (r31462)
2008-03-19 11:23:03 +00:00
Alexandre Emsenhuber
c9bbe3cb03 (bug 2084) Fixed incorrect regex to match redirects 2008-03-14 21:57:09 +00:00
Aaron Schulz
92b6da193a Allow leading whitespace in redirect matches (bug 13344) 2008-03-13 14:08:47 +00:00
Alexandre Emsenhuber
ef300f6adf * Removing some hardcoded 'edit' and 'move' restrict and replaced it $wgRestrictionTypes
* Withespaces fixes in Title.php
2008-03-04 21:27:23 +00:00
Brion Vibber
b7abfbc9f6 Revert r31505, r31510 (secureAndSplit hook).
This hook doesn't seem well thought out; a hook isn't given clean access to the various possible fields it's likely to want to manipulate, and generally feels a bit rushed.
2008-03-03 19:54:22 +00:00
Roan Kattouw
46df93d919 Tweaking r31505 so changing $dbkey actually changes something. 2008-03-03 16:38:16 +00:00
Roan Kattouw
33a913d27f (bug 13166) Adding TitleSecureAndSplit hook. Modified patch by Joshua Bacher 2008-03-03 16:22:36 +00:00
Alexandre Emsenhuber
910292e4f6 * Fix comment in Title::getUserPermissionsErrors() and Title::getUserPermissionsErrorsInternal(), missing $user parameter
* Remove unused global declaration of $wgUser in Title::getUserPermissionsErrors()
2008-03-02 21:51:58 +00:00
Huji
cf8891a819 Partially reverting r31247:
* With that, it was possible to transclude a page in a protected pag with with cascading option selected, thus making the transcluded page protected.. without having protect rights :(
* I'm keeping the editproected permission there in DefaultSettings.php, because it will be used in the "correct" solution to this bug.
* Thanks for ialex for pointing out what I just missed.
2008-03-02 19:26:59 +00:00
Roan Kattouw
30842f073d * (bug 13218) Fix inclusion of " character in hyperlinks
* Using preg_replace rather than ereg_replace in formatHTML() (faster according to php.net)
* Correcting grammatical error in Title::userIsWatching() description
2008-03-02 13:57:56 +00:00
Anders Wegge Jakobsen
3e83a7774b Make the category browser actually work 2008-02-28 08:14:49 +00:00
Rotem Liss
e98beb0f45 (bug 13132) Unable to unprotect pages protected with earlier versions of MediaWiki
* Replacing the fix for (bug 12716) Unprotecting a non-protected page leaves a log entry
2008-02-26 20:41:21 +00:00
Huji
737e2a926c (bug 13137) Bots to edit protected pages 2008-02-25 10:36:08 +00:00
Tim Starling
e995c7fecf Title::newMainPage(): don't give a fatal error if the message is broken 2008-02-13 06:13:03 +00:00
Brion Vibber
08176de1e1 * (bug 3269) Inaccessible titles ending in '/.' or '/..' now forbidden. 2008-02-12 22:45:10 +00:00
Rotem Liss
ec49c2a275 Basic compatibility between tables: When deleting the old redirect (when moving over redirect), deleting its links records and revisions. 2008-02-09 12:40:02 +00:00
Rotem Liss
57e4aef425 Fixing message cache updates for MediaWiki messages moves: article ID is now properly set in the Title objects while moving. Removing the direct use of LinkCache in favor of the Title::resetArticleID function. Also updating the cache of the old article. 2008-02-09 11:45:53 +00:00
Brion Vibber
cf9cd9dad3 Reverting r30413 for now.
'parentpagename' seems to duplicate 'basepagename'; why?
2008-02-04 19:53:21 +00:00
Misza13
b002ea6e2c Adding {{ROOTPAGENAME}} (and {{ROOTPAGENAMEE}}) variables for accessing the page's root name (i.e. everything up to the first "/").
Also adding {{PARENTPAGENAME}} as an alias for {{BASEPAGENAME}}.
2008-02-02 00:56:41 +00:00
Aryeh Gregor
355f9f200e Commit some junk: spacing, braces, parentheses, other stylistic stuff. 2008-01-24 01:59:35 +00:00
Roan Kattouw
404f6be543 Check both the old and the new title of course. What was I smoking? 2008-01-18 16:19:38 +00:00
Roan Kattouw
3eaf025051 Whoops, we should check for move *and* edit permissions. 2008-01-18 15:54:59 +00:00
Roan Kattouw
1f4ddb930d Core:
* Using getUserPermissionsErrors() rather than userCan() in Title::isValidMoveOperation()
* Removing blocked check from Article::doRollback(): Title::getUserPermissionsErrors() checks for that already

API:
* Refactoring ApiMove to use new messages system
* Adding more messages to ApiBase::$messageMap
* Removing unused parameter to 'notanarticle' in ApiDelete::execute()
2008-01-18 15:52:40 +00:00
Tim Starling
5eb44a869d Make Title::newFromIDs() work properly when given an empty array. 2008-01-17 12:33:35 +00:00
Brion Vibber
a15ed4bc6b * (bug 12567) Fix for misformatted read-only messages on edit, protect.
Also added proper read-only checks to several special pages.
  Have removed read-only checks from the general user permission framework
  since it doesn't belong there; user authorization is independent from
  the database's read-only state, and the way we check and present error
  conditions is necessarily different. Further, as a detail it was formatting
  the actual message incorrectly as an inline message when historically it's a
  big block message with tables and images and stuff.
2008-01-15 01:55:48 +00:00
Victor Vasiliev
6c07b63f61 Revert accidentally commited image moving stuff 2008-01-14 13:57:40 +00:00
Victor Vasiliev
afde502b54 * Introduce getUserPermissionsErrorsExpensive hook 2008-01-14 13:50:55 +00:00
Domas Mituzas
b96e0c7b92 * Shortcutted Title::userCanRead() for public wikis
* Moved redirects code in OutputPage before skins and ajax stuff, to handle likely scenario better
* Stripped off lots of fat (like... 30-50% of execution time) from Special:Randompage - mwahaha... ha... hahaha...
2008-01-14 10:23:48 +00:00
Huji
db7d75fba7 (bug 12608) (in continuation of r29719) Unifying the spelling of getDBkey() in the code. 2008-01-14 09:26:36 +00:00
Huji
2d8a62941c (bug 12608) Unifying the spelling of getDBkey() in the code. 2008-01-14 09:13:04 +00:00
Aryeh Gregor
131614ebe5 Tweak tweaks. 2008-01-13 22:26:08 +00:00
Aryeh Gregor
b3cff936fc Random small fixes: formatting/whitespace, comments, fix inexplicably misleading profiling name in getUserPermissionsErrorsInternal. 2008-01-13 22:23:36 +00:00