Files
server/usr/share/psa-pear/pear/horde-alarms
2026-01-07 20:52:11 +01:00

34 lines
1.1 KiB
PHP
Executable File

#!/usr/bin/env php
<?php
/**
* Copyright 2007-2017 Horde LLC (http://www.horde.org/)
*
* See the enclosed file COPYING for license information (LGPL-2). If you
* did not receive this file, see http://www.horde.org/licenses/lgpl.
*
* @author Jan Schneider <jan@horde.org>
* @category Horde
* @license http://www.horde.org/licenses/lgpl LGPL-2
* @package Horde
*/
$baseFile = __DIR__ . '/../lib/Application.php';
if (file_exists($baseFile)) {
require_once $baseFile;
} else {
require_once 'PEAR/Config.php';
require_once PEAR_Config::singleton()
->get('horde_dir', null, 'pear.horde.org') . '/lib/Application.php';
}
Horde_Registry::appInit('horde', array('cli' => true, 'user_admin' => true));
$alarm = $injector->getInstance('Horde_Alarm');
$alarm->notify(null, true, false, array('notify', 'desktop'));
foreach ($alarm->getErrors() as $id => $error) {
if (!is_int($id)) {
list($id) = explode("\0", $id);
$cli->message(sprintf(_("Error with alarm \"%s\""), $id), 'cli.error');
}
$cli->message($error, 'cli.error');
}