Commit graph

32 commits

Author SHA1 Message Date
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Antoine Musso
16558d1dbc Added some comments to our classes. 2007-04-21 12:42:27 +00:00
Nick Jenkins
113bb1c772 Documentation tweaks to help documentation systems (Doxygen + PHPDocumentor)
pick up the appropriate tags, and documentation blobs for classes. This is 
the same as per r20769, but with the grouping changes (e.g. removing "@{{") omitted.
Please be advised that more related documentation tweaks may follow later - e.g. 
Doxygen generates a log file of warnings that is 574 Kb in size, when run over 
the just the trunk/phase3 code ... eek! Thankfully, much of that is just 
whining about functions without documentation   ;-)
2007-04-04 05:22:37 +00:00
Brion Vibber
3a6ac5a3c3 Revert r20769: we don't use PHPDocumentor anymore, we use doxygen.
If making mass changes to tweak to its preferences, probably better to do it for the tool we actually generate docs with. :)
2007-03-28 14:16:43 +00:00
Nick Jenkins
5fef2333d4 PHPDocumentor [http://en.wikipedia.org/wiki/PhpDocumentor] documentation tweaking stuff.
Minor doc tweaks to prevent some PHPDocumentor warnings or errors when run on the includes/ directory. PHPDocumentor uses a syntax very similar to javadoc - mostly we already use this, but there were a few scattered places that were adjusted to make them consistent with the rest of the code. In practical terms, these changes were made:
* @url becomes @link
* @fixme becomes @todo
* HTML tags in descriptions must be closed / balanced.
* @bug was removed (where the bug was long fixed), or changed into a @todo (in the few situations where the bug was still pending)
* @obsolete becomes @deprecated
* Things like "/**@{{" and "/**@}}*/" which cause "unknown tag" warnings were removed
* @access must be a valid access level.
* @desc tag not needed, removed.
* Doesn't seem to like @licence, will accept @license however.
* Use full comment block notation in a few places (i.e. open block with "/**", start each line with " *", and end block with " */")

Then additional to this, to get some class docs associated with their respective classes:
* Moved some docs to right above those classes (deleting blank lines, or moving descriptions from the file headers)
* Marked some classes without docs as "@todo document"
* (done up to "class MIMEsearchPage" on the "classtrees_MediaWiki.html" page for the includes/ directory)
2007-03-28 08:53:02 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Nick Jenkins
65ad0d8883 Tweaks to stop following warnings with PHP's E_STRICT error_reporting mode enabled:
* Strict Standards: Non-static method DBLockForm::notWritable() should not be called statically in includes/SpecialLockdb.php on line 22
* Strict Standards: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: /var/www/hosts/mediawiki/wiki/.svn/entries:3: parser warning : xmlns: svn: not a valid URI in includes/SpecialVersion.php on line 297
* Strict Standards: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]:    xmlns=&quot;svn:&quot;&gt; in includes/SpecialVersion.php on line 297
* Strict Standards: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]:                ^ in includes/SpecialVersion.php on line 297
* Strict Standards: Undefined index:  version in includes/SpecialVersion.php on line 122
* Strict Standards: Undefined index:  url in includes/SpecialVersion.php on line 124
* Strict Standards: Undefined index:  author in includes/SpecialVersion.php on line 123
* Strict Standards: Undefined index:  description in includes/SpecialVersion.php on line 125
* Strict Standards: Undefined index:  variable in includes/SpecialVersion.php on line 113
* Strict Standards: Undefined index:  other in includes/SpecialVersion.php on line 113
2007-01-09 04:11:16 +00:00
Tim Starling
a3b490d2c4 * Made special page names case-insensitive and localisable. Care has been taken to maintain backwards compatibility.
* Used special page subpages in a few more places, instead of query parameters
2006-10-30 06:25:31 +00:00
Rob Church
5deff4e6b5 * Preserve entered reason when reporting unconfirmed lock on Special:Lockdb
* Alter default "lockdbsuccesstext" message to link to Special:Unlockdb
2006-07-12 11:28:01 +00:00
Rob Church
0d8883280d * (bug 6618) Improve permissions/error detection in Special:Lockdb
* Add another explicit check
* Suppress errors on the fopen()
* If the fopen() fails, assume a permissions problem
2006-07-10 08:53:42 +00:00
Rob Church
14b4a534b2 Remove use of deprecated OutputPage::developerRequired() 2006-07-10 08:36:16 +00:00
Tim Starling
02547dac72 Removed most exit() calls from the MediaWiki core, by replacing them with either a throw or by classic error checking. OutputPage::fatalError() and similar functions are deprecated, use either OutputPage::showFatalError() to return control or throw new FatalError() to relinquish it. Backwards compatibility of all interfaces has been maintained, thus extensions should continue to work and can be ported at a later date. 2006-06-07 06:40:24 +00:00
Lupin
11337038b3 removing unused globals and some whitespace cleaning 2006-03-07 01:10:39 +00:00
Rob Church
7aea55023b Revert to un-borked version, sorry Brion 2006-01-18 00:04:30 +00:00
Rob Church
e419436ad2 * Some code cleanup
* Deprecate OutputPage::developerRequired()
2006-01-16 18:55:45 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Antoine Musso
2ca68a256d Clean up unused globals! 2005-12-04 18:27:59 +00:00
Antoine Musso
a580ec6ce7 quotes 2005-07-05 20:39:09 +00:00
Brion Vibber
5a9e8c8c62 Audit tweaks: extra post checks, markup fixes. 2005-02-21 01:56:50 +00:00
Brion Vibber
74886b186c Kill a <font> tag, add html paranoia 2005-02-11 07:16:36 +00:00
Antoine Musso
28ea816fba Implementing user levels management. This is only a very basic interface and several things need to be done! A tracking bug is at http://bugzilla.wikipedia.org/show_bug.cgi?id=767 2004-10-24 19:14:48 +00:00
Brion Vibber
f2f29a11e3 Fix XHTML tags 2004-10-14 05:53:30 +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
68967f0f00 use of $wgRequest 2004-04-01 12:53:01 +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
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
0332f4c598 Fix for compatibility with short_open_tag = Off 2004-02-18 02:15:00 +00:00
Brion Vibber
29d030f994 Use wfMsg()'s parameters 2003-11-15 13:56:14 +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
Lee Daniel Crocker
d82c14fb4f Initial revision 2003-04-14 23:10:40 +00:00