Commit graph

536 commits

Author SHA1 Message Date
Bryan Tong Minh
b3aaa8e4a6 (bug 14093) Do 'sysop' => 'protect' magic in Title::isValidMoveOperation 2008-05-12 14:12:51 +00:00
Aaron Schulz
dbad34cb69 Tweak doc 2008-05-11 20:24:15 +00:00
Aaron Schulz
75cd7536b0 GAID_FOR_UPDATE 2008-05-11 20:22:49 +00:00
Aaron Schulz
cb658cdcc3 Add $flags 2008-05-10 23:31:52 +00:00
Niklas Laxström
fedb357696 * Normalise also special page names (in addition to namespace) 2008-05-10 15:14:39 +00:00
Brion Vibber
7df3adb9ae Revert r34541 for the moment pending further review & discussion...
There's some kind of crazy magic_quotes stuff in here which screams RED ALERT, something's weird going on! :)
2008-05-09 23:52:04 +00:00
Daniel Friesen
4ee7da5b09 Fixing up a variety of GlobalFunctions and also improving queries in Titke.php.
* getFullURL and getLocalUrl now accept arrays and objects as valid input.
* Use wfAppendQuery in getLocalUrl to match up with getFullURL.
* wfArrayToCgi is now a alias to wfBuildQuery (Parameters are in the OPPOSITE order so wfBuildQuery takes defaults as second param and wfArrayToCgi takes them as first parameter like it always did)
* New function wfBuildQuery.
** The code moved here from what once was wfArrayToCgi has been changed from a set of plain loops to a wrapper around http_build_query so that complex data is handled correctly.
** We now support strings and objects as input, and we even parse strings when necessary to merge queries.
* New function wfForeignWikiID to pair with wfWikiID like wfForeignMemcKey. The foreign id can take 2 parameters, if omitted it falls back to the shared db, then to the local db if not set.
* wfMemcKey and wfForeignMemcKey now call the respective wf(Foreign)WikiID function, this simplifies the functions, and avoids code duplication making sure things always match even if for some strange reason it's changed.

I'll likely be using the forign functions later to improve the use of a shared interwiki map to avoid redundant caches.

I could always make the local MemcKey and WikiID functions depend on the foreign ones in a sane way
2008-05-09 23:36:21 +00:00
Brion Vibber
1d55adfb4c * (bug 12644) Template list on edit page now sorted on preview
On initial edit, items were sorted by virtue of being pulled from a sorted table, but on preview they were displayed in rough order of use in parsing, which is a bit less legible.

Added Title::compare() static comparator available as a callback for usort(), using it in Linker::formatTemplates().
2008-05-08 23:16:36 +00:00
Aaron Schulz
8289433a6a Add $flags, document 2008-05-06 14:54:17 +00:00
Bryan Tong Minh
cfb420dd40 checkExtesnion => checkExtension 2008-05-03 13:39:10 +00:00
Victor Vasiliev
8d85629c58 * (bug 709) Cannot rename/move images and other media files.
Currently in experimental mode, use $wgAllowImageMoving to enable it.
Known issues:
* Doesn't work with rev_deleted
* May also have some security and caching issues.
2008-05-03 13:09:34 +00:00
Alexandre Emsenhuber
9b748e7588 Only load old page_restrictions field if $oldFashionedRestrictions is really null, not also if it's a empty string, wich is passed from Article::loadPageData() in most of cases. This avoid to load twice that field from the database. Thank you, PHP. 2008-04-29 19:18:58 +00:00
Aaron Schulz
54510d8bd5 Missing out call 2008-04-28 17:30:07 +00:00
Aaron Schulz
9d4e81a840 Better variable name 2008-04-21 04:40:41 +00:00
Aaron Schulz
e7ef014f9a Lets include the prefix folks 2008-04-21 00:53:13 +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
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