Format code, fix message

pull/2487/head
jmontoyaa 9 years ago
parent 8c1aa2accb
commit 4643f1d525
  1. 12
      main/inc/lib/display.lib.php
  2. 2
      main/inc/lib/online.inc.php
  3. 4
      main/messages/new_message.php

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

@ -153,7 +153,7 @@ function online_logout($user_id = null, $logout_redirect = false)
Session::destroy();
if ($logout_redirect) {
header("Location: ".api_get_path(WEB_PATH)."index.php");
return;
exit;
}
}

@ -242,7 +242,9 @@ function manage_form($default, $select_from_user_list = null, $sent_to = null)
if ($res) {
$userInfo = api_get_user_info($userId);
Display::addFlash(Display::return_message(
get_lang('MessageSentTo') ."&nbsp;<b>" .$userInfo['complete_name'] ."</b>"
get_lang('MessageSentTo') ."&nbsp;<b>" .$userInfo['complete_name'] ."</b>",
'confirmation',
false
));
}
}

Loading…
Cancel
Save