mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added datetime to notifications + Fixed sticky/unsticky notifications disappearing
This commit is contained in:
@ -33,7 +33,7 @@ if (isset($_REQUEST['notification_id']) && isset($_REQUEST['action'])) {
|
||||
$status = 'ok';
|
||||
$message = 'Set as Sticky';
|
||||
}
|
||||
elseif ($_SESSION['userlevel'] == 10 && $_REQUEST['action'] == 'unstick' && dbUpdate(array('key'=>'sticky','value'=>0),'notifications_attribs','notifications_id = ? && user_id = ?',array($_REQUEST['notification_id'],$_SESSION['user_id']))) {
|
||||
elseif ($_SESSION['userlevel'] == 10 && $_REQUEST['action'] == 'unstick' && dbDelete('notifications_attribs',"notifications_id = ? && user_id = ? AND `key`='sticky'",array($_REQUEST['notification_id'],$_SESSION['user_id']))) {
|
||||
$status = 'ok';
|
||||
$message = 'Removed Sticky';
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ $notifications = new ObjCache('notifications');
|
||||
<div class="col-md-12">
|
||||
<blockquote>
|
||||
<p><?php echo $notif['body']; ?></p>
|
||||
<footer>Source: <code><?php echo $notif['source']; ?></code></footer>
|
||||
<footer><?php echo $notif['datetime']; ?> | Source: <code><?php echo $notif['source']; ?></code></footer>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
@ -104,7 +104,7 @@ $notifications = new ObjCache('notifications');
|
||||
<div class="col-md-12">
|
||||
<blockquote>
|
||||
<p><?php echo preg_replace('/\\\n/','<br />', $notif['body']); ?></p>
|
||||
<footer>Source: <code><?php echo $notif['source']; ?></code></footer>
|
||||
<footer><?php echo $notif['datetime']; ?> | Source: <code><?php echo $notif['source']; ?></code></footer>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
@ -134,7 +134,7 @@ $notifications = new ObjCache('notifications');
|
||||
<div class="col-md-12">
|
||||
<blockquote>
|
||||
<p><?php echo preg_replace('/\\\n/','<br />', $notif['body']); ?></p>
|
||||
<footer>Source: <code><?php echo $notif['source']; ?></code></footer>
|
||||
<footer><?php echo $notif['datetime']; ?> | Source: <code><?php echo $notif['source']; ?></code></footer>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
|
1
sql-schema/087.sql
Normal file
1
sql-schema/087.sql
Normal file
@ -0,0 +1 @@
|
||||
ALTER TABLE `notifications` ADD `datetime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
|
Reference in New Issue
Block a user