array (
'criteria' =>
array (
'name' => 'controlerrorlog',
),
'object' =>
array (
'name' => 'controlerrorlog',
'path' => '{core_path}components/controlerrorlog/',
'assets_path' => '',
),
),
'c6b0d7dc69515ccfbc56f53ff5b92979' =>
array (
'criteria' =>
array (
'key' => 'controlerrorlog.last_lines',
),
'object' =>
array (
'key' => 'controlerrorlog.last_lines',
'value' => '15',
'xtype' => 'numberfield',
'namespace' => 'controlerrorlog',
'area' => 'controlerrorlog.main',
'editedon' => NULL,
),
),
'fac5269bbaa2413065f4e3f500db4d84' =>
array (
'criteria' =>
array (
'key' => 'controlerrorlog.refresh_freq',
),
'object' =>
array (
'key' => 'controlerrorlog.refresh_freq',
'value' => '60',
'xtype' => 'numberfield',
'namespace' => 'controlerrorlog',
'area' => 'controlerrorlog.main',
'editedon' => NULL,
),
),
'5cc62a8e4d945052128c717ddb994514' =>
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,
),
),
'db1651ccf8d78878f7fad86a0818ec4f' =>
array (
'criteria' =>
array (
'key' => 'controlerrorlog.control_frontend',
),
'object' =>
array (
'key' => 'controlerrorlog.control_frontend',
'value' => '',
'xtype' => 'combo-boolean',
'namespace' => 'controlerrorlog',
'area' => 'controlerrorlog.main',
'editedon' => NULL,
),
),
'f7ec2e1038e0a965ecab04223491cd3b' =>
array (
'criteria' =>
array (
'key' => 'controlerrorlog.admin_email',
),
'object' =>
array (
'key' => 'controlerrorlog.admin_email',
'value' => '',
'xtype' => 'textfield',
'namespace' => 'controlerrorlog',
'area' => 'controlerrorlog.main',
'editedon' => NULL,
),
),
'fc52b35d4dd2b1ca9360e0658b3c1d0b' =>
array (
'criteria' =>
array (
'key' => 'controlerrorlog.allow_copy_deletion',
),
'object' =>
array (
'key' => 'controlerrorlog.allow_copy_deletion',
'value' => '1',
'xtype' => 'combo-boolean',
'namespace' => 'controlerrorlog',
'area' => 'controlerrorlog.main',
'editedon' => NULL,
),
),
'8d45f03f2b643a262a3c40630c679a36' =>
array (
'criteria' =>
array (
'category' => 'controlErrorLog',
),
'object' =>
array (
'id' => 14,
'parent' => 0,
'category' => 'controlErrorLog',
'rank' => 0,
),
),
'c4ed937aabe20bd41baf4743e2ac2432' =>
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 \'OnHandleRequest\':
if ($modx->context->get(\'key\') == \'mgr\') 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);
$email = $modx->getOption(\'controlerrorlog.admin_email\');
if (filesize($f) > 0 && !empty($casheHash) && $casheHash != $hash && $modx->getOption(\'controlerrorlog.control_frontend\') && !empty($email)) {
$modx->lexicon->load(\'controlerrorlog:default\');
/** @var modPHPMailer $mail */
$mail = $modx->getService(\'mail\', \'mail.modPHPMailer\');
$mail->setHTML(true);
$mail->set(modMail::MAIL_SUBJECT, $modx->lexicon(\'errorlog_email_subject\'));
$mail->set(modMail::MAIL_BODY, $modx->lexicon(\'errorlog_email_body\'));
$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 \'OnHandleRequest\':
if ($modx->context->get(\'key\') == \'mgr\') 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);
$email = $modx->getOption(\'controlerrorlog.admin_email\');
if (filesize($f) > 0 && !empty($casheHash) && $casheHash != $hash && $modx->getOption(\'controlerrorlog.control_frontend\') && !empty($email)) {
$modx->lexicon->load(\'controlerrorlog:default\');
/** @var modPHPMailer $mail */
$mail = $modx->getService(\'mail\', \'mail.modPHPMailer\');
$mail->setHTML(true);
$mail->set(modMail::MAIL_SUBJECT, $modx->lexicon(\'errorlog_email_subject\'));
$mail->set(modMail::MAIL_BODY, $modx->lexicon(\'errorlog_email_body\'));
$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;
}',
),
),
'beef8e7a85c708ddde40020258b2ecee' =>
array (
'criteria' =>
array (
'pluginid' => 7,
'event' => 'OnManagerPageBeforeRender',
),
'object' =>
array (
'pluginid' => 7,
'event' => 'OnManagerPageBeforeRender',
'priority' => 0,
'propertyset' => 0,
),
),
'cad8effc6200116dce84759e6e09092f' =>
array (
'criteria' =>
array (
'pluginid' => 7,
'event' => 'OnWebPageComplete',
),
'object' =>
array (
'pluginid' => 7,
'event' => 'OnWebPageComplete',
'priority' => 0,
'propertyset' => 0,
),
),
);