Commit graph

46 commits

Author SHA1 Message Date
Umherirrender
a9007e8baf Add missing & to @param documentation to match functon call
Change-Id: I81e68310abcbc59964b22e0e74842d509f6b1fb9
2017-08-11 18:47:46 +02:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
umherirrender
1c68a1ee86 Cleanup some docs (includes/*.php)
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling

Change-Id: I783e4dbfe5f6f98b32b9a03ccf6439e13e132bcc
2014-07-24 19:42:24 +02:00
Siebrand Mazeland
e9eb00b203 Make phpcs-strict pass on includes/ (1/~10)
Change-Id: Ib51381a2261d064988ba2f39b71c0252f2458faf
2014-05-11 19:14:17 +00:00
umherirrender
8ad1c92441 Fixed some @params documentation (includes/*)
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.

Change-Id: I7f605aa9e117b5fd80d9b1440864fe526d2b14a5
2014-04-20 21:16:57 +02:00
umherirrender
ef2f507d23 Fixed spacing in files direct in includes folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: Ibb8dd102db045522d12ff939075ba7420d95ab6b
2013-04-21 06:38:49 +00:00
Tyler Anthony Romeo
4dcc7961df Fixed @param tags to conform with Doxygen format.
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.

Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
2013-03-11 13:15:01 -04:00
jeroendedauw
dc8f3e6c78 Added a pile of missing brackets
Change-Id: Id7b331e1b12875736c8e7e93660e71630360a723
2012-09-27 21:46:22 +02:00
Siebrand Mazeland
b345869770 Prevent Call to a member function msg() on a non-object
- Added HTMLFormField::msg() to check whether $this->mParent->msg()
  can be called and otherwise use wfMessage()
- Made Licenses::msg() inline to prevent conflict with HTMLFormField::msg()

Change-Id: I7fa95e1d61ac4128d1d4d5f091c39bcbc8ecc651
2012-08-24 11:47:25 +02:00
Alex Monk
2fabea7eea Use wfMessage instead of deprecated wfMsg*
Or $this->msg in special pages.

Change-Id: I774a89d646615053c8424050e42ad95601f92543
2012-08-18 14:11:05 +02:00
Alexandre Emsenhuber
a682b7335a Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I0db3461139284edcb6ac02923eb83d54e6756ffb
2012-05-12 22:33:51 +02:00
Sam Reed
ad39f2da86 Trim trailing whitespace
Add/tweak/update documentation

Simplify some boolean returns
2011-09-04 21:40:17 +00:00
Sam Reed
bdf84cb20e Swap else if for elseif
Trimming trailing whitespace also

Doing in 3 commits, so hopefully reviewable in CR...
2011-06-17 16:03:52 +00:00
Sam Reed
93b8ff3a10 Some for MaxSem too 2011-05-28 17:52:12 +00:00
Daniel Friesen
39ab3cfc9f Implement Message::isBlank and Message::isDisabled.
And while we're at it... update a random assortment of code using wfEmptyMsg to use the new wfMessage class and our exists/isBlank/isDisabled methods.
2011-01-14 10:51:05 +00:00
Mark A. Hershberger
a465346c6e random w/s cleanup 2010-12-01 20:22:45 +00:00
Chad Horohoe
9e6c7cc8ef Get rid of PHP4-style constructors 2010-08-30 16:52:51 +00:00
Sam Reed
b6f2713294 Remove unused variable
Remove 1 unused global
2010-07-24 21:11:29 +00:00
Bryan Tong Minh
2c1b2d668f Fixed certain cases where license construction would be incorrect.
Code style fixes per CR r57868. Renamed functions:
* watchCheck -> getWatchCheck
* recoverableUploadError -> showRecoverableUploadError
* uploadWarning -> showUploadWarning
* uploadError -> showUploadError
2009-12-19 21:23:04 +00:00
Bryan Tong Minh
9cec21147e Followup to r57868: Fix two strict standards warnings 2009-10-18 20:06:22 +00:00
Bryan Tong Minh
91e4d80448 Rewrote Special:Upload to allow easier extension. Mostly backwards compatible towards the end user: tested with Commons' upload scripts.
* Special:Upload now uses HTMLForm for form generation
* Upload errors that can be solved by changing the filename now do not require reuploading.
2009-10-18 19:41:01 +00:00
Chad Horohoe
be374a912a War on wfElement() and friends. Call the Xml members directly, rather than using old wrappers. 2008-12-14 19:14:21 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
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
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
Antoine Musso
b144fcb85d Rename constructors to __constructor 2007-01-20 13:34:31 +00:00
Nick Jenkins
14c53b728f Code housekeeping stuff (and barring any stuff-ups on my behalf, there should be no changes in behaviour whatsoever after this) -
* removing some unused global declarations.
* removing or commenting out or adding comments for unused local vars.
* Adding one or two local var declarations.
* Declaring $matches array passed to preg_match() / preg_match_all() as array() before using [not required, just have a slight preference for the explicitness].
* remove one or two pass-by-reference function declarations where the value is not modified.
* Adding some braces to if-else blocks.
* In Parser.php, stripstrate is now an object rather than an array as per r17820, so we no longer need ask for a reference to it (as in "$x =& $this->mStripState;"), and in fact it's probably just simpler to get rid of $x altogether.
* Moving some preg regexes from "" quoting to '' quoting to stop static analyzer whinging about bad escape sequences.

... up to "LinksUpdate.php" in the includes/ directory.
2006-11-23 08:25:56 +00:00
Antoine Musso
69689725c1 Switching from phpdoc to doxygen (use less than 32MB of memory).
Run maintenance/mwdocgen.php to generate doc in ./docs/html/ .
2006-04-19 15:46:24 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Brion Vibber
28cbccbecd * (bug 3318) UI workarounds for disabled items in license selector
MSIE/Win: items now grayed out, JS will revert to 'non selected' if clicked
  Safari: JS will revert to 'non selected' if clicked (but not gray)
  MSIE/Mac: indented items now visible (JS hack)
2006-01-01 01:05:21 +00:00
Ævar Arnfjörð Bjarmason
8f3c836b85 * Formatting 2005-12-30 17:27:46 +00:00
Ævar Arnfjörð Bjarmason
5960b30347 * Reverting the last commit, if you just want to use a message from the user
language if it exists use wfMsg() instead of wfMsgForContent(), don't
  rewrite the entire message selection code when we have libraries to handle
  that, furthermore, this *should* use the content language by default, since
  it's only in rare cases, such as the commons, when you want the opposite,
  this should be overriden via a configuration ($wgForceUIMsgAsContentMsg)
  there instead of changing the main code.
2005-12-30 17:07:47 +00:00
Magnus Manske
cdd1f5d46c Commons upload license list language fix 2005-12-30 16:52:10 +00:00
Antoine Musso
b7db9837bf some useless calls / unitialized $matches arrays 2005-12-04 21:15:04 +00:00
Ævar Arnfjörð Bjarmason
a9f26877c1 * @copyright tag 2005-11-13 02:48:19 +00:00
Ævar Arnfjörð Bjarmason
23993eb17a * Revert last change to trimStars() which broke multi-level licenses like:
* GNU
  ** GFDL
  *** GFDL|GNU Free Documentation License
* Coding style
* including {{}} in title="" e.g. title="{{GFDL}}" instead of title="GFDL"
2005-09-28 18:36:31 +00:00
Ævar Arnfjörð Bjarmason
0359fe2e54 * Improved trimStars()
* Coding style
* Changed the name of the wfNoMsg() function to wfEmptyMsg()
2005-09-06 16:53:58 +00:00
Ævar Arnfjörð Bjarmason
75cb2b36b3 * Fixed a bug, array_slice() called incorrectly 2005-08-31 14:19:01 +00:00
Brion Vibber
b50e0fcd95 eval() is evil! Improper escaping allowed, at a minimum, arbitrary global
variable interpolations into Special:Upload output on malicious data
in MediaWiki:Licenses.
2005-08-30 23:06:40 +00:00
Niklas Laxström
630c79339c Avar casts lvl 5 enhance to Licenses.php:
*Support for template paramaters
2005-08-30 19:22:31 +00:00
Ævar Arnfjörð Bjarmason
1dbcaf5411 * disabled="disabled" attribute for headers
* title="" attribute for items
* increased indent level
* avoiding warning on "*\n" input
2005-08-29 20:24:57 +00:00
Ævar Arnfjörð Bjarmason
33db62d428 * Support for a license selection box on Special:Upload, configurable from MediaWiki:Licenses 2005-08-29 16:43:48 +00:00