Commit graph

384 commits

Author SHA1 Message Date
Tim Starling
f8bbc61b42 Various board vote enhancements, moving to the BoardVote directory 2004-05-15 10:36:59 +00:00
Tim Starling
e3676a470c Introducing special page modular extensions, making the board vote special page the first of these.
* Moving common special page handling to SpecialPage.php
* Special page lists in the language classes are obsolete, replaced by the list in SpecialPage.php
* Special:Specialpages uses the standard page titles wfMsg(pagename) instead of the description list previously contained in the $wgSpecialPagesEn arrays
* Ability to add custom messages to the MessageCache. Overridable by the MediaWiki namespace.
* Moving board vote functionality from includes/SpecialBoardvote.php to extensions/BoardVote.php
2004-05-15 03:36:39 +00:00
Brion Vibber
33f1e77c11 PHP 4.1.2 compatibility fixes (based on patch submission by Asheesh Laroia)
Also, urlencode anchor names for non-ascii compatibility. This is the
recommendation of HTML 4.01 standard in B.2.1, as far as I can tell.
Works in UTF-8 at least for IE6/win, Firefox, Safari.
2004-05-10 01:54:56 +00:00
Tim Starling
0fb5ad60b1 Board of Trustees vote 2004-05-09 02:32:04 +00:00
Brion Vibber
1571a7c4c3 Suppress PHP warnings on failure to create thumbnail subdirectories. This should be checked at file save time and a human-friendly error message listed instead 2004-05-08 04:41:54 +00:00
Tim Starling
8f22cb45b1 include_once -> require_once 2004-05-07 13:43:10 +00:00
Jens Frank
144e0c2ed1 moved some more functions from GlobalFunctions to Image 2004-05-04 20:35:37 +00:00
Jens Frank
42f39da880 wfImageUrl moved from Globalfunctions to Image
Preferred access via $image->getUrl(), but for compatibility
Image::wfImageUrl() still works
2004-04-24 23:45:11 +00:00
Brion Vibber
f171bd0f88 Fix notices 2004-04-10 10:02:16 +00:00
Brion Vibber
33821336ba Whitespace & coding standards adjustments to Evan's last commits.
Metadata.php seems to be missing, so the new code doesn't work yet.
2004-04-04 22:33:11 +00:00
Evan Prodromou
22f8c4ce37 Added code to implement Dublin Core and Creative Commons RDF metadata.
If these features are turned on (with global flags), a metadata link tag is
provided to the appropriate action ('dublincore' or 'creativecommons'). When
the wiki script receives these actions, it creates RDF files on the fly.

Also includes two valuable general functions: one to show an HTTP error
(used when the flags are turned off), and one to do content negotiation
(used to determine the MIME type for RDF files).

