Page MenuHomeIn-Portal Phabricator

email_logs_config.php
No OneTemporary

File Metadata

Created
Wed, Sep 24, 6:45 AM

email_logs_config.php

<?php
/**
* @version $Id: email_logs_config.php 15944 2013-08-22 09:47:06Z alex $
* @package In-Portal
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
$config = Array (
'Prefix' => 'email-log',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'EmailLogEventHandler', 'file' => 'email_log_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'EmailLogTagProcessor', 'file' => 'email_log_tp.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'ScheduledTasks' => Array (
'rotate_email_logs' => Array ('EventName' => 'OnRotate', 'RunSchedule' => '0 0 * * *'),
),
'IDField' => 'EmailLogId',
'TableName' => TABLE_PREFIX . 'EmailLog',
'TitleField' => 'EmailLogId',
'TitlePresets' => Array (
'email_log_list' => Array ('prefixes' => Array ('email-log_List'), 'format' => '!la_tab_EmailLog!'),
'email_log_edit' => Array (
'prefixes' => Array ('email-log'), 'format' => "!la_title_ViewingEmailLog! '#email-log_titlefield#'",
),
),
'PermSection' => Array ('main' => 'in-portal:emaillog'),
'Sections' => Array (
'in-portal:emaillog' => Array (
'parent' => 'in-portal:reports',
'icon' => 'email_log',
'label' => 'la_tab_EmailLog',
'url' => Array ('t' => 'logs/email_logs/email_log_list', 'pass' => 'm'),
'permissions' => Array ('view', 'edit', 'delete'),
'priority' => 5,
'type' => stTREE,
),
),
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN ' . TABLE_PREFIX . 'Users to_user ON %1$s.ToUserId = to_user.PortalUserId',
),
'CalculatedFields' => Array (
'' => Array (
'ToUser' => 'IF (ISNULL(to_user.Username), IF (%1$s.ToUserId = ' . USER_ROOT . ', "root", IF (%1$s.ToUserId = ' . USER_GUEST . ', "Guest", "n/a")), IF(to_user.Username = "", to_user.Email, to_user.Username))',
),
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('SentOn' => 'desc'),
)
),
'Fields' => Array (
'EmailLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'From' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'To' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'OtherRecipients' => Array ('type' => 'string', 'default' => NULL),
'Subject' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'HtmlBody' => Array ('type' => 'string', 'default' => NULL),
'TextBody' => Array ('type' => 'string', 'default' => NULL),
'Status' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (
EmailLogStatus::SENT => 'la_opt_Sent',
EmailLogStatus::ERROR => 'la_opt_Error'
), 'use_phrases' => 1, 'not_null' => 1, 'default' => EmailLogStatus::SENT
),
'ErrorMessage' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'SentOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'TemplateName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'EventType' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Text_Admin', 0 => 'la_Text_User'), 'use_phrases' => 1,
'default' => NULL
),
'EventParams' => Array ('type' => 'string', 'default' => NULL),
'AccessKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => ''),
'ToUserId' => Array('type' => 'int', 'default' => NULL),
'ItemPrefix' => Array(
'type' => 'string', 'max_len' => 50,
'formatter' => 'kOptionsFormatter',
'options_sql' => 'SELECT DISTINCT %s FROM ' . TABLE_PREFIX . 'EmailLog ORDER BY Phrase',
'option_key_field' => 'ItemPrefix', 'option_title_field' => 'CONCAT("la_prefix_", ItemPrefix) AS Phrase',
'use_phrases' => 1,
'not_null' => 1, 'default' => ''
),
'ItemId' => Array('type' => 'int', 'default' => NULL),
),
'VirtualFields' => array(
'ToUser' => array('type' => 'string', 'default' => ''),
),
'Grids' => Array (
'Default' => Array (
'Fields' => Array (
'EmailLogId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 80),
'From' => Array ('title' => 'column:la_fld_Sender', 'filter_block' => 'grid_like_filter', 'width' => 200),
'To' => Array ('title' => 'column:la_fld_Recipient', 'filter_block' => 'grid_like_filter', 'width' => 200),
'ToUser' => Array ('title' => 'column:la_fld_RecipientUser', 'filter_block' => 'grid_like_filter', 'width' => 120),
'Subject' => Array ('filter_block' => 'grid_like_filter', 'width' => 200),
'TemplateName' => Array ('filter_block' => 'grid_like_filter', 'width' => 170),
'EventType' => Array ('title' => 'column:la_fld_Type', 'filter_block' => 'grid_options_filter', 'width' => 60),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
'ErrorMessage' => Array ('filter_block' => 'grid_like_filter', 'width' => 200),
'SentOn' => Array ('title' => 'la_prompt_SentOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145),
// 'EventParams' => Array ('title' => 'la_col_EventParams', 'filter_block' => 'grid_like_filter'),
'ItemPrefix' => Array('filter_block' => 'grid_options_filter'),
'ItemId' => Array('filter_block' => 'grid_range_filter', 'width' => 80),
),
),
),
);

Event Timeline