Minor - Improve deprecation documentation in Display::display_*_message() methods to allow for copy-paste. A good formula to regex search and replace in editors is Display\s?::\s?display_([^_)]*)_message\(([^,)]*)(.*)\); -> Display::addFlash(Display::return_message($2, '$1', $3));

pull/2487/head
Yannick Warnier 8 years ago
parent 32176bcc23
commit 6e3164d478
  1. 8
      main/inc/lib/display.lib.php

@ -436,7 +436,7 @@ class Display
* @param bool $filter (true) or not (false) * @param bool $filter (true) or not (false)
* @param bool $returnValue * @param bool $returnValue
* *
* @deprecated use Display::addFlash with Display::return_message($message, 'normal'); * @deprecated use Display::addFlash(Display::return_message($message, 'normal'));
* *
* @return void * @return void
*/ */
@ -454,7 +454,7 @@ class Display
* Displays an warning message. Use this if you want to draw attention to something * Displays an warning message. Use this if you want to draw attention to something
* This can also be used for instance with the hint in the exercises * This can also be used for instance with the hint in the exercises
* *
* @deprecated use Display::addFlash with Display::return_message * @deprecated use Display::addFlash(Display::return_message($message, 'warning'));
*/ */
public static function display_warning_message($message, $filter = true, $returnValue = false) public static function display_warning_message($message, $filter = true, $returnValue = false)
{ {
@ -469,7 +469,7 @@ class Display
/** /**
* Displays an confirmation message. Use this if something has been done successfully * Displays an confirmation message. Use this if something has been done successfully
* @param bool Filter (true) or not (false) * @param bool Filter (true) or not (false)
* @deprecated use Display::addFlash with Display::return_message * @deprecated use Display::addFlash(Display::return_message($message, 'confirm'));
* @return void * @return void
*/ */
public static function display_confirmation_message($message, $filter = true, $returnValue = false) public static function display_confirmation_message($message, $filter = true, $returnValue = false)
@ -487,7 +487,7 @@ class Display
* @param string $message - include any additional html * @param string $message - include any additional html
* tags if you need them * tags if you need them
* @param bool Filter (true) or not (false) * @param bool Filter (true) or not (false)
* @deprecated use Display::addFlash with Display::return_message * @deprecated use Display::addFlash(Display::return_message($message, 'error'));
* *
* @return void * @return void
*/ */

Loading…
Cancel
Save