A helper function is also added to page output to display metadata links.
2004-04-04 21:58:05 +00:00
Tim Starling
5104b9f29c more debugging rubbish, sorry 2004-04-03 07:49:26 +00:00
Tim Starling
27a4c0aee2 oops, debug output 2004-04-03 07:03:34 +00:00
Tim Starling
a134fab3c7 Made wfMerge() work on Windows, and fixed some merge-related comments in EditPage 2004-04-03 05:55:37 +00:00
Tim Starling
c10b49adf4 refactoring and $wgRequest use 2004-04-01 12:37:45 +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
f4a210165c fixed notice 2004-03-23 10:25:16 +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
Mr. E23
eacbec8220 Fixed problem with merging of identical changes 2004-03-14 21:34:03 +00:00
Mr. E23
525092fa9f Experimental merging of edit conflicts 2004-03-14 15:05:52 +00:00
Gabriel Wicke
69782d650f purge first url only once 2004-03-09 14:00:37 +00:00
Gabriel Wicke
ce031abd74 bug fixes and indentation in purge function 2004-03-09 12:07:35 +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
Brion Vibber
4dac4d85c6 Add digit transformation function Language::formatNum() for Arabic and other
languages which need to use localized (decimal) digits. Sample implementation
for Arabic.
2004-03-06 03:03:14 +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
Mr. E23
6e1ab9c0fc Fixed bug causing early execution errors to occasionally be masked 2004-03-05 21:24:14 +00:00
Tim Starling
45297d6792 wfRecordUpload() using RecentChange instead of direct DB, which fixes a minor bug 2004-02-29 08:44:59 +00:00
Gabriel Wicke
1df646d3a4 enabled ports != 80 for purging, just add the :port in wgSquidServers 2004-02-26 20:08:45 +00:00
Mr. E23
3c799396d6 Replaced uses of microtime() with wfTime() where possible. 2004-02-18 19:12:55 +00:00
Mr. E23
4e89b41d15 Added function wfTime to get current time as a float 2004-02-18 19:06:22 +00:00
Brion Vibber
0332f4c598 Fix for compatibility with short_open_tag = Off 2004-02-18 02:15:00 +00:00
Jens Frank
9f4792d3ba Fix bug with md5 generation of archived images 2004-02-09 00:37:06 +00:00
Gabriel Wicke
a3e58ae5c8 increased tries to read from socket from 4 to 20 2004-02-04 14:25:37 +00:00
Gabriel Wicke
76cbec491f fixed the wfLoclaUrl hack committed yeterday by mistake to another hack... 2004-02-03 13:20:56 +00:00
Gabriel Wicke
16e86dacf5 cpu theft and lockups found 2004-02-03 00:36:18 +00:00
Jens Frank
d305622d9a Fixing issue with IE not showing thumbs with non-ASCII-chars in their name 2004-02-01 23:43:42 +00:00
Jens Frank
b3464402c0 Fix wfImagePath: removed invalid urlencode() 2004-02-01 12:21:26 +00:00
Gabriel Wicke
f12b89003e now for the real thing- previous submit was a small hack to make it work without /wiki/... Damn, i have to save the file first... 2004-01-31 02:08:36 +00:00
Gabriel Wicke
43ce1528b3 removed left-over microtime() statement 2004-01-31 01:58:30 +00:00
Gabriel Wicke
144cbe5bd6 Squid integration changes 2004-01-30 17:07:50 +00:00
Tim Starling
57cec6f4dc More hide/show links in RC 2004-01-30 12:47:19 +00:00
Jens Frank
58c8694cae Feature-Request #816659,#668443: No (next 50) link if there is no next page
Implemented for:
   PageHistory,
   QueryPage and all derived from it,
   SpecialContributions
2004-01-20 19:02:12 +00:00
Tim Starling
85e6528f38 setArticleRelated required in more places than I realised at first 2004-01-17 15:12:33 +00:00
Erik Moeller
99f6383f37 JeLuF's image resizing code 2004-01-12 00:55:01 +00:00
Mr. E23
beaae16295 Removed a global variable. Added PHP < 4.3 compatibility for wfAbruptExit(). 2004-01-11 23:50:52 +00:00
Tim Starling
a4c652b0ff object-oriented database connections 2004-01-10 16:44:31 +00:00
Tim Starling
7fd73cbe63 fixed a few minor bugs and misc. notices 2004-01-10 14:18:05 +00:00
Tim Starling
82c2a935ff Alteration of security fix to make it very slightly less ugly 2004-01-07 09:02:36 +00:00
Brion Vibber
712ee46ba4 change wfEscapeWikiText() to escape the pipe | character. This was breaking
{{MSGNW:foo}} inside a wiki-syntax table.
2003-12-22 04:14:33 +00:00
Mr. E23
77c8660ee8 Added <4.3.0 compatibility for wfAbruptExit() 2003-12-17 08:30:11 +00:00
Tim Starling
036ff960ce Improvements in MediaWiki namespace handling, enhanced rollback 2003-12-14 14:29:35 +00:00
Mr. E23
4f8b5eaaa5 removed tracing printout 2003-12-11 22:14:03 +00:00
Mr. E23
bdf73da2d2 The purpose of this modification is to ensure that every normal request
execution starts and ends in wiki.phtml, giving the code a somewhat
more predictable flow.

OutputPage.php:
* Added disable() method to Output class.
* Replaced exit() call in checkLastModified() with "return true" (thereby
  altering its contract quite severly).
