Enhance the destination control parameter of wfDebug() and wfDebugLog()
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 14 Nov 2013 11:17:25 +0000 (12:17 +0100)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 4 Feb 2014 19:56:24 +0000 (19:56 +0000)
commita7a08830193b4af0b25bcef0796a2342b33d2e57
treeba9411f796685d450e0c7dd07322f7258bfed3c9
parent5eda555000550e5beebcac376508efbf89c9ae2c
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
includes/AjaxResponse.php
includes/Exception.php
includes/GlobalFunctions.php
includes/OutputPage.php
includes/api/ApiMain.php
includes/cache/HTMLFileCache.php
includes/debug/Debug.php
includes/specials/SpecialSearch.php