| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- <?php return array (
- 'cfcc329eb831525d81ee59e90755b5b6' =>
- 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 = "<script> var cel_config = " . $modx->toJSON($resObj) . "; </script>";
- $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 = "<script> var cel_config = " . $modx->toJSON($resObj) . "; </script>";
- $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,
- ),
- ),
- );
|