本文整理汇总了PHP中Whups::getCurrentTicket方法的典型用法代码示例。如果您正苦于以下问题:PHP Whups::getCurrentTicket方法的具体用法?PHP Whups::getCurrentTicket怎么用?PHP Whups::getCurrentTicket使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Whups
的用法示例。
在下文中一共展示了Whups::getCurrentTicket方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
/**
* Copyright 2001-2002 Robert E. Coyle <robertecoyle@hotmail.com>
* Copyright 2001-2014 Horde LLC (http://www.horde.org/)
*
* See the enclosed file LICENSE for license information (BSD). If you
* did not receive this file, see http://www.horde.org/licenses/bsdl.php.
*/
require_once __DIR__ . '/../lib/Application.php';
Horde_Registry::appInit('whups');
$ticket = Whups::getCurrentTicket();
$page_output->addLinkTag($ticket->feedLink());
if (!Whups::hasPermission($ticket->get('queue'), 'queue', 'update')) {
$notification->push(_("Permission Denied"), 'horde.error');
Horde::url($prefs->getValue('whups_default_view') . '.php', true)->redirect();
}
Whups::addTopbarSearch();
$vars = Horde_Variables::getDefaultVariables();
$vars->set('id', $id = $ticket->getId());
foreach ($ticket->getDetails() as $varname => $value) {
if ($varname == 'owners') {
$owners = $gowners = array();
foreach ($value as $owner) {
if (strpos($owner, 'user:') !== false) {
$owners[] = $owner;
} else {
$gowners[] = $owner;
}
}
$vars->add('owners', $owners);