docu and layout updates

This commit is contained in:
Cornelius Weiß 2007-06-18 08:48:43 +00:00
parent 76c98cf9ec
commit 8cd9ca29ed
3 changed files with 8 additions and 2 deletions

View File

@ -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 );

View File

@ -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) {

View File

@ -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;
}
}