array (
'criteria' =>
array (
'name' => 'controlerrorlog',
),
'object' =>
array (
'name' => 'controlerrorlog',
'path' => '{core_path}components/controlerrorlog/',
'assets_path' => '',
),
),
'8ab77a1c2fb4a17efdea27b6756be973' =>
array (
'criteria' =>
array (
'key' => 'controlerrorlog.last_lines',
),
'object' =>
array (
'key' => 'controlerrorlog.last_lines',
'value' => '15',
'xtype' => 'numberfield',
'namespace' => 'controlerrorlog',
'area' => 'controlerrorlog.main',
'editedon' => NULL,
),
),
'17b191c27199c7801528bc7560b500da' =>
array (
'criteria' =>
array (
'key' => 'controlerrorlog.refresh_freq',
),
'object' =>
array (
'key' => 'controlerrorlog.refresh_freq',
'value' => '60',
'xtype' => 'numberfield',
'namespace' => 'controlerrorlog',
'area' => 'controlerrorlog.main',
'editedon' => NULL,
),
),
'e07b5dca8fbe408e15ca8a54b3c955ff' =>
array (
'criteria' =>
array (
'key' => 'controlerrorlog.auto_refresh',
),
'object' =>
array (
'key' => 'controlerrorlog.auto_refresh',
'value' => '1',
'xtype' => 'combo-boolean',
'namespace' => 'controlerrorlog',
'area' => 'controlerrorlog.main',
'editedon' => NULL,
),
),
'3634058ff6f3b9e0998aad8241d81069' =>
array (
'criteria' =>
array (
'key' => 'controlerrorlog.control_frontend',
),
'object' =>
array (
'key' => 'controlerrorlog.control_frontend',
'value' => '',
'xtype' => 'combo-boolean',
'namespace' => 'controlerrorlog',
'area' => 'controlerrorlog.main',
'editedon' => NULL,
),
),
'480508a17f6a747f6821938f4924e734' =>
array (
'criteria' =>
array (
'key' => 'controlerrorlog.admin_email',
),
'object' =>
array (
'key' => 'controlerrorlog.admin_email',
'value' => '',
'xtype' => 'textfield',
'namespace' => 'controlerrorlog',
'area' => 'controlerrorlog.main',
'editedon' => NULL,
),
),
'a7c7c35d35d463638db14ae06f8d0eb4' =>
array (
'criteria' =>
array (
'category' => 'controlErrorLog',
),
'object' =>
array (
'id' => 14,
'parent' => 0,
'category' => 'controlErrorLog',
'rank' => 0,
),
),
'1935d8dd2279b94c384b3fcc93d60783' =>
array (
'criteria' =>
array (
'name' => 'controlErrorLog',
),
'object' =>
array (
'id' => 7,
'source' => 1,
'property_preprocess' => 0,
'name' => 'controlErrorLog',
'description' => '',
'editor_type' => 0,
'category' => 14,
'cache_type' => 0,
'plugincode' => 'switch ($modx->event->name) {
case \'OnManagerPageBeforeRender\':
if ($modx->hasPermission(\'error_log_view\')) {
$modx->controller->addLexiconTopic(\'controlerrorlog:default\');
$modx->controller->addCss($modx->getOption(\'assets_url\').\'components/controlerrorlog/css/mgr/main.css\');
$modx->controller->addJavascript($modx->getOption(\'assets_url\').\'components/controlerrorlog/js/mgr/cel.default.js\');
$response = $modx->runProcessor(\'mgr/errorlog/get\', array(\'includeContent\'=>false), array(\'processors_path\' => $modx->getOption(\'core_path\') . \'components/controlerrorlog/processors/\'));
$resObj = $response->getObject();
$_html = "";
$modx->controller->addHtml($_html);
}
break;
case \'OnWebPageComplete\':
$email = $modx->getOption(\'controlerrorlog.admin_email\');
if ($modx->context->get(\'key\') == \'mgr\' || empty($email) || !$modx->getOption(\'controlerrorlog.control_frontend\')) return;
$f = $modx->getOption(xPDO::OPT_CACHE_PATH) . \'logs/error.log\';
if (file_exists($f)) {
$casheHash = $modx->cacheManager->get(\'error_log\');
$hash = md5_file($f);
if (filesize($f) > 0 && !empty($casheHash) && $casheHash != $hash) {
$modx->lexicon->load(\'controlerrorlog:default\');
/** @var modPHPMailer $mail */
$mail = $modx->getService(\'mail\', \'mail.modPHPMailer\');
$mail->setHTML(true);
$mail->set(modMail::MAIL_SUBJECT, $modx->lexicon(\'error_log_email_subject\'));
$mail->set(modMail::MAIL_BODY, $modx->lexicon(\'error_log_email_body\', array(\'siteName\' => $modx->config[\'site_name\'])));
$mail->set(modMail::MAIL_SENDER, $modx->getOption(\'emailsender\'));
$mail->set(modMail::MAIL_FROM, $modx->getOption(\'emailsender\'));
$mail->set(modMail::MAIL_FROM_NAME, $modx->getOption(\'site_name\'));
$mail->address(\'to\', $email);
$mail->address(\'reply-to\', $modx->getOption(\'emailsender\'));
if (!$mail->send()) {
print (\'An error occurred while trying to send the email: \'.$modx->mail->mailer->ErrorInfo);
}
$mail->reset();
}
if ($casheHash != $hash) {
$modx->cacheManager->set(\'error_log\', $hash, 0);
}
}
break;
}',
'locked' => 0,
'properties' => NULL,
'disabled' => 0,
'moduleguid' => '',
'static' => 0,
'static_file' => 'core/components/controlerrorlog/elements/plugins/plugin.controlerrorlog.php',
'content' => 'switch ($modx->event->name) {
case \'OnManagerPageBeforeRender\':
if ($modx->hasPermission(\'error_log_view\')) {
$modx->controller->addLexiconTopic(\'controlerrorlog:default\');
$modx->controller->addCss($modx->getOption(\'assets_url\').\'components/controlerrorlog/css/mgr/main.css\');
$modx->controller->addJavascript($modx->getOption(\'assets_url\').\'components/controlerrorlog/js/mgr/cel.default.js\');
$response = $modx->runProcessor(\'mgr/errorlog/get\', array(\'includeContent\'=>false), array(\'processors_path\' => $modx->getOption(\'core_path\') . \'components/controlerrorlog/processors/\'));
$resObj = $response->getObject();
$_html = "";
$modx->controller->addHtml($_html);
}
break;
case \'OnWebPageComplete\':
$email = $modx->getOption(\'controlerrorlog.admin_email\');
if ($modx->context->get(\'key\') == \'mgr\' || empty($email) || !$modx->getOption(\'controlerrorlog.control_frontend\')) return;
$f = $modx->getOption(xPDO::OPT_CACHE_PATH) . \'logs/error.log\';
if (file_exists($f)) {
$casheHash = $modx->cacheManager->get(\'error_log\');
$hash = md5_file($f);
if (filesize($f) > 0 && !empty($casheHash) && $casheHash != $hash) {
$modx->lexicon->load(\'controlerrorlog:default\');
/** @var modPHPMailer $mail */
$mail = $modx->getService(\'mail\', \'mail.modPHPMailer\');
$mail->setHTML(true);
$mail->set(modMail::MAIL_SUBJECT, $modx->lexicon(\'error_log_email_subject\'));
$mail->set(modMail::MAIL_BODY, $modx->lexicon(\'error_log_email_body\', array(\'siteName\' => $modx->config[\'site_name\'])));
$mail->set(modMail::MAIL_SENDER, $modx->getOption(\'emailsender\'));
$mail->set(modMail::MAIL_FROM, $modx->getOption(\'emailsender\'));
$mail->set(modMail::MAIL_FROM_NAME, $modx->getOption(\'site_name\'));
$mail->address(\'to\', $email);
$mail->address(\'reply-to\', $modx->getOption(\'emailsender\'));
if (!$mail->send()) {
print (\'An error occurred while trying to send the email: \'.$modx->mail->mailer->ErrorInfo);
}
$mail->reset();
}
if ($casheHash != $hash) {
$modx->cacheManager->set(\'error_log\', $hash, 0);
}
}
break;
}',
),
),
'e7ab7ce05f18e304c8359c0b2a3935b7' =>
array (
'criteria' =>
array (
'pluginid' => 7,
'event' => 'OnManagerPageBeforeRender',
),
'object' =>
array (
'pluginid' => 7,
'event' => 'OnManagerPageBeforeRender',
'priority' => 0,
'propertyset' => 0,
),
),
'a272f82e0dc47cd422a7593cd11e7ffa' =>
array (
'criteria' =>
array (
'pluginid' => 7,
'event' => 'OnWebPageComplete',
),
'object' =>
array (
'pluginid' => 7,
'event' => 'OnWebPageComplete',
'priority' => 0,
'propertyset' => 0,
),
),
);