Moved the Agents into their own repo. Kept the agent.pl just for reference
This commit is contained in:
parent
22381be29a
commit
8680a02b13
18132 changed files with 0 additions and 2569420 deletions
|
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
|
||||
require 'include/ticket.php';
|
||||
require 'include/TicketSettings.php';
|
||||
|
||||
function exec_ogp_module()
|
||||
{
|
||||
global $db;
|
||||
|
||||
$ticket = new Ticket($db);
|
||||
$TicketSettings = new TicketSettings($db);
|
||||
$notificationsEnabled = $TicketSettings->get('notifications_enabled');
|
||||
|
||||
if ($notificationsEnabled['notifications_enabled']) {
|
||||
$isAdmin = $db->isAdmin($_SESSION['user_id']);
|
||||
$status = $isAdmin ? 3 : 2;
|
||||
$ticketOwner = (!$isAdmin ? $_SESSION['user_id'] : null);
|
||||
|
||||
echo json_encode(
|
||||
array('notificationCount' => $ticket->notificationCount($ticketOwner, $status)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue