Commit graph

39 commits

Author SHA1 Message Date
Tim Starling
f79522aa34 debugging 2007-04-25 07:40:00 +00:00
Nick Jenkins
9648f3b4d0 Some small doc tweaks to reduce Doxygen warnings, namely:
* @link. You might think @link would surely mean "here comes a web URL" ... but @link is a valid command 
  in Doxygen, which means an entirely different kind of link (an internal link to somewhere, so that you can separate 
  documentation and implementation). The result is a mess, and the best solution I can see is to use "@see" instead of "@link".
* Warning: argument `nourl' of command @param is not found in the argument list of Linker::makeMediaLinkObj($title,$text='')
* Moving few class descriptions to right above classes, and/or formatting into Javadoc style.
* "@addtogroup Special Pages" --> "@addtogroup SpecialPage" so that all special pages have the same @addtogroup tag.
* @fixme --> @todo (must have missed these before)
* "@param $specialPage @see" remove the "@" in the "@see" to stop warning.
* @throws wants type, then a brief description, to stop warning.

This last one is for PHPdocumentor only, but it fixes something for PHPDocumentor, and should be neutral for Doxygen:
* WARNING in includes/api/ApiFormatYaml_spyc.php on line 860: docblock template never terminated with /**#@-*/
2007-04-18 09:50:10 +00:00
Aaron Schulz
7a1682f7a5 *fix ipv6 prefix consistency 2007-04-08 01:41:41 +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
Aaron Schulz
fa85cc3420 *comment typo 2007-04-04 05:19:33 +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
Aaron Schulz
17b53cedd4 *Fix isInRange(), remove cruft, add "ipv-6" prefix to toHex() and parseRange6(), actually show hidename option for blocks 2007-03-28 05:39:06 +00:00
Aaron Schulz
04a0d93878 *Fix comment typo, remove some redundant conversions 2007-03-22 22:08:31 +00:00
Aaron Schulz
b016603be8 *Run isIPv6() before trim/uppercasing 2007-03-14 05:23:17 +00:00
Aaron Schulz
93ffe9c200 *More robust IPv6 validation (exclude ambiguous IPs) 2007-03-13 19:25:49 +00:00
Aaron Schulz
1bfe3eb527 *Make sanitizeIP() and toOctet() remove leading bloc zeroes instead, fix bug with ::x IPs 2007-03-13 18:43:52 +00:00
Brion Vibber
761bfca76a this isn't java... you need to say $this-> and self:: explicitly 2007-03-13 18:03:47 +00:00
Aaron Schulz
45239a493a *sanitizeIP() now adds leading zeroes to each bloc for better consistency 2007-03-13 17:15:02 +00:00
Aaron Schulz
f992eac1a3 *Padding for indexing 2007-03-13 09:25:41 +00:00
Aaron Schulz
3987c91369 *Declare static functions as such 2007-03-13 04:55:47 +00:00
Aaron Schulz
915f83d7b4 *IPv6 sanitizing, avoid use of native hex functions, enlarge ip box for blockip a bit 2007-03-12 21:37:46 +00:00
Aaron Schulz
ac03a462ff * Add IPv6 support to XFF functions, improve IPv6 regexp 2007-03-12 18:15:58 +00:00
Aaron Schulz
c59a14f2cf *Use strval() to ensure wfBaseConvert() recieves a string 2007-03-12 07:44:19 +00:00
Aaron Schulz
26f2d0b1ea *Fix typos :( 2007-03-12 07:15:19 +00:00
Aaron Schulz
c1de6176c9 * Add IPv6 support 2007-03-12 07:01:27 +00:00
Aaron Schulz
a4c349a2df * Add isIPAddress() for IPs/networks, fix a bit bug 2007-03-12 06:06:32 +00:00
Aaron Schulz
489189d66f * Add IPv6 functions, fix explicit ranges 2007-03-12 02:43:26 +00:00
Nick Jenkins
784e69d028 For the "includes/" directory:
* removing unused local vars
* removing used global declarations
* adding FIXMEs against extract() calls and lines that seem to be using uninitialized variables
* adding some array() declarations.
2007-01-12 10:03:51 +00:00
Ævar Arnfjörð Bjarmason
dc80288f32 * 001.001.001.001 and other addresses with leading zeros are valid 2006-12-31 09:42:59 +00:00
Andrew Garrett
bafa087e99 Fix regression from r17927 that broke IP::isInRange (and hence the autoblock whitelist). 2006-12-08 10:30:50 +00:00
Nick Jenkins
ae8554c45b Completing code housekeeping stuff for rest of includes/ directory: removing unused local vars, removing unused globals, replacing extract() where simple to do, declaring output arrays before calling preg_match(), and so forth. 2006-11-29 11:43:58 +00:00
Ilmari Karonen
fd989dcea6 convert "::1" and other pseudo-IPv6 addresses that Apache may throw at us to their IPv4 counterparts 2006-11-29 08:08:57 +00:00
Tim Starling
4ce2ae3eb1 2006-11-27 02:43:36 +00:00
Tim Starling
a3a6ac13c3 * Added temporary special-case AOL proxy detection, they're automatically counted as trusted proxies for now.
* Removed wfRangeStartEnd() and wfIsAddressInRange() -- avoid proliferation of global functions.
2006-11-25 16:24:44 +00:00
Aryeh Gregor
ea36e0918d Revert last three commits. I totally broke autoblock and didn't notice somehow. :| 2006-11-22 23:42:39 +00:00
Aryeh Gregor
a6931256ec More bugs! Why did I only spot these after commit >:| 2006-11-22 23:32:21 +00:00
Aryeh Gregor
0c04d9885c * Moved Werdna's new IP functions to the IP class
* Handle bad input to new IP::isAddressInRange gracefully (return false)
* Block::doAutoblock always returns a bool now, as the docs say
* Split off Block::isWhitelistedIp from Block::doAutoblock
* Put AOL proxy IPs in whitelist, and also one from Singapore that was troublesome on enwiki (more should be added, probably?)
* Improve some docs
* Fix a bug: check if the passed IP is in the whitelist, not if the request IP is in the whitelist
2006-11-22 23:21:53 +00:00
Tim Starling
3e50848357 Moved wfParseCIDR() to IP::parseCIDR(). Added IP::parseRange() to support more general range strings. An application for this will hopefully follow soon. 2006-09-24 06:11:21 +00:00
Brion Vibber
90d2083b11 normalize case 2006-07-16 20:58:40 +00:00
Antoine Musso
cbc0ac3d48 public static function isPublic 2006-07-15 12:41:42 +00:00
Tim Starling
b3352f6b68 That doesn't work... oh well, as long as no other module tries to use these constants then the original scheme will be OK. 2006-07-14 17:38:47 +00:00
Tim Starling
0ade783ae2 Deferred loading of DateFormatter.php and IP.php. Standardised IP.php function naming style. 2006-07-14 17:02:49 +00:00
Antoine Musso
71fd92d760 Migrate IP related tools from ProxyTools.php to IP.php
and its own class of static functions
2006-07-12 18:33:21 +00:00