Commit graph

49 commits

Author SHA1 Message Date
C. Scott Ananian
d63684a064 Deprecate $wgUseESI
This was an experimental Squid 3 feature which is now defunct.

Change-Id: I799d87309b0dc77100900b75040fa9b85a35fc9a
2018-10-19 11:44:17 -04:00
Fomafix
e1630b6a53 PHP: Use short ternary operator (?:) where possible
Change-Id: Idcc7e4fcdd4d8302ceda44bf6d294fa8c2219381
2018-06-11 11:26:35 +02:00
addshore
b12086b618 Get ConfigFactory & MainConfig from MediaWikiServices
Change-Id: Iafdd7e00747060572463ffb05aae4543f3a06163
2016-11-23 00:12:38 +00:00
Fomafix
202f695f67 Update weblinks in comments from HTTP to HTTPS
Use HTTPS instead of HTTP where the HTTP link is a redirect to the HTTPS link.

Also update some defect links.

Change-Id: Ic3a5eac910d098ed5c2a21e9f47c9b6ee06b2643
2016-11-07 15:24:46 +01: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
Bryan Davis
0affda7edf Remove use of $dest = 'log' for wfDebugLog
The functionality for marking a debug log message for delivery to a log
file but not to MWDebug was removed in 1.25 with the introduction of
the PSR-3 logging system. Convert the messages that were marked for this
special handling in a7a0883 to use 'private' instead.

Bug: T122644
Change-Id: Iefaac07a5922c16c2899904c7b678199c5b1efe9
2015-12-30 13:03:14 -07:00
Aaron Schulz
6af3c39c07 Replace "squid" with "CDN" in various comments
Change-Id: Idcc528daf28e119349155d36e30a9bcf61b2e7d5
2015-12-09 17:35:37 -08:00
Aaron Schulz
4f781c7bf9 Convert some users to WANObjectCache for consistency
These callers don't need to do purges, but can still perfectly
take advantage of this instance over a plain BagOStuff. Namely:
* Replication and snapshot lag awareness
* Preemptive regeneration
* Easy process cache support

The idea is for there to only be one caching class/factory
to use, instead of having rules for picking which one to use.

Change-Id: I8e362df451c0c28731fc853c044c4c4b8e097f01
2015-10-19 16:46:52 +00:00
Vivek Ghaisas
9f5b6f5aeb Fix whitespace issues around parentheses
Fix issues found by MediaWiki.WhiteSpace.SpaceyParenthesis sniff.

Bug: T102617
Change-Id: Iec7f71e64081659fba373ec20d9d2006306a98f4
2015-06-16 22:14:02 +03:00
Bryan Davis
7b6890654a AjaxResponse: Fix broken logic for extracting HTTP status codes
Follows-up 6584cef207 (r16266; 2006; MediaWiki 1.8.0).
This regex was just trimming whitespace from the start of the string. It
matched whitespace, then a match group for a first sequence of digits. The
replacement is just the digits match. This is essentially `ltrim()`. It didn't
account for the content after the match.

> echo preg_replace( '/^ *(\d+)/', '\1', '200 OK' );
> "200 OK"

This was causing:
> Warning: Unknown HTTP status code 200 OK in libs/HttpStatus.php:100
> Warning: Unknown HTTP status code 304 Not Modified OK in libs/HttpStatus.php:100

It defaults to HTTP 200. So presumbaly the impact was low. Though it may've caused
304 responses to have been broken (content body missing).

Bug: T102028
Change-Id: Iafff9982bbbee893c13f891901dde88f998db7a6
2015-06-11 16:42:02 +01:00
Timo Tijhof
70429dc8a2 Use HttpStatus::header instead of manually crafting header()
Also:
* Update wfHttpError() to use uppercase DOCTYPE, to match other code
  such as Html.php, wfThumbError(), HttpError.php, etc.

Change-Id: I4027e7fe1a138b03f78797b6d1bfe7bd1064d360
2015-06-04 02:27:35 +00:00
Kunal Mehta
6e12c4bf95 AjaxDispatcher: Use Config instead of globals
Also removed a usage of $wgUser, and converted
AjaxResponse to use Config.

Change-Id: Ia9a1e17da26908b81f7f9691445ff75db2fdefb1
2014-08-25 19:20:30 -07:00
umherirrender
4ee680a8b3 Fixed spacing
- Removed spaces after not operator (!)
- Removed spaces inside array index
- use tab as indent instead of spaces
- Add newline at end of file
- Removed spaces after casts

Change-Id: I9ba17c4385fcb43d38998d45f89cf42952bc791b
2014-07-24 11:53:04 +02:00
umherirrender
a3983418d5 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: I0056b4a8df243cfc0c5f25378de48f7a35170aca
2014-04-22 13:07:02 +02:00
Siebrand Mazeland
7a635c5dfd Try to make a dent in CodeSniffer reports on includes/ (1)
Change-Id: Iaf3120b4e32cc5835ef9ed86236d98679e2b87fa
2014-03-23 01:29:41 +00:00
Alexandre Emsenhuber
153abd52fd Correct the destination of checkLastModified debug messages
- OutputPage: if $wgCachePages is set to false, then it can be shown
  back to the user
- AjaxResponder: don't send back to the user (for consistency with the
  other calls to wfDebug(), and this can't be displayed to the user)

