forked from extern/egroupware
docu and layout updates
This commit is contained in:
parent
76c98cf9ec
commit
8cd9ca29ed
@ -25,6 +25,8 @@ interface iface_notification {
|
||||
/**
|
||||
* sends notification
|
||||
*
|
||||
* @abstract NOTE, $_message contains some html-tags (<p><a><b><br>)
|
||||
* implementing class needs to handle them somehow.
|
||||
* @param string $_message
|
||||
*/
|
||||
public function send( $_message );
|
||||
|
@ -43,6 +43,10 @@ final class notification {
|
||||
|
||||
/**
|
||||
* sets notification message
|
||||
* @abstract $message accepts html tags: <p><a><b><br>.
|
||||
* NOTE: There is no XSS prevention in notifications framework!
|
||||
* You have to filter userinputs yourseve (e.g. htmlspechialchars() )
|
||||
*
|
||||
* @param string &$message
|
||||
*/
|
||||
public function set_message($_message) {
|
||||
|
@ -116,10 +116,10 @@ class notification_popup implements iface_notification {
|
||||
while ($notification = $this->db->row(true)) {
|
||||
switch (self::_window ) {
|
||||
case 'div' :
|
||||
$message .= nl2br($notification['message']). '<br>';
|
||||
$message .= '<p>'. nl2br($notification['message']). '</p>';
|
||||
break;
|
||||
case 'alert' :
|
||||
$message .= $notification['message']. "\n";
|
||||
$message .= ".\n". $notification['message']. "\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user