Files
server/usr/share/psa-horde/nag/quick.php
2026-01-07 20:52:11 +01:00

21 lines
711 B
PHP

<?php
require_once __DIR__ . '/lib/Application.php';
Horde_Registry::appInit('nag');
if ($quickText = Horde_Util::getPost('quickText')) {
try {
$result = Nag::createTasksFromText($quickText, Nag::getDefaultTasklist(Horde_Perms::EDIT));
} catch (Nag_Exception $e) {
$notification->push($e->getMessage());
}
if ($result) {
$notification->push(sprintf(ngettext("Added %d task", "Added %d tasks", count($result)), count($result)), 'horde.success');
} else {
$notification->push(_("No tasks have been added."), 'horde.warning');
}
} else {
$notification->push(_("No tasks have been added."), 'horde.warning');
}
Horde::url('list.php', true)->redirect();