* reportTime() now only returns elapsed time, code with side effects
  moved to logProfilingData() in GlobalFunctions.php.

GlobalFunctions.php:
* Added function logProfilingData() which does most of what
  OutputPage->reportTime() used to do.

Article.php:
* Replaced exit() in checkLastModified() with "return true" (thereby altering
  its contract quite severly).
* replaced implicit exit in calls to checkLastModified() and tryFileCache()
  with returns.

LogPage.php:
* replaced implicit exit() with return in call to checkLastModified()

SpecialRecentchanges.php:
* replaced implicit exit() with return in call to checkLastModified()

wiki.phtml:
* Single call to logProfilingData() at the end of the request.
2003-12-11 20:16:34 +00:00
Mr. E23
ea5c70a473 Added wfAbruptExit() function, to replace exit() calls with. 2003-12-10 14:58:17 +00:00
Tim Starling
35cecc8014 Fixed wfMsg bug -- problems with "loading" message 2003-11-21 04:57:32 +00:00
Brion Vibber
d3c61d791d Security fix: include path 2003-11-17 03:00:18 +00:00
Brion Vibber
8609ef44c7 PHP version check on install/update; remove 4.0.x compatibility functions, as we've broken 4.0 compatibility elsewhere 2003-11-16 14:30:39 +00:00
Brion Vibber
d1c2cf108b Add compatibility file_get_contents; fix compat iconv 2003-11-15 14:47:31 +00:00
Brion Vibber
83b43d49ce Use wfMsg()'s parameters 2003-11-15 14:32:58 +00:00
Tim Starling
eee45843b0 misc. bug fixes 2003-11-15 07:14:05 +00:00
Tim Starling
596f4b09ce Latest features and bug fixes imported from stable 2003-11-12 10:21: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
ee4c7f2f49 Various fixes, see the version of [[m:Development status]] before this commit for details 2003-11-02 13:57:24 +00:00
Tim Starling
d1f6bd3328 Made enhanced wfMsg() faster 2003-10-21 13:01:49 +00:00
Tim Starling
ef8c8d5f2b fixed profiling; fixed wfMsg() use of memcached; put block log in initialdata.sql 2003-10-20 13:39:40 +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
Tim Starling
a2bc5d8338 MediaWiki namespace 2003-09-21 13:10:10 +00:00
Tim Starling
436d389650 changing wfQuery to allow replication 2003-09-20 02:30:00 +00:00
Magnus Manske
2afd409ebb upload add-on 2003-09-17 13:48:08 +00:00
Tim Starling
3d042077f8 enhanced wfMsg: minor improvements 2003-08-30 07:12:38 +00:00
Brion Vibber
578e1dbf26 Update cache validation timestamp on uploads / re-uploads 2003-08-30 06:21:34 +00:00
Brion Vibber
9dfa7d1895 Disable debug comments if debug comments are disabled 2003-07-10 04:54:22 +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
f92d41d6c3 Date/time fixes: try to ensure that timestamps are always kept in GMT, with conversion where necessary. 2003-06-30 01:33:16 +00:00
Brion Vibber
317bf19b8b fix typo 2003-06-23 07:53:08 +00:00
Brion Vibber
7303e8e667 Add wfFullUrl()/wfFullUrlE() function to explicitly include the http://foo.bar/ to use in links we give out to the world 2003-06-23 07:01:42 +00:00
Brion Vibber
5648184915 Tweak to use local random, don't trust mysql's; new seed 2003-06-03 21:27:06 +00:00
Brion Vibber
efca89ebbe Refactor some common code for offsets/limits; some preliminary stuff for upload license notes and mysql4 fulltext support (not ready yet) 2003-06-03 08:44:50 +00:00
Brion Vibber
764331c963 Experimental optional compression support for page cache 2003-05-20 09:30:40 +00:00
T.D. Corell
2f3f8433fb New function ShowingResultsNum for use in SearchEngine. 2003-05-20 06:15:20 +00:00
Brion Vibber
92ea39aa9f Local URLs return real local URLs 2003-05-15 20:44:55 +00:00
Lee Daniel Crocker
d82c14fb4f Initial revision 2003-04-14 23:10:40 +00:00