|
|
@ -518,9 +518,9 @@ class Display |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Returns a div html string with |
|
|
|
* Returns a div html string with |
|
|
|
* @param string The message |
|
|
|
* @param string $message |
|
|
|
* @param string The message type (confirm,normal,warning,error) |
|
|
|
* @param string $type Example: confirm, normal, warning, error |
|
|
|
* @param bool Whether to XSS-filter or not |
|
|
|
* @param bool $filter Whether to XSS-filter or not |
|
|
|
* @return string Message wrapped into an HTML div |
|
|
|
* @return string Message wrapped into an HTML div |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static function return_message($message, $type = 'normal', $filter = true) |
|
|
|
public static function return_message($message, $type = 'normal', $filter = true) |
|
|
@ -533,7 +533,7 @@ class Display |
|
|
|
$message = api_htmlentities($message, ENT_QUOTES, api_is_xml_http_request() ? 'UTF-8' : api_get_system_encoding()); |
|
|
|
$message = api_htmlentities($message, ENT_QUOTES, api_is_xml_http_request() ? 'UTF-8' : api_get_system_encoding()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$class = ""; |
|
|
|
$class = ''; |
|
|
|
switch ($type) { |
|
|
|
switch ($type) { |
|
|
|
case 'warning': |
|
|
|
case 'warning': |
|
|
|
$class .= 'alert alert-warning'; |
|
|
|
$class .= 'alert alert-warning'; |
|
|
|