Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/logs/email_logs/email_log_eh.php
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | |||||
} | } | ||||
$sql = 'SELECT ' . $this->Application->getUnitOption($event->Prefix, 'IDField') . ' | $sql = 'SELECT ' . $this->Application->getUnitOption($event->Prefix, 'IDField') . ' | ||||
FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . ' | FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . ' | ||||
WHERE ' . TIMENOW . ' - SentOn > ' . $rotation_interval; | WHERE ' . TIMENOW . ' - SentOn > ' . $rotation_interval; | ||||
$ids = $this->Conn->GetCol($sql); | $ids = $this->Conn->GetCol($sql); | ||||
if ( $ids ) { | if ( $ids ) { | ||||
/** @var kTempTablesHandler $temp_handler */ | |||||
$temp_handler = $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => $event)); | $temp_handler = $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => $event)); | ||||
/* @var $temp_handler kTempTablesHandler */ | |||||
$temp_handler->DeleteItems($event->Prefix, $event->Special, $ids); | $temp_handler->DeleteItems($event->Prefix, $event->Special, $ids); | ||||
} | } | ||||
} | } | ||||
/** | /** | ||||
* Returns HTML of sent e-mail for iframe | * Returns HTML of sent e-mail for iframe | ||||
* | * | ||||
* @param kEvent $event | * @param kEvent $event | ||||
* @return void | * @return void | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function OnGetHtmlBody(kEvent $event) | protected function OnGetHtmlBody(kEvent $event) | ||||
{ | { | ||||
$event->status = kEvent::erSTOP; | $event->status = kEvent::erSTOP; | ||||
/** @var kDBItem $object */ | |||||
$object = $event->getObject(); | $object = $event->getObject(); | ||||
/* @var $object kDBItem */ | |||||
echo $object->GetDBField('HtmlBody'); | echo $object->GetDBField('HtmlBody'); | ||||
} | } | ||||
/** | /** | ||||
* Checks, that currently loaded item is allowed for viewing (non permission-based) | * Checks, that currently loaded item is allowed for viewing (non permission-based) | ||||
* | * | ||||
* @param kEvent $event | * @param kEvent $event | ||||
* @return bool | * @return bool | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function checkItemStatus(kEvent $event) | protected function checkItemStatus(kEvent $event) | ||||
{ | { | ||||
/** @var kDBItem $object */ | |||||
$object = $event->getObject(); | $object = $event->getObject(); | ||||
/* @var $object kDBItem */ | |||||
if ( !$object->isLoaded() ) { | if ( !$object->isLoaded() ) { | ||||
return true; | return true; | ||||
} | } | ||||
$access_key = $object->GetDBField('AccessKey'); | $access_key = $object->GetDBField('AccessKey'); | ||||
return $access_key && $this->Application->GetVar('authkey') == $access_key; | return $access_key && $this->Application->GetVar('authkey') == $access_key; | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |