本文整理汇总了PHP中Logging::DebugLog方法的典型用法代码示例。如果您正苦于以下问题:PHP Logging::DebugLog方法的具体用法?PHP Logging::DebugLog怎么用?PHP Logging::DebugLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Logging
的用法示例。
在下文中一共展示了Logging::DebugLog方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DownloadEmails
static function DownloadEmails($cronJob = false, $exists = false, $reload = false)
{
if (is_array(Server::$Groups)) {
foreach (Server::$Groups as $group) {
$gmbout = Mailbox::GetById($group->TicketEmailOut);
if (is_array($group->TicketEmailIn)) {
foreach ($group->TicketEmailIn as $mid) {
if (!empty(Server::$Configuration->Database["gl_email"][$mid]) && Server::$Configuration->Database["gl_email"][$mid]->LastConnect < time() - Server::$Configuration->Database["gl_email"][$mid]->ConnectFrequency * 60) {
CacheManager::FlushKey(DATA_CACHE_KEY_DBCONFIG);
Server::$Configuration->Database["gl_email"][$mid]->SetLastConnect(time());
$newmails = Server::$Configuration->Database["gl_email"][$mid]->Download($reload, Server::$Configuration->Database["gl_email"][$mid]->Delete);
if ($reload) {
Server::$Configuration->Database["gl_email"][$mid]->SetLastConnect(0);
}
if (!empty($newmails) && is_array($newmails)) {
foreach ($newmails as $temail) {
if (TicketEmail::Exists($temail->Id)) {
continue;
}
$Ticket = null;
$temail->MailboxId = $mid;
$temail->GroupId = $group->Id;
if (preg_match_all("/\\[[a-zA-Z\\d]{12}\\]/", $temail->Subject . $temail->Body . $temail->BodyHTML, $matches)) {
if (empty(Server::$Configuration->File["gl_avhe"])) {
$temail->BodyHTML = "";
}
foreach ($matches[0] as $match) {
$id = $groupid = $language = "";
if ($exists = Ticket::Exists($match, $id, $groupid, $language)) {
$Ticket = new Ticket($id, true);
$Ticket->ChannelId = $mid;
$Ticket->Group = $groupid;
$Ticket->Language = strtoupper($language);
$Ticket->Messages[0]->Type = $gmbout != null && $temail->Email == $gmbout->Email || $temail->Email == Server::$Configuration->Database["gl_email"][$mid]->Email ? 1 : 3;
$Ticket->Messages[0]->Text = $temail->Body;
$Ticket->Messages[0]->Email = !empty($temail->ReplyTo) ? $temail->ReplyTo : $temail->Email;
$Ticket->Messages[0]->ChannelId = $temail->Id;
$Ticket->Messages[0]->Fullname = $temail->Name;
$Ticket->Messages[0]->Subject = $temail->Subject;
$Ticket->Messages[0]->Hash = strtoupper(str_replace(array("[", "]"), "", $match));
$Ticket->Messages[0]->Created = $temail->Created;
$Ticket->Messages[0]->Save($id, false, null, $Ticket);
$Ticket->Reactivate();
$Ticket->SetLastUpdate(time());
Logging::DebugLog("SAVE EMAIL REPLY: " . $Ticket->Messages[0]->Id . " - " . $temail->Id . " - " . $temail->Subject);
break;
}
}
}
if (!$exists) {
if ($group->TicketHandleUnknownEmails == 1) {
$temail->Save();
} else {
if ($group->TicketHandleUnknownEmails == 0) {
$temail->Save();
$temail->Destroy();
$Ticket = new Ticket(CacheManager::GetObjectId("ticket_id", DATABASE_TICKETS), true);
$Ticket->ChannelId = $mid;
$Ticket->Group = $group->Id;
$Ticket->CreationType = 1;
$Ticket->Language = strtoupper(Server::$Configuration->File["gl_default_language"]);
$Ticket->Messages[0]->Id = $Ticket->Id;
$Ticket->Messages[0]->Type = 3;
$Ticket->Messages[0]->Text = $temail->Body;
$Ticket->Messages[0]->Email = !empty($temail->ReplyTo) ? $temail->ReplyTo : $temail->Email;
$Ticket->Messages[0]->ChannelId = $temail->Id;
$Ticket->Messages[0]->Fullname = $temail->Name;
$Ticket->Messages[0]->Created = $temail->Created;
$Ticket->Messages[0]->Subject = $temail->Subject;
$Ticket->Messages[0]->Attachments = $temail->Attachments;
$Ticket->Messages[0]->SaveAttachments();
$Ticket->Save();
$Ticket->AutoAssignEditor();
$Ticket->SetLastUpdate(time());
LocalizationManager::AutoLoad(strtolower(Server::$Configuration->File["gl_default_language"]), true);
$Ticket->SendAutoresponder(new Visitor(""), new VisitorBrowser("", false));
LocalizationManager::AutoLoad("", true);
}
}
}
foreach ($temail->Attachments as $attid => $attdata) {
file_put_contents(PATH_UPLOADS . $attdata[0], $attdata[2]);
KnowledgeBase::Process("SYSTEM", $attid, $attdata[0], 3, $attdata[1], 0, 100, 1);
if (!$exists && $group->TicketHandleUnknownEmails == 1) {
$temail->SaveAttachment($attid);
}
if (!empty($Ticket)) {
$Ticket->Messages[0]->ApplyAttachment($attid);
}
}
}
}
if (!$cronJob) {
return;
}
}
}
}
}
}
//.........这里部分代码省略.........
示例2: logit
function logit($v)
{
Logging::DebugLog($v);
}