本文整理匯總了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);