Commit graph

137 commits

Author SHA1 Message Date
Brion Vibber
4a56161e24 Add $wgCapitalLinks option; if set to false, titles won't be forced to
have an initial capital. This isn't recommended in general, as it will
make "[[Asteroid]]s are..." and "... like [[asteroid]]s." point to
different pages.

It is meant mainly for languages which use the latin alphabet but don't
capitalize at sentence start (mainly conlangs) or for special purposes
where this is needed. This can *break links* and should not be changed
on an existing wiki without careful attention.
2004-04-05 04:02:04 +00:00
Tim Starling
e9aa758d7a Removed dependence on register_globals from everything except the special pages. Fixed miscellaneous bugs. 2004-03-29 14:48:07 +00:00
Tim Starling
b1a944009d Modification to moveCustomMessages.php to create redirects, related modifications in other files 2004-03-23 12:05:40 +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
ed5ebf474f Fix source forge bug 694639
Thanks to gwicke on irc for teaching me how to stop + or * to be greedy (ie replace by +? and *?).

Space around column are striped from link but the link title still show the spaces.
2004-03-16 15:57:42 +00:00
Antoine Musso
73246ffd35 Fix sourceforge bug 855544
Disallow the creation of articles with titles wich are bigger than the size of cur_title in the database.  Please review this code, it is working but I am not sure if it is safe :)
2004-03-14 05:28:46 +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
Brion Vibber
51f738ea9a More unitialized variable cleanup && 'pure' register_globals cleanup...
Added wfDebugDieBacktrace() function to help in pinpointing problems by
showing a function call backtrace along with a friendly die message.
2004-03-08 02:50:04 +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
Tim Starling
50e270939e marked a static function as such 2004-02-29 08:48:47 +00:00
Tim Starling
01d2ee5671 rejecting "." and ".." -- conflict with directories when rewrite rules are used 2004-02-24 00:09:03 +00:00
Brion Vibber
0332f4c598 Fix for compatibility with short_open_tag = Off 2004-02-18 02:15:00 +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
d3abb423f8 Compatibility with alternative memcached client. Minor performance enhancement. 2004-01-12 06:21:09 +00:00
Brion Vibber
aea5319635 Hopefully slightly saner handling of character entities in links; now will
use UTF-8 characters on a UTF-8 wiki for the Latin-1 named entities; this
prevents corrupt in-wiki links for cases such as [[Wei&szlig; kreuz]] or
[[Br&ucirc;ker:Foo]]. There is a small chance this will harm interwiki
links to latin-1 wikis that don't accept UTF-8 incoming URLs, but on
balance this is a lesser harm. Raw bytes in such links can still be used
(%XX) if need be.

This shouldn't change behavior on Latin-1 wikis.
2003-12-18 11:31:03 +00:00
Brion Vibber
ebed729266 Put the illegal char check down below again, to fix breakage to # links 2003-12-11 18:39:03 +00:00
Brion Vibber
20ea17594b Fix for #837969. Strict rejection of invalid characters in titles is good practice, and should keep away these problems with broken inaccessible pages created by page moves 2003-12-11 12:43:13 +00:00
Brion Vibber
7d01e5bb97 Fix failed imagelinks updates 2003-11-26 00:12:29 +00:00
Mr. E23
5432bc1d9e Moved out suprisingly costly get_html_translation_table()\nAdded simple cache for interwiki when memcache isn't available 2003-11-24 19:41:16 +00:00
Brion Vibber
980c966857 contribs talk link; RFE 845599 2003-11-20 06:57:00 +00:00
Brion Vibber
e3a4c27c75 Finish removing HTTP_SERVER_VARS in favor of _SERVER; fix notifications for the paranoid 2003-11-18 02:39:38 +00:00
Brion Vibber
6f026d8f86 tweak tweak 2003-11-18 02:25:28 +00:00
Tim Starling
46787701ce Nov. branch merge. Various features backported from stable, various bug fixes. 2003-11-09 11:45:12 +00:00
Tim Starling
21b8a266b7 Fixed silly bug that I just introduced. "0" == false 2003-10-23 03:45:33 +00:00
Tim Starling
b64fae6383 Optimisation 2003-10-22 23:56:49 +00:00
Tim Starling
d8cc830c4a block/unblock log; split off profiling into Profiling.php and broke it (turn it off for now) 2003-10-16 13:30:45 +00:00
Brion Vibber
381441e3c0 Upport some of the bad-title fixes; return NULL for bad titles 2003-10-01 10:26:26 +00:00
Tim Starling
af7840c7d8 changing wfQuery to allow replication 2003-09-20 03:00:34 +00:00
Brion Vibber
76dd2a8880 Article object now is associated with an arbitrary title object instead of a global 2003-09-01 08:30:14 +00:00
Brion Vibber
5c8988dfba Add notice for pages with deletion history & easy undelete link. 2003-08-31 22:21:50 +00:00
Brion Vibber
3002e1d8a6 Move interwiki management from big ugly array into the database, with
memcached backing. Second 'wikipedia-interwiki.sql' has Wikipedia's
local interlanguage URLs.
2003-08-21 11:20:38 +00:00
Brion Vibber
9d51f61661 Add zh-cn and zh-tw language prefixes in order to label simplified and traditional chinese; for now these both still point to zh.wikipedia.org, but are labeled differently in the interlanguage link list. Also, regexps expanded to better handle hypenated language codes 2003-07-02 07:29:54 +00:00
Brion Vibber
d7f6cb4ff1 Enhances special page links; allow some parameters to be passed via wikilinks to special pages to make it easier to cite things like backlinks, contribs, options for recentchanges, etc 2003-07-02 06:22:03 +00:00
Brion Vibber
8137de5574 Don't allow high control chars in titles on non-utf8 wikis 2003-05-16 13:36:37 +00:00
Lee Daniel Crocker
d82c14fb4f Initial revision 2003-04-14 23:10:40 +00:00