Change-Id: I17794016cfaef65ee3df3b82ceb8cb3a32ac7c67
2014-03-14 22:33:21 +00:00
Alexandre Emsenhuber
a7a0883019 Enhance the destination control parameter of wfDebug() and wfDebugLog()
- The parameter is now a string, making is more understandable than
  boolean values
- It takes the same values in both wfDebug() and wfDebugLog() (except
  for 'private' which is only used in the latter)
- This adds a new possibility to wfDebugLog() to log the message either
  on the specific log or the general one, but not to the debug toolbar
- Old boolean values are still recognised for backward compatibility
- Also send the messages passed to wfDebugLog() to the debug toolbar
  when they are written to a specific log and not restricted to logs
- Updated the calls of and wfDebug() and wfDebugLog() with the last
  parameter to change it into a string
- Renamed MWDebug::sendWarning() to MWDebug::sendMessage() and added
  $group parameter to it; will not break anything since that method
  is marked as private
- Changed the call to wfDebug() from MWDebug::sendMessage() to use
  wfDebugLog() with 'log' as thrid parameter, so that those messages
  can be logged separately from the main log and they don't show up
  a second time on the "debug log" tab of the debug toolbar

Change-Id: I1be09d4c1d3408ed5b26a5db02691c17c0ec0926
2014-02-04 19:56:24 +00:00
01tonythomas
3f0b8c88c3 Removed 'Disable browser page caching" user preference
It is  a very advanced user preference with little usage and is often misleading.
Updated Release Note.

Bug: 52809
Change-Id: I43f6205df53c7a38717c60a2d7d144307feb58a4
2013-12-07 14:02:44 +05:30
umherirrender
8764b3aa7c Remove spaces in function signature
Change-Id: I45aea7a7af88cd913b2f485913620a8af0ab2fed
2013-03-18 20:44:43 +01:00
Yuri Astrakhan
9506e3d812 Spellchecked /includes directory
* Ran spell-checker over code comments in /includes/
* A few spellchecking fixes for wfDebug() calls

Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?"

Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf
2013-03-13 03:42:41 -04:00
Niklas Laxström
35a3759234 Fixing typo
Change-Id: I930c37ad7550c7dd0c4856c22921155dec6ccb3b
2012-12-01 16:02:15 +00:00
mrbluesky
1aead61d4c Add and fix comments in some includes files
Change-Id: If781ad1a9eeba8310cef97dc9786685e8b265fa1
2012-05-24 20:42:56 +02:00
Alexandre Emsenhuber
44ec396481 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ife63db5d36d833de4e0944f9b79ab0f80e7b84c5
2012-05-22 20:43:10 +02:00
Sam Reed
08e4a19369 Documentation updates
Normalise method returns
2012-03-05 15:23:04 +00:00
Sam Reed
a1f96b28f8 Add some {}
Ping r111605
2012-03-02 00:15:20 +00:00
Sam Reed
c8eb4467f1 Fix user related direct member variable access 2012-02-16 00:54:34 +00:00
Sam Reed
76246b9bf5 More return documentation 2012-02-09 21:33:27 +00:00
Sam Reed
96641da58e Add, update, tweak documentation
Fix document comment blocks

Tweak some returns
2011-10-26 03:44:47 +00:00
Chad Horohoe
e830370858 Kill AjaxFunctions.php. The only thing using this was FCKEditor, so I moved js_unescape() over to it.
Roan: "So what does it do?"
Me: "Converts stuff encoded with JS's escape() back into a normal string, according to the docs."
Roan: "That sounds like a workaround for bad design"
2011-07-14 20:38:28 +00:00
Niklas Laxström
793eb5b0da Fix s-max-age to s-maxage 2010-09-11 09:18:51 +00:00
Alexandre Emsenhuber
5be509b0c1 * Standardised file description headers
* Added some descriptions
* Added @file where needed
2010-08-08 14:23:14 +00:00
Siebrand Mazeland
5c1630efa7 Ran stylize.php, removed trailing whitespace, updated indentation and code formatting. 2010-05-30 14:28:54 +00:00
Siebrand Mazeland
f8b1c4cfb7 Random indentation and code formatting updates. No functional changes. 2010-02-14 22:07:30 +00:00
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
Brion Vibber
ae98c49213 * (bug 17537) Disable bad zlib.output_compression output on HTTP 304 responses
Patch by ezyang - http://bug-attachment.wikimedia.org/attachment.cgi?id=5829
2009-03-18 21:26:57 +00:00
Tim Starling
d38a312220 Use a content type that's not an XSS risk 2009-03-18 20:20:10 +00:00
Chad Horohoe
00e5b3325d Document a bit. 2008-08-20 22:22:29 +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
Antoine Musso
db835165c2 * AjaxDispatcher : use a switch()
* Add doxygen comments.
2007-05-05 00:06:20 +00:00
Nick Jenkins
f9619da3f0 Yet more doc tweaks:
* Add @addtogroup tags to various classes, to try and group conceptually-related classes together.
* Add brief descriptions to various Special pages, thanks to Phil Boswell.
* Moving some docs to be right above the classes they represent, so that they are picked up.
2007-04-20 08:55: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
b144fcb85d Rename constructors to __constructor 2007-01-20 13:34:31 +00:00
Antoine Musso
1d84c78096 whitespaces killing 2007-01-09 20:25:28 +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
Daniel Kinzler
6584cef207 Revamped ajax interface, see release notes.
Note: wfSajaxSearch is broken (unrelated to these changes)
2006-08-29 15:43:34 +00:00