Commit graph

46 commits

Author SHA1 Message Date
Brion Vibber
f92d1f7588 Move page tweaks:
* Allow [[0]] to be renamed
* Fix the $wgRawHtml check so it actually works
* (bug 776) Old title as default for new title when moving pages [modified patch from guanaco]
2004-10-26 03:51:59 +00:00
River Tarnell
69ba56aa9e fix xss attack if wgRawHtml is enabled 2004-10-14 07:29:38 +00:00
Wil Mahan
da2c08db84 Move length check to secureAndSplit(), so it is always used.
Also, don't query the DB for the max length, but use a
hardcoded 255.
2004-10-05 00:17:25 +00:00
River Tarnell
6f49fc4e9d forwardport better fix (thanks brion) 2004-09-14 05:35:34 +00:00
River Tarnell
650a5c5ac9 merge # moving fix from 1.3 2004-09-14 04:57:15 +00:00
Antoine Musso
ba2afcd9fa Split files and classes in different packages for phpdocumentor. I probably changed some double quotes to single and used function foo () { shema 2004-09-03 23:00:01 +00:00
Antoine Musso
90155b8a97 Changing comments layout preparing for generated documentation with Phpdocumentor 2004-09-02 23:28:24 +00:00
Tim Starling
fb9684cd96 fix of bug added in 1.37 2004-08-15 07:43:37 +00:00
Arne Heizmann
5424706764 English 2004-08-14 22:21:30 +00:00
Antoine Musso
8628ce8310 Fix sourceforge bug #850012 : Page move doesn't update article count
It works on my local wiki unfortunatly I have neither memcached nor
squid so the code might need some tweaking.
2004-08-14 20:09:47 +00:00
Antoine Musso
d6a9faa1f4 Code standardization:
* if($foo == 1) instead of 1 == $foo
* double to single quote translations
2004-08-14 19:52:18 +00:00
Magnus Manske
605f0d728f This should fix bug 975072 (Move page doesn't update categories page) 2004-08-06 16:09:45 +00:00
Tim Starling
f32bf27848 $_REQUEST -> $wgRequest 2004-07-24 10:56:32 +00:00
Tim Starling
451df485da restrictions on Special:Movepage 2004-07-10 01:28:25 +00:00
Tim Starling
8f22cb45b1 include_once -> require_once 2004-05-07 13:43:10 +00:00
Brion Vibber
11bf1cd3b5 Disable renaming of category pages (this causes a number of problems
currently which make it a dubious thing to try to do). Fix HTML for
error display on move. Add error class to style sheets. Fix error call
in protect. Remove dupe function that was moved from skin to output.
2004-04-25 01:01:38 +00:00
Brion Vibber
0d8c8ffee1 XHTML fixes 2004-04-03 11:31:05 +00:00
Tim Starling
50ab7cefd0 page-move code moved to Title and disentangled from the user interface 2004-03-23 10:22:49 +00:00
Tim Starling
2ca258fd03 * Changed inclusion syntax to allow e.g. {{stub}}
* Split MediaWiki namespace into MediaWiki and Template (requires changes to all language files)
* Purge links to on edit of Template namespace
* General refactoring of purging and cache invalidation code
2004-03-20 15:03:26 +00:00
Antoine Musso
6d372793c0 Fix sourceforge bug 600079
Allow to move a talk page if an article is moved across different namespace (unless the new namespace is itself a talk page)
2004-03-14 03:02:42 +00:00
Brion Vibber
59c6e92429 Some changes to the link tables. They now all use a key on cur_id for the *_from column instead of strings, and have a unique index to force prevent any duplicate entries. There's not yet a clean step in the update script, so just clear out your links tables (patch-linktables.sql) and rebuild them with refreshLinks.php.
This saves trouble in a number of places where we can now do joins with the link tables to get other info (such as cur_is_redirect!) as well as the name, and fewer bits need to be juggled on page renaming, as outgoing links no longer have to be changed (cur_id remains the same when a page is renamed).

rebuildLinks.inc and some of the tools in the 'maintenance page' still need to be updated to work with the new setup. (Special:Maintenance needs a *lot* of cleanup in general. It's kind of a catch-all of vaguely defined features which suck performance like a hydroelectric dam.)

Also I've slipped in some extra debug code. And, I think 'indexes.sql' is a big waste of time and should all be moved into tables.sql. Building indexes separately doesn't help on InnoDB and won't do anything on MyISAM either if you're just going to replace the table after it's built with an imported one from a dump which creates it with indexes.
2004-03-11 09:06:13 +00:00
Brion Vibber
f680d2a574 Consolidate with Title::getInternalURL() a bit 2004-03-08 09:51:11 +00:00
Brion Vibber
014093acc4 More globals and uninitialized variables fixes. Added WebRequest ($wgRequest)
object to encapsulate the handling of get/post variables:

The following grab something out of $_REQUEST. The first parameter is the
variable name and is required. The second is an optional default value:

  $wgRequest->getVal() - any type, returns NULL if no default given
  $wgRequest->getInt() - forced integer, 0 default
  $wgRequest->getText() - runs through $wgLang->recodeInput()
  $wgRequest->getBool() - return true/false
  $wgRequest->getCheck() - returns true if the var is set, even if to ""

$wgRequest strips slashes at initialization if necessary.

Also in this fine object:
  $wgRequest->wasPosted() - returns false if this wasn't a real form post,
    so we can protect against faked submissions in get urls.

There's still plenty of work to do, not everything uses the new functions
yet. To test the strict mode, do define('DEBUG_GLOBALS', 1);
2004-03-08 09:09:35 +00:00
Mr. E23
9b45e1ee08 Fixed parse error 2004-03-07 17:27:00 +00:00
Brion Vibber
b59ce22943 Replace the random boolean parameters on Title::getURL() with a set of
practical, clear methods:
  Title::getLocalURL() - "/wiki/index.php/Foobar" or "/wiki/index.php?title=Foobar&action=edit"
  Title::getFullUrl() - ditto with $wgServer on the front
  Title::getInternalUrl() - ditto with $wgInternalServer on the front (for some squid-related functions)
  Title::escapeLocalUrl() - local URL escaped for HTML output
  Title::escapeFullUrl() - full URL escaped for HTML output

All take an optional query parameter.

Title::getURL(), wfFullUrl() and wfFullUrlE() are now officially
deprecated and will result in instant death. wfLocalUrl() and wfLocalUrlE()
will be killed shortly; they are still used in the language files.
2004-03-07 07:26:56 +00:00
Tim Starling
840dee3ad4 * Fixed magic quotes in $_REQUEST, in Setup.php
* Converted many instances of globals from the query to $_REQUEST
* Renamed near-useless Title::getURL() to Title::getPartialURL()
* Created new Title::getURL(), to replace wfLocalUrl, wfLocalUrlE, wfFullUrl and wfFullUrlE. Replaced most instances throughout the code
* In Parser.php, generalised stripping of <nowiki>, <pre> and <math> to allow more general use such as nesting
* Moved body of Article::preSaveTransform to Parser.php
* Put lots of comments in Title.php
2004-03-06 01:49:16 +00:00
Brion Vibber
b8a9a85bc1 Fix for #883774 inverse_timestamp not updated when overwriting an old redirect on move. 2004-03-04 08:26:17 +00:00
Brion Vibber
0332f4c598 Fix for compatibility with short_open_tag = Off 2004-02-18 02:15:00 +00:00
Gabriel Wicke
ef98e54686 Squid branch merge. Calls to purge functions in Article.php and special pages. 2004-02-02 01:40:03 +00:00
Tim Starling
c5e8241dc0 Bug fix: moving both normal page and talk page within a non-article namespace 2004-01-26 14:22:03 +00:00
Tim Starling
3c96949682 * Recent Changes improvements: object oriented back end, move page annotation and (untested) message queue feed.
* Misc. bugs fixed in DatabaseFunctions.php and Skin.php.
* install-utils, install and update utilise Database objects instead of handling their own connections
* schema change for RC improvement -- added rc_type, rc_moved_to_title and rc_moved_to_ns
2004-01-17 05:49:39 +00:00
Mr. E23
f55ee65a08 Added hooks for article create/delete/edit events and moved linkscc calls there 2004-01-05 23:32:39 +00:00
Mr. E23
bd7256aede Moved linkscc SQL details into LinkCache for cleaner code. Also cleaned up LinkCache a bit. 2004-01-05 20:55:45 +00:00
Tim Starling
036ff960ce Improvements in MediaWiki namespace handling, enhanced rollback 2003-12-14 14:29:35 +00:00
Brion Vibber
a1106db8ac Update timestamp of redirect when renaming over a redirect; add some comments 2003-12-05 04:35:23 +00:00
Mr. E23
5179254ac6 Fixed so that move to a new page causes linkscc to clear cache for pages that link to the new page, making sure repaired broken links are shown correctly. 2003-11-28 10:12:27 +00:00
Tim Starling
395d65d43c Errant brace removed 2003-11-15 13:45:25 +00:00
Brion Vibber
077ccb298c Use wfMsg()'s parameters 2003-11-15 13:41:26 +00:00
Tim Starling
286be59ed5 Imported latest features from the stable branch 2003-11-12 13:07:08 +00:00
Tim Starling
46787701ce Nov. branch merge. Various features backported from stable, various bug fixes. 2003-11-09 11:45:12 +00:00
Brion Vibber
2442fa30e2 Fix move page / linkcache / memcached problem 2003-11-04 08:59:28 +00:00
Tim Starling
9b28aa9905 changing wfQuery to allow replication 2003-09-20 02:21:40 +00:00
Brion Vibber
6dff569b09 Consolidate a bit of the link update code from movepage into linksupdate
(specifically, turning brokenlinks on a new page into live links), which
should also fix the old code not touching the cache timestamps for pages
linking to the 'new' title after a move.
2003-07-05 08:12:04 +00:00
Brion Vibber
75ec13ba75 Fix minor bug that didn't properly touch the new page title when renaming, which could lead to the 'there is no text' message showing 2003-07-05 07:35:28 +00:00
Brion Vibber
7ac5e9e132 Fix bug that rejected renames to one-character titles 2003-05-31 20:22:44 +00:00
Lee Daniel Crocker
d82c14fb4f Initial revision 2003-04-14 23:10:40 +00:00