Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sat, Feb 22, 12:03 AM

in-portal

This file is larger than 256 KB, so syntax highlighting was skipped.
Index: branches/5.3.x/core/kernel/db/cat_dbitem.php
===================================================================
--- branches/5.3.x/core/kernel/db/cat_dbitem.php (revision 15937)
+++ branches/5.3.x/core/kernel/db/cat_dbitem.php (revision 15938)
@@ -1,621 +1,621 @@
<?php
/**
* @version $Id$
* @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!');
class kCatDBItem extends kDBItem {
/**
* Category path, needed for import
*
* @var Array
*/
var $CategoryPath = Array();
/**
* Use automatic filename generation
*
* @var bool
*/
var $useFilenames = true;
/**
* Use pending editing abilities during item (delegated by permissions)
*
* @var bool
*/
var $usePendingEditing = false;
/**
* Removes all data from an object
*
* @param int $new_id
* @return bool
* @access public
*/
public function Clear($new_id = null)
{
parent::Clear($new_id);
$this->CategoryPath = Array();
}
/**
* Set's prefix and special
*
* @param string $prefix
* @param string $special
* @access public
*/
function Init($prefix, $special)
{
parent::Init($prefix, $special);
$this->usePendingEditing = $this->getUnitConfig()->getUsePendingEditing();
}
/**
* Assigns primary category for the item
*
* @access public
*/
public function assignPrimaryCategory()
{
if ( $this->GetDBField('CategoryId') <= 0 ) {
// set primary category in item object
$this->SetDBField('CategoryId', $this->Application->GetVar('m_cat_id'));
}
$this->assignToCategory($this->GetDBField('CategoryId'), true);
}
/**
* Updates previously loaded record with current item' values
*
* @access public
* @param int $id Primary Key Id to update
* @param Array $update_fields
* @param bool $system_update
* @return bool
* @access public
*/
public function Update($id = null, $update_fields = null, $system_update = false)
{
if ( $this->useFilenames ) {
$this->checkFilename();
$this->generateFilename();
}
$ret = parent::Update($id, $update_fields, $system_update);
if ( $ret ) {
$filename = $this->useFilenames ? (string)$this->GetDBField('Filename') : '';
$sql = 'UPDATE ' . $this->CategoryItemsTable() . '
SET Filename = ' . $this->Conn->qstr($filename) . '
WHERE ItemResourceId = ' . $this->GetDBField('ResourceId');
$this->Conn->Query($sql);
}
return $ret;
}
/**
* Returns CategoryItems table based on current item mode (temp/live)
*
* @return string
*/
function CategoryItemsTable()
{
$table = TABLE_PREFIX.'CategoryItems';
if ($this->Application->IsTempTable($this->TableName)) {
$table = $this->Application->GetTempName($table, 'prefix:'.$this->Prefix);
}
return $table;
}
function checkFilename()
{
if( !$this->GetDBField('AutomaticFilename') )
{
$filename = $this->GetDBField('Filename');
$this->SetDBField('Filename', $this->stripDisallowed($filename) );
}
}
function Copy($cat_id=null)
{
if (!isset($cat_id)) $cat_id = $this->Application->GetVar('m_cat_id');
$this->NameCopy($cat_id);
return $this->Create($cat_id);
}
/**
* Sets new name for item in case if it is being copied in same table
*
* @param array $master Table data from TempHandler
* @param int $foreign_key ForeignKey value to filter name check query by
* @param string $title_field FieldName to alter, by default - TitleField of the prefix
* @param string $format sprintf-style format of renaming pattern, by default Copy %1$s of %2$s which makes it Copy [Number] of Original Name
* @access public
*/
public function NameCopy($master=null, $foreign_key=null, $title_field=null, $format='Copy %1$s of %2$s')
{
$title_field = $this->getUnitConfig()->getTitleField();
if (!$title_field) return;
$new_name = $this->GetDBField($title_field);
$cat_id = (int)$this->Application->GetVar('m_cat_id');
$original_checked = false;
do {
if ( preg_match('/Copy ([0-9]*) *of (.*)/', $new_name, $regs) ) {
$new_name = 'Copy '.( (int)$regs[1] + 1 ).' of '.$regs[2];
}
elseif ($original_checked) {
$new_name = 'Copy of '.$new_name;
}
$query = 'SELECT '.$title_field.' FROM '.$this->TableName.'
LEFT JOIN '.TABLE_PREFIX.'CategoryItems ON
('.TABLE_PREFIX.'CategoryItems.ItemResourceId = '.$this->TableName.'.ResourceId)
WHERE ('.TABLE_PREFIX.'CategoryItems.CategoryId = '.$cat_id.') AND '.
$title_field.' = '.$this->Conn->qstr($new_name);
$res = $this->Conn->GetOne($query);
$original_checked = true;
} while ($res !== false);
$this->SetDBField($title_field, $new_name);
// this is needed, because Create will create items in its own CategoryId (if it's set),
// but we need to create it in target Paste category @see{kCatDBItem::Create} and its primary_category detection
$this->SetDBField('CategoryId', $cat_id);
}
/**
* Changes item primary category to given/current category
*
* @param int $category_id
*/
function MoveToCat($category_id = null)
{
// $this->NameCopy();
if (!isset($category_id)) {
$category_id = $this->Application->GetVar('m_cat_id');
}
$table_name = TABLE_PREFIX . 'CategoryItems';
if ($this->IsTempTable()) {
$table_name = $this->Application->GetTempName($table_name, 'prefix:' . $this->Prefix);
}
// check if the item already exists in destination category
$sql = 'SELECT PrimaryCat
FROM ' . $table_name . '
WHERE (CategoryId = ' . (int)$category_id . ') AND (ItemResourceId = ' . $this->GetDBField('ResourceId') . ')';
$is_primary = $this->Conn->GetOne($sql);
// if it's not found is_primary will be FALSE, if it's found but not primary it will be int 0
$exists = $is_primary !== false;
if ($exists) {
// if the item already exists in destination category
if ($is_primary) {
// do nothing when we paste to primary
return ;
}
// if it's not primary - delete it from destination category, as we will move it from current primary below
$sql = 'DELETE FROM ' . $table_name . '
WHERE (CategoryId = ' . (int)$category_id . ') AND (ItemResourceId = ' . $this->GetDBField('ResourceId') . ')';
$this->Conn->Query($sql);
}
// change category id in existing primary category record
$sql = 'UPDATE ' . $table_name . '
SET CategoryId = ' . (int)$category_id . '
WHERE (ItemResourceId = ' . $this->GetDBField('ResourceId') . ') AND (PrimaryCat = 1)';
$this->Conn->Query($sql);
$this->Update();
}
/**
* When item is deleted, then also delete it from all categories
*
* @param int $id
* @return bool
* @access public
*/
public function Delete($id = null)
{
if ( isset($id) ) {
$this->setID($id);
}
$this->Load($this->GetID());
$ret = parent::Delete();
if ( $ret ) {
// TODO: move to OnAfterItemDelete method
$query = ' DELETE FROM ' . $this->CategoryItemsTable() . '
WHERE ItemResourceId = ' . $this->GetDBField('ResourceId');
$this->Conn->Query($query);
}
return $ret;
}
/**
* Deletes item from categories
*
* @param Array $delete_category_ids
* @author Alex
*/
function DeleteFromCategories($delete_category_ids)
{
$id_field = $this->getUnitConfig()->getIDField(); // because item was loaded before by ResourceId
$ci_table = $this->Application->getUnitConfig($this->Prefix . '-ci')->getTableName();
$resource_id = $this->GetDBField('ResourceId');
$item_cats_sql = ' SELECT CategoryId
FROM %s
WHERE ItemResourceId = %s';
$delete_category_items_sql = ' DELETE FROM %s
WHERE ItemResourceId = %s AND CategoryId IN (%s)';
$category_ids = $this->Conn->GetCol( sprintf($item_cats_sql, $ci_table, $resource_id) );
$cats_left = array_diff($category_ids, $delete_category_ids);
if ( !$cats_left ) {
$sql = 'SELECT %s
FROM %s
WHERE ResourceId = %s';
$ids = $this->Conn->GetCol(sprintf($sql, $id_field, $this->TableName, $resource_id));
$temp_handler = $this->Application->recallObject($this->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems($this->Prefix, $this->Special, $ids);
}
else {
$this->Conn->Query( sprintf($delete_category_items_sql, $ci_table, $resource_id, implode(',', $delete_category_ids)) );
$sql = 'SELECT CategoryId
FROM %s
WHERE PrimaryCat = 1 AND ItemResourceId = %s';
$primary_cat_id = $this->Conn->GetCol(sprintf($sql, $ci_table, $resource_id));
if ( count($primary_cat_id) == 0 ) {
$sql = 'UPDATE %s
SET PrimaryCat = 1
WHERE (CategoryId = %s) AND (ItemResourceId = %s)';
$this->Conn->Query( sprintf($sql, $ci_table, reset($cats_left), $resource_id) );
}
}
}
/**
* replace not allowed symbols with "_" chars + remove duplicate "_" chars in result
*
* @param string $filename
* @return string
*/
function stripDisallowed($filename)
{
$filenames_helper = $this->Application->recallObject('FilenamesHelper');
/* @var $filenames_helper kFilenamesHelper */
$table = $this->IsTempTable() ? $this->Application->GetTempName(TABLE_PREFIX.'CategoryItems', 'prefix:'.$this->Prefix) : TABLE_PREFIX.'CategoryItems';
return $filenames_helper->stripDisallowed($table, 'ItemResourceId', $this->GetDBField('ResourceId'), $filename);
}
/* commented out because it's called only from stripDisallowed body, which is moved to helper
function checkAutoFilename($filename)
{
$filenames_helper = $this->Application->recallObject('FilenamesHelper');
return $filenames_helper->checkAutoFilename($this->TableName, $this->IDField, $this->GetID(), $filename);
}*/
/**
* Generate item's filename based on it's title field value
*
* @return void
* @access protected
*/
protected function generateFilename()
{
if ( !$this->GetDBField('AutomaticFilename') && $this->GetDBField('Filename') ) {
return ;
}
$title_field = $this->getUnitConfig()->getTitleField();
if ( preg_match('/l([\d]+)_(.*)/', $title_field, $regs) ) {
// if title field is multilingual, then use it's name from primary language
$title_field = 'l' . $this->Application->GetDefaultLanguageId() . '_' . $regs[2];
}
$name = $this->stripDisallowed( $this->GetDBField($title_field) );
if ( $name != $this->GetDBField('Filename') ) {
$this->SetDBField('Filename', $name);
}
}
/**
* Adds item to other category
*
* @param int $category_id
* @param bool $is_primary
* @return void
* @access public
*/
public function assignToCategory($category_id, $is_primary = false)
{
$table = $this->CategoryItemsTable();
$key_clause = '(ItemResourceId = ' . $this->GetDBField('ResourceId') . ')';
// get all categories, where item is in
$sql = 'SELECT PrimaryCat, CategoryId
FROM ' . $table . '
WHERE ' . $key_clause;
$item_categories = $this->Conn->GetCol($sql, 'CategoryId');
$primary_found = $item_category_id = false;
if ( $item_categories ) {
// find primary category
foreach ($item_categories as $item_category_id => $primary_found) {
if ( $primary_found ) {
break;
}
}
}
if ( $primary_found && ($item_category_id == $category_id) && !$is_primary ) {
// want to make primary category as non-primary :(
return;
}
elseif ( !$primary_found ) {
$is_primary = true;
}
if ( $is_primary && $item_categories ) {
// reset primary mark from all other categories
$sql = 'UPDATE ' . $table . '
SET PrimaryCat = 0
WHERE ' . $key_clause;
$this->Conn->Query($sql);
}
// UPDATE & INSERT instead of REPLACE because CategoryItems table has no primary key defined in database
if ( isset($item_categories[$category_id]) ) {
$sql = 'UPDATE ' . $table . '
SET PrimaryCat = ' . ($is_primary ? 1 : 0) . '
WHERE ' . $key_clause . ' AND (CategoryId = ' . $category_id . ')';
$this->Conn->Query($sql);
}
else {
$fields_hash = Array(
'CategoryId' => $category_id,
'ItemResourceId' => $this->GetField('ResourceId'),
'PrimaryCat' => $is_primary ? 1 : 0,
'ItemPrefix' => $this->Prefix,
'Filename' => $this->useFilenames ? (string)$this->GetDBField('Filename') : '', // because some prefixes does not use filenames,
);
$this->Conn->doInsert($fields_hash, $table);
}
// to ensure filename update after adding to another category
// this is critical since there may be an item with same filename in newly added category!
$this->Update();
}
/**
* Removes item from category specified
*
* @param int $category_id
*/
function removeFromCategory($category_id)
{
$sql = 'DELETE FROM '.TABLE_PREFIX.'CategoryItems WHERE (CategoryId = %s) AND (ItemResourceId = %s)';
$this->Conn->Query( sprintf($sql, $category_id, $this->GetDBField('ResourceId')) );
}
/**
* Returns list of columns, that could exist in imported file
*
* @return Array
*/
function getPossibleExportColumns()
{
static $columns = null;
if (!is_array($columns)) {
$columns = array_merge($this->Fields['AvailableColumns']['options'], $this->Fields['ExportColumns']['options']);
}
return $columns;
}
/**
* Returns item's primary image data
*
* @return Array
*/
function getPrimaryImageData()
{
$sql = 'SELECT *
FROM '.TABLE_PREFIX.'CatalogImages
WHERE (ResourceId = '.$this->GetDBField('ResourceId').') AND (DefaultImg = 1)';
$image_data = $this->Conn->GetRow($sql);
if (!$image_data) {
// 2. no primary image, then get image with name "main"
$sql = 'SELECT *
FROM '.TABLE_PREFIX.'CatalogImages
WHERE (ResourceId = '.$this->GetDBField('ResourceId').') AND (Name = "main")';
$image_data = $this->Conn->GetRow($sql);
}
return $image_data;
}
function ChangeStatus($new_status, $pending_editing = false)
{
$status_field = $this->getUnitConfig()->getStatusField(true);
if ($new_status != $this->GetDBField($status_field)) {
// status was changed
$this->sendEmails($new_status, $pending_editing);
}
$this->SetDBField($status_field, $new_status);
return $this->Update();
}
function sendEmails($new_status, $pending_editing = false)
{
$config = $this->getUnitConfig();
$owner_field = $config->getOwnerField('CreatedById');
$event_name = $config->getPermItemPrefix();
if ($pending_editing) {
$event_name .= '.MODIFY';
}
$event_name .= $new_status == STATUS_ACTIVE ? '.APPROVE' : '.DENY';
- $this->Application->emailUser($event_name, $this->GetDBField($owner_field));
+ $this->Application->emailUser($event_name, $this->GetDBField($owner_field), $this->getEmailParams());
}
/**
* Approves changes made to category item
*
* @return bool
*/
function ApproveChanges()
{
$original_id = $this->GetDBField('OrgId');
if ( !($this->usePendingEditing && $original_id) ) {
// non-pending copy of original link
return $this->ChangeStatus(STATUS_ACTIVE);
}
if ( $this->raiseEvent('OnBeforeDeleteOriginal', null, Array ('original_id' => $original_id)) ) {
// delete original item, because changes made in pending copy (this item) got to be approved in this method
$temp_handler = $this->Application->recallObject($this->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems($this->Prefix, $this->Special, Array ($original_id));
$this->raiseEvent('OnAfterDeleteOriginal', null, Array ('original_id' => $original_id));
$this->SetDBField('OrgId', 0);
return $this->ChangeStatus(STATUS_ACTIVE, true);
}
return false;
}
/**
* Decline changes made to category item
*
* @return bool
*/
function DeclineChanges()
{
$original_id = $this->GetDBField('OrgId');
if ( !($this->usePendingEditing && $original_id) ) {
// non-pending copy of original link
return $this->ChangeStatus(STATUS_DISABLED);
}
// delete this item, because changes made in pending copy (this item) will be declined in this method
$temp_handler = $this->Application->recallObject($this->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems($this->Prefix, $this->Special, Array ($this->GetID()));
$this->sendEmails(STATUS_DISABLED, true);
// original item is not changed here, because it is already enabled (thrus pending copy is visible to item's owner or admin with permission)
return true;
}
function RegisterHit()
{
$already_viewed = $this->Application->RecallVar($this->getPrefixSpecial().'_already_viewed');
$already_viewed = $already_viewed ? unserialize($already_viewed) : Array ();
$id = $this->GetID();
if (!in_array($id, $already_viewed)) {
$property_map = $this->getUnitConfig()->getItemPropertyMappings(Array ());
if (!$property_map) {
return ;
}
$hits_field = $property_map['ClickField'];
$new_hits = $this->GetDBField($hits_field) + 1;
$sql = 'SELECT MAX('.$hits_field.')
FROM '.$this->TableName.'
WHERE FLOOR('.$hits_field.') = '.$new_hits;
$max_hits = $this->Conn->GetOne($sql);
if ($max_hits) {
$new_hits = $max_hits + 0.000001;
}
$fields_hash = Array ($hits_field => $new_hits,);
$this->Conn->doUpdate($fields_hash, $this->TableName, $this->IDField.' = '.$id);
array_push($already_viewed, $id);
$this->Application->StoreVar($this->getPrefixSpecial().'_already_viewed', serialize($already_viewed));
}
}
/**
* Returns part of SQL WHERE clause identifying the record, ex. id = 25
*
* @param string $method Child class may want to know who called GetKeyClause, Load(), Update(), Delete() send its names as method
* @param Array $keys_hash alternative, then item id, keys hash to load item by
* @see kDBItem::Load()
* @see kDBItem::Update()
* @see kDBItem::Delete()
* @return string
* @access protected
*/
protected function GetKeyClause($method = null, $keys_hash = null)
{
if ( $method == 'load' && !isset($keys_hash) ) {
// for item with many categories makes primary to load
$ci_table = TABLE_PREFIX . 'CategoryItems';
if ($this->IsTempTable()) {
$ci_table = $this->Application->GetTempName($ci_table, 'prefix:' . $this->Prefix);
}
// ensures, that CategoryId calculated field has primary category id in it
$keys_hash = Array (
$this->IDField => $this->ID,
'`' . $ci_table . '`.`PrimaryCat`' => 1
);
}
return parent::GetKeyClause($method, $keys_hash);
}
}
\ No newline at end of file
Index: branches/5.3.x/core/kernel/db/dbitem.php
===================================================================
--- branches/5.3.x/core/kernel/db/dbitem.php (revision 15937)
+++ branches/5.3.x/core/kernel/db/dbitem.php (revision 15938)
@@ -1,1557 +1,1572 @@
<?php
/**
* @version $Id$
* @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!');
/**
* DBItem
*
*/
class kDBItem extends kDBBase {
/**
* Description
*
* @var array Associative array of current item' field values
* @access protected
*/
protected $FieldValues = Array ();
/**
* Unformatted field values, before parse
*
* @var Array
* @access protected
*/
protected $DirtyFieldValues = Array ();
/**
* Holds item values after loading (not affected by submit)
*
* @var Array
* @access protected
*/
protected $OriginalFieldValues = Array ();
/**
* If set to true, Update will skip Validation before running
*
* @var array Associative array of current item' field values
* @access public
*/
public $IgnoreValidation = false;
/**
* Remembers if object was loaded
*
* @var bool
* @access protected
*/
protected $Loaded = false;
/**
* Holds item' primary key value
*
* @var int Value of primary key field for current item
* @access protected
*/
protected $ID;
/**
* This object is used in cloning operations
*
* @var bool
* @access public
*/
public $inCloning = false;
/**
* Validator object reference
*
* @var kValidator
*/
protected $validator = null;
/**
* Creates validator object, only when required
*
*/
public function initValidator()
{
if ( !is_object($this->validator) ) {
$validator_class = $this->getUnitConfig()->getValidatorClass('kValidator');
$this->validator = $this->Application->makeClass($validator_class);
}
$this->validator->setDataSource($this);
}
public function SetDirtyField($field_name, $field_value)
{
$this->DirtyFieldValues[$field_name] = $field_value;
}
public function GetDirtyField($field_name)
{
return $this->DirtyFieldValues[$field_name];
}
public function GetOriginalField($field_name, $formatted = false, $format=null)
{
if (array_key_exists($field_name, $this->OriginalFieldValues)) {
// item was loaded before
$value = $this->OriginalFieldValues[$field_name];
}
else {
// no original fields -> use default field value
$value = $this->Fields[$field_name]['default'];
}
if (!$formatted) {
return $value;
}
$res = $value;
$formatter = $this->GetFieldOption($field_name, 'formatter');
if ( $formatter ) {
$formatter = $this->Application->recallObject($formatter);
/* @var $formatter kFormatter */
$res = $formatter->Format($value, $field_name, $this, $format);
}
return $res;
}
/**
* Sets original field value (useful for custom virtual fields)
*
* @param string $field_name
* @param string $field_value
*/
public function SetOriginalField($field_name, $field_value)
{
$this->OriginalFieldValues[$field_name] = $field_value;
}
/**
* Set's default values for all fields
*
* @access public
*/
public function SetDefaultValues()
{
parent::SetDefaultValues();
if ($this->populateMultiLangFields) {
$this->PopulateMultiLangFields();
}
foreach ($this->Fields as $field => $field_options) {
$default_value = isset($field_options['default']) ? $field_options['default'] : NULL;
$this->SetDBField($field, $default_value);
}
}
/**
* Sets current item field value
* (applies formatting)
*
* @access public
* @param string $name Name of the field
* @param mixed $value Value to set the field to
* @return void
*/
public function SetField($name,$value)
{
$options = $this->GetFieldOptions($name);
$parsed = $value;
if ($value == '') {
$parsed = NULL;
}
// kFormatter is always used, to make sure, that numeric value is converted to normal representation
// according to regional format, even when formatter is not set (try seting format to 1.234,56 to understand why)
$formatter = $this->Application->recallObject(isset($options['formatter']) ? $options['formatter'] : 'kFormatter');
/* @var $formatter kFormatter */
$parsed = $formatter->Parse($value, $name, $this);
$this->SetDBField($name,$parsed);
}
/**
* Sets current item field value
* (doesn't apply formatting)
*
* @access public
* @param string $name Name of the field
* @param mixed $value Value to set the field to
* @return void
*/
public function SetDBField($name,$value)
{
$this->FieldValues[$name] = $value;
}
/**
* Set's field error, if pseudo passed not found then create it with message text supplied.
* Don't overwrite existing pseudo translation.
*
* @param string $field
* @param string $pseudo
* @param string $error_label
* @param Array $error_params
*
* @return bool
* @access public
*/
public function SetError($field, $pseudo, $error_label = null, $error_params = null)
{
$this->initValidator();
return $this->validator->SetError($field, $pseudo, $error_label, $error_params);
}
/**
* Removes error on field
*
* @param string $field
* @access public
*/
public function RemoveError($field)
{
if ( !is_object($this->validator) ) {
return ;
}
$this->validator->RemoveError($field);
}
/**
* Returns error pseudo
*
* @param string $field
* @return string
*/
public function GetErrorPseudo($field)
{
if ( !is_object($this->validator) ) {
return '';
}
return $this->validator->GetErrorPseudo($field);
}
/**
* Return current item' field value by field name
* (doesn't apply formatter)
*
* @param string $name field name to return
* @return mixed
* @access public
*/
public function GetDBField($name)
{
/*if (!array_key_exists($name, $this->FieldValues) && defined('DEBUG_MODE') && DEBUG_MODE) {
$this->Application->Debugger->appendTrace();
}*/
return $this->FieldValues[$name];
}
public function HasField($name)
{
return array_key_exists($name, $this->FieldValues);
}
public function GetFieldValues()
{
return $this->FieldValues;
}
/**
* Sets item' fields corresponding to elements in passed $hash values.
*
* The function sets current item fields to values passed in $hash, by matching $hash keys with field names
* of current item. If current item' fields are unknown {@link kDBItem::PrepareFields()} is called before actually setting the fields
*
* @param Array $hash
* @param Array $skip_fields Optional param, field names in target object not to set, other fields will be set
* @param Array $set_fields Optional param, field names in target object to set, other fields will be skipped
* @return void
* @access public
*/
public function SetFieldsFromHash($hash, $skip_fields = Array (), $set_fields = Array ())
{
if ( !$set_fields ) {
$set_fields = array_keys($hash);
}
if ( $skip_fields ) {
$set_fields = array_diff($set_fields, $skip_fields);
}
$set_fields = array_intersect($set_fields, array_keys($this->Fields));
// used in formatter which work with multiple fields together
foreach ($set_fields as $field_name) {
$this->SetDirtyField($field_name, $hash[$field_name]);
}
// formats all fields using associated formatters
foreach ($set_fields as $field_name) {
$this->SetField($field_name, $hash[$field_name]);
}
}
/**
* Sets object fields from $hash array
* @param Array $hash
* @param Array|null $skip_fields
* @param Array|null $set_fields
* @return void
* @access public
*/
public function SetDBFieldsFromHash($hash, $skip_fields = Array (), $set_fields = Array ())
{
if ( !$set_fields ) {
$set_fields = array_keys($hash);
}
if ( $skip_fields ) {
$set_fields = array_diff($set_fields, $skip_fields);
}
$set_fields = array_intersect($set_fields, array_keys($this->Fields));
foreach ($set_fields as $field_name) {
$this->SetDBField($field_name, $hash[$field_name]);
}
}
/**
* Returns part of SQL WHERE clause identifying the record, ex. id = 25
*
* @param string $method Child class may want to know who called GetKeyClause, Load(), Update(), Delete() send its names as method
* @param Array $keys_hash alternative, then item id, keys hash to load item by
* @see kDBItem::Load()
* @see kDBItem::Update()
* @see kDBItem::Delete()
* @return string
* @access protected
*/
protected function GetKeyClause($method = null, $keys_hash = null)
{
if ( !isset($keys_hash) ) {
$keys_hash = Array ($this->IDField => $this->ID);
}
$ret = '';
foreach ($keys_hash as $field => $value) {
$value_part = is_null($value) ? ' IS NULL' : ' = ' . $this->Conn->qstr($value);
$ret .= '(' . (strpos($field, '.') === false ? '`' . $this->TableName . '`.' : '') . $field . $value_part . ') AND ';
}
return substr($ret, 0, -5);
}
/**
* Loads item from the database by given id
*
* @access public
* @param mixed $id item id of keys->values hash to load item by
* @param string $id_field_name Optional parameter to load item by given Id field
* @param bool $cachable cache this query result based on it's prefix serial
* @return bool True if item has been loaded, false otherwise
*/
public function Load($id, $id_field_name = null, $cachable = false)
{
if ( isset($id_field_name) ) {
$this->IDField = $id_field_name; // set new IDField
}
$keys_sql = '';
if (is_array($id)) {
$keys_sql = $this->GetKeyClause('load', $id);
}
else {
$this->setID($id);
$keys_sql = $this->GetKeyClause('load');
}
if ( isset($id_field_name) ) {
// restore original IDField from unit config
$this->IDField = $this->getUnitConfig()->getIDField();
}
if (($id === false) || !$keys_sql) {
return $this->Clear();
}
if (!$this->raiseEvent('OnBeforeItemLoad', $id)) {
return false;
}
$q = $this->GetSelectSQL() . ' WHERE ' . $keys_sql;
if ($cachable && $this->Application->isCachingType(CACHING_TYPE_MEMORY)) {
$serial_name = $this->Application->incrementCacheSerial($this->Prefix == 'st' ? 'c' : $this->Prefix, isset($id_field_name) ? null : $id, false);
$cache_key = 'kDBItem::Load_' . crc32(serialize($id) . '-' . $this->IDField) . '[%' . $serial_name . '%]';
$field_values = $this->Application->getCache($cache_key, false);
if ($field_values === false) {
$field_values = $this->Conn->GetRow($q);
if ($field_values !== false) {
// only cache, when data was retrieved
$this->Application->setCache($cache_key, $field_values);
}
}
}
else {
$field_values = $this->Conn->GetRow($q);
}
if ($field_values) {
$this->FieldValues = array_merge($this->FieldValues, $field_values);
$this->OriginalFieldValues = $this->FieldValues;
}
else {
return $this->Clear();
}
if (is_array($id) || isset($id_field_name)) {
$this->setID($this->FieldValues[$this->IDField]);
}
$this->UpdateFormattersSubFields(); // used for updating separate virtual date/time fields from DB timestamp (for example)
$this->raiseEvent('OnAfterItemLoad', $this->GetID());
$this->Loaded = true;
return true;
}
/**
* Loads object from hash (not db)
*
* @param Array $fields_hash
* @param string $id_field
*/
public function LoadFromHash($fields_hash, $id_field = null)
{
if (!isset($id_field)) {
$id_field = $this->IDField;
}
$this->Clear();
if (!$fields_hash || !array_key_exists($id_field, $fields_hash)) {
// no data OR id field missing
return false;
}
$id = $fields_hash[$id_field];
if ( !$this->raiseEvent('OnBeforeItemLoad', $id) ) {
return false;
}
$this->FieldValues = array_merge($this->FieldValues, $fields_hash);
$this->OriginalFieldValues = $this->FieldValues;
$this->setID($id);
$this->UpdateFormattersSubFields(); // used for updating separate virtual date/time fields from DB timestamp (for example)
$this->raiseEvent('OnAfterItemLoad', $id);
$this->Loaded = true;
return true;
}
/**
* Builds select sql, SELECT ... FROM parts only
*
* @access public
* @return string
*/
/**
* Returns SELECT part of list' query
*
* @param string $base_query
* @param bool $replace_table
* @return string
* @access public
*/
public function GetSelectSQL($base_query = null, $replace_table = true)
{
if (!isset($base_query)) {
$base_query = $this->SelectClause;
}
$base_query = $this->addCalculatedFields($base_query);
return parent::GetSelectSQL($base_query, $replace_table);
}
public function UpdateFormattersMasterFields()
{
$this->initValidator(); // used, when called not from kValidator::Validate method
foreach ($this->Fields as $field => $options) {
if ( isset($options['formatter']) ) {
$formatter = $this->Application->recallObject($options['formatter']);
/* @var $formatter kFormatter */
$formatter->UpdateMasterFields($field, $this->GetDBField($field), $options, $this);
}
}
}
/**
* Returns variable name, used to store pending file actions
*
* @return string
* @access protected
*/
protected function _getPendingActionVariableName()
{
$window_id = $this->Application->GetTopmostWid($this->Prefix);
return $this->Prefix . '_file_pending_actions' . $window_id;
}
/**
* Returns pending actions
*
* @param mixed $id
* @return Array
* @access public
*/
public function getPendingActions($id = null)
{
if ( !isset($id) ) {
$id = $this->GetID();
}
$pending_actions = $this->Application->RecallVar($this->_getPendingActionVariableName());
$pending_actions = $pending_actions ? unserialize($pending_actions) : Array ();
if ( is_numeric($id) ) {
// filter by given/current id
$ret = Array ();
foreach ($pending_actions as $pending_action) {
if ( $pending_action['id'] == $id ) {
$ret[] = $pending_action;
}
}
return $ret;
}
return $pending_actions;
}
/**
* Sets new pending actions
*
* @param Array|null $new_pending_actions
* @param mixed $id
* @return void
* @access public
*/
public function setPendingActions($new_pending_actions = null, $id = null)
{
if ( !isset($new_pending_actions) ) {
$new_pending_actions = Array ();
}
if ( !isset($id) ) {
$id = $this->GetID();
}
$pending_actions = Array ();
$old_pending_actions = $this->getPendingActions(true);
if ( is_numeric($id) ) {
// remove old actions for this id
foreach ($old_pending_actions as $pending_action) {
if ( $pending_action['id'] != $id ) {
$pending_actions[] = $pending_action;
}
}
// add new actions for this id
$pending_actions = array_merge($pending_actions, $new_pending_actions);
}
else {
$pending_actions = $new_pending_actions;
}
// save changes
$var_name = $this->_getPendingActionVariableName();
if ( !$pending_actions ) {
$this->Application->RemoveVar($var_name);
}
else {
$this->Application->StoreVar($var_name, serialize($pending_actions));
}
}
/**
* Allows to skip certain fields from getting into sql queries
*
* @param string $field_name
* @param mixed $force_id
* @return bool
*/
public function skipField($field_name, $force_id = false)
{
$skip = false;
// 1. skipping 'virtual' field
$skip = $skip || array_key_exists($field_name, $this->VirtualFields);
// 2. don't write empty field value to db, when "skip_empty" option is set
$field_value = array_key_exists($field_name, $this->FieldValues) ? $this->FieldValues[$field_name] : false;
if (array_key_exists($field_name, $this->Fields)) {
$skip_empty = array_key_exists('skip_empty', $this->Fields[$field_name]) ? $this->Fields[$field_name]['skip_empty'] : false;
}
else {
// field found in database, but not declared in unit config
$skip_empty = false;
}
$skip = $skip || (!$field_value && $skip_empty);
// 3. skipping field not in Fields (nor virtual, nor real)
$skip = $skip || !array_key_exists($field_name, $this->Fields);
return $skip;
}
/**
* Updates previously loaded record with current item' values
*
* @access public
* @param int $id Primary Key Id to update
* @param Array $update_fields
* @param bool $system_update
* @return bool
* @access public
*/
public function Update($id = null, $update_fields = null, $system_update = false)
{
if ( isset($id) ) {
$this->setID($id);
}
if ( !$this->raiseEvent('OnBeforeItemUpdate') ) {
return false;
}
if ( !isset($this->ID) ) {
// ID could be set inside OnBeforeItemUpdate event, so don't combine this check with previous one
return false;
}
// validate before updating
if ( !$this->Validate() ) {
return false;
}
if ( !$this->FieldValues ) {
// nothing to update
return true;
}
$sql = '';
$set_fields = isset($update_fields) ? $update_fields : array_keys($this->FieldValues);
foreach ($set_fields as $field_name) {
if ( $this->skipField($field_name) ) {
continue;
}
$field_value = $this->FieldValues[$field_name];
if ( is_null($field_value) ) {
if ( array_key_exists('not_null', $this->Fields[$field_name]) && $this->Fields[$field_name]['not_null'] ) {
// "kFormatter::Parse" methods converts empty values to NULL and for
// not-null fields they are replaced with default value here
$field_value = $this->Fields[$field_name]['default'];
}
}
$sql .= '`' . $field_name . '` = ' . $this->Conn->qstr($field_value) . ', ';
}
$sql = 'UPDATE ' . $this->TableName . '
SET ' . substr($sql, 0, -2) . '
WHERE ' . $this->GetKeyClause('update');
if ( $this->Conn->ChangeQuery($sql) === false ) {
// there was and sql error
$this->SetError($this->IDField, 'sql_error', '#' . $this->Conn->getErrorCode() . ': ' . $this->Conn->getErrorMsg());
return false;
}
$affected_rows = $this->Conn->getAffectedRows();
if ( !$system_update && ($affected_rows > 0) ) {
$this->setModifiedFlag(ChangeLog::UPDATE);
}
$this->saveCustomFields();
$this->raiseEvent('OnAfterItemUpdate');
if ( !isset($update_fields) ) {
$this->OriginalFieldValues = $this->FieldValues;
}
else {
foreach ($update_fields as $update_field) {
$this->OriginalFieldValues[$update_field] = $this->FieldValues[$update_field];
}
}
$this->Loaded = true;
if ( !$this->IsTempTable() ) {
$this->Application->resetCounters($this->TableName);
}
return true;
}
/**
* Validates given field
*
* @param string $field
* @return bool
* @access public
*/
public function ValidateField($field)
{
$this->initValidator();
return $this->validator->ValidateField($field);
}
/**
* Validate all item fields based on
* constraints set in each field options
* in config
*
* @return bool
* @access private
*/
public function Validate()
{
if ( $this->IgnoreValidation ) {
return true;
}
$this->initValidator();
// will apply any custom validation to the item
$this->raiseEvent('OnBeforeItemValidate');
if ( $this->validator->Validate() ) {
// no validation errors
$this->raiseEvent('OnAfterItemValidate');
return true;
}
return false;
}
/**
* Check if item has errors
*
* @param Array $skip_fields fields to skip during error checking
* @return bool
*/
public function HasErrors($skip_fields = Array ())
{
if ( !is_object($this->validator) ) {
return false;
}
return $this->validator->HasErrors($skip_fields);
}
/**
* Check if value is set for required field
*
* @param string $field field name
* @param Array $params field options from config
* @return bool
* @access public
* @todo Find a way to get rid of direct call from kMultiLanguage::UpdateMasterFields method
*/
public function ValidateRequired($field, $params)
{
return $this->validator->ValidateRequired($field, $params);
}
/**
* Return error message for field
*
* @param string $field
* @param bool $force_escape
* @return string
* @access public
*/
public function GetErrorMsg($field, $force_escape = null)
{
if ( !is_object($this->validator) ) {
return '';
}
return $this->validator->GetErrorMsg($field, $force_escape);
}
/**
* Returns field errors
*
* @return Array
* @access public
*/
public function GetFieldErrors()
{
if ( !is_object($this->validator) ) {
return Array ();
}
return $this->validator->GetFieldErrors();
}
/**
* Creates a record in the database table with current item' values
*
* @param mixed $force_id Set to TRUE to force creating of item's own ID or to value to force creating of passed id. Do not pass 1 for true, pass exactly TRUE!
* @param bool $system_create
* @return bool
* @access public
*/
public function Create($force_id = false, $system_create = false)
{
if (!$this->raiseEvent('OnBeforeItemCreate')) {
return false;
}
// Validating fields before attempting to create record
if (!$this->Validate()) {
return false;
}
if (is_int($force_id)) {
$this->FieldValues[$this->IDField] = $force_id;
}
elseif (!$force_id || !is_bool($force_id)) {
$this->FieldValues[$this->IDField] = $this->generateID();
}
$fields_sql = '';
$values_sql = '';
foreach ($this->FieldValues as $field_name => $field_value) {
if ($this->skipField($field_name, $force_id)) {
continue;
}
if (is_null($field_value)) {
if (array_key_exists('not_null', $this->Fields[$field_name]) && $this->Fields[$field_name]['not_null']) {
// "kFormatter::Parse" methods converts empty values to NULL and for
// not-null fields they are replaced with default value here
$values_sql .= $this->Conn->qstr($this->Fields[$field_name]['default']);
}
else {
$values_sql .= $this->Conn->qstr($field_value);
}
}
else {
if (($field_name == $this->IDField) && ($field_value == 0) && !is_int($force_id)) {
// don't skip IDField in INSERT statement, just use DEFAULT keyword as it's value
$values_sql .= 'DEFAULT';
}
else {
$values_sql .= $this->Conn->qstr($field_value);
}
}
$fields_sql .= '`' . $field_name . '`, '; //Adding field name to fields block of Insert statement
$values_sql .= ', ';
}
$sql = 'INSERT INTO ' . $this->TableName . ' (' . substr($fields_sql, 0, -2) . ')
VALUES (' . substr($values_sql, 0, -2) . ')';
//Executing the query and checking the result
if ($this->Conn->ChangeQuery($sql) === false) {
$this->SetError($this->IDField, 'sql_error', '#' . $this->Conn->getErrorCode() . ': ' . $this->Conn->getErrorMsg());
return false;
}
$insert_id = $this->Conn->getInsertID();
if ($insert_id == 0) {
// insert into temp table (id is not auto-increment field)
$insert_id = $this->FieldValues[$this->IDField];
}
$this->setID($insert_id);
$this->OriginalFieldValues = $this->FieldValues;
if (!$system_create){
$this->setModifiedFlag(ChangeLog::CREATE);
}
$this->saveCustomFields();
if (!$this->IsTempTable()) {
$this->Application->resetCounters($this->TableName);
}
if ($this->IsTempTable() && ($this->Application->GetTopmostPrefix($this->Prefix) != $this->Prefix) && !is_int($force_id)) {
// temp table + subitem = set negative id
$this->setTempID();
}
$this->raiseEvent('OnAfterItemCreate');
$this->Loaded = true;
return true;
}
/**
* Deletes the record from database
*
* @param int $id
* @return bool
* @access public
*/
public function Delete($id = null)
{
if ( isset($id) ) {
$this->setID($id);
}
if ( !$this->raiseEvent('OnBeforeItemDelete') ) {
return false;
}
$sql = 'DELETE FROM ' . $this->TableName . '
WHERE ' . $this->GetKeyClause('Delete');
$ret = $this->Conn->ChangeQuery($sql);
$affected_rows = $this->Conn->getAffectedRows();
if ( $affected_rows > 0 ) {
$this->setModifiedFlag(ChangeLog::DELETE); // will change affected rows, so get it before this line
// something was actually deleted
$this->raiseEvent('OnAfterItemDelete');
}
if ( !$this->IsTempTable() ) {
$this->Application->resetCounters($this->TableName);
}
return $ret;
}
public function PopulateMultiLangFields()
{
foreach ($this->Fields as $field => $options) {
// master field is set only for CURRENT language
$formatter = array_key_exists('formatter', $options) ? $options['formatter'] : false;
if ( ($formatter == 'kMultiLanguage') && isset($options['master_field']) && isset($options['error_field']) ) {
// MuliLanguage formatter sets error_field to master_field, but in PopulateMlFields mode,
// we display ML fields directly so we set it back to itself, otherwise error won't be displayed
unset( $this->Fields[$field]['error_field'] );
}
}
}
/**
* Sets new name for item in case if it is being copied in same table
*
* @param array $master Table data from TempHandler
* @param int $foreign_key ForeignKey value to filter name check query by
* @param string $title_field FieldName to alter, by default - TitleField of the prefix
* @param string $format sprintf-style format of renaming pattern, by default Copy %1$s of %2$s which makes it Copy [Number] of Original Name
* @access public
*/
public function NameCopy($master=null, $foreign_key=null, $title_field=null, $format='Copy %1$s of %2$s')
{
if ( !isset($title_field) ) {
$title_field = $this->getUnitConfig()->getTitleField();
if ( !$title_field || isset($this->CalculatedFields[$title_field]) ) {
return;
}
}
$original_checked = false;
$new_name = $this->GetDBField($title_field);
do {
if ( preg_match('/' . sprintf($format, '([0-9]*) *', '(.*)') . '/', $new_name, $regs) ) {
$new_name = sprintf($format, ($regs[1] + 1), $regs[2]);
}
elseif ( $original_checked ) {
$new_name = sprintf($format, '', $new_name);
}
// if we are cloning in temp table this will look for names in temp table,
// since object' TableName contains correct TableName (for temp also!)
// if we are cloning live - look in live
$sql = 'SELECT ' . $title_field . '
FROM ' . $this->TableName . '
WHERE ' . $title_field . ' = ' . $this->Conn->qstr($new_name);
$foreign_key_field = getArrayValue($master, 'ForeignKey');
$foreign_key_field = is_array($foreign_key_field) ? $foreign_key_field[$master['ParentPrefix']] : $foreign_key_field;
if ( $foreign_key_field && isset($foreign_key) ) {
$sql .= ' AND ' . $foreign_key_field . ' = ' . $foreign_key;
}
$res = $this->Conn->GetOne($sql);
// if not found in live table, check in temp table if applicable
/*if ( $res === false && $this->Special == 'temp' ) {
$sql = 'SELECT ' . $name_field . '
FROM ' . $this->Application->GetTempName($master['TableName']) . '
WHERE ' . $name_field . ' = ' . $this->Conn->qstr($new_name);
$res = $this->Conn->GetOne($sql);
}*/
$original_checked = true;
} while ( $res !== false );
$this->SetDBField($title_field, $new_name);
}
protected function raiseEvent($name, $id = null, $additional_params = Array())
{
$additional_params['id'] = isset($id) ? $id : $this->GetID();
$event = new kEvent($this->getPrefixSpecial() . ':' . $name, $additional_params);
if ( is_object($this->parentEvent) ) {
$event->MasterEvent = $this->parentEvent;
}
$this->Application->HandleEvent($event);
return $event->status == kEvent::erSUCCESS;
}
/**
* Set's new ID for item
*
* @param int $new_id
* @access public
*/
public function setID($new_id)
{
$this->ID = $new_id;
$this->SetDBField($this->IDField, $new_id);
}
/**
* Generate and set new temporary id
*
* @access private
*/
public function setTempID()
{
$new_id = (int)$this->Conn->GetOne('SELECT MIN(' . $this->IDField . ') FROM ' . $this->TableName);
if ( $new_id > 0 ) {
$new_id = 0;
}
--$new_id;
$this->Conn->Query('UPDATE ' . $this->TableName . ' SET `' . $this->IDField . '` = ' . $new_id . ' WHERE `' . $this->IDField . '` = ' . $this->GetID());
if ( $this->ShouldLogChanges(true) ) {
// Updating TempId in ChangesLog, if changes are disabled
$ses_var_name = $this->Application->GetTopmostPrefix($this->Prefix) . '_changes_' . $this->Application->GetTopmostWid($this->Prefix);
$changes = $this->Application->RecallVar($ses_var_name);
$changes = $changes ? unserialize($changes) : Array ();
if ( $changes ) {
foreach ($changes as $key => $rec) {
if ( $rec['Prefix'] == $this->Prefix && $rec['ItemId'] == $this->GetID() ) {
// change log for record, that's ID was just updated -> update in change log record too
$changes[$key]['ItemId'] = $new_id;
}
if ( $rec['MasterPrefix'] == $this->Prefix && $rec['MasterId'] == $this->GetID() ) {
// master item id was changed
$changes[$key]['MasterId'] = $new_id;
}
if ( in_array($this->Prefix, $rec['ParentPrefix']) && $rec['ParentId'][$this->Prefix] == $this->GetID() ) {
// change log record of given item's sub item -> update changed id's in dependent fields
$changes[$key]['ParentId'][$this->Prefix] = $new_id;
if ( array_key_exists('DependentFields', $rec) ) {
// these are fields from table of $rec['Prefix'] table!
// when one of dependent fields goes into id field of it's parent item, that was changed
$config = $this->Application->getUnitConfig($rec['Prefix']);
$parent_table_key = $config->getParentTableKey($this->Prefix);
if ( $parent_table_key == $this->IDField ) {
$foreign_key = $config->getForeignKey($this->Prefix);
$changes[$key]['DependentFields'][$foreign_key] = $new_id;
}
}
}
}
}
$this->Application->StoreVar($ses_var_name, serialize($changes));
}
$this->SetID($new_id);
}
/**
* Set's modification flag for main prefix of current prefix to true
*
* @param int $mode
* @access private
*/
public function setModifiedFlag($mode = null)
{
$main_prefix = $this->Application->GetTopmostPrefix($this->Prefix);
$this->Application->StoreVar($main_prefix . '_modified', '1', true); // true for optional
if ($this->ShouldLogChanges(true)) {
$this->LogChanges($main_prefix, $mode);
if (!$this->IsTempTable()) {
$handler = $this->Application->recallObject($this->Prefix . '_EventHandler');
/* @var $handler kDBEventHandler */
$ses_var_name = $main_prefix . '_changes_' . $this->Application->GetTopmostWid($this->Prefix);
$handler->SaveLoggedChanges($ses_var_name, $this->ShouldLogChanges());
}
}
}
/**
* Determines, that changes made to this item should be written to change log
*
* @param bool $log_changes
* @return bool
*/
public function ShouldLogChanges($log_changes = null)
{
$config = $this->getUnitConfig();
if ( !isset($log_changes) ) {
// specific logging mode no forced -> use global logging settings
$log_changes = $config->getLogChanges() || $this->Application->ConfigValue('UseChangeLog');
}
return $log_changes && !$config->getForceDontLogChanges();
}
protected function LogChanges($main_prefix, $mode)
{
if ( !$mode ) {
return ;
}
$ses_var_name = $main_prefix . '_changes_' . $this->Application->GetTopmostWid($this->Prefix);
$changes = $this->Application->RecallVar($ses_var_name);
$changes = $changes ? unserialize($changes) : Array ();
$fields_hash = Array (
'Prefix' => $this->Prefix,
'ItemId' => $this->GetID(),
'OccuredOn' => time(),
'MasterPrefix' => $main_prefix,
'Action' => $mode,
);
if ( $this->Prefix == $main_prefix ) {
// main item
$fields_hash['MasterId'] = $this->GetID();
$fields_hash['ParentPrefix'] = Array ($main_prefix);
$fields_hash['ParentId'] = Array ($main_prefix => $this->GetID());
}
else {
// sub item
// collect foreign key values (for serial reset)
$config = $this->getUnitConfig();
$foreign_keys = $config->getForeignKey(null, Array ());
$dependent_fields = $fields_hash['ParentId'] = $fields_hash['ParentPrefix'] = Array ();
/* @var $foreign_keys Array */
if ( is_array($foreign_keys) ) {
foreach ($foreign_keys as $prefix => $field_name) {
$dependent_fields[$field_name] = $this->GetDBField($field_name);
$fields_hash['ParentPrefix'][] = $prefix;
$fields_hash['ParentId'][$prefix] = $this->getParentId($prefix);
}
}
else {
$dependent_fields[$foreign_keys] = $this->GetDBField($foreign_keys);
$fields_hash['ParentPrefix'] = Array ( $config->getParentPrefix() );
$fields_hash['ParentId'][ $fields_hash['ParentPrefix'][0] ] = $this->getParentId('auto');
}
$fields_hash['DependentFields'] = $dependent_fields;
// works only, when main item is present in url, when sub-item is changed
$master_id = $this->Application->GetVar($main_prefix . '_id');
if ( $master_id === false ) {
// works in case of we are not editing topmost item, when sub-item is created/updated/deleted
$master_id = $this->getParentId('auto', true);
}
$fields_hash['MasterId'] = $master_id;
}
switch ( $mode ) {
case ChangeLog::UPDATE:
$to_save = array_merge($this->GetTitleField(), $this->GetChangedFields());
break;
case ChangeLog::CREATE:
$to_save = $this->GetTitleField();
break;
case ChangeLog::DELETE:
$to_save = array_merge($this->GetTitleField(), $this->GetRealFields());
break;
default:
$to_save = Array ();
break;
}
$fields_hash['Changes'] = serialize($to_save);
$changes[] = $fields_hash;
$this->Application->StoreVar($ses_var_name, serialize($changes));
}
/**
* Returns current item parent's ID
*
* @param string $parent_prefix
* @param bool $top_most return topmost parent, when used
* @return int
* @access public
*/
public function getParentId($parent_prefix, $top_most = false)
{
$current_id = $this->GetID();
$current_prefix = $this->Prefix;
$current_config = $this->Application->getUnitConfig($current_prefix);
if ( $parent_prefix == 'auto' ) {
$parent_prefix = $current_config->getParentPrefix();
}
if ( !$parent_prefix ) {
return $current_id;
}
do {
// field in this table
$foreign_key = $current_config->getForeignKey($parent_prefix);
// get foreign key value for $current_prefix
if ( $current_prefix == $this->Prefix ) {
$foreign_key_value = $this->GetDBField($foreign_key);
}
else {
$table_name = $current_config->getTableName();
if ( $this->IsTempTable() ) {
$table_name = $this->Application->GetTempName($table_name, 'prefix:' . $current_prefix);
}
$sql = 'SELECT ' . $foreign_key . '
FROM ' . $table_name . '
WHERE ' . $current_config->getIDField() . ' = ' . $current_id;
$foreign_key_value = $this->Conn->GetOne($sql);
}
// field in parent table
$parent_table_key = $current_config->getParentTableKey($parent_prefix);
$parent_config = $this->Application->getUnitConfig($parent_prefix);
$parent_id_field = $parent_config->getIDField();
$parent_table_name = $parent_config->getTableName();
if ( $this->IsTempTable() ) {
$parent_table_name = $this->Application->GetTempName($parent_table_name, 'prefix:' . $current_prefix);
}
if ( $parent_id_field == $parent_table_key ) {
// sub-item is related by parent item id field
$current_id = $foreign_key_value;
}
else {
// sub-item is related by other parent item field
$sql = 'SELECT ' . $parent_id_field . '
FROM ' . $parent_table_name . '
WHERE ' . $parent_table_key . ' = ' . $foreign_key_value;
$current_id = $this->Conn->GetOne($sql);
}
$current_prefix = $parent_prefix;
$current_config = $this->Application->getUnitConfig($current_prefix);
if ( !$top_most ) {
break;
}
} while ( $parent_prefix = $current_config->getParentPrefix() );
return $current_id;
}
/**
* Returns title field (if any)
*
* @return Array
*/
public function GetTitleField()
{
$title_field = $this->getUnitConfig()->getTitleField();
if ( $title_field ) {
$value = $this->GetField($title_field);
return $value ? Array ($title_field => $value) : Array ();
}
return Array ();
}
/**
* Returns only fields, that are present in database (no virtual and no calculated fields)
*
* @return Array
*/
public function GetRealFields()
{
return array_diff_key($this->FieldValues, $this->VirtualFields, $this->CalculatedFields);
}
/**
* Returns only changed database field
*
* @param bool $include_virtual_fields
* @return Array
*/
public function GetChangedFields($include_virtual_fields = false)
{
$changes = Array ();
$fields = $include_virtual_fields ? $this->FieldValues : $this->GetRealFields();
$diff = array_diff_assoc($fields, $this->OriginalFieldValues);
foreach ($diff as $field => $new_value) {
$old_value = $this->GetOriginalField($field, true);
$new_value = $this->GetField($field);
if ($old_value != $new_value) {
// "0.00" and "0.0000" are stored as strings and will differ. Double check to prevent that.
$changes[$field] = Array ('old' => $old_value, 'new' => $new_value);
}
}
return $changes;
}
/**
* Returns ID of currently processed record
*
* @return int
* @access public
*/
public function GetID()
{
return $this->ID;
}
/**
* Generates ID for new items before inserting into database
*
* @return int
* @access private
*/
protected function generateID()
{
return 0;
}
/**
* Returns true if item was loaded successfully by Load method
*
* @return bool
*/
public function isLoaded()
{
return $this->Loaded;
}
/**
* Checks if field is required
*
* @param string $field
* @return bool
*/
public function isRequired($field)
{
return isset($this->Fields[$field]['required']) && $this->Fields[$field]['required'];
}
/**
* Sets new required flag to field
*
* @param mixed $fields
* @param bool $is_required
*/
public function setRequired($fields, $is_required = true)
{
if ( !is_array($fields) ) {
$fields = explode(',', $fields);
}
foreach ($fields as $field) {
$this->Fields[$field]['required'] = $is_required;
}
}
/**
* Removes all data from an object
*
* @param int $new_id
* @return bool
* @access public
*/
public function Clear($new_id = null)
{
$this->Loaded = false;
$this->FieldValues = $this->OriginalFieldValues = Array ();
$this->SetDefaultValues(); // will wear off kDBItem::setID effect, so set it later
if ( is_object($this->validator) ) {
$this->validator->reset();
}
$this->setID($new_id);
return $this->Loaded;
}
public function Query($force = false)
{
throw new Exception('<b>Query</b> method is called in class <strong>' . get_class($this) . '</strong> for prefix <strong>' . $this->getPrefixSpecial() . '</strong>');
}
protected function saveCustomFields()
{
if ( !$this->customFields || $this->inCloning ) {
return true;
}
$cdata_key = rtrim($this->Prefix . '-cdata.' . $this->Special, '.');
$cdata = $this->Application->recallObject($cdata_key, null, Array ('skip_autoload' => true));
/* @var $cdata kDBItem */
$resource_id = $this->GetDBField('ResourceId');
$cdata->Load($resource_id, 'ResourceId');
$cdata->SetDBField('ResourceId', $resource_id);
$ml_formatter = $this->Application->recallObject('kMultiLanguage');
/* @var $ml_formatter kMultiLanguage */
$ml_helper = $this->Application->recallObject('kMultiLanguageHelper');
/* @var $ml_helper kMultiLanguageHelper */
$languages = $ml_helper->getLanguages();
foreach ($this->customFields as $custom_id => $custom_name) {
$force_primary = $cdata->GetFieldOption('cust_' . $custom_id, 'force_primary');
if ( $force_primary ) {
$cdata->SetDBField($ml_formatter->LangFieldName('cust_' . $custom_id, true), $this->GetDBField('cust_' . $custom_name));
}
else {
foreach ($languages as $language_id) {
$cdata->SetDBField('l' . $language_id . '_cust_' . $custom_id, $this->GetDBField('l' . $language_id . '_cust_' . $custom_name));
}
}
}
return $cdata->isLoaded() ? $cdata->Update() : $cdata->Create();
}
/**
* Returns specified field value from all selected rows.
* Don't affect current record index
*
* @param string $field
* @param bool $formatted
* @param string $format
* @return Array
*/
public function GetCol($field, $formatted = false, $format = null)
{
if ($formatted) {
return Array (0 => $this->GetField($field, $format));
}
return Array (0 => $this->GetDBField($field));
}
/**
* Set's loaded status of object
*
* @param bool $is_loaded
* @access public
* @todo remove this method, since item can't be marked as loaded externally
*/
public function setLoaded($is_loaded = true)
{
$this->Loaded = $is_loaded;
}
+
+ /**
+ * Returns parser parameters, used to identify this object in the e-mail template.
+ *
+ * @param array $merge_with Original send params to merge with.
+ *
+ * @return array
+ */
+ public function getEmailParams(array $merge_with = array())
+ {
+ $merge_with['item_id'] = $this->GetID();
+ $merge_with['PrefixSpecial'] = $this->getPrefixSpecial();
+
+ return $merge_with;
+ }
}
\ No newline at end of file
Index: branches/5.3.x/core/kernel/db/cat_event_handler.php
===================================================================
--- branches/5.3.x/core/kernel/db/cat_event_handler.php (revision 15937)
+++ branches/5.3.x/core/kernel/db/cat_event_handler.php (revision 15938)
@@ -1,3104 +1,3105 @@
<?php
/**
* @version $Id$
* @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!');
class kCatDBEventHandler extends kDBEventHandler {
/**
* Allows to override standard permission mapping
*
* @return void
* @access protected
* @see kEventHandler::$permMapping
*/
protected function mapPermissions()
{
parent::mapPermissions();
$permissions = Array(
'OnSaveSettings' => Array ('self' => 'add|edit|advanced:import'),
'OnResetSettings' => Array ('self' => 'add|edit|advanced:import'),
'OnBeforeDeleteOriginal' => Array ('self' => 'edit|advanced:approve'),
'OnAfterDeleteOriginal' => Array ('self' => 'edit|advanced:approve'),
'OnCopy' => Array ('self' => true),
'OnDownloadFile' => Array ('self' => 'view'),
'OnCancelAction' => Array ('self' => true),
'OnItemBuild' => Array ('self' => true),
'OnMakeVote' => Array ('self' => true),
'OnReviewHelpful' => Array ('self' => true),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
/**
* Load item if id is available
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function LoadItem(kEvent $event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$id = $this->getPassedID($event);
if ( $object->Load($id) ) {
$actions = $this->Application->recallObject('kActions');
/* @var $actions Params */
$actions->Set($event->getPrefixSpecial() . '_id', $object->GetID());
$use_pending_editing = $event->getUnitConfig()->getUsePendingEditing();
if ( $use_pending_editing && $event->Special != 'original' ) {
$this->Application->SetVar($event->Prefix . '.original_id', $object->GetDBField('OrgId'));
}
}
else {
$object->setID($id);
}
}
/**
* Checks user permission to execute given $event
*
* @param kEvent $event
* @return bool
* @access public
*/
public function CheckPermission(kEvent $event)
{
if ( !$this->Application->isAdmin ) {
if ( $event->Name == 'OnSetSortingDirect' ) {
// allow sorting on front event without view permission
return true;
}
}
if ( $event->Name == 'OnExport' ) {
// save category_id before doing export
$this->Application->LinkVar('m_cat_id');
}
if ( in_array($event->Name, $this->_getMassPermissionEvents()) ) {
$items = $this->_getPermissionCheckInfo($event);
$perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
if ( ($event->Name == 'OnSave') && array_key_exists(0, $items) ) {
// adding new item (ID = 0)
$perm_value = $perm_helper->AddCheckPermission($items[0]['CategoryId'], $event->Prefix) > 0;
}
else {
// leave only items, that can be edited
$ids = Array ();
$check_method = in_array($event->Name, Array ('OnMassDelete', 'OnCut')) ? 'DeleteCheckPermission' : 'ModifyCheckPermission';
foreach ($items as $item_id => $item_data) {
if ( $perm_helper->$check_method($item_data['CreatedById'], $item_data['CategoryId'], $event->Prefix) > 0 ) {
$ids[] = $item_id;
}
}
if ( !$ids ) {
// no items left for editing -> no permission
return $perm_helper->finalizePermissionCheck($event, false);
}
$perm_value = true;
$event->setEventParam('ids', $ids); // will be used later by "kDBEventHandler::StoreSelectedIDs" method
}
return $perm_helper->finalizePermissionCheck($event, $perm_value);
}
$export_events = Array ('OnSaveSettings', 'OnResetSettings', 'OnExportBegin');
if ( in_array($event->Name, $export_events) ) {
// when import settings before selecting target import category
return $this->Application->CheckPermission('in-portal:main_import.view');
}
if ( $event->Name == 'OnProcessSelected' ) {
if ( $this->Application->RecallVar('dst_field') == 'ImportCategory' ) {
// when selecting target import category
return $this->Application->CheckPermission('in-portal:main_import.view');
}
}
return parent::CheckPermission($event);
}
/**
* Returns events, that require item-based (not just event-name based) permission check
*
* @return Array
*/
function _getMassPermissionEvents()
{
return Array (
'OnEdit', 'OnSave', 'OnMassDelete', 'OnMassApprove',
'OnMassDecline', 'OnMassMoveUp', 'OnMassMoveDown',
'OnCut',
);
}
/**
* Returns category item IDs, that require permission checking
*
* @param kEvent $event
* @return string
*/
function _getPermissionCheckIDs($event)
{
if ($event->Name == 'OnSave') {
$selected_ids = implode(',', $this->getSelectedIDs($event, true));
if (!$selected_ids) {
$selected_ids = 0; // when saving newly created item (OnPreCreate -> OnPreSave -> OnSave)
}
}
else {
// OnEdit, OnMassDelete events, when items are checked in grid
$selected_ids = implode(',', $this->StoreSelectedIDs($event));
}
return $selected_ids;
}
/**
* Returns information used in permission checking
*
* @param kEvent $event
* @return Array
*/
function _getPermissionCheckInfo($event)
{
$perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
// when saving data from temp table to live table check by data from temp table
$item_ids = $this->_getPermissionCheckIDs($event);
$items = $perm_helper->GetCategoryItemData($event->Prefix, $item_ids, $event->Name == 'OnSave');
if (!$items) {
// when item not present in temp table, then permission is not checked, because there are no data in db to check
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
list ($id, $fields_hash) = each($items_info);
if (array_key_exists('CategoryId', $fields_hash)) {
$item_category = $fields_hash['CategoryId'];
}
else {
$item_category = $this->Application->GetVar('m_cat_id');
}
$items[$id] = Array (
'CreatedById' => $this->Application->RecallVar('use_id'),
'CategoryId' => $item_category,
);
}
return $items;
}
/**
* Add selected items to clipboard with mode = COPY (CLONE)
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnCopy($event)
{
$this->Application->RemoveVar('clipboard');
$clipboard_helper = $this->Application->recallObject('ClipboardHelper');
/* @var $clipboard_helper kClipboardHelper */
$clipboard_helper->setClipboard($event, 'copy', $this->StoreSelectedIDs($event));
$this->clearSelectedIDs($event);
}
/**
* Add selected items to clipboard with mode = CUT
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnCut($event)
{
$this->Application->RemoveVar('clipboard');
$clipboard_helper = $this->Application->recallObject('ClipboardHelper');
/* @var $clipboard_helper kClipboardHelper */
$clipboard_helper->setClipboard($event, 'cut', $this->StoreSelectedIDs($event));
$this->clearSelectedIDs($event);
}
/**
* Checks permission for OnPaste event
*
* @param kEvent $event
* @return bool
*/
function _checkPastePermission($event)
{
$perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$category_id = $this->Application->GetVar('m_cat_id');
if ($perm_helper->AddCheckPermission($category_id, $event->Prefix) == 0) {
// no items left for editing -> no permission
return $perm_helper->finalizePermissionCheck($event, false);
}
return true;
}
/**
* Performs category item paste
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnPaste($event)
{
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) || !$this->_checkPastePermission($event) ) {
$event->status = kEvent::erFAIL;
return;
}
$clipboard_data = $event->getEventParam('clipboard_data');
if ( !$clipboard_data['cut'] && !$clipboard_data['copy'] ) {
return;
}
if ( $clipboard_data['copy'] ) {
$temp = $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => $event));
/* @var $temp kTempTablesHandler */
$this->Application->SetVar('ResetCatBeforeClone', 1); // used in "kCatDBEventHandler::OnBeforeClone"
$temp->CloneItems($event->Prefix, $event->Special, $clipboard_data['copy']);
}
if ( $clipboard_data['cut'] ) {
$object = $this->Application->recallObject($event->getPrefixSpecial() . '.item', $event->Prefix, Array ('skip_autoload' => true));
/* @var $object kCatDBItem */
foreach ($clipboard_data['cut'] as $id) {
$object->Load($id);
$object->MoveToCat();
}
}
}
/**
* Deletes all selected items.
* Automatically recurse into sub-items using temp handler, and deletes sub-items
* by calling its Delete method if sub-item has AutoDelete set to true in its config file
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnMassDelete(kEvent $event)
{
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
return;
}
$ids = $this->StoreSelectedIDs($event);
$to_delete = Array ();
$recycle_bin = $this->Application->ConfigValue('RecycleBinFolder');
if ( $recycle_bin ) {
$rb = $this->Application->recallObject('c.recycle', NULL, array ('skip_autoload' => true));
/* @var $rb CategoriesItem */
$rb->Load($recycle_bin);
$object = $this->Application->recallObject($event->Prefix . '.recycleitem', NULL, Array ('skip_autoload' => true));
/* @var $object kCatDBItem */
foreach ($ids as $id) {
$object->Load($id);
if ( preg_match('/^' . preg_quote($rb->GetDBField('ParentPath'), '/') . '/', $object->GetDBField('ParentPath')) ) {
$to_delete[] = $id;
continue;
}
$object->MoveToCat($recycle_bin);
}
$ids = $to_delete;
}
$temp_handler = $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => $event));
/* @var $temp_handler kTempTablesHandler */
$event->setEventParam('ids', $ids);
$this->customProcessing($event, 'before');
$ids = $event->getEventParam('ids');
if ( $ids ) {
$temp_handler->DeleteItems($event->Prefix, $event->Special, $ids);
}
$this->clearSelectedIDs($event);
}
/**
* Return type clauses for list bulding on front
*
* @param kEvent $event
* @return Array
*/
function getTypeClauses($event)
{
$types = $event->getEventParam('types');
$types = $types ? explode(',', $types) : Array ();
$except_types = $event->getEventParam('except');
$except_types = $except_types ? explode(',', $except_types) : Array ();
$type_clauses = Array();
$user_id = $this->Application->RecallVar('user_id');
$owner_field = $this->getOwnerField($event->Prefix);
$type_clauses['my_items']['include'] = '%1$s.'.$owner_field.' = '.$user_id;
$type_clauses['my_items']['except'] = '%1$s.'.$owner_field.' <> '.$user_id;
$type_clauses['my_items']['having_filter'] = false;
$type_clauses['pick']['include'] = '%1$s.EditorsPick = 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
$type_clauses['pick']['except'] = '%1$s.EditorsPick! = 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
$type_clauses['pick']['having_filter'] = false;
$type_clauses['hot']['include'] = '`IsHot` = 1 AND PrimaryCat = 1';
$type_clauses['hot']['except'] = '`IsHot`! = 1 AND PrimaryCat = 1';
$type_clauses['hot']['having_filter'] = true;
$type_clauses['pop']['include'] = '`IsPop` = 1 AND PrimaryCat = 1';
$type_clauses['pop']['except'] = '`IsPop`! = 1 AND PrimaryCat = 1';
$type_clauses['pop']['having_filter'] = true;
$type_clauses['new']['include'] = '`IsNew` = 1 AND PrimaryCat = 1';
$type_clauses['new']['except'] = '`IsNew`! = 1 AND PrimaryCat = 1';
$type_clauses['new']['having_filter'] = true;
$type_clauses['displayed']['include'] = '';
$displayed = $this->Application->GetVar($event->Prefix.'_displayed_ids');
if ($displayed) {
$id_field = $event->getUnitConfig()->getIDField();
$type_clauses['displayed']['except'] = '%1$s.'.$id_field.' NOT IN ('.$displayed.')';
}
else {
$type_clauses['displayed']['except'] = '';
}
$type_clauses['displayed']['having_filter'] = false;
if (in_array('search', $types) || in_array('search', $except_types)) {
$event_mapping = Array (
'simple' => 'OnSimpleSearch',
'subsearch' => 'OnSubSearch',
'advanced' => 'OnAdvancedSearch'
);
$keywords = $event->getEventParam('keyword_string');
$type = $this->Application->GetVar('search_type', 'simple');
if ( $keywords ) {
// processing keyword_string param of ListProducts tag
$this->Application->SetVar('keywords', $keywords);
$type = 'simple';
}
$search_event = $event_mapping[$type];
$this->$search_event($event);
$object = $event->getObject();
/* @var $object kDBList */
$search_sql = ' FROM ' . TABLE_PREFIX . 'ses_' . $this->Application->GetSID() . '_' . TABLE_PREFIX . 'Search search_result
JOIN %1$s ON %1$s.ResourceId = search_result.ResourceId';
$sql = str_replace('FROM %1$s', $search_sql, $object->GetPlainSelectSQL());
$object->SetSelectSQL($sql);
$object->addCalculatedField('Relevance', 'search_result.Relevance');
$type_clauses['search']['include'] = 'PrimaryCat = 1 AND ('.TABLE_PREFIX.'Categories.Status = '.STATUS_ACTIVE.')';
$type_clauses['search']['except'] = 'PrimaryCat = 1 AND ('.TABLE_PREFIX.'Categories.Status = '.STATUS_ACTIVE.')';
$type_clauses['search']['having_filter'] = false;
}
if (in_array('related', $types) || in_array('related', $except_types)) {
$related_to = $event->getEventParam('related_to');
if (!$related_to) {
$related_prefix = $event->Prefix;
}
else {
$sql = 'SELECT Prefix
FROM '.TABLE_PREFIX.'ItemTypes
WHERE ItemName = '.$this->Conn->qstr($related_to);
$related_prefix = $this->Conn->GetOne($sql);
}
$rel_table = $this->Application->getUnitConfig('rel')->getTableName();
$item_type = (int)$event->getUnitConfig()->getItemType();
if ($item_type == 0) {
trigger_error('<strong>ItemType</strong> not defined for prefix <strong>' . $event->Prefix . '</strong>', E_USER_WARNING);
}
// process case, then this list is called inside another list
$prefix_special = $event->getEventParam('PrefixSpecial');
if (!$prefix_special) {
$prefix_special = $this->Application->Parser->GetParam('PrefixSpecial');
}
$id = false;
if ($prefix_special !== false) {
$processed_prefix = $this->Application->processPrefix($prefix_special);
if ($processed_prefix['prefix'] == $related_prefix) {
// printing related categories within list of items (not on details page)
$list = $this->Application->recallObject($prefix_special);
/* @var $list kDBList */
$id = $list->GetID();
}
}
if ($id === false) {
// printing related categories for single item (possibly on details page)
if ($related_prefix == 'c') {
$id = $this->Application->GetVar('m_cat_id');
}
else {
$id = $this->Application->GetVar($related_prefix . '_id');
}
}
$p_item = $this->Application->recallObject($related_prefix.'.current', NULL, Array('skip_autoload' => true));
/* @var $p_item kCatDBItem */
$p_item->Load( (int)$id );
$p_resource_id = $p_item->GetDBField('ResourceId');
$sql = 'SELECT SourceId, TargetId FROM '.$rel_table.'
WHERE
(Enabled = 1)
AND (
(Type = 0 AND SourceId = '.$p_resource_id.' AND TargetType = '.$item_type.')
OR
(Type = 1
AND (
(SourceId = '.$p_resource_id.' AND TargetType = '.$item_type.')
OR
(TargetId = '.$p_resource_id.' AND SourceType = '.$item_type.')
)
)
)';
$related_ids_array = $this->Conn->Query($sql);
$related_ids = Array();
foreach ($related_ids_array as $record) {
$related_ids[] = $record[ $record['SourceId'] == $p_resource_id ? 'TargetId' : 'SourceId' ];
}
if (count($related_ids) > 0) {
$type_clauses['related']['include'] = '%1$s.ResourceId IN ('.implode(',', $related_ids).') AND PrimaryCat = 1';
$type_clauses['related']['except'] = '%1$s.ResourceId NOT IN ('.implode(',', $related_ids).') AND PrimaryCat = 1';
}
else {
$type_clauses['related']['include'] = '0';
$type_clauses['related']['except'] = '1';
}
$type_clauses['related']['having_filter'] = false;
}
if (in_array('favorites', $types) || in_array('favorites', $except_types)) {
$sql = 'SELECT ResourceId
FROM ' . $this->Application->getUnitConfig('fav')->getTableName() . '
WHERE PortalUserId = '.$this->Application->RecallVar('user_id');
$favorite_ids = $this->Conn->GetCol($sql);
if ($favorite_ids) {
$type_clauses['favorites']['include'] = '%1$s.ResourceId IN ('.implode(',', $favorite_ids).') AND PrimaryCat = 1';
$type_clauses['favorites']['except'] = '%1$s.ResourceId NOT IN ('.implode(',', $favorite_ids).') AND PrimaryCat = 1';
}
else {
$type_clauses['favorites']['include'] = 0;
$type_clauses['favorites']['except'] = 1;
}
$type_clauses['favorites']['having_filter'] = false;
}
return $type_clauses;
}
/**
* Returns SQL clause, that will help to select only data from specified category & it's children
*
* @param int $category_id
* @return string
*/
function getCategoryLimitClause($category_id)
{
if (!$category_id) {
return false;
}
$tree_indexes = $this->Application->getTreeIndex($category_id);
if (!$tree_indexes) {
// id of non-existing category was given
return 'FALSE';
}
return TABLE_PREFIX.'Categories.TreeLeft BETWEEN '.$tree_indexes['TreeLeft'].' AND '.$tree_indexes['TreeRight'];
}
/**
* Apply any custom changes to list's sql query
*
* @param kEvent $event
* @return void
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
$object = $event->getObject();
/* @var $object kCatDBList */
// add category filter if needed
if ($event->Special != 'showall' && $event->Special != 'user') {
if ( (string)$event->getEventParam('parent_cat_id') !== '' ) {
$parent_cat_id = $event->getEventParam('parent_cat_id');
}
else {
$parent_cat_id = $this->Application->GetVar('c_id');
if (!$parent_cat_id) {
$parent_cat_id = $this->Application->GetVar('m_cat_id');
}
if (!$parent_cat_id) {
$parent_cat_id = 0;
}
}
if ("$parent_cat_id" == '0') {
// replace "0" category with "Content" category id (this way template
$parent_cat_id = $this->Application->getBaseCategory();
}
if ((string)$parent_cat_id != 'any') {
if ($event->getEventParam('recursive')) {
$filter_clause = $this->getCategoryLimitClause($parent_cat_id);
if ($filter_clause !== false) {
$object->addFilter('category_filter', $filter_clause);
}
$object->addFilter('primary_filter', 'PrimaryCat = 1');
}
else {
$object->addFilter('category_filter', TABLE_PREFIX.'CategoryItems.CategoryId = '.$parent_cat_id );
}
}
else {
$object->addFilter('primary_filter', 'PrimaryCat = 1');
}
}
else {
$object->addFilter('primary_filter', 'PrimaryCat = 1');
// if using recycle bin don't show items from there
$recycle_bin = $this->Application->ConfigValue('RecycleBinFolder');
if ($recycle_bin) {
$object->addFilter('recyclebin_filter', TABLE_PREFIX.'CategoryItems.CategoryId <> '.$recycle_bin);
}
}
if ($event->Special == 'user') {
$editable_user = $this->Application->GetVar('u_id');
$object->addFilter('owner_filter', '%1$s.'.$this->getOwnerField($event->Prefix).' = '.$editable_user);
}
$this->applyViewPermissionFilter($object);
$types = $event->getEventParam('types');
$this->applyItemStatusFilter($object, $types);
$except_types = $event->getEventParam('except');
$type_clauses = $this->getTypeClauses($event);
$search_helper = $this->Application->recallObject('SearchHelper');
/* @var $search_helper kSearchHelper */
$search_helper->SetComplexFilter($event, $type_clauses, $types, $except_types);
}
/**
* Adds filter, that uses *.VIEW permissions to determine if an item should be shown to a user.
*
* @param kCatDBList $object Object.
*
* @return void
* @access protected
*/
protected function applyViewPermissionFilter(kCatDBList $object)
{
if ( !$this->Application->ConfigValue('CheckViewPermissionsInCatalog') ) {
return;
}
if ( $this->Application->RecallVar('user_id') == USER_ROOT ) {
// for "root" CATEGORY.VIEW permission is checked for items lists too
$view_perm = 1;
}
else {
// for any real user item list view permission is checked instead of CATEGORY.VIEW
$count_helper = $this->Application->recallObject('CountHelper');
/* @var $count_helper kCountHelper */
list ($view_perm, $view_filter) = $count_helper->GetPermissionClause($object->Prefix, 'perm');
$object->addFilter('perm_filter2', $view_filter);
}
$object->addFilter('perm_filter', 'perm.PermId = ' . $view_perm);
}
/**
* Adds filter that filters out items with non-required statuses
*
* @param kDBList $object
* @param string $types
*/
function applyItemStatusFilter(&$object, $types)
{
// Link1 (before modifications) [Status = 1, OrgId = NULL], Link2 (after modifications) [Status = -2, OrgId = Link1_ID]
$pending_editing = $object->getUnitConfig()->getUsePendingEditing();
if (!$this->Application->isAdminUser) {
$types = explode(',', $types);
if (in_array('my_items', $types)) {
$allow_statuses = Array (STATUS_ACTIVE, STATUS_PENDING, STATUS_PENDING_EDITING);
$object->addFilter('status_filter', '%1$s.Status IN ('.implode(',', $allow_statuses).')');
if ($pending_editing) {
$user_id = $this->Application->RecallVar('user_id');
$this->applyPendingEditingFilter($object, $user_id);
}
}
else {
$object->addFilter('status_filter', '(%1$s.Status = ' . STATUS_ACTIVE . ') AND (' . TABLE_PREFIX . 'Categories.Status = ' . STATUS_ACTIVE . ')');
if ($pending_editing) {
// if category item uses pending editing abilities, then in no cases show pending copies on front
$object->addFilter('original_filter', '%1$s.OrgId = 0 OR %1$s.OrgId IS NULL');
}
}
}
else {
if ($pending_editing) {
$this->applyPendingEditingFilter($object);
}
}
}
/**
* Adds filter, that removes live items if they have pending editing copies
*
* @param kDBList $object
* @param int $user_id
*/
function applyPendingEditingFilter(&$object, $user_id = NULL)
{
$sql = 'SELECT OrgId
FROM '.$object->TableName.'
WHERE Status = '.STATUS_PENDING_EDITING.' AND OrgId IS NOT NULL';
if (isset($user_id)) {
$owner_field = $this->getOwnerField($object->Prefix);
$sql .= ' AND '.$owner_field.' = '.$user_id;
}
$pending_ids = $this->Conn->GetCol($sql);
if ($pending_ids) {
$object->addFilter('no_original_filter', '%1$s.'.$object->IDField.' NOT IN ('.implode(',', $pending_ids).')');
}
}
/**
* Adds calculates fields for item statuses
*
* @param kDBItem|kDBList $object
* @param kEvent $event
* @return void
* @access protected
*/
protected function prepareObject(&$object, kEvent $event)
{
$this->prepareItemStatuses($event);
$object->addCalculatedField('CachedNavbar', 'l' . $this->Application->GetVar('m_lang') . '_CachedNavbar');
if ( $event->Special == 'export' || $event->Special == 'import' ) {
$export_helper = $this->Application->recallObject('CatItemExportHelper');
/* @var $export_helper kCatDBItemExportHelper */
$export_helper->prepareExportColumns($event);
}
}
/**
* Creates calculated fields for all item statuses based on config settings
*
* @param kEvent $event
*/
function prepareItemStatuses($event)
{
$object = $event->getObject( Array('skip_autoload' => true) );
$property_map = $event->getUnitConfig()->getItemPropertyMappings();
if (!$property_map) {
return ;
}
// new items
$object->addCalculatedField('IsNew', ' IF(%1$s.NewItem = 2,
IF(%1$s.CreatedOn >= (UNIX_TIMESTAMP() - ' . $this->Application->ConfigValue($property_map['NewDays']) . '*3600*24), 1, 0),
%1$s.NewItem
)');
// hot items (cache updated every hour)
if ($this->Application->isCachingType(CACHING_TYPE_MEMORY)) {
$serial_name = $this->Application->incrementCacheSerial($event->Prefix, NULL, false);
$hot_limit = $this->Application->getCache($property_map['HotLimit'] . '[%' . $serial_name . '%]');
}
else {
$hot_limit = $this->Application->getDBCache($property_map['HotLimit']);
}
if ($hot_limit === false) {
$hot_limit = $this->CalculateHotLimit($event);
}
$object->addCalculatedField('IsHot', ' IF(%1$s.HotItem = 2,
IF(%1$s.'.$property_map['ClickField'].' >= '.$hot_limit.', 1, 0),
%1$s.HotItem
)');
// popular items
$object->addCalculatedField('IsPop', ' IF(%1$s.PopItem = 2,
IF(%1$s.CachedVotesQty >= ' . $this->Application->ConfigValue($property_map['MinPopVotes']) . ' AND %1$s.CachedRating >= ' . $this->Application->ConfigValue($property_map['MinPopRating']) . ', 1, 0),
%1$s.PopItem)');
}
/**
* Calculates hot limit for current item's table
*
* @param kEvent $event
* @return float
* @access protected
*/
protected function CalculateHotLimit($event)
{
$config = $event->getUnitConfig();
$property_map = $config->getItemPropertyMappings();
if ( !$property_map ) {
return 0.00;
}
$click_field = $property_map['ClickField'];
$last_hot = $this->Application->ConfigValue($property_map['MaxHotNumber']) - 1;
$sql = 'SELECT ' . $click_field . '
FROM ' . $config->getTableName() . '
ORDER BY ' . $click_field . ' DESC
LIMIT ' . $last_hot . ', 1';
$res = $this->Conn->GetCol($sql);
$hot_limit = (double)array_shift($res);
if ( $this->Application->isCachingType(CACHING_TYPE_MEMORY) ) {
$serial_name = $this->Application->incrementCacheSerial($event->Prefix, NULL, false);
$this->Application->setCache($property_map['HotLimit'] . '[%' . $serial_name . '%]', $hot_limit);
}
else {
$this->Application->setDBCache($property_map['HotLimit'], $hot_limit, 3600);
}
return $hot_limit;
}
/**
* Moves item to preferred category, updates item hits
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
$object = $event->getObject();
/* @var $object kCatDBItem */
// update hits field
$config = $event->getUnitConfig();
$property_map = $config->getUserProfileMapping();
if ( $property_map ) {
$click_field = $property_map['ClickField'];
if ( $this->Application->isAdminUser && ($this->Application->GetVar($click_field . '_original') !== false) && floor($this->Application->GetVar($click_field . '_original')) != $object->GetDBField($click_field) ) {
$sql = 'SELECT MAX(' . $click_field . ')
FROM ' . $config->getTableName() . '
WHERE FLOOR(' . $click_field . ') = ' . $object->GetDBField($click_field);
$hits = ($res = $this->Conn->GetOne($sql)) ? $res + 0.000001 : $object->GetDBField($click_field);
$object->SetDBField($click_field, $hits);
}
}
// change category
$target_category = $object->GetDBField('CategoryId');
if ( $object->GetOriginalField('CategoryId') != $target_category ) {
$object->MoveToCat($target_category);
}
}
/**
* Occurs after loading item, 'id' parameter
* allows to get id of item that was loaded
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
$special = substr($event->Special, -6);
$object = $event->getObject();
/* @var $object kCatDBItem */
if ( $special == 'import' || $special == 'export' ) {
$image_data = $object->getPrimaryImageData();
if ( $image_data ) {
$thumbnail_image = $image_data[$image_data['LocalThumb'] ? 'ThumbPath' : 'ThumbUrl'];
if ( $image_data['SameImages'] ) {
$full_image = '';
}
else {
$full_image = $image_data[$image_data['LocalImage'] ? 'LocalPath' : 'Url'];
}
$object->SetDBField('ThumbnailImage', $thumbnail_image);
$object->SetDBField('FullImage', $full_image);
$object->SetDBField('ImageAlt', $image_data['AltName']);
}
}
// substituting pending status value for pending editing
if ( $object->HasField('OrgId') && $object->GetDBField('OrgId') > 0 && $object->GetDBField('Status') == -2 ) {
$new_options = Array ();
$options = $object->GetFieldOption('Status', 'options', false, Array ());
foreach ($options as $key => $val) {
if ( $key == 2 ) {
$key = -2;
}
$new_options[$key] = $val;
}
$object->SetFieldOption('Status', 'options', $new_options);
}
if ( !$this->Application->isAdmin ) {
// linking existing images for item with virtual fields
$image_helper = $this->Application->recallObject('ImageHelper');
/* @var $image_helper ImageHelper */
$image_helper->LoadItemImages($object);
// linking existing files for item with virtual fields
$file_helper = $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
$file_helper->LoadItemFiles($object);
}
if ( $object->isVirtualField('MoreCategories') ) {
// set item's additional categories to virtual field (used in editing)
$item_categories = $this->getItemCategories($object->GetDBField('ResourceId'));
$object->SetDBField('MoreCategories', $item_categories ? '|' . implode('|', $item_categories) . '|' : '');
}
}
/**
* Occurs after updating item
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
$this->CalculateHotLimit($event);
if ( substr($event->Special, -6) == 'import' ) {
$this->setCustomExportColumns($event);
}
$object = $event->getObject();
/* @var $object kCatDBItem */
if ( !$this->Application->isAdmin ) {
$image_helper = $this->Application->recallObject('ImageHelper');
/* @var $image_helper ImageHelper */
// process image upload in virtual fields
$image_helper->SaveItemImages($object);
$file_helper = $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
// process file upload in virtual fields
$file_helper->SaveItemFiles($object);
if ( $event->Special != '-item' ) {
// don't touch categories during cloning
$this->processAdditionalCategories($object, 'update');
}
}
$recycle_bin = $this->Application->ConfigValue('RecycleBinFolder');
if ( $this->Application->isAdminUser && $recycle_bin ) {
$sql = 'SELECT CategoryId
FROM ' . $this->Application->getUnitConfig('ci')->getTableName() . '
WHERE ItemResourceId = ' . $object->GetDBField('ResourceId') . ' AND PrimaryCat = 1';
$primary_category = $this->Conn->GetOne($sql);
if ( $primary_category == $recycle_bin ) {
$event->CallSubEvent('OnAfterItemDelete');
}
}
if ( $object->GetChangedFields() ) {
$now = time();
$object->SetDBField('Modified_date', $now);
$object->SetDBField('Modified_time', $now);
$object->SetDBField('ModifiedById', $this->Application->RecallVar('user_id'));
}
}
/**
* Sets values for import process
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
$object = $event->getObject();
/* @var $object kCatDBItem */
if ( substr($event->Special, -6) == 'import' ) {
$this->setCustomExportColumns($event);
}
$object->assignPrimaryCategory();
if ( !$this->Application->isAdmin ) {
$image_helper = $this->Application->recallObject('ImageHelper');
/* @var $image_helper ImageHelper */
// process image upload in virtual fields
$image_helper->SaveItemImages($object);
$file_helper = $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
// process file upload in virtual fields
$file_helper->SaveItemFiles($object);
if ( $event->Special != '-item' ) {
// don't touch categories during cloning
$this->processAdditionalCategories($object, 'create');
}
}
}
/**
* Make record to search log
*
* @param string $keywords
* @param int $search_type 0 - simple search, 1 - advanced search
*/
function saveToSearchLog($keywords, $search_type = 0)
{
// don't save keywords for each module separately, just one time
// static variable can't help here, because each module uses it's own class instance !
if (!$this->Application->GetVar('search_logged')) {
$sql = 'UPDATE '.TABLE_PREFIX.'SearchLogs
SET Indices = Indices + 1
WHERE Keyword = '.$this->Conn->qstr($keywords).' AND SearchType = '.$search_type; // 0 - simple search, 1 - advanced search
$this->Conn->Query($sql);
if ($this->Conn->getAffectedRows() == 0) {
$fields_hash = Array('Keyword' => $keywords, 'Indices' => 1, 'SearchType' => $search_type);
$this->Conn->doInsert($fields_hash, TABLE_PREFIX.'SearchLogs');
}
$this->Application->SetVar('search_logged', 1);
}
}
/**
* Makes simple search for category items
* based on keywords string
*
* @param kEvent $event
*/
function OnSimpleSearch($event)
{
$event->redirect = false;
$search_table = TABLE_PREFIX.'ses_'.$this->Application->GetSID().'_'.TABLE_PREFIX.'Search';
$keywords = htmlspecialchars_decode( trim($this->Application->GetVar('keywords')) );
$query_object = $this->Application->recallObject('HTTPQuery');
/* @var $query_object kHTTPQuery */
$sql = 'SHOW TABLES LIKE "'.$search_table.'"';
if(!isset($query_object->Get['keywords']) &&
!isset($query_object->Post['keywords']) &&
$this->Conn->Query($sql))
{
return; // used when navigating by pages or changing sorting in search results
}
if(!$keywords || strlen($keywords) < $this->Application->ConfigValue('Search_MinKeyword_Length'))
{
$this->Conn->Query('DROP TABLE IF EXISTS '.$search_table);
$this->Application->SetVar('keywords_too_short', 1);
return; // if no or too short keyword entered, doing nothing
}
$this->Application->StoreVar('keywords', $keywords);
$this->saveToSearchLog($keywords, 0); // 0 - simple search, 1 - advanced search
$event->setPseudoClass('_List');
$object = $event->getObject();
/* @var $object kDBList */
$config = $event->getUnitConfig();
$this->Application->SetVar($event->getPrefixSpecial().'_Page', 1);
$lang = $this->Application->GetVar('m_lang');
$items_table = $config->getTableName();
$module_name = $this->Application->findModule('Var', $event->Prefix, 'Name');
$sql = 'SELECT *
FROM ' . $this->Application->getUnitConfig('confs')->getTableName() . '
WHERE ModuleName = ' . $this->Conn->qstr($module_name) . ' AND SimpleSearch = 1';
$search_config = $this->Conn->Query($sql, 'FieldName');
$field_list = array_keys($search_config);
$join_clauses = Array();
// field processing
$weight_sum = 0;
$alias_counter = 0;
$custom_fields = $config->getCustomFields();
if ($custom_fields) {
$custom_table = $this->Application->getUnitConfig($event->Prefix . '-cdata')->getTableName();
$join_clauses[] = ' LEFT JOIN '.$custom_table.' custom_data ON '.$items_table.'.ResourceId = custom_data.ResourceId';
}
// what field in search config becomes what field in sql (key - new field, value - old field (from searchconfig table))
$search_config_map = Array();
foreach ($field_list as $key => $field) {
$local_table = TABLE_PREFIX.$search_config[$field]['TableName'];
$weight_sum += $search_config[$field]['Priority']; // counting weight sum; used when making relevance clause
// processing multilingual fields
if ( !$search_config[$field]['CustomFieldId'] && $object->GetFieldOption($field, 'formatter') == 'kMultiLanguage' ) {
$field_list[$key.'_primary'] = 'l'.$this->Application->GetDefaultLanguageId().'_'.$field;
$field_list[$key] = 'l'.$lang.'_'.$field;
if (!isset($search_config[$field]['ForeignField'])) {
$field_list[$key.'_primary'] = $local_table.'.'.$field_list[$key.'_primary'];
$search_config_map[ $field_list[$key.'_primary'] ] = $field;
}
}
// processing fields from other tables
$foreign_field = $search_config[$field]['ForeignField'];
if ( $foreign_field ) {
$exploded = explode(':', $foreign_field, 2);
if ($exploded[0] == 'CALC') {
// ignoring having type clauses in simple search
unset($field_list[$key]);
continue;
}
else {
$multi_lingual = false;
if ($exploded[0] == 'MULTI') {
$multi_lingual = true;
$foreign_field = $exploded[1];
}
$exploded = explode('.', $foreign_field); // format: table.field_name
$foreign_table = TABLE_PREFIX.$exploded[0];
$alias_counter++;
$alias = 't'.$alias_counter;
if ($multi_lingual) {
$field_list[$key] = $alias.'.'.'l'.$lang.'_'.$exploded[1];
$field_list[$key.'_primary'] = 'l'.$this->Application->GetDefaultLanguageId().'_'.$field;
$search_config_map[ $field_list[$key] ] = $field;
$search_config_map[ $field_list[$key.'_primary'] ] = $field;
}
else {
$field_list[$key] = $alias.'.'.$exploded[1];
$search_config_map[ $field_list[$key] ] = $field;
}
$join_clause = str_replace('{ForeignTable}', $alias, $search_config[$field]['JoinClause']);
$join_clause = str_replace('{LocalTable}', $items_table, $join_clause);
$join_clauses[] = ' LEFT JOIN '.$foreign_table.' '.$alias.'
ON '.$join_clause;
}
}
else {
// processing fields from local table
if ($search_config[$field]['CustomFieldId']) {
$local_table = 'custom_data';
// search by custom field value on current language
$custom_field_id = array_search($field_list[$key], $custom_fields);
$field_list[$key] = 'l'.$lang.'_cust_'.$custom_field_id;
// search by custom field value on primary language
$field_list[$key.'_primary'] = $local_table.'.l'.$this->Application->GetDefaultLanguageId().'_cust_'.$custom_field_id;
$search_config_map[ $field_list[$key.'_primary'] ] = $field;
}
$field_list[$key] = $local_table.'.'.$field_list[$key];
$search_config_map[ $field_list[$key] ] = $field;
}
}
// keyword string processing
$search_helper = $this->Application->recallObject('SearchHelper');
/* @var $search_helper kSearchHelper */
$where_clause = Array ();
foreach ($field_list as $field) {
if (preg_match('/^' . preg_quote($items_table, '/') . '\.(.*)/', $field, $regs)) {
// local real field
$filter_data = $search_helper->getSearchClause($object, $regs[1], $keywords, false);
if ($filter_data) {
$where_clause[] = $filter_data['value'];
}
}
elseif (preg_match('/^custom_data\.(.*)/', $field, $regs)) {
$custom_field_name = 'cust_' . $search_config_map[$field];
$filter_data = $search_helper->getSearchClause($object, $custom_field_name, $keywords, false);
if ($filter_data) {
$where_clause[] = str_replace('`' . $custom_field_name . '`', $field, $filter_data['value']);
}
}
else {
$where_clause[] = $search_helper->buildWhereClause($keywords, Array ($field));
}
}
$where_clause = '((' . implode(') OR (', $where_clause) . '))'; // 2 braces for next clauses, see below!
$search_scope = $this->Application->GetVar('search_scope');
if ($search_scope == 'category') {
$category_id = $this->Application->GetVar('m_cat_id');
$category_filter = $this->getCategoryLimitClause($category_id);
if ($category_filter !== false) {
$join_clauses[] = ' LEFT JOIN '.TABLE_PREFIX.'CategoryItems ON '.TABLE_PREFIX.'CategoryItems.ItemResourceId = '.$items_table.'.ResourceId';
$join_clauses[] = ' LEFT JOIN '.TABLE_PREFIX.'Categories ON '.TABLE_PREFIX.'Categories.CategoryId = '.TABLE_PREFIX.'CategoryItems.CategoryId';
$where_clause = '('.$this->getCategoryLimitClause($category_id).') AND '.$where_clause;
}
}
$where_clause = $where_clause . ' AND (' . $items_table . '.Status = ' . STATUS_ACTIVE . ')';
if ($event->MasterEvent && $event->MasterEvent->Name == 'OnListBuild') {
$sub_search_ids = $event->MasterEvent->getEventParam('ResultIds');
if ( $sub_search_ids !== false ) {
if ( $sub_search_ids ) {
$where_clause .= 'AND (' . $items_table . '.ResourceId IN (' . implode(',', $sub_search_ids) . '))';
}
else {
$where_clause .= 'AND FALSE';
}
}
}
// making relevance clause
$positive_words = $search_helper->getPositiveKeywords($keywords);
$this->Application->StoreVar('highlight_keywords', serialize($positive_words));
$relevance_parts = Array();
reset($search_config);
foreach ($positive_words as $keyword_index => $positive_word) {
$positive_word = $search_helper->transformWildcards($positive_word);
$positive_words[$keyword_index] = $this->Conn->escape($positive_word);
}
foreach ($field_list as $field) {
if (!array_key_exists($field, $search_config_map)) {
$map_key = $search_config_map[$items_table . '.' . $field];
}
else {
$map_key = $search_config_map[$field];
}
$config_elem = $search_config[ $map_key ];
$weight = $config_elem['Priority'];
// search by whole words only ([[:<:]] - word boundary)
/*$relevance_parts[] = 'IF('.$field.' REGEXP "[[:<:]]('.implode(' ', $positive_words).')[[:>:]]", '.$weight.', 0)';
foreach ($positive_words as $keyword) {
$relevance_parts[] = 'IF('.$field.' REGEXP "[[:<:]]('.$keyword.')[[:>:]]", '.$weight.', 0)';
}*/
// search by partial word matches too
$relevance_parts[] = 'IF('.$field.' LIKE "%'.implode(' ', $positive_words).'%", '.$weight_sum.', 0)';
foreach ($positive_words as $keyword) {
$relevance_parts[] = 'IF('.$field.' LIKE "%'.$keyword.'%", '.$weight.', 0)';
}
}
$relevance_parts = array_unique($relevance_parts);
$conf_postfix = $config->getSearchConfigPostfix();
$rel_keywords = $this->Application->ConfigValue('SearchRel_Keyword_'.$conf_postfix) / 100;
$rel_pop = $this->Application->ConfigValue('SearchRel_Pop_'.$conf_postfix) / 100;
$rel_rating = $this->Application->ConfigValue('SearchRel_Rating_'.$conf_postfix) / 100;
$relevance_clause = '('.implode(' + ', $relevance_parts).') / '.$weight_sum.' * '.$rel_keywords;
if ($rel_pop && $object->isField('Hits')) {
$relevance_clause .= ' + (Hits + 1) / (MAX(Hits) + 1) * '.$rel_pop;
}
if ($rel_rating && $object->isField('CachedRating')) {
$relevance_clause .= ' + (CachedRating + 1) / (MAX(CachedRating) + 1) * '.$rel_rating;
}
// building final search query
if (!$this->Application->GetVar('do_not_drop_search_table')) {
$this->Conn->Query('DROP TABLE IF EXISTS '.$search_table); // erase old search table if clean k4 event
$this->Application->SetVar('do_not_drop_search_table', true);
}
$search_table_exists = $this->Conn->Query('SHOW TABLES LIKE "'.$search_table.'"');
if ($search_table_exists) {
$select_intro = 'INSERT INTO '.$search_table.' (Relevance, ItemId, ResourceId, ItemType, EdPick) ';
}
else {
$select_intro = 'CREATE TABLE '.$search_table.' AS ';
}
$edpick_clause = $config->getFieldByName('EditorsPick') ? $items_table.'.EditorsPick' : '0';
$sql = $select_intro.' SELECT '.$relevance_clause.' AS Relevance,
'.$items_table.'.'.$config->getIDField().' AS ItemId,
'.$items_table.'.ResourceId,
'.$config->getItemType().' AS ItemType,
'.$edpick_clause.' AS EdPick
FROM '.$object->TableName.'
'.implode(' ', $join_clauses).'
WHERE '.$where_clause.'
GROUP BY '.$items_table.'.'.$config->getIDField().' ORDER BY Relevance DESC';
$this->Conn->Query($sql);
if ( !$search_table_exists ) {
$sql = 'ALTER TABLE ' . $search_table . '
ADD INDEX (ResourceId),
ADD INDEX (Relevance)';
$this->Conn->Query($sql);
}
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnSubSearch($event)
{
// keep search results from other items after doing a sub-search on current item type
$this->Application->SetVar('do_not_drop_search_table', true);
$ids = Array ();
$search_table = TABLE_PREFIX . 'ses_' . $this->Application->GetSID() . '_' . TABLE_PREFIX . 'Search';
$sql = 'SHOW TABLES LIKE "' . $search_table . '"';
if ( $this->Conn->Query($sql) ) {
$item_type = $event->getUnitConfig()->getItemType();
// 1. get ids to be used as search bounds
$sql = 'SELECT DISTINCT ResourceId
FROM ' . $search_table . '
WHERE ItemType = ' . $item_type;
$ids = $this->Conn->GetCol($sql);
// 2. delete previously found ids
$sql = 'DELETE FROM ' . $search_table . '
WHERE ItemType = ' . $item_type;
$this->Conn->Query($sql);
}
$event->setEventParam('ResultIds', $ids);
$event->CallSubEvent('OnSimpleSearch');
}
/**
* Enter description here...
*
* @param kEvent $event
* @todo Change all hardcoded Products table & In-Commerce module usage to dynamic usage from item config !!!
*/
function OnAdvancedSearch($event)
{
$query_object = $this->Application->recallObject('HTTPQuery');
/* @var $query_object kHTTPQuery */
if ( !isset($query_object->Post['andor']) ) {
// used when navigating by pages or changing sorting in search results
return;
}
$this->Application->RemoveVar('keywords');
$this->Application->RemoveVar('Search_Keywords');
$module_name = $this->Application->findModule('Var', $event->Prefix, 'Name');
$sql = 'SELECT *
FROM '.$this->Application->getUnitConfig('confs')->getTableName().'
WHERE (ModuleName = '.$this->Conn->qstr($module_name).') AND (AdvancedSearch = 1)';
$search_config = $this->Conn->Query($sql);
$lang = $this->Application->GetVar('m_lang');
$object = $event->getObject();
/* @var $object kDBList */
$object->SetPage(1);
$config = $event->getUnitConfig();
$items_table = $config->getTableName();
$search_keywords = $this->Application->GetVar('value'); // will not be changed
$keywords = $this->Application->GetVar('value'); // will be changed down there
$verbs = $this->Application->GetVar('verb');
$glues = $this->Application->GetVar('andor');
$and_conditions = Array();
$or_conditions = Array();
$and_having_conditions = Array();
$or_having_conditions = Array();
$join_clauses = Array();
$highlight_keywords = Array();
$relevance_parts = Array();
$alias_counter = 0;
$custom_fields = $config->getCustomFields();
if ($custom_fields) {
$custom_table = $this->Application->getUnitConfig($event->Prefix . '-cdata')->getTableName();
$join_clauses[] = ' LEFT JOIN '.$custom_table.' custom_data ON '.$items_table.'.ResourceId = custom_data.ResourceId';
}
$search_log = '';
$weight_sum = 0;
// processing fields and preparing conditions
foreach ($search_config as $record) {
$field = $record['FieldName'];
$join_clause = '';
$condition_mode = 'WHERE';
// field processing
$local_table = TABLE_PREFIX.$record['TableName'];
$weight_sum += $record['Priority']; // counting weight sum; used when making relevance clause
// processing multilingual fields
if ( $object->GetFieldOption($field, 'formatter') == 'kMultiLanguage' ) {
$field_name = 'l'.$lang.'_'.$field;
}
else {
$field_name = $field;
}
// processing fields from other tables
$foreign_field = $record['ForeignField'];
if ( $foreign_field ) {
$exploded = explode(':', $foreign_field, 2);
if($exploded[0] == 'CALC')
{
$user_groups = $this->Application->RecallVar('UserGroups');
$field_name = str_replace('{PREFIX}', TABLE_PREFIX, $exploded[1]);
$join_clause = str_replace('{PREFIX}', TABLE_PREFIX, $record['JoinClause']);
$join_clause = str_replace('{USER_GROUPS}', $user_groups, $join_clause);
$join_clause = ' LEFT JOIN '.$join_clause;
$condition_mode = 'HAVING';
}
else {
$exploded = explode('.', $foreign_field);
$foreign_table = TABLE_PREFIX.$exploded[0];
if($record['CustomFieldId']) {
$exploded[1] = 'l'.$lang.'_'.$exploded[1];
}
$alias_counter++;
$alias = 't'.$alias_counter;
$field_name = $alias.'.'.$exploded[1];
$join_clause = str_replace('{ForeignTable}', $alias, $record['JoinClause']);
$join_clause = str_replace('{LocalTable}', $items_table, $join_clause);
if($record['CustomFieldId'])
{
$join_clause .= ' AND '.$alias.'.CustomFieldId='.$record['CustomFieldId'];
}
$join_clause = ' LEFT JOIN '.$foreign_table.' '.$alias.'
ON '.$join_clause;
}
}
else
{
// processing fields from local table
if ($record['CustomFieldId']) {
$local_table = 'custom_data';
$field_name = 'l'.$lang.'_cust_'.array_search($field_name, $custom_fields);
}
$field_name = $local_table.'.'.$field_name;
}
$condition = $this->getAdvancedSearchCondition($field_name, $record, $keywords, $verbs, $highlight_keywords);
if ($record['CustomFieldId'] && strlen($condition)) {
// search in primary value of custom field + value in current language
$field_name = $local_table.'.'.'l'.$this->Application->GetDefaultLanguageId().'_cust_'.array_search($field, $custom_fields);
$primary_condition = $this->getAdvancedSearchCondition($field_name, $record, $keywords, $verbs, $highlight_keywords);
$condition = '('.$condition.' OR '.$primary_condition.')';
}
if ($condition) {
if ($join_clause) {
$join_clauses[] = $join_clause;
}
$relevance_parts[] = 'IF('.$condition.', '.$record['Priority'].', 0)';
if ($glues[$field] == 1) { // and
if ($condition_mode == 'WHERE') {
$and_conditions[] = $condition;
}
else {
$and_having_conditions[] = $condition;
}
}
else { // or
if ($condition_mode == 'WHERE') {
$or_conditions[] = $condition;
}
else {
$or_having_conditions[] = $condition;
}
}
// create search log record
$search_log_data = Array('search_config' => $record, 'verb' => getArrayValue($verbs, $field), 'value' => ($record['FieldType'] == 'range') ? $search_keywords[$field.'_from'].'|'.$search_keywords[$field.'_to'] : $search_keywords[$field]);
$search_log[] = $this->Application->Phrase('la_Field').' "'.$this->getHuman('Field', $search_log_data).'" '.$this->getHuman('Verb', $search_log_data).' '.$this->Application->Phrase('la_Value').' '.$this->getHuman('Value', $search_log_data).' '.$this->Application->Phrase($glues[$field] == 1 ? 'lu_And' : 'lu_Or');
}
}
if ($search_log) {
$search_log = implode('<br />', $search_log);
$search_log = preg_replace('/(.*) '.preg_quote($this->Application->Phrase('lu_and'), '/').'|'.preg_quote($this->Application->Phrase('lu_or'), '/').'$/is', '\\1', $search_log);
$this->saveToSearchLog($search_log, 1); // advanced search
}
$this->Application->StoreVar('highlight_keywords', serialize($highlight_keywords));
// making relevance clause
if($relevance_parts)
{
$conf_postfix = $config->getSearchConfigPostfix();
$rel_keywords = $this->Application->ConfigValue('SearchRel_Keyword_'.$conf_postfix) / 100;
$rel_pop = $this->Application->ConfigValue('SearchRel_Pop_'.$conf_postfix) / 100;
$rel_rating = $this->Application->ConfigValue('SearchRel_Rating_'.$conf_postfix) / 100;
$relevance_clause = '('.implode(' + ', $relevance_parts).') / '.$weight_sum.' * '.$rel_keywords;
$relevance_clause .= ' + (Hits + 1) / (MAX(Hits) + 1) * '.$rel_pop;
$relevance_clause .= ' + (CachedRating + 1) / (MAX(CachedRating) + 1) * '.$rel_rating;
}
else
{
$relevance_clause = '0';
}
// building having clause
if($or_having_conditions)
{
$and_having_conditions[] = '('.implode(' OR ', $or_having_conditions).')';
}
$having_clause = implode(' AND ', $and_having_conditions);
$having_clause = $having_clause ? ' HAVING '.$having_clause : '';
// building where clause
if($or_conditions)
{
$and_conditions[] = '('.implode(' OR ', $or_conditions).')';
}
// $and_conditions[] = $items_table.'.Status = 1';
$where_clause = implode(' AND ', $and_conditions);
if(!$where_clause)
{
if($having_clause)
{
$where_clause = '1';
}
else
{
$where_clause = '0';
$this->Application->SetVar('adv_search_error', 1);
}
}
$where_clause .= ' AND '.$items_table.'.Status = 1';
// building final search query
$search_table = TABLE_PREFIX.'ses_'.$this->Application->GetSID().'_'.TABLE_PREFIX.'Search';
$this->Conn->Query('DROP TABLE IF EXISTS '.$search_table);
$id_field = $config->getIDField();
$pick_field = $config->getFieldByName('EditorsPick') ? $items_table.'.EditorsPick' : '0';
$sql = ' CREATE TABLE '.$search_table.'
SELECT '.$relevance_clause.' AS Relevance,
'.$items_table.'.'.$id_field.' AS ItemId,
'.$items_table.'.ResourceId AS ResourceId,
11 AS ItemType,
'.$pick_field.' AS EdPick
FROM '.$items_table.'
'.implode(' ', $join_clauses).'
WHERE '.$where_clause.'
GROUP BY '.$items_table.'.'.$id_field.
$having_clause;
$res = $this->Conn->Query($sql);
}
function getAdvancedSearchCondition($field_name, $record, $keywords, $verbs, &$highlight_keywords)
{
$field = $record['FieldName'];
$condition_patterns = Array (
'any' => '%s LIKE %s',
'contains' => '%s LIKE %s',
'notcontains' => '(NOT (%1$s LIKE %2$s) OR %1$s IS NULL)',
'is' => '%s = %s',
'isnot' => '(%1$s != %2$s OR %1$s IS NULL)'
);
$condition = '';
switch ($record['FieldType']) {
case 'select':
$keywords[$field] = htmlspecialchars_decode( $keywords[$field] );
if ($keywords[$field]) {
$condition = sprintf($condition_patterns['is'], $field_name, $this->Conn->qstr( $keywords[$field] ));
}
break;
case 'multiselect':
$keywords[$field] = htmlspecialchars_decode( $keywords[$field] );
if ($keywords[$field]) {
$condition = Array ();
$values = explode('|', substr($keywords[$field], 1, -1));
foreach ($values as $selected_value) {
$condition[] = sprintf($condition_patterns['contains'], $field_name, $this->Conn->qstr('%|'.$selected_value.'|%'));
}
$condition = '('.implode(' OR ', $condition).')';
}
break;
case 'text':
$keywords[$field] = htmlspecialchars_decode( $keywords[$field] );
if (mb_strlen($keywords[$field]) >= $this->Application->ConfigValue('Search_MinKeyword_Length')) {
$highlight_keywords[] = $keywords[$field];
if (in_array($verbs[$field], Array('any', 'contains', 'notcontains'))) {
$keywords[$field] = '%'.strtr($keywords[$field], Array('%' => '\\%', '_' => '\\_')).'%';
}
$condition = sprintf($condition_patterns[$verbs[$field]], $field_name, $this->Conn->qstr( $keywords[$field] ));
}
break;
case 'boolean':
if ($keywords[$field] != -1) {
$config = $this->getUnitConfig();
$items_table = $config->getTableName();
$property_mappings = $config->getItemPropertyMappings();
switch ($field) {
case 'HotItem':
$hot_limit_var = getArrayValue($property_mappings, 'HotLimit');
if ($hot_limit_var) {
$hot_limit = (int)$this->Application->getDBCache($hot_limit_var);
$condition = 'IF('.$items_table.'.HotItem = 2,
IF('.$items_table.'.Hits >= '.
$hot_limit.
', 1, 0), '.$items_table.'.HotItem) = '.$keywords[$field];
}
break;
case 'PopItem':
$votes2pop_var = getArrayValue($property_mappings, 'VotesToPop');
$rating2pop_var = getArrayValue($property_mappings, 'RatingToPop');
if ($votes2pop_var && $rating2pop_var) {
$condition = 'IF('.$items_table.'.PopItem = 2, IF('.$items_table.'.CachedVotesQty >= '.
$this->Application->ConfigValue($votes2pop_var).
' AND '.$items_table.'.CachedRating >= '.
$this->Application->ConfigValue($rating2pop_var).
', 1, 0), '.$items_table.'.PopItem) = '.$keywords[$field];
}
break;
case 'NewItem':
$new_days_var = getArrayValue($property_mappings, 'NewDays');
if ($new_days_var) {
$condition = 'IF('.$items_table.'.NewItem = 2,
IF('.$items_table.'.CreatedOn >= (UNIX_TIMESTAMP() - '.
$this->Application->ConfigValue($new_days_var).
'*3600*24), 1, 0), '.$items_table.'.NewItem) = '.$keywords[$field];
}
break;
case 'EditorsPick':
$condition = $items_table.'.EditorsPick = '.$keywords[$field];
break;
}
}
break;
case 'range':
$range_conditions = Array();
if ($keywords[$field.'_from'] && !preg_match("/[^0-9]/i", $keywords[$field.'_from'])) {
$range_conditions[] = $field_name.' >= '.$keywords[$field.'_from'];
}
if ($keywords[$field.'_to'] && !preg_match("/[^0-9]/i", $keywords[$field.'_to'])) {
$range_conditions[] = $field_name.' <= '.$keywords[$field.'_to'];
}
if ($range_conditions) {
$condition = implode(' AND ', $range_conditions);
}
break;
case 'date':
if ($keywords[$field]) {
if (in_array($keywords[$field], Array('today', 'yesterday'))) {
$current_time = getdate();
$day_begin = mktime(0, 0, 0, $current_time['mon'], $current_time['mday'], $current_time['year']);
$time_mapping = Array('today' => $day_begin, 'yesterday' => ($day_begin - 86400));
$min_time = $time_mapping[$keywords[$field]];
}
else {
$time_mapping = Array (
'last_week' => 604800, 'last_month' => 2628000, 'last_3_months' => 7884000,
'last_6_months' => 15768000, 'last_year' => 31536000,
);
$min_time = time() - $time_mapping[$keywords[$field]];
}
$condition = $field_name.' > '.$min_time;
}
break;
}
return $condition;
}
/**
* Returns human readable representation of searched data to be placed in search log
* @param string $type
* @param Array $search_data
* @return string
* @access protected
*/
protected function getHuman($type, $search_data)
{
// all 3 variables are retrieved from $search_data array
/* @var $search_config Array */
/* @var $verb string */
/* @var $value string */
$type = ucfirst(strtolower($type));
extract($search_data);
switch ($type) {
case 'Field':
return $this->Application->Phrase($search_config['DisplayName']);
break;
case 'Verb':
return $verb ? $this->Application->Phrase('lu_advsearch_'.$verb) : '';
break;
case 'Value':
switch ($search_config['FieldType']) {
case 'date':
$values = Array(0 => 'lu_comm_Any', 'today' => 'lu_comm_Today',
'yesterday' => 'lu_comm_Yesterday', 'last_week' => 'lu_comm_LastWeek',
'last_month' => 'lu_comm_LastMonth', 'last_3_months' => 'lu_comm_Last3Months',
'last_6_months' => 'lu_comm_Last6Months', 'last_year' => 'lu_comm_LastYear');
$ret = $this->Application->Phrase($values[$value]);
break;
case 'range':
$value = explode('|', $value);
return $this->Application->Phrase('lu_comm_From').' "'.$value[0].'" '.$this->Application->Phrase('lu_comm_To').' "'.$value[1].'"';
break;
case 'boolean':
$values = Array(1 => 'lu_comm_Yes', 0 => 'lu_comm_No', -1 => 'lu_comm_Both');
$ret = $this->Application->Phrase($values[$value]);
break;
default:
$ret = $value;
break;
}
return '"'.$ret.'"';
break;
}
return '';
}
/**
* Set's correct page for list based on data provided with event
*
* @param kEvent $event
* @return void
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
protected function SetPagination(kEvent $event)
{
$object = $event->getObject();
/* @var $object kDBList */
// get PerPage (forced -> session -> config -> 10)
$object->SetPerPage($this->getPerPage($event));
// main lists on Front-End have special get parameter for page
$page = $object->isMainList() ? $this->Application->GetVar('page') : false;
if ( !$page ) {
// page is given in "env" variable for given prefix
$page = $this->Application->GetVar($event->getPrefixSpecial() . '_Page');
}
if ( !$page && $event->Special ) {
// when not part of env, then variables like "prefix.special_Page" are
// replaced (by PHP) with "prefix_special_Page", so check for that too
$page = $this->Application->GetVar($event->getPrefixSpecial(true) . '_Page');
}
if ( !$object->isMainList() ) {
// main lists doesn't use session for page storing
$this->Application->StoreVarDefault($event->getPrefixSpecial() . '_Page', 1, true); // true for optional
if ( !$page ) {
if ( $this->Application->RewriteURLs() ) {
// when page not found by prefix+special, then try to search it without special at all
$page = $this->Application->GetVar($event->Prefix . '_Page');
if ( !$page ) {
// page not found in request -> get from session
$page = $this->Application->RecallVar($event->Prefix . '_Page');
}
if ( $page ) {
// page found in request -> store in session
$this->Application->StoreVar($event->getPrefixSpecial() . '_Page', $page, true); //true for optional
}
}
else {
// page not found in request -> get from session
$page = $this->Application->RecallVar($event->getPrefixSpecial() . '_Page');
}
}
else {
// page found in request -> store in session
$this->Application->StoreVar($event->getPrefixSpecial() . '_Page', $page, true); //true for optional
}
if ( !$event->getEventParam('skip_counting') ) {
// when stored page is larger, then maximal list page number
// (such case is also processed in kDBList::Query method)
$pages = $object->GetTotalPages();
if ( $page > $pages ) {
$page = 1;
$this->Application->StoreVar($event->getPrefixSpecial() . '_Page', 1, true);
}
}
}
$object->SetPage($page);
}
/* === RELATED TO IMPORT/EXPORT: BEGIN === */
/**
* Shows export dialog
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnExport(kEvent $event)
{
$selected_ids = $this->StoreSelectedIDs($event);
if ( implode(',', $selected_ids) == '' ) {
// K4 fix when no ids found bad selected ids array is formed
$selected_ids = false;
}
$selected_cats_ids = $this->Application->GetVar('export_categories');
$this->Application->StoreVar($event->Prefix . '_export_ids', $selected_ids ? implode(',', $selected_ids) : '');
$this->Application->StoreVar($event->Prefix . '_export_cats_ids', $selected_cats_ids);
$export_helper = $this->Application->recallObject('CatItemExportHelper');
/* @var $export_helper kCatDBItemExportHelper */
$redirect_params = Array (
$this->Prefix . '.export_event' => 'OnNew',
'pass' => 'all,' . $this->Prefix . '.export'
);
$event->setRedirectParams($redirect_params);
}
/**
* Performs each export step & displays progress percent
*
* @param kEvent $event
*/
function OnExportProgress($event)
{
$export_object = $this->Application->recallObject('CatItemExportHelper');
/* @var $export_object kCatDBItemExportHelper */
$event = new kEvent($event->getPrefixSpecial().':OnDummy');
$action_method = 'perform'.ucfirst($event->Special);
$field_values = $export_object->$action_method($event);
// finish code is done from JS now
if ($field_values['start_from'] == $field_values['total_records']) {
if ($event->Special == 'import') {
$this->Application->StoreVar('PermCache_UpdateRequired', 1);
$event->SetRedirectParam('m_cat_id', $this->Application->RecallVar('ImportCategory'));
$event->SetRedirectParam('anchor', 'tab-' . $event->Prefix);
$event->redirect = 'catalog/catalog';
}
elseif ($event->Special == 'export') {
$event->redirect = $export_object->getModuleName($event) . '/' . $event->Special . '_finish';
$event->SetRedirectParam('pass', 'all');
}
return ;
}
$export_options = $export_object->loadOptions($event);
echo $export_options['start_from'] * 100 / $export_options['total_records'];
$event->status = kEvent::erSTOP;
}
/**
* Returns specific to each item type columns only
*
* @param kEvent $event
* @return Array
* @access protected
*/
public function getCustomExportColumns(kEvent $event)
{
return Array (
'__VIRTUAL__ThumbnailImage' => 'ThumbnailImage',
'__VIRTUAL__FullImage' => 'FullImage',
'__VIRTUAL__ImageAlt' => 'ImageAlt'
);
}
/**
* Sets non standart virtual fields (e.g. to other tables)
*
* @param kEvent $event
*/
function setCustomExportColumns($event)
{
$this->restorePrimaryImage($event);
}
/**
* Create/Update primary image record in info found in imported data
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function restorePrimaryImage($event)
{
$object = $event->getObject();
/* @var $object kCatDBItem */
$has_image_info = $object->GetDBField('ImageAlt') && ($object->GetDBField('ThumbnailImage') || $object->GetDBField('FullImage'));
if ( !$has_image_info ) {
return ;
}
$image_data = $object->getPrimaryImageData();
$image = $this->Application->recallObject('img', NULL, Array ('skip_autoload' => true));
/* @var $image kDBItem */
if ( $image_data ) {
$image->Load($image_data['ImageId']);
}
else {
$image->Clear();
$image->SetDBField('Name', 'main');
$image->SetDBField('DefaultImg', 1);
$image->SetDBField('ResourceId', $object->GetDBField('ResourceId'));
}
$image->SetDBField('AltName', $object->GetDBField('ImageAlt'));
if ( $object->GetDBField('ThumbnailImage') ) {
$thumbnail_field = $this->isURL($object->GetDBField('ThumbnailImage')) ? 'ThumbUrl' : 'ThumbPath';
$image->SetDBField($thumbnail_field, $object->GetDBField('ThumbnailImage'));
$image->SetDBField('LocalThumb', $thumbnail_field == 'ThumbPath' ? 1 : 0);
}
if ( !$object->GetDBField('FullImage') ) {
$image->SetDBField('SameImages', 1);
}
else {
$image->SetDBField('SameImages', 0);
$full_field = $this->isURL($object->GetDBField('FullImage')) ? 'Url' : 'LocalPath';
$image->SetDBField($full_field, $object->GetDBField('FullImage'));
$image->SetDBField('LocalImage', $full_field == 'LocalPath' ? 1 : 0);
}
if ( $image->isLoaded() ) {
$image->Update();
}
else {
$image->Create();
}
}
/**
* Detects if image url is specified in a given path (instead of path on disk)
*
* @param string $path
* @return bool
* @access protected
*/
protected function isURL($path)
{
return preg_match('#(http|https)://(.*)#', $path);
}
/**
* Prepares item for import/export operations
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnNew(kEvent $event)
{
parent::OnNew($event);
if ( $event->Special == 'import' || $event->Special == 'export' ) {
$export_helper = $this->Application->recallObject('CatItemExportHelper');
/* @var $export_helper kCatDBItemExportHelper */
$export_helper->setRequiredFields($event);
}
}
/**
* Process items selected in item_selector
*
* @param kEvent $event
*/
function OnProcessSelected($event)
{
$dst_field = $this->Application->RecallVar('dst_field');
$selected_ids = $this->Application->GetVar('selected_ids');
if ( $dst_field == 'ItemCategory' ) {
// Item Edit -> Categories Tab -> New Categories
$object = $event->getObject();
/* @var $object kCatDBItem */
$category_ids = explode(',', $selected_ids['c']);
foreach ($category_ids as $category_id) {
$object->assignToCategory($category_id);
}
}
if ($dst_field == 'ImportCategory') {
// Tools -> Import -> Item Import -> Select Import Category
$this->Application->StoreVar('ImportCategory', $selected_ids['c']);
$event->SetRedirectParam($event->getPrefixSpecial() . '_id', 0);
$event->SetRedirectParam($event->getPrefixSpecial() . '_event', 'OnExportBegin');
}
$event->SetRedirectParam('opener', 'u');
}
/**
* Saves Import/Export settings to session
*
* @param kEvent $event
*/
function OnSaveSettings($event)
{
$event->redirect = false;
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
if ( $items_info ) {
list($id, $field_values) = each($items_info);
$object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
$field_values['ImportFilename'] = $object->GetDBField('ImportFilename'); //if upload formatter has renamed the file during moving !!!
$field_values['ImportSource'] = 2;
$field_values['ImportLocalFilename'] = $object->GetDBField('ImportFilename');
$items_info[$id] = $field_values;
$this->Application->StoreVar($event->getPrefixSpecial() . '_ItemsInfo', serialize($items_info));
}
}
/**
* Saves Import/Export settings to session
*
* @param kEvent $event
*/
function OnResetSettings($event)
{
$this->Application->StoreVar('ImportCategory', $this->Application->getBaseCategory());
}
/**
* Cancels item editing
* @param kEvent $event
* @return void
* @todo Used?
*/
function OnCancelAction($event)
{
$event->redirect = $this->Application->GetVar('cancel_template');
$event->SetRedirectParam('pass', 'all,' . $event->getPrefixSpecial());
}
/* === RELATED TO IMPORT/EXPORT: END === */
/**
* Stores item's owner login into separate field together with id
*
* @param kEvent $event
* @param string $id_field
* @param string $cached_field
*/
function cacheItemOwner($event, $id_field, $cached_field)
{
$object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField($cached_field, $object->GetField($id_field));
$options = $object->GetFieldOptions($id_field);
if ( isset($options['options'][$user_id]) ) {
$object->SetDBField($cached_field, $options['options'][$user_id]);
}
else {
$user_config = $this->Application->getUnitConfig('u');
$id_field = $user_config->getIDField();
$table_name = $user_config->getTableName();
$sql = 'SELECT Username
FROM ' . $table_name . '
WHERE ' . $id_field . ' = ' . $user_id;
$object->SetDBField($cached_field, $this->Conn->GetOne($sql));
}
}
/**
* Saves edited item into temp table
* If there is no id, new item is created in temp table
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnPreSave(kEvent $event)
{
parent::OnPreSave($event);
$use_pending_editing = $event->getUnitConfig()->getUsePendingEditing();
if ( $event->status == kEvent::erSUCCESS && $use_pending_editing ) {
// decision: clone or not clone
$object = $event->getObject();
/* @var $object kCatDBItem */
if ( $object->GetID() == 0 || $object->GetDBField('OrgId') > 0 ) {
// new items or cloned items shouldn't be cloned again
return ;
}
$perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$owner_field = $this->getOwnerField($event->Prefix);
if ( $perm_helper->ModifyCheckPermission($object->GetDBField($owner_field), $object->GetDBField('CategoryId'), $event->Prefix) == 2 ) {
// 1. clone original item
$temp_handler = $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => $event));
/* @var $temp_handler kTempTablesHandler */
$cloned_ids = $temp_handler->CloneItems($event->Prefix, $event->Special, Array ($object->GetID()), NULL, NULL, NULL, true);
$ci_table = $this->Application->GetTempName(TABLE_PREFIX . 'CategoryItems');
// 2. delete record from CategoryItems (about cloned item) that was automatically created during call of Create method of kCatDBItem
$sql = 'SELECT ResourceId
FROM ' . $object->TableName . '
WHERE ' . $object->IDField . ' = ' . $cloned_ids[0];
$clone_resource_id = $this->Conn->GetOne($sql);
$sql = 'DELETE FROM ' . $ci_table . '
WHERE ItemResourceId = ' . $clone_resource_id . ' AND PrimaryCat = 1';
$this->Conn->Query($sql);
// 3. copy main item categoryitems to cloned item
$sql = ' INSERT INTO ' . $ci_table . ' (CategoryId, ItemResourceId, PrimaryCat, ItemPrefix, Filename)
SELECT CategoryId, ' . $clone_resource_id . ' AS ItemResourceId, PrimaryCat, ItemPrefix, Filename
FROM ' . $ci_table . '
WHERE ItemResourceId = ' . $object->GetDBField('ResourceId');
$this->Conn->Query($sql);
// 4. put cloned id to OrgId field of item being cloned
$sql = 'UPDATE ' . $object->TableName . '
SET OrgId = ' . $object->GetID() . '
WHERE ' . $object->IDField . ' = ' . $cloned_ids[0];
$this->Conn->Query($sql);
// 5. substitute id of item being cloned with clone id
$this->Application->SetVar($event->getPrefixSpecial() . '_id', $cloned_ids[0]);
$selected_ids = $this->getSelectedIDs($event, true);
$selected_ids[ array_search($object->GetID(), $selected_ids) ] = $cloned_ids[0];
$this->StoreSelectedIDs($event, $selected_ids);
// 6. delete original item from temp table
$temp_handler->DeleteItems($event->Prefix, $event->Special, Array ($object->GetID()));
}
}
}
/**
* Sets item's owner field
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnPreCreate(kEvent $event)
{
parent::OnPreCreate($event);
if ( $event->status != kEvent::erSUCCESS ) {
return ;
}
$object = $event->getObject();
/* @var $object kDBItem */
$owner_field = $this->getOwnerField($event->Prefix);
$object->SetDBField($owner_field, $this->Application->RecallVar('user_id'));
}
/**
* Occurs before original item of item in pending editing got deleted (for hooking only)
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeDeleteOriginal(kEvent $event)
{
}
/**
* Occurs after original item of item in pending editing got deleted (for hooking only)
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterDeleteOriginal(kEvent $event)
{
}
/**
* Occurs before an item has been cloned
* Id of newly created item is passed as event' 'id' param
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeClone(kEvent $event)
{
parent::OnBeforeClone($event);
$object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('ResourceId', 0); // this will reset it
if ( $this->Application->GetVar('ResetCatBeforeClone') ) {
$object->SetDBField('CategoryId', NULL);
}
}
/**
* Set status for new category item based on user permission in category
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
$object = $event->getObject();
/* @var $object kCatDBItem */
$is_admin = $this->Application->isAdminUser;
$owner_field = $this->getOwnerField($event->Prefix);
if ( (!$object->IsTempTable() && !$is_admin) || ($is_admin && !$object->GetDBField($owner_field)) ) {
// Front-end OR owner not specified -> set to currently logged-in user
$object->SetDBField($owner_field, $this->Application->RecallVar('user_id'));
}
if ( !$this->Application->isAdmin ) {
$this->setItemStatusByPermission($event);
}
}
/**
* Sets category item status based on user permissions (only on Front-end)
*
* @param kEvent $event
*/
function setItemStatusByPermission($event)
{
$use_pending_editing = $event->getUnitConfig()->getUsePendingEditing();
if (!$use_pending_editing) {
return ;
}
$object = $event->getObject();
/* @var $object kCatDBItem */
$perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$primary_category = $object->GetDBField('CategoryId') > 0 ? $object->GetDBField('CategoryId') : $this->Application->GetVar('m_cat_id');
$item_status = $perm_helper->AddCheckPermission($primary_category, $event->Prefix);
if ($item_status == STATUS_DISABLED) {
$event->status = kEvent::erFAIL;
}
else {
$object->SetDBField('Status', $item_status);
}
}
/**
* Creates category item & redirects to confirmation template (front-end only)
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnCreate(kEvent $event)
{
parent::OnCreate($event);
$this->SetFrontRedirectTemplate($event, 'suggest');
}
/**
* Returns item's categories (allows to exclude primary category)
*
* @param int $resource_id
* @param bool $with_primary
* @return Array
*/
function getItemCategories($resource_id, $with_primary = false)
{
$sql = 'SELECT CategoryId
FROM '.TABLE_PREFIX.'CategoryItems
WHERE (ItemResourceId = '.$resource_id.')';
if (!$with_primary) {
$sql .= ' AND (PrimaryCat = 0)';
}
return $this->Conn->GetCol($sql);
}
/**
* Adds new and removes old additional categories from category item
*
* @param kCatDBItem $object
* @param int $mode
*/
function processAdditionalCategories(&$object, $mode)
{
if ( !$object->isVirtualField('MoreCategories') ) {
// given category item doesn't require such type of processing
return ;
}
$process_categories = $object->GetDBField('MoreCategories');
if ($process_categories === '') {
// field was not in submit & have default value (when no categories submitted, then value is null)
return ;
}
if ($mode == 'create') {
// prevents first additional category to become primary
$object->assignPrimaryCategory();
}
$process_categories = $process_categories ? explode('|', substr($process_categories, 1, -1)) : Array ();
$existing_categories = $this->getItemCategories($object->GetDBField('ResourceId'));
$add_categories = array_diff($process_categories, $existing_categories);
foreach ($add_categories as $category_id) {
$object->assignToCategory($category_id);
}
$remove_categories = array_diff($existing_categories, $process_categories);
foreach ($remove_categories as $category_id) {
$object->removeFromCategory($category_id);
}
}
/**
* Creates category item & redirects to confirmation template (front-end only)
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnUpdate(kEvent $event)
{
$use_pending = $event->getUnitConfig()->getUsePendingEditing();
if ($this->Application->isAdminUser || !$use_pending) {
parent::OnUpdate($event);
$this->SetFrontRedirectTemplate($event, 'modify');
return ;
}
$object = $event->getObject(Array('skip_autoload' => true));
/* @var $object kCatDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
if ($items_info) {
$perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$temp_handler = $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler', Array ('parent_event' => $event));
/* @var $temp_handler kTempTablesHandler */
$owner_field = $this->getOwnerField($event->Prefix);
$file_helper = $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
foreach ($items_info as $id => $field_values) {
$object->Load($id);
$edit_perm = $perm_helper->ModifyCheckPermission($object->GetDBField($owner_field), $object->GetDBField('CategoryId'), $event->Prefix);
if ($use_pending && !$object->GetDBField('OrgId') && ($edit_perm == STATUS_PENDING)) {
// pending editing enabled + not pending copy -> get/create pending copy & save changes to it
$original_id = $object->GetID();
$original_resource_id = $object->GetDBField('ResourceId');
$file_helper->PreserveItemFiles($field_values);
$object->Load($original_id, 'OrgId');
if (!$object->isLoaded()) {
// 1. user has no pending copy of live item -> clone live item
$cloned_ids = $temp_handler->CloneItems($event->Prefix, $event->Special, Array($original_id), NULL, NULL, NULL, true);
$object->Load($cloned_ids[0]);
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
$event->setEventParam('form_data', $field_values);
// 1a. delete record from CategoryItems (about cloned item) that was automatically created during call of Create method of kCatDBItem
$ci_table = $this->Application->getUnitConfig('ci')->getTableName();
$sql = 'DELETE FROM '.$ci_table.'
WHERE ItemResourceId = '.$object->GetDBField('ResourceId').' AND PrimaryCat = 1';
$this->Conn->Query($sql);
// 1b. copy main item categoryitems to cloned item
$sql = 'INSERT INTO '.$ci_table.' (CategoryId, ItemResourceId, PrimaryCat, ItemPrefix, Filename)
SELECT CategoryId, '.$object->GetDBField('ResourceId').' AS ItemResourceId, PrimaryCat, ItemPrefix, Filename
FROM '.$ci_table.'
WHERE ItemResourceId = '.$original_resource_id;
$this->Conn->Query($sql);
// 1c. put cloned id to OrgId field of item being cloned
$object->SetDBField('Status', STATUS_PENDING_EDITING);
$object->SetDBField('OrgId', $original_id);
}
else {
// 2. user has pending copy of live item -> just update field values
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
$event->setEventParam('form_data', $field_values);
}
// update id in request (used for redirect in mod-rewrite mode)
$this->Application->SetVar($event->getPrefixSpecial().'_id', $object->GetID());
}
else {
// 3. already editing pending copy -> just update field values
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
$event->setEventParam('form_data', $field_values);
}
if ($object->Update()) {
$event->status = kEvent::erSUCCESS;
}
else {
$event->status = kEvent::erFAIL;
$event->redirect = false;
break;
}
}
}
$this->SetFrontRedirectTemplate($event, 'modify');
}
/**
* Sets next template to one required for front-end after adding/modifying item
*
* @param kEvent $event
* @param string $template_key - {suggest,modify}
*/
function SetFrontRedirectTemplate($event, $template_key)
{
if ( $this->Application->isAdmin || $event->status != kEvent::erSUCCESS ) {
return;
}
// prepare redirect template
$object = $event->getObject();
/* @var $object kDBItem */
$is_active = ($object->GetDBField('Status') == STATUS_ACTIVE);
$next_template = $is_active ? 'confirm_template' : 'pending_confirm_template';
$event->redirect = $this->Application->GetVar($template_key . '_' . $next_template);
$event->SetRedirectParam('opener', 's');
// send email events
$perm_prefix = $event->getUnitConfig()->getPermItemPrefix();
$owner_field = $this->getOwnerField($event->Prefix);
$owner_id = $object->GetDBField($owner_field);
+ $send_params = $object->getEmailParams();
switch ( $event->Name ) {
case 'OnCreate':
$event_suffix = $is_active ? 'ADD' : 'ADD.PENDING';
- $this->Application->emailAdmin($perm_prefix . '.' . $event_suffix); // there are no ADD.PENDING event for admin :(
- $this->Application->emailUser($perm_prefix . '.' . $event_suffix, $owner_id);
+ $this->Application->emailUser($perm_prefix . '.' . $event_suffix, $owner_id, $send_params);
+ $this->Application->emailAdmin($perm_prefix . '.' . $event_suffix, null, $send_params); // there are no ADD.PENDING event for admin :(
break;
case 'OnUpdate':
$event_suffix = $is_active ? 'MODIFY' : 'MODIFY.PENDING';
$user_id = is_numeric($object->GetDBField('ModifiedById')) ? $object->GetDBField('ModifiedById') : $owner_id;
- $this->Application->emailAdmin($perm_prefix . '.' . $event_suffix); // there are no ADD.PENDING event for admin :(
- $this->Application->emailUser($perm_prefix . '.' . $event_suffix, $user_id);
+ $this->Application->emailUser($perm_prefix . '.' . $event_suffix, $user_id, $send_params);
+ $this->Application->emailAdmin($perm_prefix . '.' . $event_suffix, null, $send_params); // there are no ADD.PENDING event for admin :(
break;
}
}
/**
* Apply same processing to each item being selected in grid
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function iterateItems(kEvent $event)
{
if ( $event->Name != 'OnMassApprove' && $event->Name != 'OnMassDecline' ) {
parent::iterateItems($event);
}
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
return ;
}
$object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kCatDBItem */
$ids = $this->StoreSelectedIDs($event);
if ( $ids ) {
foreach ($ids as $id) {
$ret = true;
$object->Load($id);
switch ( $event->Name ) {
case 'OnMassApprove':
$ret = $object->ApproveChanges();
break;
case 'OnMassDecline':
$ret = $object->DeclineChanges();
break;
}
if ( !$ret ) {
$event->status = kEvent::erFAIL;
$event->redirect = false;
break;
}
}
}
$this->clearSelectedIDs($event);
}
/**
* Deletes items & preserves clean env
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnDelete(kEvent $event)
{
parent::OnDelete($event);
if ( $event->status == kEvent::erSUCCESS && !$this->Application->isAdmin ) {
$event->SetRedirectParam('pass', 'm');
$event->SetRedirectParam('m_cat_id', 0);
}
}
/**
* Checks, that currently loaded item is allowed for viewing (non permission-based)
*
* @param kEvent $event
* @return bool
* @access protected
*/
protected function checkItemStatus(kEvent $event)
{
$object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
if ( $event->Special != 'previous' && $event->Special != 'next' ) {
$this->_errorNotFound($event);
}
return true;
}
$status = $object->GetDBField('Status');
$user_id = $this->Application->RecallVar('user_id');
$owner_field = $this->getOwnerField($event->Prefix);
if ( ($status == STATUS_PENDING_EDITING || $status == STATUS_PENDING) && ($object->GetDBField($owner_field) == $user_id) ) {
return true;
}
return $status == STATUS_ACTIVE;
}
/**
* Set's correct sorting for list based on data provided with event
*
* @param kEvent $event
* @return void
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
protected function SetSorting(kEvent $event)
{
if ( !$this->Application->isAdmin ) {
$event->setEventParam('same_special', true);
}
$types = $event->getEventParam('types');
$types = $types ? explode(',', $types) : Array ();
if ( in_array('search', $types) ) {
$event->setPseudoClass('_List');
$object = $event->getObject();
/* @var $object kDBList */
// 1. no user sorting - sort by relevance
$default_sortings = parent::_getDefaultSorting($event);
$default_sorting = key($default_sortings['Sorting']) . ',' . current($default_sortings['Sorting']);
if ( $object->isMainList() ) {
$sort_by = $this->Application->GetVar('sort_by', '');
if ( !$sort_by ) {
$this->Application->SetVar('sort_by', 'Relevance,desc|' . $default_sorting);
}
elseif ( strpos($sort_by, 'Relevance,') !== false ) {
$this->Application->SetVar('sort_by', $sort_by . '|' . $default_sorting);
}
}
else {
$sorting_settings = $this->getListSetting($event, 'Sortings');
$sort_by = trim(getArrayValue($sorting_settings, 'Sort1') . ',' . getArrayValue($sorting_settings, 'Sort1_Dir'), ',');
if ( !$sort_by ) {
$event->setEventParam('sort_by', 'Relevance,desc|' . $default_sorting);
}
elseif ( strpos($sort_by, 'Relevance,') !== false ) {
$event->setEventParam('sort_by', $sort_by . '|' . $default_sorting);
}
}
$this->_removeForcedSortings($event);
}
parent::SetSorting($event);
}
/**
* Removes forced sortings
*
* @param kEvent $event
*/
protected function _removeForcedSortings(kEvent $event)
{
$config = $event->getUnitConfig();
foreach ($config->getListSortingSpecials() as $special) {
$list_sortings = $config->getListSortingsBySpecial($special);
unset($list_sortings['ForcedSorting']);
$config->setListSortingsBySpecial('', $list_sortings);
}
}
/**
* Default sorting in search results only comes from relevance field
*
* @param kEvent $event
* @return Array
* @access protected
*/
protected function _getDefaultSorting(kEvent $event)
{
$types = $event->getEventParam('types');
$types = $types ? explode(',', $types) : Array ();
return in_array('search', $types) ? Array () : parent::_getDefaultSorting($event);
}
/**
* Returns current per-page setting for list
*
* @param kEvent $event
* @return int
* @access protected
*/
protected function getPerPage(kEvent $event)
{
if ( !$this->Application->isAdmin ) {
$event->setEventParam('same_special', true);
}
return parent::getPerPage($event);
}
/**
* Returns owner field for given prefix
*
* @param $prefix
* @return string
* @access protected
*/
protected function getOwnerField($prefix)
{
return $this->Application->getUnitConfig($prefix)->getOwnerField('CreatedById');
}
/**
* Creates virtual image fields for item
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
if (defined('IS_INSTALL') && IS_INSTALL) {
$this->addViewPermissionJoin($event);
return ;
}
if ( !$this->Application->isAdmin ) {
$file_helper = $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
$file_helper->createItemFiles($event->Prefix, true); // create image fields
$file_helper->createItemFiles($event->Prefix, false); // create file fields
}
$this->changeSortings($event)->addViewPermissionJoin($event);
// add grids for advanced view (with primary category column)
$config = $event->getUnitConfig();
foreach (Array ('Default', 'Radio') as $process_grid) {
$grid_data = $config->getGridByName($process_grid);
$grid_data['Fields']['CachedNavbar'] = Array ('title' => 'la_col_Path', 'data_block' => 'grid_primary_category_td', 'filter_block' => 'grid_like_filter');
$config->addGrids($grid_data, $process_grid . 'ShowAll');
}
// add options for CategoryId field (quick way to select item's primary category)
$category_helper = $this->Application->recallObject('CategoryHelper');
/* @var $category_helper CategoryHelper */
$virtual_fields = $config->getVirtualFields();
$virtual_fields['CategoryId']['default'] = (int)$this->Application->GetVar('m_cat_id');
$virtual_fields['CategoryId']['options'] = $category_helper->getStructureTreeAsOptions();
$config->setVirtualFields($virtual_fields);
}
/**
* Changes default sorting according to system settings.
*
* @param kEvent $event Event.
*
* @return self
* @access protected
*/
protected function changeSortings(kEvent $event)
{
$remove_sortings = Array ();
$config = $event->getUnitConfig();
if ( !$this->Application->isAdmin ) {
// remove Pick sorting on Front-end, when not required
$config_mapping = $config->getConfigMapping(Array ());
if ( !isset($config_mapping['ForceEditorPick']) || !$this->Application->ConfigValue($config_mapping['ForceEditorPick']) ) {
$remove_sortings[] = 'EditorsPick';
}
}
else {
// remove all forced sortings in Admin Console
$remove_sortings = array_merge($remove_sortings, Array ('Priority', 'EditorsPick'));
}
if ( !$remove_sortings ) {
return $this;
}
foreach ($config->getListSortingSpecials() as $special) {
$list_sortings = $config->getListSortingsBySpecial($special);
foreach ($remove_sortings as $sorting_field) {
unset($list_sortings['ForcedSorting'][$sorting_field]);
}
$config->setListSortingsBySpecial('', $list_sortings);
}
return $this;
}
/**
* Adds permission table table JOIN clause only, when advanced catalog view permissions enabled.
*
* @param kEvent $event Event.
*
* @return self
* @access protected
*/
protected function addViewPermissionJoin(kEvent $event)
{
if ( $this->Application->ConfigValue('CheckViewPermissionsInCatalog') ) {
$join_clause = 'LEFT JOIN ' . TABLE_PREFIX . 'CategoryPermissionsCache perm ON perm.CategoryId = ' . TABLE_PREFIX . '%3$sCategoryItems.CategoryId';
}
else {
$join_clause = '';
}
$config = $event->getUnitConfig();
foreach ( $config->getListSQLSpecials() as $special ) {
$list_sql = str_replace('{PERM_JOIN}', $join_clause, $config->getListSQLsBySpecial($special));
$config->setListSQLsBySpecial($special, $list_sql);
}
return $this;
}
/**
* Returns file contents associated with item
*
* @param kEvent $event
*/
function OnDownloadFile($event)
{
$object = $event->getObject();
/* @var $object kCatDBItem */
$event->status = kEvent::erSTOP;
$field = $this->Application->GetVar('field');
if (!preg_match('/^File([\d]+)/', $field)) {
return ;
}
$file_helper = $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
$filename = $object->GetField($field, 'full_path');
$file_helper->DownloadFile($filename);
}
/**
* Saves user's vote
*
* @param kEvent $event
*/
function OnMakeVote($event)
{
$event->status = kEvent::erSTOP;
if ($this->Application->GetVar('ajax') != 'yes') {
// this is supposed to call from AJAX only
return ;
}
$rating_helper = $this->Application->recallObject('RatingHelper');
/* @var $rating_helper RatingHelper */
$object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kCatDBItem */
$object->Load( $this->Application->GetVar('id') );
echo $rating_helper->makeVote($object);
}
/**
* Marks review as useful
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnReviewHelpful($event)
{
if ( $this->Application->GetVar('ajax') == 'yes' ) {
$event->status = kEvent::erSTOP;
}
$review_id = (int)$this->Application->GetVar('review_id');
if ( !$review_id ) {
return;
}
$spam_helper = $this->Application->recallObject('SpamHelper');
/* @var $spam_helper SpamHelper */
$spam_helper->InitHelper($review_id, 'ReviewHelpful', strtotime('+1 month') - strtotime('now'));
$field = (int)$this->Application->GetVar('helpful') ? 'HelpfulCount' : 'NotHelpfulCount';
$review_config = $this->Application->getUnitConfig('rev');
$sql = 'SELECT ' . $field . '
FROM ' . $review_config->getTableName() . '
WHERE ' . $review_config->getIDField() . ' = ' . $review_id;
$count = $this->Conn->GetOne($sql);
if ( $spam_helper->InSpamControl() ) {
if ( $this->Application->GetVar('ajax') == 'yes' ) {
echo $count;
}
return;
}
$sql = 'UPDATE ' . $review_config->getTableName() . '
SET ' . $field . ' = ' . $field . ' + 1
WHERE ' . $review_config->getIDField() . ' = ' . $review_id;
$this->Conn->Query($sql);
if ( $this->Conn->getAffectedRows() ) {
// db was changed -> review with such ID exists
$spam_helper->AddToSpamControl();
}
if ( $this->Application->GetVar('ajax') == 'yes' ) {
echo $count + 1;
}
}
/**
* [HOOK] Allows to add cloned subitem to given prefix
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnCloneSubItem(kEvent $event)
{
parent::OnCloneSubItem($event);
if ( $event->MasterEvent->Prefix == 'fav' ) {
$master_config = $event->MasterEvent->getUnitConfig();
$clones = $master_config->getClones();
$sub_item_prefix = $event->Prefix . '-' . $event->MasterEvent->Prefix;
$clones[$sub_item_prefix]['ParentTableKey'] = 'ResourceId';
$clones[$sub_item_prefix]['ForeignKey'] = 'ResourceId';
$master_config->setClones($clones);
}
}
/**
* Set's new unique resource id to user
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemValidate(kEvent $event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$resource_id = $object->GetDBField('ResourceId');
if ( !$resource_id ) {
$object->SetDBField('ResourceId', $this->Application->NextResourceId());
}
}
}
\ No newline at end of file
Index: branches/5.3.x/core/kernel/utility/email.php
===================================================================
--- branches/5.3.x/core/kernel/utility/email.php (revision 15937)
+++ branches/5.3.x/core/kernel/utility/email.php (revision 15938)
@@ -1,877 +1,902 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @copyright Copyright (C) 1997 - 2012 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!');
class kEmail extends kBase {
/**
* Reference to class, that could send out e-mail
*
* @var kEmailSendingHelper
* @access protected
*/
protected $sender = null;
/**
* Parameters of e-mail
*
* @var Array
* @access protected
* @see kEmail::_getCustomParams() List of possible system parameters supported
*/
protected $params = Array ();
/**
* Reference to e-mail template object, that would be used as data source
*
* @var kDBItem
*/
protected $emailTemplate = null;
/**
* Sender name
*
* @var string
* @access protected
*/
protected $fromName = '';
/**
* Sender e-mail
*
* @var string
* @access protected
*/
protected $fromEmail = '';
/**
* Recipient name
*
* @var string
* @access protected
*/
protected $toName = '';
/**
* Recipient e-mail
*
* @var string
* @access protected
*/
protected $toEmail = '';
/**
* ID of recipient user
*
* @var int
*/
protected $recipientUserId = null;
/**
* List of e-mail recipients
*
* @var Array
* @access protected
*/
protected $recipients = Array (
EmailTemplate::RECIPIENT_TYPE_TO => Array (),
EmailTemplate::RECIPIENT_TYPE_CC => Array (),
EmailTemplate::RECIPIENT_TYPE_BCC => Array (),
);
/**
* Creates e-mail instance
*/
public function __construct()
{
parent::__construct();
$this->sender = $this->Application->recallObject('EmailSender');
}
/**
* Resets state of e-mail
*
* @return void
* @access protected
*/
protected function _resetState()
{
$this->fromEmail = $this->fromName = '';
$this->Application->removeObject('u.email-from');
$this->recipients = Array (
EmailTemplate::RECIPIENT_TYPE_TO => Array (),
EmailTemplate::RECIPIENT_TYPE_CC => Array (),
EmailTemplate::RECIPIENT_TYPE_BCC => Array (),
);
$this->toEmail = $this->toEmail = '';
$this->Application->removeObject('u.email-to');
}
/**
* Finds e-mail template matching user data
*
* @param string $name
* @param int $type
* @return bool
* @throws InvalidArgumentException
* @access public
*/
public function findTemplate($name, $type)
{
if ( !$name || !preg_match('/^[A-Z\.]+$/', $name) ) {
throw new InvalidArgumentException('Invalid e-mail template name "<strong>' . $name . '</strong>". Only <strong>UPPERCASE characters</strong> and <strong>dots</strong> are allowed.');
}
if ( $type != EmailTemplate::TEMPLATE_TYPE_ADMIN && $type != EmailTemplate::TEMPLATE_TYPE_FRONTEND ) {
throw new InvalidArgumentException('Invalid e-mail template type');
}
// use "-item" special prevent error, when e-mail sent out from e-mail templates list
$this->emailTemplate = $this->Application->recallObject('email-template.-item', null, Array ('skip_autoload' => true));
if ( !$this->emailTemplate->isLoaded() || !$this->_sameTemplate($name, $type) ) {
// get template parameters by name & type
$this->emailTemplate->Load(Array ('TemplateName' => $name, 'Type' => $type));
}
return $this->_templateUsable();
}
/**
* Detects, that given e-mail template data matches currently used e-mail template
*
* @param string $name
* @param int $type
* @return bool
* @access protected
*/
protected function _sameTemplate($name, $type)
{
return $this->emailTemplate->GetDBField('TemplateName') == $name && $this->emailTemplate->GetDBField('Type') == $type;
}
/**
* Determines if we can use e-mail template we've found based on user data
*
* @return bool
* @access protected
*/
protected function _templateUsable()
{
if ( !$this->emailTemplate->isLoaded() || $this->emailTemplate->GetDBField('Enabled') == STATUS_DISABLED ) {
return false;
}
if ( $this->emailTemplate->GetDBField('FrontEndOnly') && $this->Application->isAdmin ) {
return false;
}
return true;
}
/**
* Sets e-mail template params
*
* @param Array $params
* @access public
*/
public function setParams($params)
{
$this->params = $params;
}
/**
* Returns any custom parameters, that are passed when invoked e-mail template sending
*
* @return Array
* @access protected
*/
protected function _getCustomParams()
{
$ret = $this->params;
- $send_keys = Array ('from_email', 'from_name', 'to_email', 'to_name', 'overwrite_to_email', 'language_id', 'use_custom_design', 'delivery');
+ $send_keys = Array (
+ 'from_email', 'from_name', 'to_email', 'to_name',
+ 'overwrite_to_email', 'language_id', 'use_custom_design', 'delivery',
+ 'PrefixSpecial', 'item_id',
+ );
foreach ($send_keys as $send_key) {
unset($ret[$send_key]);
}
return $ret;
}
/**
* Sends e-mail now or puts it in queue
*
* @param int $recipient_user_id
* @return bool
* @access public
*/
public function send($recipient_user_id = null)
{
$this->recipientUserId = $recipient_user_id;
$this->_resetState();
$this->_processSender();
$this->_processRecipients();
$this->_changeLanguage(false);
// 1. set headers
try {
$message_headers = $this->_getHeaders();
}
catch ( Exception $e ) {
trigger_error('Error parsing e-mail message headers', E_USER_WARNING);
return false;
}
$message_subject = isset($message_headers['Subject']) ? $message_headers['Subject'] : 'Mail message';
$this->sender->SetSubject($message_subject);
foreach ($message_headers as $header_name => $header_value) {
$this->sender->SetEncodedHeader($header_name, $header_value);
}
if ( $this->_storeEmailLog() ) {
// 2. prepare log
$log_fields_hash = Array (
'From' => $this->fromName . ' (' . $this->fromEmail . ')',
'To' => $this->toName . ' (' . $this->toEmail . ')',
'OtherRecipients' => serialize($this->recipients),
'Subject' => $message_subject,
'SentOn' => TIMENOW,
'TemplateName' => $this->emailTemplate->GetDBField('TemplateName'),
'EventType' => $this->emailTemplate->GetDBField('Type'),
'EventParams' => serialize($this->_getCustomParams()),
+ 'ToUserId' => $this->recipientUserId,
+ 'ItemPrefix' => $this->getItemPrefix(),
+ 'ItemId' => isset($this->params['item_id']) ? $this->params['item_id'] : null,
);
$this->params['email_access_key'] = $this->_generateAccessKey($log_fields_hash);
}
// 3. set body
try {
$html_message_body = $this->_getMessageBody(true);
$plain_message_body = $this->_getMessageBody(false);
}
catch ( Exception $e ) {
trigger_error('Error parsing e-mail message body', E_USER_WARNING);
return false;
}
if ( $html_message_body === false && $plain_message_body === false ) {
trigger_error('Message template is empty (maybe after parsing).', E_USER_WARNING);
return false;
}
if ( $html_message_body !== false ) {
$this->sender->CreateTextHtmlPart($html_message_body, true);
}
if ( $plain_message_body !== false ) {
$this->sender->CreateTextHtmlPart($plain_message_body, false);
}
$this->_changeLanguage(true);
if ( $this->_storeEmailLog() ) {
// 4. set log
$log_fields_hash['HtmlBody'] = $html_message_body;
$log_fields_hash['TextBody'] = $plain_message_body;
$log_fields_hash['AccessKey'] = $this->params['email_access_key'];
$this->sender->setLogData($log_fields_hash);
}
$delivery = isset($this->params['delivery']) ? $this->params['delivery'] : $this->Application->ConfigValue('EmailDelivery');
return $this->sender->Deliver(null, $delivery == EmailDelivery::IMMEDIATE);
}
/**
+ * Extracts prefix from a given PrefixSpecial parameter.
+ *
+ * @return string
+ */
+ protected function getItemPrefix()
+ {
+ $prefix_special = isset($this->params['PrefixSpecial']) ? $this->params['PrefixSpecial'] : '';
+
+ if ( !$prefix_special ) {
+ return '';
+ }
+
+ $prefix_info = $this->Application->processPrefix($prefix_special);
+
+ return $prefix_info['prefix'];
+ }
+
+ /**
* Determines whatever we should keep e-mail log or not
*
* @return bool
* @access protected
*/
protected function _storeEmailLog()
{
return $this->Application->ConfigValue('EnableEmailLog');
}
/**
* Generates access key for accessing e-mail later
*
* @param Array $log_fields_hash
* @return string
* @access protected
*/
protected function _generateAccessKey($log_fields_hash)
{
$ret = '';
$use_fields = Array ('From', 'To', 'Subject');
foreach ($use_fields as $use_field) {
$ret .= $log_fields_hash[$use_field] . ':';
}
return md5($ret . microtime(true));
}
/**
* Processes email sender
*
* @return void
* @access protected
*/
protected function _processSender()
{
if ( $this->emailTemplate->GetDBField('CustomSender') ) {
$this->_processCustomSender();
}
// update with custom data given during event execution
if ( isset($this->params['from_email']) ) {
$this->fromEmail = $this->params['from_email'];
}
if ( isset($this->params['from_name']) ) {
$this->fromName = $this->params['from_name'];
}
// still nothing, set defaults
$this->_ensureDefaultSender();
$this->sender->SetFrom($this->fromEmail, $this->fromName);
}
/**
* Processes custom e-mail sender
*
* @return void
* @access protected
*/
protected function _processCustomSender()
{
$address = $this->emailTemplate->GetDBField('SenderAddress');
$address_type = $this->emailTemplate->GetDBField('SenderAddressType');
switch ($address_type) {
case EmailTemplate::ADDRESS_TYPE_EMAIL:
$this->fromEmail = $address;
break;
case EmailTemplate::ADDRESS_TYPE_USER:
$sql = 'SELECT FirstName, LastName, Email, PortalUserId
FROM ' . TABLE_PREFIX . 'Users
WHERE Username = ' . $this->Conn->qstr($address);
$user_info = $this->Conn->GetRow($sql);
if ( $user_info ) {
// user still exists
$this->fromEmail = $user_info['Email'];
$this->fromName = trim($user_info['FirstName'] . ' ' . $user_info['LastName']);
$user = $this->Application->recallObject('u.email-from', null, Array ('skip_autoload' => true));
/* @var $user UsersItem */
$user->Load($user_info['PortalUserId']);
}
break;
}
if ( $this->emailTemplate->GetDBField('SenderName') ) {
$this->fromName = $this->emailTemplate->GetDBField('SenderName');
}
}
/**
* Ensures, that sender name & e-mail are not empty
*
* @return void
* @access protected
*/
protected function _ensureDefaultSender()
{
if ( !$this->fromEmail ) {
$this->fromEmail = $this->Application->ConfigValue('DefaultEmailSender');
}
if ( !$this->fromName ) {
$this->fromName = strip_tags($this->Application->ConfigValue('Site_Name'));
}
}
/**
* Processes email recipients
*
* @return void
* @access protected
*/
protected function _processRecipients()
{
$this->_collectRecipients();
$header_mapping = Array (
EmailTemplate::RECIPIENT_TYPE_TO => 'To',
EmailTemplate::RECIPIENT_TYPE_CC => 'Cc',
EmailTemplate::RECIPIENT_TYPE_BCC => 'Bcc',
);
$default_email = $this->Application->ConfigValue('DefaultEmailSender');
$this->recipients = array_map(Array ($this, '_transformRecipientsIntoPairs'), $this->recipients);
foreach ($this->recipients as $recipient_type => $recipients) {
// add recipients to email
if ( !$recipients ) {
continue;
}
if ( $recipient_type == EmailTemplate::RECIPIENT_TYPE_TO ) {
$this->toEmail = $recipients[0]['email'] ? $recipients[0]['email'] : $default_email;
$this->toName = $recipients[0]['name'] ? $recipients[0]['name'] : $this->toEmail;
}
$header_name = $header_mapping[$recipient_type];
foreach ($recipients as $recipient) {
$email = $recipient['email'] ? $recipient['email'] : $default_email;
$name = $recipient['name'] ? $recipient['name'] : $email;
$this->sender->AddRecipient($header_name, $email, $name);
}
}
}
/**
* Collects e-mail recipients from various sources
*
* @return void
* @access protected
*/
protected function _collectRecipients()
{
$this->_addRecipientsFromXml($this->emailTemplate->GetDBField('Recipients'));
$this->_overwriteToRecipient();
$this->_addRecipientByUserId();
$this->_addRecipientFromParams();
if ( ($this->emailTemplate->GetDBField('Type') == EmailTemplate::TEMPLATE_TYPE_ADMIN) && !$this->recipients[EmailTemplate::RECIPIENT_TYPE_TO] ) {
// admin email template without direct recipient -> send to admin
$this->_addDefaultRecipient();
}
}
/**
* Adds multiple recipients from an XML
*
* @param string $xml
* @return bool
* @access protected
*/
protected function _addRecipientsFromXml($xml)
{
if ( !$xml ) {
return false;
}
$minput_helper = $this->Application->recallObject('MInputHelper');
/* @var $minput_helper MInputHelper */
// group recipients by type
$records = $minput_helper->parseMInputXML($xml);
foreach ($records as $record) {
$this->recipients[$record['RecipientType']][] = $record;
}
return true;
}
/**
* Remove all "To" recipients, when not allowed
*
* @return void
* @access protected
*/
protected function _overwriteToRecipient()
{
$overwrite_to_email = isset($this->params['overwrite_to_email']) ? $this->params['overwrite_to_email'] : false;
if ( !$this->emailTemplate->GetDBField('CustomRecipient') || $overwrite_to_email ) {
$this->recipients[EmailTemplate::RECIPIENT_TYPE_TO] = Array ();
}
}
/**
* Update with custom data given during event execution (user_id)
*
* @return void
* @access protected
*/
protected function _addRecipientByUserId()
{
if ( !is_numeric($this->recipientUserId) ) {
return;
}
if ( $this->recipientUserId <= 0 ) {
// recipient is system user with negative ID (root, guest, etc.) -> send to admin
$this->_addDefaultRecipient();
return;
}
$language_field = $this->emailTemplate->GetDBField('Type') == EmailTemplate::TEMPLATE_TYPE_FRONTEND ? 'FrontLanguage' : 'AdminLanguage';
$sql = 'SELECT FirstName, LastName, Email, ' . $language_field . ' AS Language
FROM ' . TABLE_PREFIX . 'Users
WHERE PortalUserId = ' . $this->recipientUserId;
$user_info = $this->Conn->GetRow($sql);
if ( !$user_info ) {
return;
}
$add_recipient = Array (
'RecipientAddressType' => EmailTemplate::ADDRESS_TYPE_EMAIL,
'RecipientAddress' => $user_info['Email'],
'RecipientName' => trim($user_info['FirstName'] . ' ' . $user_info['LastName']),
);
if ( $user_info['Language'] && !isset($this->params['language_id']) ) {
$this->params['language_id'] = $user_info['Language'];
}
array_unshift($this->recipients[EmailTemplate::RECIPIENT_TYPE_TO], $add_recipient);
$user = $this->Application->recallObject('u.email-to', null, Array('skip_autoload' => true));
/* @var $user UsersItem */
$user->Load($this->recipientUserId);
}
/**
* Update with custom data given during event execution (email + name)
*
* @return void
* @access protected
*/
protected function _addRecipientFromParams()
{
$add_recipient = Array ();
if ( isset($this->params['to_email']) && $this->params['to_email'] ) {
$add_recipient['RecipientName'] = '';
$add_recipient['RecipientAddressType'] = EmailTemplate::ADDRESS_TYPE_EMAIL;
$add_recipient['RecipientAddress'] = $this->params['to_email'];
}
if ( isset($this->params['to_name']) && $this->params['to_name'] ) {
$add_recipient['RecipientName'] = $this->params['to_name'];
}
if ( $add_recipient ) {
array_unshift($this->recipients[EmailTemplate::RECIPIENT_TYPE_TO], $add_recipient);
}
}
/**
* This is default recipient, when we can't determine actual one
*
* @return void
* @access protected
*/
protected function _addDefaultRecipient()
{
$xml = $this->Application->ConfigValue('DefaultEmailRecipients');
if ( !$this->_addRecipientsFromXml($xml) ) {
$recipient = Array (
'RecipientName' => $this->Application->ConfigValue('DefaultEmailSender'),
'RecipientAddressType' => EmailTemplate::ADDRESS_TYPE_EMAIL,
'RecipientAddress' => $this->Application->ConfigValue('DefaultEmailSender'),
);
array_unshift($this->recipients[EmailTemplate::RECIPIENT_TYPE_TO], $recipient);
}
}
/**
* Transforms recipients into name/e-mail pairs
*
* @param Array $recipients
* @return Array
* @access protected
*/
protected function _transformRecipientsIntoPairs($recipients)
{
if ( !$recipients ) {
return Array ();
}
$pairs = Array ();
foreach ($recipients as $recipient) {
$address = $recipient['RecipientAddress'];
$address_type = $recipient['RecipientAddressType'];
$recipient_name = $recipient['RecipientName'];
switch ($address_type) {
case EmailTemplate::ADDRESS_TYPE_EMAIL:
$pairs[] = Array ('email' => $address, 'name' => $recipient_name);
break;
case EmailTemplate::ADDRESS_TYPE_USER:
$sql = 'SELECT FirstName, LastName, Email
FROM ' . TABLE_PREFIX . 'Users
WHERE Username = ' . $this->Conn->qstr($address);
$user_info = $this->Conn->GetRow($sql);
if ( $user_info ) {
// user still exists
$name = trim($user_info['FirstName'] . ' ' . $user_info['LastName']);
$pairs[] = Array (
'email' => $user_info['Email'],
'name' => $name ? $name : $recipient_name,
);
}
break;
case EmailTemplate::ADDRESS_TYPE_GROUP:
$sql = 'SELECT u.FirstName, u.LastName, u.Email
FROM ' . TABLE_PREFIX . 'UserGroups g
JOIN ' . TABLE_PREFIX . 'UserGroupRelations ug ON ug.GroupId = g.GroupId
JOIN ' . TABLE_PREFIX . 'Users u ON u.PortalUserId = ug.PortalUserId
WHERE g.Name = ' . $this->Conn->qstr($address);
$users = $this->Conn->Query($sql);
foreach ($users as $user_info) {
$name = trim($user_info['FirstName'] . ' ' . $user_info['LastName']);
$pairs[] = Array (
'email' => $user_info['Email'],
'name' => $name ? $name : $recipient_name,
);
}
break;
}
}
return $pairs;
}
/**
* Change system language temporarily to send e-mail on user language
*
* @param bool $restore
* @return void
* @access protected
*/
protected function _changeLanguage($restore = false)
{
static $prev_language_id = null;
if ( !isset($prev_language_id) ) {
$prev_language_id = $this->Application->GetVar('m_lang');
}
// ensure that language is set
if ( !isset($this->params['language_id']) ) {
$this->params['language_id'] = $this->Application->GetVar('m_lang');
}
$language_id = $restore ? $prev_language_id : $this->params['language_id'];
$this->Application->SetVar('m_lang', $language_id);
$language = $this->Application->recallObject('lang.current');
/* @var $language LanguagesItem */
$language->Load($language_id);
$this->Application->Phrases->LanguageId = $language_id;
$this->Application->Phrases->Phrases = Array ();
}
/**
* Parses message headers into array
*
* @return Array
* @access protected
*/
protected function _getHeaders()
{
$headers = $this->emailTemplate->GetDBField('Headers');
$headers = 'Subject: ' . $this->emailTemplate->GetField('Subject') . ($headers ? "\n" . $headers : '');
$headers = explode("\n", $this->_parseText($headers));
$ret = Array ();
foreach ($headers as $header) {
$header = explode(':', $header, 2);
$ret[ trim($header[0]) ] = trim($header[1]);
}
if ( $this->Application->isDebugMode() ) {
// set special header with template name, so it will be easier to determine what's actually was received
$template_type = $this->emailTemplate->GetDBField('Type') == EmailTemplate::TEMPLATE_TYPE_ADMIN ? 'ADMIN' : 'USER';
$ret['X-Template-Name'] = $this->emailTemplate->GetDBField('TemplateName') . ' - ' . $template_type;
}
return $ret;
}
/**
* Applies design to given e-mail text
*
* @param string $text
* @param bool $is_html
* @return string
* @access protected
*/
protected function _applyMessageDesign($text, $is_html = true)
{
static $design_templates = Array();
$design_key = 'L' . $this->params['language_id'] . ':' . ($is_html ? 'html' : 'text');
if ( !isset($design_templates[$design_key]) ) {
$language = $this->Application->recallObject('lang.current');
/* @var $language LanguagesItem */
$design_template = $language->GetDBField($is_html ? 'HtmlEmailTemplate' : 'TextEmailTemplate');
if ( !$is_html && !$design_template ) {
$design_template = $this->sender->ConvertToText($language->GetDBField('HtmlEmailTemplate'), true);
}
$design_templates[$design_key] = $design_template;
}
return $this->_parseText(str_replace('$body', $text, $design_templates[$design_key]), $is_html);
}
/**
* Returns message body
*
* @param bool $is_html
* @return bool|string
* @access protected
*/
protected function _getMessageBody($is_html = false)
{
$message_body = $this->emailTemplate->GetField($is_html ? 'HtmlBody' : 'PlainTextBody');
if ( !trim($message_body) && !$is_html ) {
// no plain text part available -> make it from html part then
$message_body = $this->sender->ConvertToText($this->emailTemplate->GetField('HtmlBody'), true);
}
if ( !trim($message_body) ) {
return false;
}
if ( isset($this->params['use_custom_design']) && $this->params['use_custom_design'] ) {
$message_body = $this->_parseText($message_body, $is_html);
}
else {
$message_body = $this->_applyMessageDesign($message_body, $is_html);
}
return trim($message_body) ? $message_body : false;
}
/**
* Parse message template and return headers (as array) and message body part
*
* @param string $text
* @param bool $is_html
* @return string
* @access protected
*/
protected function _parseText($text, $is_html = true)
{
$text = $this->_substituteReplacementTags($text);
if ( !$text ) {
return '';
}
// init for cases, when e-mail is sent from event before page template rendering
$this->Application->InitParser();
$parser_params = $this->Application->Parser->Params; // backup parser params
$this->Application->Parser->SetParams($this->params);
$text = $this->Application->Parser->Parse($this->_normalizeLineEndings($text), 'email_template');
$this->Application->Parser->SetParams($parser_params); // restore parser params
$category_helper = $this->Application->recallObject('CategoryHelper');
/* @var $category_helper CategoryHelper */
return $category_helper->replacePageIds($is_html ? $this->_removeTrailingLineEndings($text) : $text);
}
/**
* Substitutes replacement tags in given text
*
* @param string $text
* @return string
* @access protected
*/
protected function _substituteReplacementTags($text)
{
$default_replacement_tags = Array (
'<inp:touser _Field="password"' => '<inp2:u_Field name="Password_plain"',
'<inp:touser _Field="UserName"' => '<inp2:u_Field name="Username"',
'<inp:touser _Field' => '<inp2:u_Field name',
);
$replacement_tags = $this->emailTemplate->GetDBField('ReplacementTags');
$replacement_tags = $replacement_tags ? unserialize($replacement_tags) : Array ();
$replacement_tags = array_merge($default_replacement_tags, $replacement_tags);
foreach ($replacement_tags as $replace_from => $replace_to) {
$text = str_replace($replace_from, $replace_to, $text);
}
return $text;
}
/**
* Convert Unix/Windows/Mac line ending into Unix line endings
*
* @param string $text
* @return string
* @access protected
*/
protected function _normalizeLineEndings($text)
{
return str_replace(Array ("\r\n", "\r"), "\n", $text);
}
/**
* Remove trailing line endings
*
* @param $text
* @return string
* @access protected
*/
protected function _removeTrailingLineEndings($text)
{
return preg_replace('/(\n|\r)+/', "\\1", $text);
}
}
Index: branches/5.3.x/core/units/categories/categories_event_handler.php
===================================================================
--- branches/5.3.x/core/units/categories/categories_event_handler.php (revision 15937)
+++ branches/5.3.x/core/units/categories/categories_event_handler.php (revision 15938)
@@ -1,3155 +1,3156 @@
<?php
/**
* @version $Id$
* @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!');
class CategoriesEventHandler extends kDBEventHandler {
/**
* Allows to override standard permission mapping
*
* @return void
* @access protected
* @see kEventHandler::$permMapping
*/
protected function mapPermissions()
{
parent::mapPermissions();
$permissions = Array (
'OnRebuildCache' => Array ('self' => 'add|edit'),
'OnCopy' => Array ('self' => true),
'OnCut' => Array ('self' => 'edit'),
'OnPasteClipboard' => Array ('self' => true),
'OnPaste' => Array ('self' => 'add|edit', 'subitem' => 'edit'),
'OnRecalculatePriorities' => Array ('self' => 'add|edit'), // category ordering
'OnItemBuild' => Array ('self' => true), // always allow to view individual categories (regardless of CATEGORY.VIEW right)
'OnUpdatePreviewBlock' => Array ('self' => true), // for FCKEditor integration
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
/**
* Categories are sorted using special sorting event
*
*/
function mapEvents()
{
parent::mapEvents();
$events_map = Array (
'OnMassMoveUp' => 'OnChangePriority',
'OnMassMoveDown' => 'OnChangePriority',
);
$this->eventMethods = array_merge($this->eventMethods, $events_map);
}
/**
* Checks user permission to execute given $event
*
* @param kEvent $event
* @return bool
* @access public
*/
public function CheckPermission(kEvent $event)
{
if ( $event->Name == 'OnResetCMSMenuCache' ) {
// events from "Tools -> System Tools" section are controlled via that section "edit" permission
$perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$perm_value = $this->Application->CheckPermission('in-portal:service.edit');
return $perm_helper->finalizePermissionCheck($event, $perm_value);
}
if ( !$this->Application->isAdmin ) {
if ( $event->Name == 'OnSetSortingDirect' ) {
// allow sorting on front event without view permission
return true;
}
if ( $event->Name == 'OnItemBuild' ) {
$category_id = $this->getPassedID($event);
if ( $category_id == 0 ) {
return true;
}
}
}
if ( in_array($event->Name, $this->_getMassPermissionEvents()) ) {
$items = $this->_getPermissionCheckInfo($event);
$perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
if ( ($event->Name == 'OnSave') && array_key_exists(0, $items) ) {
// adding new item (ID = 0)
$perm_value = $perm_helper->AddCheckPermission($items[0]['ParentId'], $event->Prefix) > 0;
}
else {
// leave only items, that can be edited
$ids = Array ();
$check_method = in_array($event->Name, Array ('OnMassDelete', 'OnCut')) ? 'DeleteCheckPermission' : 'ModifyCheckPermission';
foreach ($items as $item_id => $item_data) {
if ( $perm_helper->$check_method($item_data['CreatedById'], $item_data['ParentId'], $event->Prefix) > 0 ) {
$ids[] = $item_id;
}
}
if ( !$ids ) {
// no items left for editing -> no permission
return $perm_helper->finalizePermissionCheck($event, false);
}
$perm_value = true;
$event->setEventParam('ids', $ids); // will be used later by "kDBEventHandler::StoreSelectedIDs" method
}
return $perm_helper->finalizePermissionCheck($event, $perm_value);
}
if ( $event->Name == 'OnRecalculatePriorities' ) {
$perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$category_id = $this->Application->GetVar('m_cat_id');
return $perm_helper->AddCheckPermission($category_id, $event->Prefix) || $perm_helper->ModifyCheckPermission(0, $category_id, $event->Prefix);
}
if ( $event->Name == 'OnPasteClipboard' ) {
// forces permission check to work by current category for "Paste In Category" operation
$category_id = $this->Application->GetVar('m_cat_id');
$this->Application->SetVar('c_id', $category_id);
}
return parent::CheckPermission($event);
}
/**
* Returns events, that require item-based (not just event-name based) permission check
*
* @return Array
*/
function _getMassPermissionEvents()
{
return Array (
'OnEdit', 'OnSave', 'OnMassDelete', 'OnMassApprove',
'OnMassDecline', 'OnMassMoveUp', 'OnMassMoveDown',
'OnCut',
);
}
/**
* Returns category item IDs, that require permission checking
*
* @param kEvent $event
* @return string
*/
function _getPermissionCheckIDs($event)
{
if ($event->Name == 'OnSave') {
$selected_ids = implode(',', $this->getSelectedIDs($event, true));
if (!$selected_ids) {
$selected_ids = 0; // when saving newly created item (OnPreCreate -> OnPreSave -> OnSave)
}
}
else {
// OnEdit, OnMassDelete events, when items are checked in grid
$selected_ids = implode(',', $this->StoreSelectedIDs($event));
}
return $selected_ids;
}
/**
* Returns information used in permission checking
*
* @param kEvent $event
* @return Array
*/
function _getPermissionCheckInfo($event)
{
// when saving data from temp table to live table check by data from temp table
$config = $event->getUnitConfig();
$id_field = $config->getIDField();
$table_name = $config->getTableName();
if ($event->Name == 'OnSave') {
$table_name = $this->Application->GetTempName($table_name, 'prefix:' . $event->Prefix);
}
$sql = 'SELECT ' . $id_field . ', CreatedById, ParentId
FROM ' . $table_name . '
WHERE ' . $id_field . ' IN (' . $this->_getPermissionCheckIDs($event) . ')';
$items = $this->Conn->Query($sql, $id_field);
if (!$items) {
// when creating new category, then no IDs are stored in session
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
list ($id, $fields_hash) = each($items_info);
if (array_key_exists('ParentId', $fields_hash)) {
$item_category = $fields_hash['ParentId'];
}
else {
$item_category = $this->Application->RecallVar('m_cat_id'); // saved in c:OnPreCreate event permission checking
}
$items[$id] = Array (
'CreatedById' => $this->Application->RecallVar('user_id'),
'ParentId' => $item_category,
);
}
return $items;
}
/**
* Set's mark, that root category is edited
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnEdit(kEvent $event)
{
$category_id = $this->Application->GetVar($event->getPrefixSpecial() . '_id');
$home_category = $this->Application->getBaseCategory();
$this->Application->StoreVar('IsRootCategory_' . $this->Application->GetVar('m_wid'), ($category_id === '0') || ($category_id == $home_category));
parent::OnEdit($event);
if ( $event->status == kEvent::erSUCCESS ) {
// keep "Section Properties" link (in browse modes) clean
$this->Application->DeleteVar('admin');
}
}
/**
* Adds selected link to listing
*
* @param kEvent $event
*/
function OnProcessSelected($event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$selected_ids = $this->Application->GetVar('selected_ids');
$this->RemoveRequiredFields($object);
$object->SetDBField($this->Application->RecallVar('dst_field'), $selected_ids['c']);
$object->Update();
$event->SetRedirectParam('opener', 'u');
}
/**
* Apply system filter to categories list
*
* @param kEvent $event
* @return void
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
$object = $event->getObject();
/* @var $object kDBList */
// don't show "Content" category in advanced view
$object->addFilter('system_categories', '%1$s.Status <> 4');
// show system templates from current theme only + all virtual templates
$object->addFilter('theme_filter', '%1$s.ThemeId = ' . $this->_getCurrentThemeId() . ' OR %1$s.ThemeId = 0');
if ($event->Special == 'showall') {
// if using recycle bin don't show categories from there
$recycle_bin = $this->Application->ConfigValue('RecycleBinFolder');
if ($recycle_bin) {
$sql = 'SELECT TreeLeft, TreeRight
FROM '.TABLE_PREFIX.'Categories
WHERE CategoryId = '.$recycle_bin;
$tree_indexes = $this->Conn->GetRow($sql);
$object->addFilter('recyclebin_filter', '%1$s.TreeLeft < '.$tree_indexes['TreeLeft'].' OR %1$s.TreeLeft > '.$tree_indexes['TreeRight']);
}
}
if ( (string)$event->getEventParam('parent_cat_id') !== '' ) {
$parent_cat_id = $event->getEventParam('parent_cat_id');
if ("$parent_cat_id" == 'Root') {
$module_name = $event->getEventParam('module') ? $event->getEventParam('module') : 'In-Commerce';
$parent_cat_id = $this->Application->findModule('Name', $module_name, 'RootCat');
}
}
else {
$parent_cat_id = $this->Application->GetVar('c_id');
if (!$parent_cat_id) {
$parent_cat_id = $this->Application->GetVar('m_cat_id');
}
if (!$parent_cat_id) {
$parent_cat_id = 0;
}
}
if ("$parent_cat_id" == '0') {
// replace "0" category with "Content" category id (this way template
$parent_cat_id = $this->Application->getBaseCategory();
}
if ("$parent_cat_id" != 'any') {
if ($event->getEventParam('recursive')) {
if ($parent_cat_id > 0) {
// not "Home" category
$tree_indexes = $this->Application->getTreeIndex($parent_cat_id);
$object->addFilter('parent_filter', '%1$s.TreeLeft BETWEEN '.$tree_indexes['TreeLeft'].' AND '.$tree_indexes['TreeRight']);
}
}
else {
$object->addFilter('parent_filter', '%1$s.ParentId = '.$parent_cat_id);
}
}
$this->applyViewPermissionFilter($object);
if (!$this->Application->isAdminUser) {
// apply status filter only on front
$object->addFilter('status_filter', $object->TableName.'.Status = 1');
}
// process "types" and "except" parameters
$type_clauses = Array();
$types = $event->getEventParam('types');
$types = $types ? explode(',', $types) : Array ();
$except_types = $event->getEventParam('except');
$except_types = $except_types ? explode(',', $except_types) : Array ();
$config = $event->getUnitConfig();
if (in_array('related', $types) || in_array('related', $except_types)) {
$related_to = $event->getEventParam('related_to');
if (!$related_to) {
$related_prefix = $event->Prefix;
}
else {
$sql = 'SELECT Prefix
FROM '.TABLE_PREFIX.'ItemTypes
WHERE ItemName = '.$this->Conn->qstr($related_to);
$related_prefix = $this->Conn->GetOne($sql);
}
$rel_table = $this->Application->getUnitConfig('rel')->getTableName();
$item_type = (int)$config->getItemType();
if ($item_type == 0) {
trigger_error('<strong>ItemType</strong> not defined for prefix <strong>' . $event->Prefix . '</strong>', E_USER_WARNING);
}
// process case, then this list is called inside another list
$prefix_special = $event->getEventParam('PrefixSpecial');
if (!$prefix_special) {
$prefix_special = $this->Application->Parser->GetParam('PrefixSpecial');
}
$id = false;
if ($prefix_special !== false) {
$processed_prefix = $this->Application->processPrefix($prefix_special);
if ($processed_prefix['prefix'] == $related_prefix) {
// printing related categories within list of items (not on details page)
$list = $this->Application->recallObject($prefix_special);
/* @var $list kDBList */
$id = $list->GetID();
}
}
if ($id === false) {
// printing related categories for single item (possibly on details page)
if ($related_prefix == 'c') {
$id = $this->Application->GetVar('m_cat_id');
}
else {
$id = $this->Application->GetVar($related_prefix . '_id');
}
}
$p_item = $this->Application->recallObject($related_prefix . '.current', null, Array('skip_autoload' => true));
/* @var $p_item kCatDBItem */
$p_item->Load( (int)$id );
$p_resource_id = $p_item->GetDBField('ResourceId');
$sql = 'SELECT SourceId, TargetId FROM '.$rel_table.'
WHERE
(Enabled = 1)
AND (
(Type = 0 AND SourceId = '.$p_resource_id.' AND TargetType = '.$item_type.')
OR
(Type = 1
AND (
(SourceId = '.$p_resource_id.' AND TargetType = '.$item_type.')
OR
(TargetId = '.$p_resource_id.' AND SourceType = '.$item_type.')
)
)
)';
$related_ids_array = $this->Conn->Query($sql);
$related_ids = Array();
foreach ($related_ids_array as $key => $record) {
$related_ids[] = $record[ $record['SourceId'] == $p_resource_id ? 'TargetId' : 'SourceId' ];
}
if (count($related_ids) > 0) {
$type_clauses['related']['include'] = '%1$s.ResourceId IN ('.implode(',', $related_ids).')';
$type_clauses['related']['except'] = '%1$s.ResourceId NOT IN ('.implode(',', $related_ids).')';
}
else {
$type_clauses['related']['include'] = '0';
$type_clauses['related']['except'] = '1';
}
$type_clauses['related']['having_filter'] = false;
}
if (in_array('category_related', $type_clauses)) {
$object->removeFilter('parent_filter');
$resource_id = $this->Conn->GetOne('
SELECT ResourceId FROM '.$config->getTableName().'
WHERE CategoryId = '.$parent_cat_id
);
$sql = 'SELECT DISTINCT(TargetId) FROM '.TABLE_PREFIX.'CatalogRelationships
WHERE SourceId = '.$resource_id.' AND SourceType = 1';
$related_cats = $this->Conn->GetCol($sql);
$related_cats = is_array($related_cats) ? $related_cats : Array();
$sql = 'SELECT DISTINCT(SourceId) FROM '.TABLE_PREFIX.'CatalogRelationships
WHERE TargetId = '.$resource_id.' AND TargetType = 1 AND Type = 1';
$related_cats2 = $this->Conn->GetCol($sql);
$related_cats2 = is_array($related_cats2) ? $related_cats2 : Array();
$related_cats = array_unique( array_merge( $related_cats2, $related_cats ) );
if ($related_cats) {
$type_clauses['category_related']['include'] = '%1$s.ResourceId IN ('.implode(',', $related_cats).')';
$type_clauses['category_related']['except'] = '%1$s.ResourceId NOT IN ('.implode(',', $related_cats).')';
}
else
{
$type_clauses['category_related']['include'] = '0';
$type_clauses['category_related']['except'] = '1';
}
$type_clauses['category_related']['having_filter'] = false;
}
if (in_array('product_related', $types)) {
$object->removeFilter('parent_filter');
$product_id = $event->getEventParam('product_id') ? $event->getEventParam('product_id') : $this->Application->GetVar('p_id');
$sql = 'SELECT ResourceId
FROM ' . $this->Application->getUnitConfig('p')->getTableName() . '
WHERE ProductId = ' . $product_id;
$resource_id = $this->Conn->GetOne($sql);
$sql = 'SELECT DISTINCT(TargetId)
FROM ' . TABLE_PREFIX . 'CatalogRelationships
WHERE SourceId = '.$resource_id.' AND TargetType = 1';
$related_cats = $this->Conn->GetCol($sql);
$related_cats = is_array($related_cats) ? $related_cats : Array();
$sql = 'SELECT DISTINCT(SourceId)
FROM ' . TABLE_PREFIX . 'CatalogRelationships
WHERE TargetId = '.$resource_id.' AND SourceType = 1 AND Type = 1';
$related_cats2 = $this->Conn->GetCol($sql);
$related_cats2 = is_array($related_cats2) ? $related_cats2 : Array();
$related_cats = array_unique( array_merge( $related_cats2, $related_cats ) );
if ($related_cats) {
$type_clauses['product_related']['include'] = '%1$s.ResourceId IN ('.implode(',', $related_cats).')';
$type_clauses['product_related']['except'] = '%1$s.ResourceId NOT IN ('.implode(',', $related_cats).')';
}
else {
$type_clauses['product_related']['include'] = '0';
$type_clauses['product_related']['except'] = '1';
}
$type_clauses['product_related']['having_filter'] = false;
}
$type_clauses['menu']['include'] = '%1$s.IsMenu = 1';
$type_clauses['menu']['except'] = '%1$s.IsMenu = 0';
$type_clauses['menu']['having_filter'] = false;
if (in_array('search', $types) || in_array('search', $except_types)) {
$event_mapping = Array (
'simple' => 'OnSimpleSearch',
'subsearch' => 'OnSubSearch',
'advanced' => 'OnAdvancedSearch'
);
$keywords = $event->getEventParam('keyword_string');
$type = $this->Application->GetVar('search_type', 'simple');
if ( $keywords ) {
// processing keyword_string param of ListProducts tag
$this->Application->SetVar('keywords', $keywords);
$type = 'simple';
}
$search_event = $event_mapping[$type];
$this->$search_event($event);
$object = $event->getObject();
/* @var $object kDBList */
$search_sql = ' FROM ' . TABLE_PREFIX . 'ses_' . $this->Application->GetSID() . '_' . TABLE_PREFIX . 'Search
search_result JOIN %1$s ON %1$s.ResourceId = search_result.ResourceId';
$sql = str_replace('FROM %1$s', $search_sql, $object->GetPlainSelectSQL());
$object->SetSelectSQL($sql);
$object->addCalculatedField('Relevance', 'search_result.Relevance');
$type_clauses['search']['include'] = '1';
$type_clauses['search']['except'] = '0';
$type_clauses['search']['having_filter'] = false;
}
$search_helper = $this->Application->recallObject('SearchHelper');
/* @var $search_helper kSearchHelper */
$search_helper->SetComplexFilter($event, $type_clauses, implode(',', $types), implode(',', $except_types));
}
/**
* Adds filter, that uses *.VIEW permissions to determine if an item should be shown to a user.
*
* @param kDBList $object Object.
*
* @return void
* @access protected
*/
protected function applyViewPermissionFilter(kDBList $object)
{
if ( !$this->Application->ConfigValue('CheckViewPermissionsInCatalog') ) {
return;
}
if ( $this->Application->RecallVar('user_id') == USER_ROOT ) {
// for "root" CATEGORY.VIEW permission is checked for items lists too
$view_perm = 1;
}
else {
$count_helper = $this->Application->recallObject('CountHelper');
/* @var $count_helper kCountHelper */
list ($view_perm, $view_filter) = $count_helper->GetPermissionClause($object->Prefix, 'perm');
$object->addFilter('perm_filter2', $view_filter);
}
$object->addFilter('perm_filter', 'perm.PermId = ' . $view_perm); // check for CATEGORY.VIEW permission
}
/**
* Returns current theme id
*
* @return int
*/
function _getCurrentThemeId()
{
$themes_helper = $this->Application->recallObject('ThemesHelper');
/* @var $themes_helper kThemesHelper */
return (int)$themes_helper->getCurrentThemeId();
}
/**
* Returns ID of current item to be edited
* by checking ID passed in get/post as prefix_id
* or by looking at first from selected ids, stored.
* Returned id is also stored in Session in case
* it was explicitly passed as get/post
*
* @param kEvent $event
* @return int
* @access public
*/
public function getPassedID(kEvent $event)
{
if ( ($event->Special == 'page') || $this->_isVirtual($event) || ($event->Prefix == 'st') ) {
return $this->_getPassedStructureID($event);
}
if ( $this->Application->isAdmin ) {
return parent::getPassedID($event);
}
return $this->Application->GetVar('m_cat_id');
}
/**
* Enter description here...
*
* @param kEvent $event
* @return int
*/
function _getPassedStructureID($event)
{
static $page_by_template = Array ();
if ( $event->Special == 'current' ) {
return $this->Application->GetVar('m_cat_id');
}
$event->setEventParam('raise_warnings', 0);
$page_id = parent::getPassedID($event);
if ( $page_id === false ) {
$template = $event->getEventParam('page');
if ( !$template ) {
$template = $this->Application->GetVar('t');
}
// bug: when template contains "-" symbols (or others, that stripDisallowed will replace) it's not found
if ( !array_key_exists($template, $page_by_template) ) {
$config = $event->getUnitConfig();
$template_crc = kUtil::crc32(mb_strtolower($template));
$sql = 'SELECT ' . $config->getIDField() . '
FROM ' . $config->getTableName() . '
WHERE
(
(NamedParentPathHash = ' . $template_crc . ') OR
(`Type` = ' . PAGE_TYPE_TEMPLATE . ' AND CachedTemplateHash = ' . $template_crc . ')
) AND (ThemeId = ' . $this->_getCurrentThemeId() . ' OR ThemeId = 0)';
$page_id = $this->Conn->GetOne($sql);
}
else {
$page_id = $page_by_template[$template];
}
if ( $page_id ) {
$page_by_template[$template] = $page_id;
}
}
if ( !$page_id && !$this->Application->isAdmin ) {
$page_id = $this->Application->GetVar('m_cat_id');
}
return $page_id;
}
function ParentGetPassedID($event)
{
return parent::getPassedID($event);
}
/**
* Adds calculates fields for item statuses
*
* @param kCatDBItem $object
* @param kEvent $event
* @return void
* @access protected
*/
protected function prepareObject(&$object, kEvent $event)
{
if ( $this->_isVirtual($event) ) {
return;
}
$object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$object->addCalculatedField(
'IsNew',
' IF(%1$s.NewItem = 2,
IF(%1$s.CreatedOn >= (UNIX_TIMESTAMP() - '.
$this->Application->ConfigValue('Category_DaysNew').
'*3600*24), 1, 0),
%1$s.NewItem
)');
}
/**
* Checks, that this is virtual page
*
* @param kEvent $event
* @return int
* @access protected
*/
protected function _isVirtual(kEvent $event)
{
return strpos($event->Special, '-virtual') !== false;
}
/**
* Gets right special for configuring virtual page
*
* @param kEvent $event
* @return string
* @access protected
*/
protected function _getCategorySpecial(kEvent $event)
{
return $this->_isVirtual($event) ? '-virtual' : $event->Special;
}
/**
* Set correct parent path for newly created categories
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterCopyToLive(kEvent $event)
{
parent::OnAfterCopyToLive($event);
$object = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true, 'live_table' => true));
/* @var $object CategoriesItem */
$parent_path = false;
$object->Load($event->getEventParam('id'));
if ( $event->getEventParam('temp_id') == 0 ) {
if ( $object->isLoaded() ) {
// update path only for real categories (not including "Home" root category)
$fields_hash = $object->buildParentBasedFields();
$this->Conn->doUpdate($fields_hash, $object->TableName, 'CategoryId = ' . $object->GetID());
$parent_path = $fields_hash['ParentPath'];
}
}
else {
$parent_path = $object->GetDBField('ParentPath');
}
if ( $parent_path ) {
$cache_updater = $this->Application->makeClass('kPermCacheUpdater', Array (null, $parent_path));
/* @var $cache_updater kPermCacheUpdater */
$cache_updater->OneStepRun();
}
}
/**
* Set cache modification mark if needed
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeDeleteFromLive(kEvent $event)
{
parent::OnBeforeDeleteFromLive($event);
$id = $event->getEventParam('id');
// loading anyway, because this object is needed by "c-perm:OnBeforeDeleteFromLive" event
$temp_object = $event->getObject(Array ('skip_autoload' => true));
/* @var $temp_object CategoriesItem */
$temp_object->Load($id);
if ( $id == 0 ) {
if ( $temp_object->isLoaded() ) {
// new category -> update cache (not loaded when "Home" category)
$this->Application->StoreVar('PermCache_UpdateRequired', 1);
}
return ;
}
// existing category was edited, check if in-cache fields are modified
$live_object = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('live_table' => true, 'skip_autoload' => true));
/* @var $live_object CategoriesItem */
$live_object->Load($id);
$cached_fields = Array ('l' . $this->Application->GetDefaultLanguageId() . '_Name', 'Filename', 'Template', 'ParentId', 'Priority');
foreach ($cached_fields as $cached_field) {
if ( $live_object->GetDBField($cached_field) != $temp_object->GetDBField($cached_field) ) {
// use session instead of REQUEST because of permission editing in category can contain
// multiple submits, that changes data before OnSave event occurs
$this->Application->StoreVar('PermCache_UpdateRequired', 1);
break;
}
}
// remember category filename change between temp and live records
if ( $temp_object->GetDBField('Filename') != $live_object->GetDBField('Filename') ) {
$filename_changes = $this->Application->GetVar($event->Prefix . '_filename_changes', Array ());
$filename_changes[ $live_object->GetID() ] = Array (
'from' => $live_object->GetDBField('Filename'),
'to' => $temp_object->GetDBField('Filename')
);
$this->Application->SetVar($event->Prefix . '_filename_changes', $filename_changes);
}
}
/**
* Calls kDBEventHandler::OnSave original event
* Used in proj-cms:StructureEventHandler->OnSave
*
* @param kEvent $event
*/
function parentOnSave($event)
{
parent::OnSave($event);
}
/**
* Reset root-category flag when new category is created
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnPreCreate(kEvent $event)
{
// 1. for permission editing of Home category
$this->Application->RemoveVar('IsRootCategory_' . $this->Application->GetVar('m_wid'));
parent::OnPreCreate($event);
$object = $event->getObject();
/* @var $object kDBItem */
// 2. preset template
$category_id = $this->Application->GetVar('m_cat_id');
$root_category = $this->Application->getBaseCategory();
if ( $category_id == $root_category ) {
$object->SetDBField('Template', $this->_getDefaultDesign());
}
// 3. set default owner
$object->SetDBField('CreatedById', $this->Application->RecallVar('user_id'));
}
/**
* Checks cache update mark and redirect to cache if needed
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnSave(kEvent $event)
{
// get data from live table before it is overwritten by parent OnSave method call
$ids = $this->getSelectedIDs($event, true);
$is_editing = implode('', $ids);
$old_statuses = $is_editing ? $this->_getCategoryStatus($ids) : Array ();
$object = $event->getObject();
/* @var $object CategoriesItem */
parent::OnSave($event);
if ( $event->status != kEvent::erSUCCESS ) {
return;
}
if ( $this->Application->RecallVar('PermCache_UpdateRequired') ) {
$this->Application->RemoveVar('IsRootCategory_' . $this->Application->GetVar('m_wid'));
}
$this->Application->StoreVar('RefreshStructureTree', 1);
$this->_resetMenuCache();
if ( $is_editing ) {
// send email event to category owner, when it's status is changed (from admin)
$object->SwitchToLive();
$new_statuses = $this->_getCategoryStatus($ids);
$process_statuses = Array (STATUS_ACTIVE, STATUS_DISABLED);
foreach ($new_statuses as $category_id => $new_status) {
if ( $new_status != $old_statuses[$category_id] && in_array($new_status, $process_statuses) ) {
$object->Load($category_id);
$email_event = $new_status == STATUS_ACTIVE ? 'CATEGORY.APPROVE' : 'CATEGORY.DENY';
- $this->Application->emailUser($email_event, $object->GetDBField('CreatedById'));
+ $this->Application->emailUser($email_event, $object->GetDBField('CreatedById'), $object->getEmailParams());
}
}
}
// change opener stack in case if edited category filename was changed
$filename_changes = $this->Application->GetVar($event->Prefix . '_filename_changes', Array ());
if ( $filename_changes ) {
$opener_stack = $this->Application->makeClass('kOpenerStack');
/* @var $opener_stack kOpenerStack */
list ($template, $params, $index_file) = $opener_stack->pop();
foreach ($filename_changes as $change_info) {
$template = str_ireplace($change_info['from'], $change_info['to'], $template);
}
$opener_stack->push($template, $params, $index_file);
$opener_stack->save();
}
}
/**
* Returns statuses of given categories
*
* @param Array $category_ids
* @return Array
*/
function _getCategoryStatus($category_ids)
{
$config = $this->getUnitConfig();
$id_field = $config->getIDField();
$table_name = $config->getTableName();
$sql = 'SELECT Status, ' . $id_field . '
FROM ' . $table_name . '
WHERE ' . $id_field . ' IN (' . implode(',', $category_ids) . ')';
return $this->Conn->GetCol($sql, $id_field);
}
/**
* Creates a new item in temp table and
* stores item id in App vars and Session on success
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnPreSaveCreated(kEvent $event)
{
$object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object CategoriesItem */
if ( $object->IsRoot() ) {
// don't create root category while saving permissions
return;
}
parent::OnPreSaveCreated($event);
}
/**
* Deletes sym link to other category
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
$object = $event->getObject();
/* @var $object kDBItem */
$sql = 'UPDATE ' . $object->TableName . '
SET SymLinkCategoryId = NULL
WHERE SymLinkCategoryId = ' . $object->GetID();
$this->Conn->Query($sql);
// delete direct subscriptions to category, that was deleted
$sql = 'SELECT SubscriptionId
FROM ' . TABLE_PREFIX . 'SystemEventSubscriptions
WHERE CategoryId = ' . $object->GetID();
$ids = $this->Conn->GetCol($sql);
if ( $ids ) {
$temp_handler = $this->Application->recallObject('system-event-subscription_TempHandler', 'kTempTablesHandler', Array ('parent_event' => $event->MasterEvent));
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems('system-event-subscription', '', $ids);
}
}
/**
* Exclude root categories from deleting
*
* @param kEvent $event
* @param string $type
* @return void
* @access protected
*/
protected function customProcessing(kEvent $event, $type)
{
if ( $event->Name == 'OnMassDelete' && $type == 'before' ) {
$ids = $event->getEventParam('ids');
if ( !$ids || $this->Application->ConfigValue('AllowDeleteRootCats') ) {
return;
}
$root_categories = Array ();
// get module root categories and exclude them
foreach ($this->Application->ModuleInfo as $module_info) {
$root_categories[] = $module_info['RootCat'];
}
$root_categories = array_unique($root_categories);
if ( $root_categories && array_intersect($ids, $root_categories) ) {
$event->setEventParam('ids', array_diff($ids, $root_categories));
$this->Application->StoreVar('root_delete_error', 1);
}
}
}
/**
* Checks, that given template exists (physically) in given theme
*
* @param string $template
* @param int $theme_id
* @return bool
*/
function _templateFound($template, $theme_id = null)
{
static $init_made = false;
if (!$init_made) {
$this->Application->InitParser(true);
$init_made = true;
}
if (!isset($theme_id)) {
$theme_id = $this->_getCurrentThemeId();
}
$theme_name = $this->_getThemeName($theme_id);
return $this->Application->TemplatesCache->TemplateExists('theme:' . $theme_name . '/' . $template);
}
/**
* Removes ".tpl" in template path
*
* @param string $template
* @return string
*/
function _stripTemplateExtension($template)
{
// return preg_replace('/\.[^.\\\\\\/]*$/', '', $template);
return preg_replace('/^[\\/]{0,1}(.*)\.tpl$/', "$1", $template);
}
/**
* Deletes all selected items.
* Automatically recourse into sub-items using temp handler, and deletes sub-items
* by calling its Delete method if sub-item has AutoDelete set to true in its config file
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnMassDelete(kEvent $event)
{
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
return;
}
$to_delete = Array ();
$ids = $this->StoreSelectedIDs($event);
$recycle_bin = $this->Application->ConfigValue('RecycleBinFolder');
if ( $recycle_bin ) {
$rb = $this->Application->recallObject('c.recycle', null, Array ('skip_autoload' => true));
/* @var $rb CategoriesItem */
$rb->Load($recycle_bin);
$cat = $event->getObject(Array ('skip_autoload' => true));
/* @var $cat CategoriesItem */
foreach ($ids as $id) {
$cat->Load($id);
if ( preg_match('/^' . preg_quote($rb->GetDBField('ParentPath'), '/') . '/', $cat->GetDBField('ParentPath')) ) {
// already in "Recycle Bin" -> delete for real
$to_delete[] = $id;
continue;
}
// just move into "Recycle Bin" category
$cat->SetDBField('ParentId', $recycle_bin);
$cat->Update();
}
$ids = $to_delete;
}
$event->setEventParam('ids', $ids);
$this->customProcessing($event, 'before');
$ids = $event->getEventParam('ids');
if ( $ids ) {
$recursive_helper = $this->Application->recallObject('RecursiveHelper');
/* @var $recursive_helper kRecursiveHelper */
foreach ($ids as $id) {
$recursive_helper->DeleteCategory($id, $event->Prefix);
}
}
$this->clearSelectedIDs($event);
$this->_ensurePermCacheRebuild($event);
}
/**
* Add selected items to clipboard with mode = COPY (CLONE)
*
* @param kEvent $event
*/
function OnCopy($event)
{
$this->Application->RemoveVar('clipboard');
$clipboard_helper = $this->Application->recallObject('ClipboardHelper');
/* @var $clipboard_helper kClipboardHelper */
$clipboard_helper->setClipboard($event, 'copy', $this->StoreSelectedIDs($event));
$this->clearSelectedIDs($event);
}
/**
* Add selected items to clipboard with mode = CUT
*
* @param kEvent $event
*/
function OnCut($event)
{
$this->Application->RemoveVar('clipboard');
$clipboard_helper = $this->Application->recallObject('ClipboardHelper');
/* @var $clipboard_helper kClipboardHelper */
$clipboard_helper->setClipboard($event, 'cut', $this->StoreSelectedIDs($event));
$this->clearSelectedIDs($event);
}
/**
* Controls all item paste operations. Can occur only with filled clipboard.
*
* @param kEvent $event
*/
function OnPasteClipboard($event)
{
$clipboard = unserialize( $this->Application->RecallVar('clipboard') );
foreach ($clipboard as $prefix => $clipboard_data) {
$paste_event = new kEvent($prefix.':OnPaste', Array('clipboard_data' => $clipboard_data));
$this->Application->HandleEvent($paste_event);
$event->copyFrom($paste_event);
}
}
/**
* Checks permission for OnPaste event
*
* @param kEvent $event
* @return bool
*/
function _checkPastePermission($event)
{
$perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$category_id = $this->Application->GetVar('m_cat_id');
if ($perm_helper->AddCheckPermission($category_id, $event->Prefix) == 0) {
// no items left for editing -> no permission
return $perm_helper->finalizePermissionCheck($event, false);
}
return true;
}
/**
* Paste categories with sub-items from clipboard
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnPaste($event)
{
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) || !$this->_checkPastePermission($event) ) {
$event->status = kEvent::erFAIL;
return;
}
$clipboard_data = $event->getEventParam('clipboard_data');
if ( !$clipboard_data['cut'] && !$clipboard_data['copy'] ) {
return;
}
// 1. get ParentId of moved category(-es) before it gets updated!!!)
$source_category_id = 0;
$config = $event->getUnitConfig();
$id_field = $config->getIDField();
$table_name = $config->getTableName();
if ( $clipboard_data['cut'] ) {
$sql = 'SELECT ParentId
FROM ' . $table_name . '
WHERE ' . $id_field . ' = ' . $clipboard_data['cut'][0];
$source_category_id = $this->Conn->GetOne($sql);
}
$recursive_helper = $this->Application->recallObject('RecursiveHelper');
/* @var $recursive_helper kRecursiveHelper */
if ( $clipboard_data['cut'] ) {
$recursive_helper->MoveCategories($clipboard_data['cut'], $this->Application->GetVar('m_cat_id'));
}
if ( $clipboard_data['copy'] ) {
// don't allow to copy/paste system OR theme-linked virtual pages
$sql = 'SELECT ' . $id_field . '
FROM ' . $table_name . '
WHERE ' . $id_field . ' IN (' . implode(',', $clipboard_data['copy']) . ') AND (`Type` = ' . PAGE_TYPE_VIRTUAL . ') AND (ThemeId = 0)';
$allowed_ids = $this->Conn->GetCol($sql);
if ( !$allowed_ids ) {
return;
}
foreach ($allowed_ids as $id) {
$recursive_helper->PasteCategory($id, $event->Prefix);
}
}
$priority_helper = $this->Application->recallObject('PriorityHelper');
/* @var $priority_helper kPriorityHelper */
if ( $clipboard_data['cut'] ) {
$ids = $priority_helper->recalculatePriorities($event, 'ParentId = ' . $source_category_id);
if ( $ids ) {
$priority_helper->massUpdateChanged($event->Prefix, $ids);
}
}
// recalculate priorities of newly pasted categories in destination category
$parent_id = $this->Application->GetVar('m_cat_id');
$ids = $priority_helper->recalculatePriorities($event, 'ParentId = ' . $parent_id);
if ( $ids ) {
$priority_helper->massUpdateChanged($event->Prefix, $ids);
}
if ( $clipboard_data['cut'] || $clipboard_data['copy'] ) {
$this->_ensurePermCacheRebuild($event);
}
}
/**
* Ensures, that category permission cache is rebuild when category is added/edited/deleted
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function _ensurePermCacheRebuild(kEvent $event)
{
$this->Application->StoreVar('PermCache_UpdateRequired', 1);
$this->Application->StoreVar('RefreshStructureTree', 1);
}
/**
* Occurs when pasting category
*
* @param kEvent $event
*/
/*function OnCatPaste($event)
{
$inp_clipboard = $this->Application->RecallVar('ClipBoard');
$inp_clipboard = explode('-', $inp_clipboard, 2);
if($inp_clipboard[0] == 'COPY')
{
$config = $event->getUnitConfig();
$cat_ids = $event->getEventParam('cat_ids');
$saved_cat_id = $this->Application->GetVar('m_cat_id');
$ids_sql = 'SELECT ' . $config->getIDField() . '
FROM ' . $config->getTableName() . '
WHERE ResourceId IN (%s)';
$resource_ids_sql = 'SELECT ItemResourceId FROM '.TABLE_PREFIX.'CategoryItems WHERE CategoryId = %s AND PrimaryCat = 1';
$object = $this->Application->recallObject($event->Prefix.'.item', $event->Prefix, Array('skip_autoload' => true));
foreach($cat_ids as $source_cat => $dest_cat)
{
$item_resource_ids = $this->Conn->GetCol( sprintf($resource_ids_sql, $source_cat) );
if(!$item_resource_ids) continue;
$this->Application->SetVar('m_cat_id', $dest_cat);
$item_ids = $this->Conn->GetCol( sprintf($ids_sql, implode(',', $item_resource_ids) ) );
$temp = $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler', Array ('parent_event' => $event));
if($item_ids) $temp->CloneItems($event->Prefix, $event->Special, $item_ids);
}
$this->Application->SetVar('m_cat_id', $saved_cat_id);
}
}*/
/**
* Clears clipboard content
*
* @param kEvent $event
*/
function OnClearClipboard($event)
{
$this->Application->RemoveVar('clipboard');
}
/**
* Sets correct status for new categories created on front-end
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
$object = $event->getObject();
/* @var $object CategoriesItem */
if ( $object->GetDBField('ParentId') <= 0 ) {
// no parent category - use current (happens during import)
$object->SetDBField('ParentId', $this->Application->GetVar('m_cat_id'));
}
$this->_beforeItemChange($event);
if ( $this->Application->isAdmin || $event->Prefix == 'st' ) {
// don't check category permissions when auto-creating structure pages
return ;
}
$perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$new_status = false;
$category_id = $this->Application->GetVar('m_cat_id');
if ( $perm_helper->CheckPermission('CATEGORY.ADD', 0, $category_id) ) {
$new_status = STATUS_ACTIVE;
}
else {
if ( $perm_helper->CheckPermission('CATEGORY.ADD.PENDING', 0, $category_id) ) {
$new_status = STATUS_PENDING;
}
}
if ( $new_status ) {
$object->SetDBField('Status', $new_status);
// don't forget to set Priority for suggested from Front-End categories
$min_priority = $this->_getNextPriority($object->GetDBField('ParentId'), $object->TableName);
$object->SetDBField('Priority', $min_priority);
}
else {
$event->status = kEvent::erPERM_FAIL;
return ;
}
}
/**
* Returns next available priority for given category from given table
*
* @param int $category_id
* @param string $table_name
* @return int
*/
function _getNextPriority($category_id, $table_name)
{
$sql = 'SELECT MIN(Priority)
FROM ' . $table_name . '
WHERE ParentId = ' . $category_id;
return (int)$this->Conn->GetOne($sql) - 1;
}
/**
* Sets correct status for new categories created on front-end
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
$this->_beforeItemChange($event);
$object = $event->getObject();
/* @var $object kDBItem */
if ( $object->GetChangedFields() ) {
$object->SetDBField('ModifiedById', $this->Application->RecallVar('user_id'));
}
}
/**
* Creates needed sql query to load item,
* if no query is defined in config for
* special requested, then use list query
*
* @param kEvent $event
* @return string
* @access protected
*/
protected function ItemPrepareQuery(kEvent $event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$sqls = $object->getFormOption('ItemSQLs', Array ());
$category_special = $this->_getCategorySpecial($event);
$special = isset($sqls[$category_special]) ? $category_special : '';
// preferred special not found in ItemSQLs -> use analog from ListSQLs
return isset($sqls[$special]) ? $sqls[$special] : $this->ListPrepareQuery($event);
}
/**
* Creates needed sql query to load list,
* if no query is defined in config for
* special requested, then use default
* query
*
* @param kEvent $event
* @return string
* @access protected
*/
protected function ListPrepareQuery(kEvent $event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$special = $this->_getCategorySpecial($event);
$sqls = $object->getFormOption('ListSQLs', Array ());
return $sqls[array_key_exists($special, $sqls) ? $special : ''];
}
/**
* Performs redirect to correct suggest confirmation template
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnCreate(kEvent $event)
{
parent::OnCreate($event);
if ( $this->Application->isAdmin || $event->status != kEvent::erSUCCESS ) {
// don't sent email or rebuild cache directly after category is created by admin
return;
}
$object = $event->getObject();
/* @var $object kDBItem */
$cache_updater = $this->Application->makeClass('kPermCacheUpdater', Array (null, $object->GetDBField('ParentPath')));
/* @var $cache_updater kPermCacheUpdater */
$cache_updater->OneStepRun();
$is_active = ($object->GetDBField('Status') == STATUS_ACTIVE);
$next_template = $is_active ? 'suggest_confirm_template' : 'suggest_pending_confirm_template';
$event->redirect = $this->Application->GetVar($next_template);
$event->SetRedirectParam('opener', 's');
// send email events
+ $send_params = $object->getEmailParams();
+ $event_suffix = $is_active ? 'ADD' : 'ADD.PENDING';
$perm_prefix = $event->getUnitConfig()->getPermItemPrefix();
- $event_suffix = $is_active ? 'ADD' : 'ADD.PENDING';
- $this->Application->emailAdmin($perm_prefix . '.' . $event_suffix);
- $this->Application->emailUser($perm_prefix . '.' . $event_suffix, $object->GetDBField('CreatedById'));
+ $this->Application->emailUser($perm_prefix . '.' . $event_suffix, $object->GetDBField('CreatedById'), $send_params);
+ $this->Application->emailAdmin($perm_prefix . '.' . $event_suffix, null, $send_params);
}
/**
* Returns current per-page setting for list
*
* @param kEvent $event
* @return int
* @access protected
*/
protected function getPerPage(kEvent $event)
{
if ( !$this->Application->isAdmin ) {
$same_special = $event->getEventParam('same_special');
$event->setEventParam('same_special', true);
$per_page = parent::getPerPage($event);
$event->setEventParam('same_special', $same_special);
}
return parent::getPerPage($event);
}
/**
* Set's correct page for list based on data provided with event
*
* @param kEvent $event
* @return void
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
protected function SetPagination(kEvent $event)
{
parent::SetPagination($event);
if ( !$this->Application->isAdmin ) {
$page_var = $event->getEventParam('page_var');
if ( $page_var !== false ) {
$page = $this->Application->GetVar($page_var);
if ( is_numeric($page) ) {
$object = $event->getObject();
/* @var $object kDBList */
$object->SetPage($page);
}
}
}
}
/**
* Apply same processing to each item being selected in grid
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function iterateItems(kEvent $event)
{
if ( $event->Name != 'OnMassApprove' && $event->Name != 'OnMassDecline' ) {
parent::iterateItems($event);
}
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
return;
}
$object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object CategoriesItem */
$ids = $this->StoreSelectedIDs($event);
if ( $ids ) {
$propagate_category_status = $this->Application->GetVar('propagate_category_status');
$status_field = $event->getUnitConfig()->getStatusField(true);
foreach ($ids as $id) {
$object->Load($id);
$object->SetDBField($status_field, $event->Name == 'OnMassApprove' ? 1 : 0);
if ( $object->Update() ) {
if ( $propagate_category_status ) {
$sql = 'UPDATE ' . $object->TableName . '
SET ' . $status_field . ' = ' . $object->GetDBField($status_field) . '
WHERE TreeLeft BETWEEN ' . $object->GetDBField('TreeLeft') . ' AND ' . $object->GetDBField('TreeRight');
$this->Conn->Query($sql);
}
$event->status = kEvent::erSUCCESS;
$email_event = $event->Name == 'OnMassApprove' ? 'CATEGORY.APPROVE' : 'CATEGORY.DENY';
- $this->Application->emailUser($email_event, $object->GetDBField('CreatedById'));
+ $this->Application->emailUser($email_event, $object->GetDBField('CreatedById'), $object->getEmailParams());
}
else {
$event->status = kEvent::erFAIL;
$event->redirect = false;
break;
}
}
}
$this->clearSelectedIDs($event);
$this->Application->StoreVar('RefreshStructureTree', 1);
}
/**
* Checks, that currently loaded item is allowed for viewing (non permission-based)
*
* @param kEvent $event
* @return bool
* @access protected
*/
protected function checkItemStatus(kEvent $event)
{
$object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
return true;
}
if ( $object->GetDBField('Status') != STATUS_ACTIVE && $object->GetDBField('Status') != 4 ) {
if ( !$object->GetDBField('DirectLinkEnabled') || !$object->GetDBField('DirectLinkAuthKey') ) {
return false;
}
return $this->Application->GetVar('authkey') == $object->GetDBField('DirectLinkAuthKey');
}
return true;
}
/**
* Set's correct sorting for list based on data provided with event
*
* @param kEvent $event
* @return void
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
protected function SetSorting(kEvent $event)
{
$types = $event->getEventParam('types');
$types = $types ? explode(',', $types) : Array ();
if ( in_array('search', $types) ) {
$event->setPseudoClass('_List');
$object = $event->getObject();
/* @var $object kDBList */
// 1. no user sorting - sort by relevance
$default_sortings = parent::_getDefaultSorting($event);
$default_sorting = key($default_sortings['Sorting']) . ',' . current($default_sortings['Sorting']);
if ( $object->isMainList() ) {
$sort_by = $this->Application->GetVar('sort_by', '');
if ( !$sort_by ) {
$this->Application->SetVar('sort_by', 'Relevance,desc|' . $default_sorting);
}
elseif ( strpos($sort_by, 'Relevance,') !== false ) {
$this->Application->SetVar('sort_by', $sort_by . '|' . $default_sorting);
}
}
else {
$sorting_settings = $this->getListSetting($event, 'Sortings');
$sort_by = trim(getArrayValue($sorting_settings, 'Sort1') . ',' . getArrayValue($sorting_settings, 'Sort1_Dir'), ',');
if ( !$sort_by ) {
$event->setEventParam('sort_by', 'Relevance,desc|' . $default_sorting);
}
elseif ( strpos($sort_by, 'Relevance,') !== false ) {
$event->setEventParam('sort_by', $sort_by . '|' . $default_sorting);
}
}
$this->_removeForcedSortings($event);
}
parent::SetSorting($event);
}
/**
* Removes forced sortings
*
* @param kEvent $event
*/
protected function _removeForcedSortings(kEvent $event)
{
$config = $event->getUnitConfig();
foreach ($config->getListSortingSpecials() as $special) {
$list_sortings = $config->getListSortingsBySpecial($special);
unset($list_sortings['ForcedSorting']);
$config->setListSortingsBySpecial('', $list_sortings);
}
}
/**
* Default sorting in search results only comes from relevance field
*
* @param kEvent $event
* @return Array
* @access protected
*/
protected function _getDefaultSorting(kEvent $event)
{
$types = $event->getEventParam('types');
$types = $types ? explode(',', $types) : Array ();
return in_array('search', $types) ? Array () : parent::_getDefaultSorting($event);
}
// ============= for cms page processing =======================
/**
* Returns default design template
*
* @return string
*/
function _getDefaultDesign()
{
$default_design = trim($this->Application->ConfigValue('cms_DefaultDesign'), '/');
if (!$default_design) {
// theme-based alias for default design
return '#default_design#';
}
if (strpos($default_design, '#') === false) {
// real template, not alias, so prefix with "/"
return '/' . $default_design;
}
// alias
return $default_design;
}
/**
* Returns default design based on given virtual template (used from kApplication::Run)
*
* @param string $t
* @return string
* @access public
*/
public function GetDesignTemplate($t = null)
{
if ( !isset($t) ) {
$t = $this->Application->GetVar('t');
}
$page = $this->Application->recallObject($this->Prefix . '.-virtual', null, Array ('page' => $t));
/* @var $page CategoriesItem */
if ( $page->isLoaded() ) {
$real_t = $page->GetDBField('CachedTemplate');
$this->Application->SetVar('m_cat_id', $page->GetDBField('CategoryId'));
if ( $page->GetDBField('FormId') ) {
$this->Application->SetVar('form_id', $page->GetDBField('FormId'));
}
}
else {
$not_found = $this->Application->ConfigValue('ErrorTemplate');
$real_t = $not_found ? $not_found : 'error_notfound';
$themes_helper = $this->Application->recallObject('ThemesHelper');
/* @var $themes_helper kThemesHelper */
$theme_id = $this->Application->GetVar('m_theme');
$category_id = $themes_helper->getPageByTemplate($real_t, $theme_id);
$this->Application->SetVar('m_cat_id', $category_id);
header('HTTP/1.0 404 Not Found');
}
// replace alias in form #alias_name# to actual template used in this theme
if ( $this->Application->isAdmin ) {
$themes_helper = $this->Application->recallObject('ThemesHelper');
/* @var $themes_helper kThemesHelper */
// only, used when in "Design Mode"
$this->Application->SetVar('theme.current_id', $themes_helper->getCurrentThemeId());
}
$theme = $this->Application->recallObject('theme.current');
/* @var $theme kDBItem */
$template = $theme->GetField('TemplateAliases', $real_t);
if ( $template ) {
return $template;
}
return $real_t;
}
/**
* Sets category id based on found template (used from kApplication::Run)
*
* @deprecated
*/
/*function SetCatByTemplate()
{
$t = $this->Application->GetVar('t');
$page = $this->Application->recallObject($this->Prefix . '.-virtual');
if ( $page->isLoaded() ) {
$this->Application->SetVar('m_cat_id', $page->GetDBField('CategoryId'));
}
}*/
/**
* Prepares template paths
*
* @param kEvent $event
*/
function _beforeItemChange($event)
{
$object = $event->getObject();
/* @var $object CategoriesItem */
$object->checkFilename();
$object->generateFilename();
$now = time();
if ( !$this->Application->isDebugMode() && strpos($event->Special, 'rebuild') === false ) {
$object->SetDBField('Type', $object->GetOriginalField('Type'));
$object->SetDBField('Protected', $object->GetOriginalField('Protected'));
if ( $object->GetDBField('Protected') ) {
// some fields are read-only for protected pages, when debug mode is off
$object->SetDBField('AutomaticFilename', $object->GetOriginalField('AutomaticFilename'));
$object->SetDBField('Filename', $object->GetOriginalField('Filename'));
$object->SetDBField('Status', $object->GetOriginalField('Status'));
}
}
$is_admin = $this->Application->isAdminUser;
if ( (!$object->IsTempTable() && !$is_admin) || ($is_admin && !$object->GetDBField('CreatedById')) ) {
$object->SetDBField('CreatedById', $this->Application->RecallVar('user_id'));
}
if ($object->GetChangedFields()) {
$object->SetDBField('Modified_date', $now);
$object->SetDBField('Modified_time', $now);
}
$object->setRequired('PageCacheKey', $object->GetDBField('OverridePageCacheKey'));
$object->SetDBField('Template', $this->_stripTemplateExtension( $object->GetDBField('Template') ));
if ($object->GetDBField('Type') == PAGE_TYPE_TEMPLATE) {
if (!$this->_templateFound($object->GetDBField('Template'), $object->GetDBField('ThemeId'))) {
$object->SetError('Template', 'template_file_missing', 'la_error_TemplateFileMissing');
}
}
$this->_saveTitleField($object, 'Title');
$this->_saveTitleField($object, 'MenuTitle');
$root_category = $this->Application->getBaseCategory();
if ( file_exists(FULL_PATH . '/themes') && ($object->GetDBField('ParentId') == $root_category) && ($object->GetDBField('Template') == CATEGORY_TEMPLATE_INHERIT) ) {
// there are themes + creating top level category
$object->SetError('Template', 'no_inherit');
}
if ( !$this->Application->isAdminUser && $object->isVirtualField('cust_RssSource') ) {
// only administrator can set/change "cust_RssSource" field
if ($object->GetDBField('cust_RssSource') != $object->GetOriginalField('cust_RssSource')) {
$object->SetError('cust_RssSource', 'not_allowed', 'la_error_OperationNotAllowed');
}
}
if ( !$object->GetDBField('DirectLinkAuthKey') ) {
$key_parts = Array (
$object->GetID(),
$object->GetDBField('ParentId'),
$object->GetField('Name'),
'b38'
);
$object->SetDBField('DirectLinkAuthKey', substr( md5( implode(':', $key_parts) ), 0, 20 ));
}
}
/**
* Sets page name to requested field in case when:
* 1. page was auto created (through theme file rebuild)
* 2. requested field is empty
*
* @param kDBItem $object
* @param string $field
* @author Alex
*/
function _saveTitleField(&$object, $field)
{
$value = $object->GetField($field, 'no_default'); // current value of target field
$ml_formatter = $this->Application->recallObject('kMultiLanguage');
/* @var $ml_formatter kMultiLanguage */
$src_field = $ml_formatter->LangFieldName('Name');
$dst_field = $ml_formatter->LangFieldName($field);
$dst_field_not_changed = $object->GetOriginalField($dst_field) == $value;
if ($value == '' || preg_match('/^_Auto: (.*)/', $value) || (($object->GetOriginalField($src_field) == $value) && $dst_field_not_changed)) {
// target field is empty OR target field value starts with "_Auto: " OR (source field value
// before change was equals to current target field value AND target field value wasn't changed)
$object->SetField($dst_field, $object->GetField($src_field));
}
}
/**
* Don't allow to delete system pages, when not in debug mode
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemDelete(kEvent $event)
{
parent::OnBeforeItemDelete($event);
$object = $event->getObject();
/* @var $object kDBItem */
if ( $object->GetDBField('Protected') && !$this->Application->isDebugMode(false) ) {
$event->status = kEvent::erFAIL;
}
}
/**
* Creates category based on given TPL file
*
* @param CategoriesItem $object
* @param string $template
* @param int $theme_id
* @param int $system_mode
* @param array $template_info
* @return bool
*/
function _prepareAutoPage(&$object, $template, $theme_id = null, $system_mode = SMS_MODE_AUTO, $template_info = Array ())
{
$template = $this->_stripTemplateExtension($template);
if ($system_mode == SMS_MODE_AUTO) {
$page_type = $this->_templateFound($template, $theme_id) ? PAGE_TYPE_TEMPLATE : PAGE_TYPE_VIRTUAL;
}
else {
$page_type = $system_mode == SMS_MODE_FORCE ? PAGE_TYPE_TEMPLATE : PAGE_TYPE_VIRTUAL;
}
if (($page_type == PAGE_TYPE_TEMPLATE) && ($template_info === false)) {
// do not auto-create system pages, when browsing through site
return false;
}
if (!isset($theme_id)) {
$theme_id = $this->_getCurrentThemeId();
}
$root_category = $this->Application->getBaseCategory();
$page_category = $this->Application->GetVar('m_cat_id');
if (!$page_category) {
$page_category = $root_category;
$this->Application->SetVar('m_cat_id', $page_category);
}
if (($page_type == PAGE_TYPE_VIRTUAL) && (strpos($template, '/') !== false)) {
// virtual page, but have "/" in template path -> create it's path
$category_path = explode('/', $template);
$template = array_pop($category_path);
$page_category = $this->_getParentCategoryFromPath($category_path, $root_category, $theme_id);
}
$page_name = ($page_type == PAGE_TYPE_TEMPLATE) ? '_Auto: ' . $template : $template;
$page_description = '';
if ($page_type == PAGE_TYPE_TEMPLATE) {
$design_template = strtolower($template); // leading "/" not added !
if ($template_info) {
if (array_key_exists('name', $template_info) && $template_info['name']) {
$page_name = $template_info['name'];
}
if (array_key_exists('desc', $template_info) && $template_info['desc']) {
$page_description = $template_info['desc'];
}
if (array_key_exists('section', $template_info) && $template_info['section']) {
// this will override any global "m_cat_id"
$page_category = $this->_getParentCategoryFromPath(explode('||', $template_info['section']), $root_category, $theme_id);
}
}
}
else {
$design_template = $this->_getDefaultDesign(); // leading "/" added !
}
$object->Clear();
$object->SetDBField('ParentId', $page_category);
$object->SetDBField('Type', $page_type);
$object->SetDBField('Protected', 1); // $page_type == PAGE_TYPE_TEMPLATE
$object->SetDBField('IsMenu', 0);
$object->SetDBField('ThemeId', $theme_id);
// put all templates to then end of list (in their category)
$min_priority = $this->_getNextPriority($page_category, $object->TableName);
$object->SetDBField('Priority', $min_priority);
$object->SetDBField('Template', $design_template);
$object->SetDBField('CachedTemplate', $design_template);
$primary_language = $this->Application->GetDefaultLanguageId();
$current_language = $this->Application->GetVar('m_lang');
$object->SetDBField('l' . $primary_language . '_Name', $page_name);
$object->SetDBField('l' . $current_language . '_Name', $page_name);
$object->SetDBField('l' . $primary_language . '_Description', $page_description);
$object->SetDBField('l' . $current_language . '_Description', $page_description);
return $object->Create();
}
function _getParentCategoryFromPath($category_path, $base_category, $theme_id = null)
{
static $category_ids = Array ();
if (!$category_path) {
return $base_category;
}
if (array_key_exists(implode('||', $category_path), $category_ids)) {
return $category_ids[ implode('||', $category_path) ];
}
$backup_category_id = $this->Application->GetVar('m_cat_id');
$object = $this->Application->recallObject($this->Prefix . '.rebuild-path', null, Array ('skip_autoload' => true));
/* @var $object CategoriesItem */
$parent_id = $base_category;
$filenames_helper = $this->Application->recallObject('FilenamesHelper');
/* @var $filenames_helper kFilenamesHelper */
$safe_category_path = array_map(Array (&$filenames_helper, 'replaceSequences'), $category_path);
foreach ($category_path as $category_order => $category_name) {
$this->Application->SetVar('m_cat_id', $parent_id);
// get virtual category first, when possible
$sql = 'SELECT ' . $object->IDField . '
FROM ' . $object->TableName . '
WHERE
(
Filename = ' . $this->Conn->qstr($safe_category_path[$category_order]) . ' OR
Filename = ' . $this->Conn->qstr( $filenames_helper->replaceSequences('_Auto: ' . $category_name) ) . '
) AND
(ParentId = ' . $parent_id . ') AND
(ThemeId = 0 OR ThemeId = ' . $theme_id . ')
ORDER BY ThemeId ASC';
$parent_id = $this->Conn->GetOne($sql);
if ($parent_id === false) {
// page not found
$template = implode('/', array_slice($safe_category_path, 0, $category_order + 1));
// don't process system templates in sub-categories
$system = $this->_templateFound($template, $theme_id) && (strpos($template, '/') === false);
if (!$this->_prepareAutoPage($object, $category_name, $theme_id, $system ? SMS_MODE_FORCE : false)) {
// page was not created
break;
}
$parent_id = $object->GetID();
}
}
$this->Application->SetVar('m_cat_id', $backup_category_id);
$category_ids[ implode('||', $category_path) ] = $parent_id;
return $parent_id;
}
/**
* Returns theme name by it's id. Used in structure page creation.
*
* @param int $theme_id
* @return string
*/
function _getThemeName($theme_id)
{
static $themes = null;
if (!isset($themes)) {
$theme_config = $this->Application->getUnitConfig('theme');
$id_field = $theme_config->getIDField();
$table_name = $theme_config->getTableName();
$sql = 'SELECT Name, ' . $id_field . '
FROM ' . $table_name . '
WHERE Enabled = 1';
$themes = $this->Conn->GetCol($sql, $id_field);
}
return array_key_exists($theme_id, $themes) ? $themes[$theme_id] : false;
}
/**
* Resets SMS-menu cache
*
* @param kEvent $event
*/
function OnResetCMSMenuCache($event)
{
if ($this->Application->GetVar('ajax') == 'yes') {
$event->status = kEvent::erSTOP;
}
$this->_resetMenuCache();
$event->SetRedirectParam('action_completed', 1);
}
/**
* Performs reset of category-related caches (menu, structure dropdown, template mapping)
*
* @return void
* @access protected
*/
protected function _resetMenuCache()
{
// reset cms menu cache (all variables are automatically rebuild, when missing)
if ($this->Application->isCachingType(CACHING_TYPE_MEMORY)) {
$this->Application->rebuildCache('master:cms_menu', kCache::REBUILD_LATER, CacheSettings::$cmsMenuRebuildTime);
$this->Application->rebuildCache('master:StructureTree', kCache::REBUILD_LATER, CacheSettings::$structureTreeRebuildTime);
$this->Application->rebuildCache('master:template_mapping', kCache::REBUILD_LATER, CacheSettings::$templateMappingRebuildTime);
}
else {
$this->Application->rebuildDBCache('cms_menu', kCache::REBUILD_LATER, CacheSettings::$cmsMenuRebuildTime);
$this->Application->rebuildDBCache('StructureTree', kCache::REBUILD_LATER, CacheSettings::$structureTreeRebuildTime);
$this->Application->rebuildDBCache('template_mapping', kCache::REBUILD_LATER, CacheSettings::$templateMappingRebuildTime);
}
}
/**
* Updates structure config
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
if (defined('IS_INSTALL') && IS_INSTALL) {
// skip any processing, because Categories table doesn't exists until install is finished
$this->addViewPermissionJoin($event);
return ;
}
$site_config_helper = $this->Application->recallObject('SiteConfigHelper');
/* @var $site_config_helper SiteConfigHelper */
$settings = $site_config_helper->getSettings();
$root_category = $this->Application->getBaseCategory();
$config = $event->getUnitConfig();
// set root category
$config->addSectionAdjustments(Array (
'in-portal:browse' => Array (
'url' => Array ('m_cat_id' => $root_category),
'late_load' => Array ('m_cat_id' => $root_category),
'onclick' => 'checkCatalog(' . $root_category . ')',
),
'in-portal:browse_site' => Array (
'url' => Array ('editing_mode' => $settings['default_editing_mode']),
)
));
// prepare structure dropdown
$category_helper = $this->Application->recallObject('CategoryHelper');
/* @var $category_helper CategoryHelper */
$fields = $config->getFields();
$fields['ParentId']['default'] = (int)$this->Application->GetVar('m_cat_id');
$fields['ParentId']['options'] = $category_helper->getStructureTreeAsOptions();
// limit design list by theme
$theme_id = $this->_getCurrentThemeId();
$design_sql = $fields['Template']['options_sql'];
$design_sql = str_replace('(tf.FilePath = "/designs")', '(' . implode(' OR ', $this->getDesignFolders()) . ')' . ' AND (t.ThemeId = ' . $theme_id . ')', $design_sql);
$fields['Template']['options_sql'] = $design_sql;
// adds "Inherit From Parent" option to "Template" field
$fields['Template']['options'] = Array (CATEGORY_TEMPLATE_INHERIT => $this->Application->Phrase('la_opt_InheritFromParent'));
$config->setFields($fields);
if ($this->Application->isAdmin) {
// don't sort by Front-End sorting fields
$config_mapping = $config->getConfigMapping();
$remove_keys = Array ('DefaultSorting1Field', 'DefaultSorting2Field', 'DefaultSorting1Dir', 'DefaultSorting2Dir');
foreach ($remove_keys as $remove_key) {
unset($config_mapping[$remove_key]);
}
$config->setConfigMapping($config_mapping);
}
else {
// sort by parent path on Front-End only
$config->setListSortingsBySpecial('', Array (
'ForcedSorting' => Array ('CurrentSort' => 'asc'),
));
}
$this->addViewPermissionJoin($event);
// add grids for advanced view (with primary category column)
foreach (Array ('Default', 'Radio') as $process_grid) {
$grid_data = $config->getGridByName($process_grid);
$grid_data['Fields']['CachedNavbar'] = Array ('title' => 'la_col_Path', 'data_block' => 'grid_parent_category_td', 'filter_block' => 'grid_like_filter');
$config->addGrids($grid_data, $process_grid . 'ShowAll');
}
}
/**
* Adds permission table table JOIN clause only, when advanced catalog view permissions enabled.
*
* @param kEvent $event Event.
*
* @return self
* @access protected
*/
protected function addViewPermissionJoin(kEvent $event)
{
if ( $this->Application->ConfigValue('CheckViewPermissionsInCatalog') ) {
$join_clause = 'LEFT JOIN ' . TABLE_PREFIX . 'CategoryPermissionsCache perm ON perm.CategoryId = %1$s.CategoryId';
}
else {
$join_clause = '';
}
$config = $event->getUnitConfig();
foreach ( $config->getListSQLSpecials() as $special ) {
$list_sql = str_replace('{PERM_JOIN}', $join_clause, $config->getListSQLsBySpecial($special));
$config->setListSQLsBySpecial($special, $list_sql);
}
return $this;
}
/**
* Returns folders, that can contain design templates
*
* @return array
* @access protected
*/
protected function getDesignFolders()
{
$ret = Array ('tf.FilePath = "/designs"', 'tf.FilePath = "/platform/designs"');
foreach ($this->Application->ModuleInfo as $module_info) {
$ret[] = 'tf.FilePath = "/' . $module_info['TemplatePath'] . 'designs"';
}
return array_unique($ret);
}
/**
* Removes this item and it's children (recursive) from structure dropdown
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
if ( !$this->Application->isAdmin ) {
// calculate priorities dropdown only for admin
return;
}
$object = $event->getObject();
/* @var $object kDBItem */
// remove this category & it's children from dropdown
$sql = 'SELECT ' . $object->IDField . '
FROM ' . $event->getUnitConfig()->getTableName() . '
WHERE ParentPath LIKE "' . $object->GetDBField('ParentPath') . '%"';
$remove_categories = $this->Conn->GetCol($sql);
$options = $object->GetFieldOption('ParentId', 'options');
foreach ($remove_categories as $remove_category) {
unset($options[$remove_category]);
}
$object->SetFieldOption('ParentId', 'options', $options);
}
/**
* Occurs after creating item
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
$object = $event->getObject();
/* @var $object CategoriesItem */
// need to update path after category is created, so category is included in that path
$fields_hash = $object->buildParentBasedFields();
$this->Conn->doUpdate($fields_hash, $object->TableName, $object->IDField . ' = ' . $object->GetID());
$object->SetDBFieldsFromHash($fields_hash);
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnAfterRebuildThemes($event)
{
$sql = 'SELECT t.ThemeId, CONCAT( tf.FilePath, \'/\', tf.FileName ) AS Path, tf.FileMetaInfo
FROM ' . TABLE_PREFIX . 'ThemeFiles AS tf
LEFT JOIN ' . TABLE_PREFIX . 'Themes AS t ON t.ThemeId = tf.ThemeId
WHERE t.Enabled = 1 AND tf.FileType = 1
AND (
SELECT COUNT(CategoryId)
FROM ' . TABLE_PREFIX . 'Categories c
WHERE CONCAT(\'/\', c.Template, \'.tpl\') = CONCAT( tf.FilePath, \'/\', tf.FileName ) AND (c.ThemeId = t.ThemeId)
) = 0 ';
$files = $this->Conn->Query($sql, 'Path');
if ( !$files ) {
// all possible pages are already created
return;
}
kUtil::setResourceLimit();
$dummy = $this->Application->recallObject($event->Prefix . '.rebuild', NULL, Array ('skip_autoload' => true));
/* @var $dummy CategoriesItem */
$error_count = 0;
foreach ($files as $a_file => $file_info) {
$status = $this->_prepareAutoPage($dummy, $a_file, $file_info['ThemeId'], SMS_MODE_FORCE, unserialize($file_info['FileMetaInfo'])); // create system page
if ( !$status ) {
$error_count++;
}
}
if ( $this->Application->ConfigValue('CategoryPermissionRebuildMode') == CategoryPermissionRebuild::SILENT ) {
$updater = $this->Application->makeClass('kPermCacheUpdater');
/* @var $updater kPermCacheUpdater */
$updater->OneStepRun();
}
$this->_resetMenuCache();
if ( $error_count ) {
// allow user to review error after structure page creation
$event->MasterEvent->redirect = false;
}
}
/**
* Processes OnMassMoveUp, OnMassMoveDown events
*
* @param kEvent $event
*/
function OnChangePriority($event)
{
$this->Application->SetVar('priority_prefix', $event->getPrefixSpecial());
$event->CallSubEvent('priority:' . $event->Name);
$this->Application->StoreVar('RefreshStructureTree', 1);
$this->_resetMenuCache();
}
/**
* Completely recalculates priorities in current category
*
* @param kEvent $event
*/
function OnRecalculatePriorities($event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = kEvent::erFAIL;
return;
}
$this->Application->SetVar('priority_prefix', $event->getPrefixSpecial());
$event->CallSubEvent('priority:' . $event->Name);
$this->_resetMenuCache();
}
/**
* Update Preview Block for FCKEditor
*
* @param kEvent $event
*/
function OnUpdatePreviewBlock($event)
{
$event->status = kEvent::erSTOP;
$string = htmlspecialchars_decode($this->Application->GetVar('preview_content'));
$category_helper = $this->Application->recallObject('CategoryHelper');
/* @var $category_helper CategoryHelper */
$string = $category_helper->replacePageIds($string);
$this->Application->StoreVar('_editor_preview_content_', $string);
}
/**
* Makes simple search for categories
* based on keywords string
*
* @param kEvent $event
*/
function OnSimpleSearch($event)
{
$event->redirect = false;
$search_table = TABLE_PREFIX.'ses_'.$this->Application->GetSID().'_'.TABLE_PREFIX.'Search';
$keywords = htmlspecialchars_decode( trim($this->Application->GetVar('keywords')) );
$query_object = $this->Application->recallObject('HTTPQuery');
/* @var $query_object kHTTPQuery */
$sql = 'SHOW TABLES LIKE "'.$search_table.'"';
if ( !isset($query_object->Get['keywords']) && !isset($query_object->Post['keywords']) && $this->Conn->Query($sql) ) {
// used when navigating by pages or changing sorting in search results
return;
}
if(!$keywords || strlen($keywords) < $this->Application->ConfigValue('Search_MinKeyword_Length'))
{
$this->Conn->Query('DROP TABLE IF EXISTS '.$search_table);
$this->Application->SetVar('keywords_too_short', 1);
return; // if no or too short keyword entered, doing nothing
}
$this->Application->StoreVar('keywords', $keywords);
$this->saveToSearchLog($keywords, 0); // 0 - simple search, 1 - advanced search
$keywords = strtr($keywords, Array('%' => '\\%', '_' => '\\_'));
$event->setPseudoClass('_List');
$object = $event->getObject();
/* @var $object kDBList */
$config = $event->getUnitConfig();
$this->Application->SetVar($event->getPrefixSpecial().'_Page', 1);
$lang = $this->Application->GetVar('m_lang');
$items_table = $config->getTableName();
$module_name = 'In-Portal';
$sql = 'SELECT *
FROM ' . $this->Application->getUnitConfig('confs')->getTableName() . '
WHERE ModuleName = ' . $this->Conn->qstr($module_name) . ' AND SimpleSearch = 1';
$search_config = $this->Conn->Query($sql, 'FieldName');
$field_list = array_keys($search_config);
$join_clauses = Array();
// field processing
$weight_sum = 0;
$alias_counter = 0;
$custom_fields = $config->getCustomFields();
if ($custom_fields) {
$custom_table = $this->Application->getUnitConfig($event->Prefix . '-cdata')->getTableName();
$join_clauses[] = ' LEFT JOIN '.$custom_table.' custom_data ON '.$items_table.'.ResourceId = custom_data.ResourceId';
}
// what field in search config becomes what field in sql (key - new field, value - old field (from searchconfig table))
$search_config_map = Array();
foreach ($field_list as $key => $field) {
$local_table = TABLE_PREFIX.$search_config[$field]['TableName'];
$weight_sum += $search_config[$field]['Priority']; // counting weight sum; used when making relevance clause
// processing multilingual fields
if ( !$search_config[$field]['CustomFieldId'] && $object->GetFieldOption($field, 'formatter') == 'kMultiLanguage' ) {
$field_list[$key.'_primary'] = 'l'.$this->Application->GetDefaultLanguageId().'_'.$field;
$field_list[$key] = 'l'.$lang.'_'.$field;
if (!isset($search_config[$field]['ForeignField'])) {
$field_list[$key.'_primary'] = $local_table.'.'.$field_list[$key.'_primary'];
$search_config_map[ $field_list[$key.'_primary'] ] = $field;
}
}
// processing fields from other tables
$foreign_field = $search_config[$field]['ForeignField'];
if ( $foreign_field ) {
$exploded = explode(':', $foreign_field, 2);
if ($exploded[0] == 'CALC') {
// ignoring having type clauses in simple search
unset($field_list[$key]);
continue;
}
else {
$multi_lingual = false;
if ($exploded[0] == 'MULTI') {
$multi_lingual = true;
$foreign_field = $exploded[1];
}
$exploded = explode('.', $foreign_field); // format: table.field_name
$foreign_table = TABLE_PREFIX.$exploded[0];
$alias_counter++;
$alias = 't'.$alias_counter;
if ($multi_lingual) {
$field_list[$key] = $alias.'.'.'l'.$lang.'_'.$exploded[1];
$field_list[$key.'_primary'] = 'l'.$this->Application->GetDefaultLanguageId().'_'.$field;
$search_config_map[ $field_list[$key] ] = $field;
$search_config_map[ $field_list[$key.'_primary'] ] = $field;
}
else {
$field_list[$key] = $alias.'.'.$exploded[1];
$search_config_map[ $field_list[$key] ] = $field;
}
$join_clause = str_replace('{ForeignTable}', $alias, $search_config[$field]['JoinClause']);
$join_clause = str_replace('{LocalTable}', $items_table, $join_clause);
$join_clauses[] = ' LEFT JOIN '.$foreign_table.' '.$alias.'
ON '.$join_clause;
}
}
else {
// processing fields from local table
if ($search_config[$field]['CustomFieldId']) {
$local_table = 'custom_data';
// search by custom field value on current language
$custom_field_id = array_search($field_list[$key], $custom_fields);
$field_list[$key] = 'l'.$lang.'_cust_'.$custom_field_id;
// search by custom field value on primary language
$field_list[$key.'_primary'] = $local_table.'.l'.$this->Application->GetDefaultLanguageId().'_cust_'.$custom_field_id;
$search_config_map[ $field_list[$key.'_primary'] ] = $field;
}
$field_list[$key] = $local_table.'.'.$field_list[$key];
$search_config_map[ $field_list[$key] ] = $field;
}
}
// keyword string processing
$search_helper = $this->Application->recallObject('SearchHelper');
/* @var $search_helper kSearchHelper */
$where_clause = Array ();
foreach ($field_list as $field) {
if (preg_match('/^' . preg_quote($items_table, '/') . '\.(.*)/', $field, $regs)) {
// local real field
$filter_data = $search_helper->getSearchClause($object, $regs[1], $keywords, false);
if ($filter_data) {
$where_clause[] = $filter_data['value'];
}
}
elseif (preg_match('/^custom_data\.(.*)/', $field, $regs)) {
$custom_field_name = 'cust_' . $search_config_map[$field];
$filter_data = $search_helper->getSearchClause($object, $custom_field_name, $keywords, false);
if ($filter_data) {
$where_clause[] = str_replace('`' . $custom_field_name . '`', $field, $filter_data['value']);
}
}
else {
$where_clause[] = $search_helper->buildWhereClause($keywords, Array ($field));
}
}
$where_clause = '((' . implode(') OR (', $where_clause) . '))'; // 2 braces for next clauses, see below!
$where_clause = $where_clause . ' AND (' . $items_table . '.Status = ' . STATUS_ACTIVE . ')';
if ($event->MasterEvent && $event->MasterEvent->Name == 'OnListBuild') {
$sub_search_ids = $event->MasterEvent->getEventParam('ResultIds');
if ( $sub_search_ids !== false ) {
if ( $sub_search_ids ) {
$where_clause .= 'AND (' . $items_table . '.ResourceId IN (' . implode(',', $sub_search_ids) . '))';
}
else {
$where_clause .= 'AND FALSE';
}
}
}
// exclude template based sections from search results (ie. registration)
if ( $this->Application->ConfigValue('ExcludeTemplateSectionsFromSearch') ) {
$where_clause .= ' AND ' . $items_table . '.ThemeId = 0';
}
// making relevance clause
$positive_words = $search_helper->getPositiveKeywords($keywords);
$this->Application->StoreVar('highlight_keywords', serialize($positive_words));
$revelance_parts = Array();
reset($search_config);
foreach ($positive_words as $keyword_index => $positive_word) {
$positive_word = $search_helper->transformWildcards($positive_word);
$positive_words[$keyword_index] = $this->Conn->escape($positive_word);
}
foreach ($field_list as $field) {
if (!array_key_exists($field, $search_config_map)) {
$map_key = $search_config_map[$items_table . '.' . $field];
}
else {
$map_key = $search_config_map[$field];
}
$config_elem = $search_config[ $map_key ];
$weight = $config_elem['Priority'];
// search by whole words only ([[:<:]] - word boundary)
/*$revelance_parts[] = 'IF('.$field.' REGEXP "[[:<:]]('.implode(' ', $positive_words).')[[:>:]]", '.$weight.', 0)';
foreach ($positive_words as $keyword) {
$revelance_parts[] = 'IF('.$field.' REGEXP "[[:<:]]('.$keyword.')[[:>:]]", '.$weight.', 0)';
}*/
// search by partial word matches too
$revelance_parts[] = 'IF('.$field.' LIKE "%'.implode(' ', $positive_words).'%", '.$weight_sum.', 0)';
foreach ($positive_words as $keyword) {
$revelance_parts[] = 'IF('.$field.' LIKE "%'.$keyword.'%", '.$weight.', 0)';
}
}
$revelance_parts = array_unique($revelance_parts);
$conf_postfix = $config->getSearchConfigPostfix();
$rel_keywords = $this->Application->ConfigValue('SearchRel_Keyword_'.$conf_postfix) / 100;
$rel_pop = $this->Application->ConfigValue('SearchRel_Pop_'.$conf_postfix) / 100;
$rel_rating = $this->Application->ConfigValue('SearchRel_Rating_'.$conf_postfix) / 100;
$relevance_clause = '('.implode(' + ', $revelance_parts).') / '.$weight_sum.' * '.$rel_keywords;
if ($rel_pop && $object->isField('Hits')) {
$relevance_clause .= ' + (Hits + 1) / (MAX(Hits) + 1) * '.$rel_pop;
}
if ($rel_rating && $object->isField('CachedRating')) {
$relevance_clause .= ' + (CachedRating + 1) / (MAX(CachedRating) + 1) * '.$rel_rating;
}
// building final search query
if (!$this->Application->GetVar('do_not_drop_search_table')) {
$this->Conn->Query('DROP TABLE IF EXISTS '.$search_table); // erase old search table if clean k4 event
$this->Application->SetVar('do_not_drop_search_table', true);
}
$search_table_exists = $this->Conn->Query('SHOW TABLES LIKE "'.$search_table.'"');
if ($search_table_exists) {
$select_intro = 'INSERT INTO '.$search_table.' (Relevance, ItemId, ResourceId, ItemType, EdPick) ';
}
else {
$select_intro = 'CREATE TABLE '.$search_table.' AS ';
}
$edpick_clause = $config->getFieldByName('EditorsPick') ? $items_table.'.EditorsPick' : '0';
$sql = $select_intro.' SELECT '.$relevance_clause.' AS Relevance,
'.$items_table.'.'.$config->getIDField().' AS ItemId,
'.$items_table.'.ResourceId,
'.$config->getItemType().' AS ItemType,
'.$edpick_clause.' AS EdPick
FROM '.$object->TableName.'
'.implode(' ', $join_clauses).'
WHERE '.$where_clause.'
GROUP BY '.$items_table.'.'.$config->getIDField().' ORDER BY Relevance DESC';
$this->Conn->Query($sql);
if ( !$search_table_exists ) {
$sql = 'ALTER TABLE ' . $search_table . '
ADD INDEX (ResourceId),
ADD INDEX (Relevance)';
$this->Conn->Query($sql);
}
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnSubSearch($event)
{
// keep search results from other items after doing a sub-search on current item type
$this->Application->SetVar('do_not_drop_search_table', true);
$ids = Array ();
$search_table = TABLE_PREFIX . 'ses_' . $this->Application->GetSID() . '_' . TABLE_PREFIX . 'Search';
$sql = 'SHOW TABLES LIKE "' . $search_table . '"';
if ( $this->Conn->Query($sql) ) {
$item_type = $event->getUnitConfig()->getItemType();
// 1. get ids to be used as search bounds
$sql = 'SELECT DISTINCT ResourceId
FROM ' . $search_table . '
WHERE ItemType = ' . $item_type;
$ids = $this->Conn->GetCol($sql);
// 2. delete previously found ids
$sql = 'DELETE FROM ' . $search_table . '
WHERE ItemType = ' . $item_type;
$this->Conn->Query($sql);
}
$event->setEventParam('ResultIds', $ids);
$event->CallSubEvent('OnSimpleSearch');
}
/**
* Make record to search log
*
* @param string $keywords
* @param int $search_type 0 - simple search, 1 - advanced search
*/
function saveToSearchLog($keywords, $search_type = 0)
{
// don't save keywords for each module separately, just one time
// static variable can't help here, because each module uses it's own class instance !
if (!$this->Application->GetVar('search_logged')) {
$sql = 'UPDATE '.TABLE_PREFIX.'SearchLogs
SET Indices = Indices + 1
WHERE Keyword = '.$this->Conn->qstr($keywords).' AND SearchType = '.$search_type; // 0 - simple search, 1 - advanced search
$this->Conn->Query($sql);
if ($this->Conn->getAffectedRows() == 0) {
$fields_hash = Array('Keyword' => $keywords, 'Indices' => 1, 'SearchType' => $search_type);
$this->Conn->doInsert($fields_hash, TABLE_PREFIX.'SearchLogs');
}
$this->Application->SetVar('search_logged', 1);
}
}
/**
* Load item if id is available
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function LoadItem(kEvent $event)
{
if ( !$this->_isVirtual($event) ) {
parent::LoadItem($event);
return;
}
$object = $event->getObject();
/* @var $object kDBItem */
$id = $this->getPassedID($event);
if ( $object->isLoaded() && !is_array($id) && ($object->GetID() == $id) ) {
// object is already loaded by same id
return;
}
if ( $object->Load($id, null, true) ) {
$actions = $this->Application->recallObject('kActions');
/* @var $actions Params */
$actions->Set($event->getPrefixSpecial() . '_id', $object->GetID());
}
else {
$object->setID($id);
}
}
/**
* Returns constrain for priority calculations
*
* @param kEvent $event
* @return void
* @see PriorityEventHandler
* @access protected
*/
protected function OnGetConstrainInfo(kEvent $event)
{
$constrain = ''; // for OnSave
$event_name = $event->getEventParam('original_event');
$actual_event_name = $event->getEventParam('actual_event');
if ( $actual_event_name == 'OnSavePriorityChanges' || $event_name == 'OnAfterItemLoad' || $event_name == 'OnAfterItemDelete' ) {
$object = $event->getObject();
/* @var $object kDBItem */
$constrain = 'ParentId = ' . $object->GetDBField('ParentId');
}
elseif ( $actual_event_name == 'OnPreparePriorities' ) {
$constrain = 'ParentId = ' . $this->Application->GetVar('m_cat_id');
}
elseif ( $event_name == 'OnSave' ) {
$constrain = '';
}
else {
$constrain = 'ParentId = ' . $this->Application->GetVar('m_cat_id');
}
$event->setEventParam('constrain_info', Array ($constrain, ''));
}
/**
* Parses category part of url, build main part of url
*
* @param int $rewrite_mode Mode in what rewrite listener was called. Possbile two modes: REWRITE_MODE_BUILD, REWRITE_MODE_PARSE.
* @param string $prefix Prefix, that listener uses for system integration
* @param Array $params Params, that are used for url building or created during url parsing.
* @param Array $url_parts Url parts to parse (only for parsing).
* @param bool $keep_events Keep event names in resulting url (only for building).
* @return bool|string|Array Return true to continue to next listener; return false (when building) not to rewrite given prefix; return false (when parsing) to stop processing at this listener.
*/
public function CategoryRewriteListener($rewrite_mode = REWRITE_MODE_BUILD, $prefix, &$params, &$url_parts, $keep_events = false)
{
if ($rewrite_mode == REWRITE_MODE_BUILD) {
return $this->_buildMainUrl($prefix, $params, $keep_events);
}
if ( $this->_parseFriendlyUrl($url_parts, $params) ) {
// friendly urls work like exact match only!
return false;
}
$this->_parseCategory($url_parts, $params);
return true;
}
/**
* Build main part of every url
*
* @param string $prefix_special
* @param Array $params
* @param bool $keep_events
* @return string
*/
protected function _buildMainUrl($prefix_special, &$params, $keep_events)
{
$ret = '';
list ($prefix) = explode('.', $prefix_special);
$rewrite_processor = $this->Application->recallObject('kRewriteUrlProcessor');
/* @var $rewrite_processor kRewriteUrlProcessor */
$processed_params = $rewrite_processor->getProcessedParams($prefix_special, $params, $keep_events);
if ($processed_params === false) {
return '';
}
// add language
if ($processed_params['m_lang'] && ($processed_params['m_lang'] != $rewrite_processor->primaryLanguageId)) {
$language_name = $this->Application->getCache('language_names[%LangIDSerial:' . $processed_params['m_lang'] . '%]');
if ($language_name === false) {
$sql = 'SELECT PackName
FROM ' . TABLE_PREFIX . 'Languages
WHERE LanguageId = ' . $processed_params['m_lang'];
$language_name = $this->Conn->GetOne($sql);
$this->Application->setCache('language_names[%LangIDSerial:' . $processed_params['m_lang'] . '%]', $language_name);
}
$ret .= $language_name . '/';
}
// add theme
if ($processed_params['m_theme'] && ($processed_params['m_theme'] != $rewrite_processor->primaryThemeId)) {
$theme_name = $this->Application->getCache('theme_names[%ThemeIDSerial:' . $processed_params['m_theme'] . '%]');
if ($theme_name === false) {
$sql = 'SELECT Name
FROM ' . TABLE_PREFIX . 'Themes
WHERE ThemeId = ' . $processed_params['m_theme'];
$theme_name = $this->Conn->GetOne($sql);
$this->Application->setCache('theme_names[%ThemeIDSerial:' . $processed_params['m_theme'] . '%]', $theme_name);
}
$ret .= $theme_name . '/';
}
// inject custom url parts made by other rewrite listeners just after language/theme url parts
if ($params['inject_parts']) {
$ret .= implode('/', $params['inject_parts']) . '/';
}
// add category
if ($processed_params['m_cat_id'] > 0 && $params['pass_category']) {
$category_filename = $this->Application->getCategoryCache($processed_params['m_cat_id'], 'filenames');
preg_match('/^Content\/(.*)/i', $category_filename, $regs);
if ($regs) {
$template = array_key_exists('t', $params) ? $params['t'] : false;
if (strtolower($regs[1]) == strtolower($template)) {
// we could have category path like "Content/<template_path>" in this case remove template
$params['pass_template'] = false;
}
$ret .= $regs[1] . '/';
}
$params['category_processed'] = true;
}
// reset category page
$force_page_adding = false;
if (array_key_exists('reset', $params) && $params['reset']) {
unset($params['reset']);
if ($processed_params['m_cat_id']) {
$processed_params['m_cat_page'] = 1;
$force_page_adding = true;
}
}
if ((array_key_exists('category_processed', $params) && $params['category_processed'] && ($processed_params['m_cat_page'] > 1)) || $force_page_adding) {
// category name was added before AND category page number found
$ret = rtrim($ret, '/') . '_' . $processed_params['m_cat_page'] . '/';
}
$template = array_key_exists('t', $params) ? $params['t'] : false;
$category_template = ($processed_params['m_cat_id'] > 0) && $params['pass_category'] ? $this->Application->getCategoryCache($processed_params['m_cat_id'], 'category_designs') : '';
if ((strtolower($template) == '__default__') && ($processed_params['m_cat_id'] == 0)) {
// for "Home" category set template to index when not set
$template = 'index';
}
// remove template from url if it is category index cached template
if ( ($template == $category_template) || (mb_strtolower($template) == '__default__') ) {
// given template is also default template for this category OR '__default__' given
$params['pass_template'] = false;
}
// remove template from url if it is site homepage on primary language & theme
if ( ($template == 'index') && $processed_params['m_lang'] == $rewrite_processor->primaryLanguageId && $processed_params['m_theme'] == $rewrite_processor->primaryThemeId ) {
// given template is site homepage on primary language & theme
$params['pass_template'] = false;
}
if ($template && $params['pass_template']) {
$ret .= $template . '/';
}
return mb_strtolower( rtrim($ret, '/') );
}
/**
* Checks if whole url_parts matches a whole In-CMS page
*
* @param Array $url_parts
* @param Array $vars
* @return bool
*/
protected function _parseFriendlyUrl($url_parts, &$vars)
{
if (!$url_parts) {
return false;
}
$sql = 'SELECT CategoryId, NamedParentPath
FROM ' . TABLE_PREFIX . 'Categories
WHERE FriendlyURL = ' . $this->Conn->qstr(implode('/', $url_parts));
$friendly = $this->Conn->GetRow($sql);
$rewrite_processor = $this->Application->recallObject('kRewriteUrlProcessor');
/* @var $rewrite_processor kRewriteUrlProcessor */
if ($friendly) {
$vars['m_cat_id'] = $friendly['CategoryId'];
$vars['t'] = preg_replace('/^Content\//i', '', $friendly['NamedParentPath']);
while ($url_parts) {
$rewrite_processor->partParsed( array_shift($url_parts) );
}
return true;
}
return false;
}
/**
* Extracts category part from url
*
* @param Array $url_parts
* @param Array $vars
* @return bool
*/
protected function _parseCategory($url_parts, &$vars)
{
if (!$url_parts) {
return false;
}
$res = false;
$url_part = array_shift($url_parts);
$category_id = 0;
$last_category_info = false;
$category_path = $url_part == 'content' ? '' : 'content';
$rewrite_processor = $this->Application->recallObject('kRewriteUrlProcessor');
/* @var $rewrite_processor kRewriteUrlProcessor */
do {
$category_path = trim($category_path . '/' . $url_part, '/');
// bb_<topic_id> -> forums/bb_2
if ( !preg_match('/^bb_[\d]+$/', $url_part) && preg_match('/(.*)_([\d]+)$/', $category_path, $rets) ) {
$category_path = $rets[1];
$vars['m_cat_page'] = $rets[2];
}
$sql = 'SELECT CategoryId, SymLinkCategoryId, NamedParentPath
FROM ' . TABLE_PREFIX . 'Categories
WHERE (LOWER(NamedParentPath) = ' . $this->Conn->qstr($category_path) . ') AND (ThemeId = ' . $vars['m_theme'] . ' OR ThemeId = 0)';
$category_info = $this->Conn->GetRow($sql);
if ($category_info !== false) {
$last_category_info = $category_info;
$rewrite_processor->partParsed($url_part);
$url_part = array_shift($url_parts);
$res = true;
}
} while ($category_info !== false && $url_part);
if ($last_category_info) {
// this category is symlink to other category, so use it's url instead
// (used in case if url prior to symlink adding was indexed by spider or was bookmarked)
if ($last_category_info['SymLinkCategoryId']) {
$sql = 'SELECT CategoryId, NamedParentPath
FROM ' . TABLE_PREFIX . 'Categories
WHERE (CategoryId = ' . $last_category_info['SymLinkCategoryId'] . ')';
$category_info = $this->Conn->GetRow($sql);
if ($category_info) {
// web symlinked category was found use it
// TODO: maybe 302 redirect should be made to symlinked category url (all other url parts should stay)
$last_category_info = $category_info;
}
}
// 1. Set virtual page as template, this will be replaced to physical template later in kApplication::Run.
// 2. Don't set CachedTemplate field as template here, because we will loose original page associated with it's cms blocks!
$vars['t'] = mb_strtolower( preg_replace('/^Content\//i', '', $last_category_info['NamedParentPath']));
$vars['m_cat_id'] = $last_category_info['CategoryId'];
$vars['is_virtual'] = true; // for template from POST, strange code there!
}
/*else {
$vars['m_cat_id'] = 0;
}*/
return $res;
}
/**
* Set's new unique resource id to user
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemValidate(kEvent $event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$resource_id = $object->GetDBField('ResourceId');
if ( !$resource_id ) {
$object->SetDBField('ResourceId', $this->Application->NextResourceId());
}
}
/**
* Occurs before an item has been cloned
* Id of newly created item is passed as event' 'id' param
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeClone(kEvent $event)
{
parent::OnBeforeClone($event);
$object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('ResourceId', 0); // this will reset it
}
}
\ No newline at end of file
Index: branches/5.3.x/core/units/users/users_event_handler.php
===================================================================
--- branches/5.3.x/core/units/users/users_event_handler.php (revision 15937)
+++ branches/5.3.x/core/units/users/users_event_handler.php (revision 15938)
@@ -1,1939 +1,1958 @@
<?php
/**
* @version $Id$
* @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!');
class UsersEventHandler extends kDBEventHandler
{
/**
* Allows to override standard permission mapping
*
* @return void
* @access protected
* @see kEventHandler::$permMapping
*/
protected function mapPermissions()
{
parent::mapPermissions();
$permissions = Array (
// admin
'OnSetPersistantVariable' => Array('self' => 'view'), // because setting to logged in user only
'OnUpdatePassword' => Array('self' => true),
'OnSaveSelected' => Array ('self' => 'view'),
'OnGeneratePassword' => Array ('self' => 'view'),
// front
'OnRefreshForm' => Array('self' => true),
'OnForgotPassword' => Array('self' => true),
'OnSubscribeQuery' => Array('self' => true),
'OnSubscribeUser' => Array('self' => true),
'OnRecommend' => Array('self' => true),
'OnItemBuild' => Array('self' => true),
'OnMassResetSettings' => Array('self' => 'edit'),
'OnMassCloneUsers' => Array('self' => 'add'),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
/**
* Returns fields, that are not allowed to be changed from request
*
* @param Array $hash
* @return Array
* @access protected
*/
protected function getRequestProtectedFields($hash)
{
$fields = parent::getRequestProtectedFields($hash);
$fields = array_merge($fields, Array ('PrevEmails', 'ResourceId', 'IPAddress', 'IsBanned', 'PwResetConfirm', 'PwRequestTime', 'OldStyleLogin'));
if ( !$this->Application->isAdmin ) {
$fields = array_merge($fields, Array ('UserType', 'Status', 'EmailVerified', 'IsBanned'));
}
return $fields;
}
/**
* Builds item (loads if needed)
*
* Pattern: Prototype Manager
*
* @param kEvent $event
* @access protected
*/
protected function OnItemBuild(kEvent $event)
{
parent::OnItemBuild($event);
$object = $event->getObject();
/* @var $object kDBItem */
if ( $event->Special == 'forgot' || $object->getFormName() == 'registration' ) {
$this->_makePasswordRequired($event);
}
}
/**
* Shows only admins when required
*
* @param kEvent $event
* @return void
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
$object = $event->getObject();
/* @var $object kDBList */
if ( $event->Special == 'regular' ) {
$object->addFilter('primary_filter', '%1$s.UserType = ' . UserType::USER);
}
if ( $event->Special == 'admins' ) {
$object->addFilter('primary_filter', '%1$s.UserType = ' . UserType::ADMIN);
}
if ( !$this->Application->isAdminUser ) {
$object->addFilter('status_filter', '%1$s.Status = ' . STATUS_ACTIVE);
}
if ( $event->Special == 'online' ) {
$object->addFilter('online_users_filter', 's.PortalUserId IS NOT NULL');
}
if ( $event->Special == 'group' ) {
$group_id = $this->Application->GetVar('g_id');
if ( $group_id !== false ) {
// show only users, that user doesn't belong to current group
$sql = 'SELECT PortalUserId
FROM ' . $this->Application->GetTempName(TABLE_PREFIX . 'UserGroupRelations', 'prefix:g') . '
WHERE GroupId = ' . (int)$group_id;
$user_ids = $this->Conn->GetCol($sql);
if ( $user_ids ) {
$object->addFilter('already_member_filter', '%1$s.PortalUserId NOT IN (' . implode(',', $user_ids) . ')');
}
}
}
}
/**
* Checks user permission to execute given $event
*
* @param kEvent $event
* @return bool
* @access public
*/
public function CheckPermission(kEvent $event)
{
if ( $event->Name == 'OnLogin' || $event->Name == 'OnLoginAjax' || $event->Name == 'OnLogout' ) {
// permission is checked in OnLogin event directly
return true;
}
if ( $event->Name == 'OnResetRootPassword' ) {
return defined('DBG_RESET_ROOT') && DBG_RESET_ROOT;
}
if ( $event->Name == 'OnLoginAs' ) {
$admin_session = $this->Application->recallObject('Session.admin');
/* @var $admin_session Session */
return $admin_session->LoggedIn();
}
if ( !$this->Application->isAdminUser ) {
$user_id = $this->Application->RecallVar('user_id');
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
if ( ($event->Name == 'OnCreate' || $event->Name == 'OnRegisterAjax') && $user_id == USER_GUEST ) {
// "Guest" can create new users
return true;
}
if ( $event->Name == 'OnUpdate' && $user_id > 0 ) {
$user_dummy = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
/* @var $user_dummy UsersItem */
foreach ($items_info as $id => $field_values) {
if ( $id != $user_id ) {
// registered users can update their record only
return false;
}
$user_dummy->Load($id);
$status_field = $event->getUnitConfig()->getStatusField(true);
if ( $user_dummy->GetDBField($status_field) != STATUS_ACTIVE ) {
// not active user is not allowed to update his record (he could not activate himself manually)
return false;
}
if ( isset($field_values[$status_field]) && $user_dummy->GetDBField($status_field) != $field_values[$status_field] ) {
// user can't change status by himself
return false;
}
}
return true;
}
if ( $event->Name == 'OnResetLostPassword' && $event->Special == 'forgot' && $user_id == USER_GUEST ) {
// non-logged in users can reset their password, when reset code is valid
return is_numeric($this->getPassedID($event));
}
if ( $event->Name == 'OnUpdate' && $user_id <= 0 ) {
// guests are not allowed to update their record, because they don't have it :)
return false;
}
}
return parent::CheckPermission($event);
}
/**
* Handles session expiration (redirects to valid template)
*
* @param kEvent $event
*/
function OnSessionExpire($event)
{
$this->Application->resetCounters('UserSessions');
// place 2 of 2 (also in kHTTPQuery::getRedirectParams)
$admin_url_params = Array (
'm_cat_id' => 0, // category means nothing on admin login screen
'm_wid' => '', // remove wid, otherwise parent window may add wid to its name breaking all the frameset (for <a> targets)
'pass' => 'm', // don't pass any other (except "m") prefixes to admin session expiration template
'expired' => 1, // expiration mark to show special error on login screen
'no_pass_through' => 1, // this way kApplication::HREF won't add them again
);
if ($this->Application->isAdmin) {
$this->Application->Redirect('index', $admin_url_params, '', 'index.php');
}
if ($this->Application->GetVar('admin') == 1) {
// Front-End showed in admin's right frame
$session_admin = $this->Application->recallObject('Session.admin');
/* @var $session_admin Session */
if (!$session_admin->LoggedIn()) {
// front-end session created from admin session & both expired
$this->Application->DeleteVar('admin');
$this->Application->Redirect('index', $admin_url_params, '', 'admin/index.php');
}
}
// Front-End session expiration
$get = $this->Application->HttpQuery->getRedirectParams();
$t = $this->Application->GetVar('t');
$get['js_redirect'] = $this->Application->ConfigValue('UseJSRedirect');
$this->Application->Redirect($t ? $t : 'index', $get);
}
/**
* [SCHEDULED TASK] Deletes expired sessions
*
* @param kEvent $event
*/
function OnDeleteExpiredSessions($event)
{
if (defined('IS_INSTALL') && IS_INSTALL) {
return ;
}
$this->Application->Session->DeleteExpired();
}
/**
* Checks user data and logs it in if allowed
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnLogin($event)
{
$object = $event->getObject( Array ('form_name' => 'login') );
/* @var $object kDBItem */
$field_values = $this->getSubmittedFields($event);
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
$username = $object->GetDBField('UserLogin');
$password = $object->GetDBField('UserPassword');
$remember_login = $object->GetDBField('UserRememberLogin') == 1;
/* @var $user_helper UserHelper */
$user_helper = $this->Application->recallObject('UserHelper');
$user_helper->event =& $event;
$result = $user_helper->loginUser($username, $password, false, $remember_login);
if ($result != LoginResult::OK) {
$event->status = kEvent::erFAIL;
$object->SetError('UserLogin', $result == LoginResult::NO_PERMISSION ? 'no_permission' : 'invalid_password');
}
if ( is_object($event->MasterEvent) && ($event->MasterEvent->Name == 'OnLoginAjax') ) {
// used to insert just logged-in user e-mail on "One Step Checkout" form in "Modern Store" theme
$user =& $user_helper->getUserObject();
$event->SetRedirectParam('user_email', $user->GetDBField('Email'));
}
}
/**
* Performs user login from ajax request
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnLoginAjax($event)
{
$ajax_form_helper = $this->Application->recallObject('AjaxFormHelper');
/* @var $ajax_form_helper AjaxFormHelper */
$ajax_form_helper->transitEvent($event, 'OnLogin'); //, Array ('do_refresh' => 1));
}
/**
* [HOOK] Auto-Logins Front-End user when "Remember Login" cookie is found
*
* @param kEvent $event
*/
function OnAutoLoginUser($event)
{
$remember_login_cookie = $this->Application->GetVar('remember_login');
if (!$remember_login_cookie || $this->Application->isAdmin || $this->Application->LoggedIn()) {
return ;
}
/* @var $user_helper UserHelper */
$user_helper = $this->Application->recallObject('UserHelper');
$user_helper->loginUser('', '', false, false, $remember_login_cookie);
}
/**
* Called when user logs in using old in-portal
*
* @param kEvent $event
*/
function OnInpLogin($event)
{
$sync_manager = $this->Application->recallObject('UsersSyncronizeManager', null, Array(), Array ('InPortalSyncronize'));
/* @var $sync_manager UsersSyncronizeManager */
$sync_manager->performAction('LoginUser', $event->getEventParam('user'), $event->getEventParam('pass') );
if ($event->redirect && is_string($event->redirect)) {
// some real template specified instead of true
$this->Application->Redirect($event->redirect, $event->getRedirectParams());
}
}
/**
* Called when user logs in using old in-portal
*
* @param kEvent $event
*/
function OnInpLogout($event)
{
$sync_manager = $this->Application->recallObject('UsersSyncronizeManager', null, Array(), Array ('InPortalSyncronize'));
/* @var $sync_manager UsersSyncronizeManager */
$sync_manager->performAction('LogoutUser');
}
/**
* Performs user logout
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnLogout($event)
{
/* @var $user_helper UserHelper */
$user_helper = $this->Application->recallObject('UserHelper');
$user_helper->event =& $event;
$user_helper->logoutUser();
}
/**
* Redirects user after successful registration to confirmation template (on Front only)
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
$this->afterItemChanged($event);
$this->assignToPrimaryGroup($event);
}
/**
* Performs user registration
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnCreate(kEvent $event)
{
if ( $this->Application->isAdmin ) {
parent::OnCreate($event);
return ;
}
$object = $event->getObject( Array('form_name' => 'registration') );
/* @var $object UsersItem */
$field_values = $this->getSubmittedFields($event);
$user_email = getArrayValue($field_values, 'Email');
$subscriber_id = $user_email ? $this->getSubscriberByEmail($user_email) : false;
if ( $subscriber_id ) {
// update existing subscriber
$object->Load($subscriber_id);
$object->SetDBField('PrimaryGroupId', $this->Application->ConfigValue('User_NewGroup'));
$this->Application->SetVar($event->getPrefixSpecial(true), Array ($object->GetID() => $field_values));
}
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
$event->setEventParam('form_data', $field_values);
$status = $object->isLoaded() ? $object->Update() : $object->Create();
if ( !$status ) {
$event->status = kEvent::erFAIL;
$event->redirect = false;
$object->setID( (int)$object->GetID() );
}
$this->setNextTemplate($event, true);
if ( ($event->status == kEvent::erSUCCESS) && $event->redirect ) {
$this->assignToPrimaryGroup($event);
$object->sendEmails();
$this->autoLoginUser($event);
}
}
/**
* Processes user registration from ajax request
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnRegisterAjax(kEvent $event)
{
$ajax_form_helper = $this->Application->recallObject('AjaxFormHelper');
/* @var $ajax_form_helper AjaxFormHelper */
$ajax_form_helper->transitEvent($event, 'OnCreate', Array ('do_refresh' => 1));
}
/**
* Returns subscribed user ID by given e-mail address
*
* @param string $email
* @return int|bool
* @access protected
*/
protected function getSubscriberByEmail($email)
{
$verify_user = $this->Application->recallObject('u.verify', null, Array ('skip_autoload' => true));
/* @var $verify_user UsersItem */
$verify_user->Load($email, 'Email');
return $verify_user->isLoaded() && $verify_user->isSubscriberOnly() ? $verify_user->GetID() : false;
}
/**
* Login user if possible, if not then redirect to corresponding template
*
* @param kEvent $event
*/
function autoLoginUser($event)
{
$object = $event->getObject();
/* @var $object UsersItem */
if ( $object->GetDBField('Status') == STATUS_ACTIVE ) {
/* @var $user_helper UserHelper */
$user_helper = $this->Application->recallObject('UserHelper');
$user =& $user_helper->getUserObject();
$user->Load($object->GetID());
if ( $user_helper->checkLoginPermission() ) {
$user_helper->loginUserById( $user->GetID() );
}
}
}
/**
* Set's new unique resource id to user
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
$this->beforeItemChanged($event);
$cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$object = $event->getObject();
/* @var $object UsersItem */
if ( !$object->isSubscriberOnly() ) {
// don't check state-to-country relations for subscribers
$cs_helper->CheckStateField($event, 'State', 'Country');
}
if ( $object->getFormName() != 'login' ) {
$this->_makePasswordRequired($event);
}
$cs_helper->PopulateStates($event, 'State', 'Country');
$this->setUserGroup($object);
/* @var $user_helper UserHelper */
$user_helper = $this->Application->recallObject('UserHelper');
if ( !$user_helper->checkBanRules($object) ) {
$object->SetError('Username', 'banned');
}
$object->SetDBField('IPAddress', $this->Application->getClientIp());
if ( !$this->Application->isAdmin ) {
$object->SetDBField('FrontLanguage', $this->Application->GetVar('m_lang'));
}
}
/**
* Sets primary group of the user
*
* @param kDBItem $object
*/
protected function setUserGroup(&$object)
{
if ($object->Special == 'subscriber') {
$object->SetDBField('PrimaryGroupId', $this->Application->ConfigValue('User_SubscriberGroup'));
return ;
}
// set primary group to user
if ( !$this->Application->isAdminUser ) {
$group_id = $object->GetDBField('PrimaryGroupId');
if ($group_id) {
// check, that group is allowed for Front-End
$sql = 'SELECT GroupId
FROM ' . TABLE_PREFIX . 'UserGroups
WHERE GroupId = ' . (int)$group_id . ' AND FrontRegistration = 1';
$group_id = $this->Conn->GetOne($sql);
}
if (!$group_id) {
// when group not selected OR not allowed -> use default group
$object->SetDBField('PrimaryGroupId', $this->Application->ConfigValue('User_NewGroup'));
}
}
}
/**
* Assigns a user to it's primary group
*
* @param kEvent $event
*/
protected function assignToPrimaryGroup($event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$primary_group_id = $object->GetDBField('PrimaryGroupId');
if ($primary_group_id) {
$ug_table = TABLE_PREFIX . 'UserGroupRelations';
if ( $object->IsTempTable() ) {
$ug_table = $this->Application->GetTempName($ug_table, 'prefix:' . $event->Prefix);
}
$fields_hash = Array (
'PortalUserId' => $object->GetID(),
'GroupId' => $primary_group_id,
);
$this->Conn->doInsert($fields_hash, $ug_table, 'REPLACE');
}
}
/**
* Set's new unique resource id to user
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemValidate(kEvent $event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$resource_id = $object->GetDBField('ResourceId');
if ( !$resource_id ) {
$object->SetDBField('ResourceId', $this->Application->NextResourceId());
}
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnRecommend($event)
{
$object = $event->getObject( Array ('form_name' => 'recommend') );
/* @var $object kDBItem */
$field_values = $this->getSubmittedFields($event);
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
if ( !$object->ValidateField('RecommendEmail') ) {
$event->status = kEvent::erFAIL;
return ;
}
$send_params = Array (
'to_email' => $object->GetDBField('RecommendEmail'),
'to_name' => $object->GetDBField('RecommendEmail'),
);
$user_id = $this->Application->RecallVar('user_id');
- $email_sent = $this->Application->emailUser('USER.SUGGEST', $user_id, $send_params);
- $this->Application->emailAdmin('USER.SUGGEST');
+ $email_sent = $this->Application->emailUser('USER.SUGGEST', $user_id, $object->getEmailParams($send_params));
+ $this->Application->emailAdmin('USER.SUGGEST', null, $object->getEmailParams());
if ( $email_sent ) {
$event->SetRedirectParam('pass', 'all');
$event->redirect = $this->Application->GetVar('template_success');
}
else {
$event->status = kEvent::erFAIL;
$object->SetError('RecommendEmail', 'send_error');
}
}
/**
* Saves address changes and mades no redirect
*
* @param kEvent $event
*/
function OnUpdateAddress($event)
{
$object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
if ( $items_info ) {
list ($id, $field_values) = each($items_info);
if ( $id > 0 ) {
$object->Load($id);
}
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
$object->setID($id);
$object->Validate();
}
$cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->PopulateStates($event, 'State', 'Country');
$event->redirect = false;
}
/**
* Validate subscriber's email & store it to session -> redirect to confirmation template
*
* @param kEvent $event
*/
function OnSubscribeQuery($event)
{
$object = $event->getObject( Array ('form_name' => 'subscription') );
/* @var $object UsersItem */
$field_values = $this->getSubmittedFields($event);
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
if ( !$object->ValidateField('SubscriberEmail') ) {
$event->status = kEvent::erFAIL;
return ;
}
$user_email = $object->GetDBField('SubscriberEmail');
$object->Load($user_email, 'Email');
$event->SetRedirectParam('subscriber_email', $user_email);
if ( $object->isLoaded() && $object->isSubscribed() ) {
$event->redirect = $this->Application->GetVar('unsubscribe_template');
}
else {
$event->redirect = $this->Application->GetVar('subscribe_template');
}
$event->SetRedirectParam('pass', 'm');
}
/**
* Subscribe/Unsubscribe user based on email stored in previous step
*
* @param kEvent $event
*/
function OnSubscribeUser($event)
{
$object = $event->getObject( Array ('form_name' => 'subscription') );
/* @var $object UsersItem */
$user_email = $this->Application->GetVar('subscriber_email');
$object->SetDBField('SubscriberEmail', $user_email);
if ( !$object->ValidateField('SubscriberEmail') ) {
$event->status = kEvent::erFAIL;
return ;
}
$username_required = $object->isRequired('Username');
$this->RemoveRequiredFields($object);
$object->Load($user_email, 'Email');
if ( $object->isLoaded() ) {
if ( $object->isSubscribed() ) {
if ( $event->getEventParam('no_unsubscribe') ) {
// for customization code from FormsEventHandler
return ;
}
if ( $object->isSubscriberOnly() ) {
$temp_handler = $this->Application->recallObject($event->Prefix . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => $event));
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems($event->Prefix, '', Array($object->GetID()));
}
else {
$this->RemoveSubscriberGroup( $object->GetID() );
}
$event->redirect = $this->Application->GetVar('unsubscribe_ok_template');
}
else {
$this->AddSubscriberGroup($object);
$event->redirect = $this->Application->GetVar('subscribe_ok_template');
}
}
else {
$object->generatePassword();
$object->SetDBField('Email', $user_email);
if ( $username_required ) {
$object->SetDBField('Username', str_replace('@', '_at_', $user_email));
}
$object->SetDBField('Status', STATUS_ACTIVE); // make user subscriber Active by default
if ( $object->Create() ) {
$this->AddSubscriberGroup($object);
$event->redirect = $this->Application->GetVar('subscribe_ok_template');
}
}
}
/**
* Adding user to subscribers group
*
* @param UsersItem $object
*/
function AddSubscriberGroup(&$object)
{
if ( !$object->isSubscriberOnly() ) {
$fields_hash = Array (
'PortalUserId' => $object->GetID(),
'GroupId' => $this->Application->ConfigValue('User_SubscriberGroup'),
);
$this->Conn->doInsert($fields_hash, TABLE_PREFIX . 'UserGroupRelations');
}
- $this->Application->emailAdmin('USER.SUBSCRIBE');
- $this->Application->emailUser('USER.SUBSCRIBE', $object->GetID());
+ $send_params = $object->getEmailParams();
+ $this->Application->emailUser('USER.SUBSCRIBE', $object->GetID(), $send_params);
+ $this->Application->emailAdmin('USER.SUBSCRIBE', null, $send_params);
}
/**
* Removing user from subscribers group
*
* @param int $user_id
*/
function RemoveSubscriberGroup($user_id)
{
$group_id = $this->Application->ConfigValue('User_SubscriberGroup');
$sql = 'DELETE FROM ' . TABLE_PREFIX . 'UserGroupRelations
WHERE PortalUserId = ' . $user_id . ' AND GroupId = ' . $group_id;
$this->Conn->Query($sql);
- $this->Application->emailAdmin('USER.UNSUBSCRIBE');
- $this->Application->emailUser('USER.UNSUBSCRIBE', $user_id);
+ $send_params = Array (
+ 'PrefixSpecial' => 'u',
+ 'item_id' => $user_id
+ );
+
+ $this->Application->emailUser('USER.UNSUBSCRIBE', $user_id, $send_params);
+ $this->Application->emailAdmin('USER.UNSUBSCRIBE', null, $send_params);
}
/**
* Validates forgot password form and sends password reset confirmation e-mail
*
* @param kEvent $event
* @return void
*/
function OnForgotPassword($event)
{
$object = $event->getObject( Array ('form_name' => 'forgot_password') );
/* @var $object kDBItem */
$field_values = $this->getSubmittedFields($event);
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
$user = $this->Application->recallObject('u.tmp', null, Array ('skip_autoload' => true));
/* @var $user UsersItem */
$found = $allow_reset = false;
$email_or_username = $object->GetDBField('ForgotLogin');
$is_email = strpos($email_or_username, '@') !== false;
if ( strlen($email_or_username) ) {
$user->Load($email_or_username, $is_email ? 'Email' : 'Username');
}
if ( $user->isLoaded() ) {
$min_pwd_reset_delay = $this->Application->ConfigValue('Users_AllowReset');
$found = ($user->GetDBField('Status') == STATUS_ACTIVE) && strlen($user->GetDBField('Password'));
if ( !$user->GetDBField('PwResetConfirm') ) {
// no reset made -> allow
$allow_reset = true;
}
else {
// reset made -> wait N minutes, then allow
$allow_reset = TIMENOW > $user->GetDBField('PwRequestTime') + $min_pwd_reset_delay;
}
}
if ($found && $allow_reset) {
- $this->Application->emailUser('USER.PSWDC', $user->GetID());
+ $this->Application->emailUser('USER.PSWDC', $user->GetID(), $user->getEmailParams());
$event->redirect = $this->Application->GetVar('template_success');
return ;
}
if ( strlen($email_or_username) ) {
$object->SetError('ForgotLogin', $found ? 'reset_denied' : ($is_email ? 'unknown_email' : 'unknown_username'));
}
if ( !$object->ValidateField('ForgotLogin') ) {
$event->status = kEvent::erFAIL;
}
}
/**
* Updates kDBItem
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnUpdate(kEvent $event)
{
parent::OnUpdate($event);
if ( !$this->Application->isAdmin ) {
$this->setNextTemplate($event);
}
}
/**
* Checks state against country
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
$this->beforeItemChanged($event);
$cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->CheckStateField($event, 'State', 'Country');
$cs_helper->PopulateStates($event, 'State', 'Country');
$object = $event->getObject();
/* @var $object kDBItem */
if ( $event->Special == 'forgot' ) {
$object->SetDBField('PwResetConfirm', '');
$object->SetDBField('PwRequestTime_date', NULL);
$object->SetDBField('PwRequestTime_time', NULL);
}
$changed_fields = array_keys($object->GetChangedFields());
if ( $changed_fields && !in_array('Modified', $changed_fields) ) {
$object->SetDBField('Modified_date', time());
$object->SetDBField('Modified_time', time());
}
if ( !$this->Application->isAdmin && in_array('Email', $changed_fields) && ($event->Special != 'email-restore') ) {
$object->SetDBField('EmailVerified', 0);
}
}
/**
* Occurs before item is changed
*
* @param kEvent $event
*/
function beforeItemChanged($event)
{
$object = $event->getObject();
/* @var $object UsersItem */
if ( !$this->Application->isAdmin && $object->getFormName() == 'registration' ) {
// sets new user's status based on config options
$status_map = Array (1 => STATUS_ACTIVE, 2 => STATUS_DISABLED, 3 => STATUS_PENDING, 4 => STATUS_PENDING);
$object->SetDBField('Status', $status_map[ $this->Application->ConfigValue('User_Allow_New') ]);
if ( $this->Application->ConfigValue('User_Password_Auto') ) {
$object->generatePassword( rand(5, 8) );
}
if ( $this->Application->ConfigValue('RegistrationCaptcha') ) {
$captcha_helper = $this->Application->recallObject('CaptchaHelper');
/* @var $captcha_helper kCaptchaHelper */
$captcha_helper->validateCode($event, false);
}
if ( $event->Name == 'OnBeforeItemUpdate' ) {
// when a subscriber-only users performs normal registration, then assign him to Member group
$this->setUserGroup($object);
}
}
}
/**
* Sets redirect template based on user status & user request contents
*
* @param kEvent $event
* @param bool $for_registration
*/
function setNextTemplate($event, $for_registration = false)
{
$event->SetRedirectParam('opener', 's');
$object = $event->getObject();
/* @var $object UsersItem */
$next_template = false;
if ( $object->GetDBField('Status') == STATUS_ACTIVE && $this->Application->GetVar('next_template') ) {
$next_template = $this->Application->GetVar('next_template');
}
elseif ( $for_registration ) {
switch ( $this->Application->ConfigValue('User_Allow_New') ) {
case 1: // Immediate
$next_template = $this->Application->GetVar('registration_confirm_template');
break;
case 3: // Upon Approval
case 4: // Email Activation
$next_template = $this->Application->GetVar('registration_confirm_pending_template');
break;
}
}
if ($next_template) {
$event->redirect = $next_template;
}
}
/**
* Delete users from groups if their membership is expired
*
* @param kEvent $event
*/
function OnCheckExpiredMembership($event)
{
// send pre-expiration reminders: begin
$pre_expiration = time() + $this->Application->ConfigValue('User_MembershipExpirationReminder') * 3600 * 24;
$sql = 'SELECT PortalUserId, GroupId
FROM '.TABLE_PREFIX.'UserGroupRelations
WHERE (MembershipExpires IS NOT NULL) AND (ExpirationReminderSent = 0) AND (MembershipExpires < '.$pre_expiration.')';
$skip_clause = $event->getEventParam('skip_clause');
if ($skip_clause) {
$sql .= ' AND !('.implode(') AND !(', $skip_clause).')';
}
$records = $this->Conn->Query($sql);
if ($records) {
$conditions = Array();
+ $send_params = Array ('PrefixSpecial' => 'u');
+
foreach ($records as $record) {
- $this->Application->emailUser('USER.MEMBERSHIP.EXPIRATION.NOTICE', $record['PortalUserId']);
- $this->Application->emailAdmin('USER.MEMBERSHIP.EXPIRATION.NOTICE');
+ $send_params['item_id'] = $record['PortalUserId'];
+ $this->Application->emailUser('USER.MEMBERSHIP.EXPIRATION.NOTICE', $record['PortalUserId'], $send_params);
+ $this->Application->emailAdmin('USER.MEMBERSHIP.EXPIRATION.NOTICE', null, $send_params);
$conditions[] = '(PortalUserId = '.$record['PortalUserId'].' AND GroupId = '.$record['GroupId'].')';
}
+
$sql = 'UPDATE '.TABLE_PREFIX.'UserGroupRelations
SET ExpirationReminderSent = 1
WHERE '.implode(' OR ', $conditions);
$this->Conn->Query($sql);
}
// send pre-expiration reminders: end
// remove users from groups with expired membership: begin
$sql = 'SELECT PortalUserId
FROM '.TABLE_PREFIX.'UserGroupRelations
WHERE (MembershipExpires IS NOT NULL) AND (MembershipExpires < '.time().')';
$user_ids = $this->Conn->GetCol($sql);
if ($user_ids) {
+ $send_params = Array ('PrefixSpecial' => 'u');
+
foreach ($user_ids as $id) {
- $this->Application->emailUser('USER.MEMBERSHIP.EXPIRED', $id);
- $this->Application->emailAdmin('USER.MEMBERSHIP.EXPIRED');
+ $send_params['item_id'] = $id;
+ $this->Application->emailUser('USER.MEMBERSHIP.EXPIRED', $id, $send_params);
+ $this->Application->emailAdmin('USER.MEMBERSHIP.EXPIRED', null, $send_params);
}
}
$sql = 'DELETE FROM '.TABLE_PREFIX.'UserGroupRelations
WHERE (MembershipExpires IS NOT NULL) AND (MembershipExpires < '.time().')';
$this->Conn->Query($sql);
// remove users from groups with expired membership: end
}
/**
* Used to keep user registration form data, while showing affiliate registration form fields
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnRefreshForm($event)
{
$event->redirect = false;
$item_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
list($id, $field_values) = each($item_info);
$object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
$object->setID($id);
$object->IgnoreValidation = true;
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
}
/**
* Sets persistant variable
*
* @param kEvent $event
*/
function OnSetPersistantVariable($event)
{
$field = $this->Application->GetVar('field');
$value = $this->Application->GetVar('value');
$this->Application->StorePersistentVar($field, $value);
$force_tab = $this->Application->GetVar('SetTab');
if ($force_tab) {
$this->Application->StoreVar('force_tab', $force_tab);
}
}
/**
* Return user from order by special .ord
*
* @param kEvent $event
* @return int
* @access public
*/
public function getPassedID(kEvent $event)
{
switch ($event->Special) {
case 'ord':
$order = $this->Application->recallObject('ord');
/* @var $order OrdersItem */
return $order->GetDBField('PortalUserId');
break;
case 'profile':
$id = $this->Application->GetVar('user_id');
if ( !$id ) {
// if none user_id given use current user id
$id = $this->Application->RecallVar('user_id');
}
return $id;
break;
case 'forgot':
/* @var $user_helper UserHelper */
$user_helper = $this->Application->recallObject('UserHelper');
$id = $user_helper->validateUserCode($this->Application->GetVar('user_key'), 'forgot_password');
if ( is_numeric($id) ) {
return $id;
}
break;
}
if ( preg_match('/^(login|register|recommend|subscribe|forgot)/', $event->Special) ) {
// this way we can have 2+ objects stating with same special, e.g. "u.login-sidebox" and "u.login-main"
return USER_GUEST;
}
return parent::getPassedID($event);
}
/**
* Allows to change root password
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnUpdatePassword($event)
{
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
if ( !$items_info ) {
return;
}
list ($id, $field_values) = each($items_info);
$user_id = $this->Application->RecallVar('user_id');
if ( $id == $user_id && ($user_id > 0 || $user_id == USER_ROOT) ) {
$user_dummy = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
/* @var $user_dummy kDBItem */
$user_dummy->Load($id);
$status_field = $event->getUnitConfig()->getStatusField(true);
if ( $user_dummy->GetDBField($status_field) != STATUS_ACTIVE ) {
// not active user is not allowed to update his record (he could not activate himself manually)
return ;
}
}
if ( $user_id == USER_ROOT ) {
$object = $event->getObject(Array ('skip_autoload' => true));
/* @var $object UsersItem */
// this is internal hack to allow root/root passwords for dev
if ( $this->Application->isDebugMode() && $field_values['RootPassword'] == 'root' ) {
$object->SetFieldOption('RootPassword', 'min_length', 4);
}
$this->RemoveRequiredFields($object);
$object->SetDBField('RootPassword', $this->Application->ConfigValue('RootPass'));
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
$object->setID(-1);
if ( $object->Validate() ) {
// validation on, password match too
$fields_hash = Array ('VariableValue' => $object->GetDBField('RootPassword'));
$conf_table = $this->Application->getUnitConfig('conf')->getTableName();
$this->Conn->doUpdate($fields_hash, $conf_table, 'VariableName = "RootPass"');
$event->SetRedirectParam('opener', 'u');
}
else {
$event->status = kEvent::erFAIL;
$event->redirect = false;
return ;
}
}
else {
$object =& $event->getObject();
/* @var $object kDBItem */
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
if ( !$object->Update() ) {
$event->status = kEvent::erFAIL;
$event->redirect = false;
}
}
$event->SetRedirectParam('opener', 'u');
}
/**
* Resets grid settings, remembered in each user record
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnMassResetSettings($event)
{
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
return;
}
$ids = $this->StoreSelectedIDs($event);
$default_user_id = $this->Application->ConfigValue('DefaultSettingsUserId');
if ( in_array($default_user_id, $ids) ) {
array_splice($ids, array_search($default_user_id, $ids), 1);
}
if ( $ids ) {
$q = 'DELETE FROM ' . TABLE_PREFIX . 'UserPersistentSessionData WHERE PortalUserId IN (' . join(',', $ids) . ') AND
(VariableName LIKE "%_columns_%"
OR
VariableName LIKE "%_filter%"
OR
VariableName LIKE "%_PerPage%")';
$this->Conn->Query($q);
}
$this->clearSelectedIDs($event);
}
/**
* Checks, that currently loaded item is allowed for viewing (non permission-based)
*
* @param kEvent $event
* @return bool
* @access protected
*/
protected function checkItemStatus(kEvent $event)
{
$object = $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
return true;
}
$virtual_users = Array (USER_ROOT, USER_GUEST);
return ($object->GetDBField('Status') == STATUS_ACTIVE) || in_array($object->GetID(), $virtual_users);
}
/**
* Sends approved/declined email event on user status change
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
$this->afterItemChanged($event);
$object = $event->getObject();
/* @var $object UsersItem */
if ( !$this->Application->isAdmin && ($event->Special != 'email-restore') ) {
$this->sendEmailChangeEvent($event);
}
if ( !$this->Application->isAdmin || $object->IsTempTable() ) {
return;
}
$this->sendStatusChangeEvent($object->GetID(), $object->GetOriginalField('Status'), $object->GetDBField('Status'));
}
/**
* Occurs, after item is changed
*
* @param kEvent $event
*/
protected function afterItemChanged($event)
{
$this->saveUserImages($event);
$object = $event->getObject();
/* @var $object UsersItem */
if ( $object->GetDBField('EmailPassword') && $object->GetDBField('Password_plain') ) {
$email_passwords = $this->Application->RecallVar('email_passwords');
$email_passwords = $email_passwords ? unserialize($email_passwords) : Array ();
$email_passwords[ $object->GetID() ] = $object->GetDBField('Password_plain');
$this->Application->StoreVar('email_passwords', serialize($email_passwords));
}
// update user subscription status (via my profile or new user registration)
if ( !$this->Application->isAdmin && !$object->isSubscriberOnly() ) {
if ( $object->GetDBField('SubscribeToMailing') && !$object->isSubscribed() ) {
$this->AddSubscriberGroup($object);
}
elseif ( !$object->GetDBField('SubscribeToMailing') && $object->isSubscribed() ) {
$this->RemoveSubscriberGroup( $object->GetID() );
}
}
}
/**
* Stores user's original Status before overwriting with data from temp table
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeDeleteFromLive(kEvent $event)
{
parent::OnBeforeDeleteFromLive($event);
$user_id = $event->getEventParam('id');
$user_status = $this->Application->GetVar('user_status', Array ());
if ( $user_id > 0 ) {
$user_status[$user_id] = $this->getUserStatus($user_id);
$this->Application->SetVar('user_status', $user_status);
}
}
/**
* Sends approved/declined email event on user status change (in temp tables during editing)
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterCopyToLive(kEvent $event)
{
parent::OnAfterCopyToLive($event);
$temp_id = $event->getEventParam('temp_id');
$email_passwords = $this->Application->RecallVar('email_passwords');
if ( $email_passwords ) {
$email_passwords = unserialize($email_passwords);
if ( isset($email_passwords[$temp_id]) ) {
$object = $event->getObject();
/* @var $object kDBItem */
$object->SwitchToLive();
$object->Load( $event->getEventParam('id') );
$object->SetField('Password', $email_passwords[$temp_id]);
$object->SetField('VerifyPassword', $email_passwords[$temp_id]);
- $this->Application->emailUser($temp_id > 0 ? 'USER.NEW.PASSWORD': 'USER.ADD.BYADMIN', $object->GetID());
+ $this->Application->emailUser($temp_id > 0 ? 'USER.NEW.PASSWORD': 'USER.ADD.BYADMIN', $object->GetID(), $object->getEmailParams());
unset($email_passwords[$temp_id]);
$this->Application->StoreVar('email_passwords', serialize($email_passwords));
}
}
if ( $temp_id > 0 ) {
// only send status change e-mail on user update
$new_status = $this->getUserStatus($temp_id);
$user_status = $this->Application->GetVar('user_status');
$this->sendStatusChangeEvent($temp_id, $user_status[$temp_id], $new_status);
}
}
/**
* Returns user status (active, pending, disabled) based on ID and temp mode setting
*
* @param int $user_id
* @return int
*/
function getUserStatus($user_id)
{
$config = $this->getUnitConfig();
$sql = 'SELECT Status
FROM '. $config->getTableName() .'
WHERE '. $config->getIDField() .' = '.$user_id;
return $this->Conn->GetOne($sql);
}
/**
* Sends approved/declined email event on user status change
*
* @param int $user_id
* @param int $prev_status
* @param int $new_status
*/
function sendStatusChangeEvent($user_id, $prev_status, $new_status)
{
$status_events = Array (
STATUS_ACTIVE => 'USER.APPROVE',
STATUS_DISABLED => 'USER.DENY',
);
$email_event = isset($status_events[$new_status]) ? $status_events[$new_status] : false;
if (($prev_status != $new_status) && $email_event) {
- $this->Application->emailUser($email_event, $user_id);
- $this->Application->emailAdmin($email_event);
+
+ $send_params = Array (
+ 'PrefixSpecial' => 'u',
+ 'item_id' => $user_id,
+ );
+
+ $this->Application->emailUser($email_event, $user_id, $send_params);
+ $this->Application->emailAdmin($email_event, null, $send_params);
}
// deletes sessions from users, that are no longer active
if (($prev_status != $new_status) && ($new_status != STATUS_ACTIVE)) {
$sql = 'SELECT SessionKey
FROM ' . TABLE_PREFIX . 'UserSessions
WHERE PortalUserId = ' . $user_id;
$session_ids = $this->Conn->GetCol($sql);
$this->Application->Session->DeleteSessions($session_ids);
}
}
/**
* Sends restore/validation email event on user email change
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function sendEmailChangeEvent(kEvent $event)
{
$object = $event->getObject();
/* @var $object UsersItem */
$new_email = $object->GetDBField('Email');
$prev_email = $object->GetOriginalField('Email');
if ( !$new_email || ($prev_email == $new_email) ) {
return;
}
$prev_emails = $object->GetDBField('PrevEmails');
$prev_emails = $prev_emails ? unserialize($prev_emails) : Array ();
$fields_hash = Array (
'PrevEmails' => serialize($prev_emails),
'EmailVerified' => 0,
);
$user_id = $object->GetID();
if ( $prev_email ) {
$hash = md5(TIMENOW + $user_id);
$prev_emails[$hash] = $prev_email;
$fields_hash['PrevEmails'] = serialize($prev_emails);
$send_params = Array (
'hash' => $hash,
'to_email' => $prev_email,
'to_name' => trim($object->GetDBField('FirstName') . ' ' . $object->GetDBField('LastName')),
);
- $this->Application->emailUser('USER.EMAIL.CHANGE.UNDO', null, $send_params);
+ $this->Application->emailUser('USER.EMAIL.CHANGE.UNDO', null, $object->getEmailParams($send_params));
}
if ( $new_email ) {
- $this->Application->emailUser('USER.EMAIL.CHANGE.VERIFY', $user_id);
+ $this->Application->emailUser('USER.EMAIL.CHANGE.VERIFY', $user_id, $object->getEmailParams());
}
// direct DB update, since USER.EMAIL.CHANGE.VERIFY puts verification code in user record, that we don't want to loose
$this->Conn->doUpdate($fields_hash, $object->TableName, 'PortalUserId = ' . $user_id);
}
/**
* OnAfterConfigRead for users
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
$config = $event->getUnitConfig();
$default_form = $config->getFormByName('default');
$form_fields =& $default_form['Fields'];
// 1. arrange user registration countries
$site_helper = $this->Application->recallObject('SiteHelper');
/* @var $site_helper SiteHelper */
$first_country = $site_helper->getDefaultCountry('', false);
if ($first_country === false) {
$first_country = $this->Application->ConfigValue('User_Default_Registration_Country');
}
if ($first_country) {
// update user country dropdown sql
$form_fields['Country']['options_sql'] = preg_replace('/ORDER BY (.*)/', 'ORDER BY IF (CountryStateId = '.$first_country.', 1, 0) DESC, \\1', $form_fields['Country']['options_sql']);
}
// 2. set default user registration group
$form_fields['PrimaryGroupId']['default'] = $this->Application->ConfigValue('User_NewGroup');
// 3. allow avatar upload on Front-End
$file_helper = $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
$file_helper->createItemFiles($event->Prefix, true); // create image fields
if ($this->Application->isAdminUser) {
// 4. when in administrative console, then create all users with Active status
$form_fields['Status']['default'] = STATUS_ACTIVE;
// 5. remove groups tab on editing forms when AdvancedUserManagement config variable not set
if (!$this->Application->ConfigValue('AdvancedUserManagement')) {
$edit_tab_presets = $config->getEditTabPresets();
foreach ($edit_tab_presets as $preset_name => $preset_tabs) {
if (array_key_exists('groups', $preset_tabs)) {
unset($edit_tab_presets[$preset_name]['groups']);
if (count($edit_tab_presets[$preset_name]) == 1) {
// only 1 tab left -> remove it too
$edit_tab_presets[$preset_name] = Array ();
}
}
}
$config->setEditTabPresets($edit_tab_presets);
}
}
if ( $this->Application->ConfigValue('RegistrationUsernameRequired') ) {
// Username becomes required only, when it's used in registration process
$max_username = $this->Application->ConfigValue('MaxUserName');
$form_fields['Username']['required'] = 1;
$form_fields['Username']['min_len'] = $this->Application->ConfigValue('Min_UserName');
$form_fields['Username']['max_len'] = $max_username ? $max_username : 255;
}
$config->addForms($default_form, 'default');
}
/**
* OnMassCloneUsers
*
* @param kEvent $event
*/
function OnMassCloneUsers($event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = kEvent::erFAIL;
return;
}
$temp_handler = $this->Application->recallObject($event->Prefix.'_TempHandler', 'kTempTablesHandler', Array ('parent_event' => $event));
/* @var $temp_handler kTempTablesHandler */
$ids = $this->StoreSelectedIDs($event);
$temp_handler->CloneItems($event->Prefix, '', $ids);
$this->clearSelectedIDs($event);
}
/**
* When cloning users, reset password (set random)
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeClone(kEvent $event)
{
parent::OnBeforeClone($event);
$object = $event->getObject();
/* @var $object UsersItem */
$object->generatePassword();
$object->SetDBField('ResourceId', 0); // this will reset it
// change email because it should be unique
$object->NameCopy(Array (), $object->GetID(), 'Email', 'copy%1$s.%2$s');
}
/**
* Saves selected ids to session
*
* @param kEvent $event
*/
function OnSaveSelected($event)
{
$this->StoreSelectedIDs($event);
// remove current ID, otherwise group selector will use it in filters
$this->Application->DeleteVar($event->getPrefixSpecial(true) . '_id');
}
/**
* Sets primary group of selected users
*
* @param kEvent $event
*/
function OnProcessSelected($event)
{
$event->SetRedirectParam('opener', 'u');
$user_ids = $this->getSelectedIDs($event, true);
$this->clearSelectedIDs($event);
$dst_field = $this->Application->RecallVar('dst_field');
if ($dst_field != 'PrimaryGroupId') {
return ;
}
$group_ids = array_keys($this->Application->GetVar('g'));
$primary_group_id = $group_ids ? array_shift($group_ids) : false;
if (!$user_ids || !$primary_group_id) {
return ;
}
$table_name = $this->Application->getUnitConfig('ug')->getTableName();
// 1. mark group as primary
$sql = 'UPDATE ' . TABLE_PREFIX . 'Users
SET PrimaryGroupId = ' . $primary_group_id . '
WHERE PortalUserId IN (' . implode(',', $user_ids) . ')';
$this->Conn->Query($sql);
$sql = 'SELECT PortalUserId
FROM ' . $table_name . '
WHERE (GroupId = ' . $primary_group_id . ') AND (PortalUserId IN (' . implode(',', $user_ids) . '))';
$existing_members = $this->Conn->GetCol($sql);
// 2. add new members to a group
$new_members = array_diff($user_ids, $existing_members);
foreach ($new_members as $user_id) {
$fields_hash = Array (
'GroupId' => $primary_group_id,
'PortalUserId' => $user_id,
);
$this->Conn->doInsert($fields_hash, $table_name);
}
}
/**
* Loads user images
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
// linking existing images for item with virtual fields
$image_helper = $this->Application->recallObject('ImageHelper');
/* @var $image_helper ImageHelper */
$object = $event->getObject();
/* @var $object UsersItem */
$image_helper->LoadItemImages($object);
$cs_helper = $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->PopulateStates($event, 'State', 'Country');
// get user subscription status
$object->SetDBField('SubscribeToMailing', $object->isSubscribed() ? 1 : 0);
if ( !$this->Application->isAdmin ) {
$object->SetFieldOption('FrontLanguage', 'options', $this->getEnabledLanguages());
}
}
/**
* Returns list of enabled languages with their names
*
* @return Array
* @access protected
*/
protected function getEnabledLanguages()
{
$cache_key = 'user_languages[%LangSerial%]';
$ret = $this->Application->getCache($cache_key);
if ( $ret === false ) {
$languages = $this->Application->recallObject('lang.enabled', 'lang_List');
/* @var $languages kDBList */
$ret = Array ();
foreach ($languages as $language_info) {
$ret[$languages->GetID()] = $language_info['LocalName'];
}
$this->Application->setCache($cache_key, $ret);
}
return $ret;
}
/**
* Save user images
*
* @param kEvent $event
*/
function saveUserImages($event)
{
if (!$this->Application->isAdmin) {
$image_helper = $this->Application->recallObject('ImageHelper');
/* @var $image_helper ImageHelper */
$object = $event->getObject();
/* @var $object kDBItem */
// process image upload in virtual fields
$image_helper->SaveItemImages($object);
}
}
/**
* Makes password required for new users
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnPreCreate(kEvent $event)
{
parent::OnPreCreate($event);
if ( $event->status != kEvent::erSUCCESS ) {
return;
}
$object = $event->getObject();
/* @var $object kDBItem */
$user_type = $this->Application->GetVar('user_type');
if ( $user_type ) {
$object->SetDBField('UserType', $user_type);
if ( $user_type == UserType::ADMIN ) {
$object->SetDBField('PrimaryGroupId', $this->Application->ConfigValue('User_AdminGroup'));
}
}
if ( $this->Application->ConfigValue('User_Password_Auto') ) {
$object->SetDBField('EmailPassword', 1);
}
$this->_makePasswordRequired($event);
}
/**
* Makes password required for new users
*
* @param kEvent $event
*/
function _makePasswordRequired($event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$required_fields = Array ('Password', 'Password_plain', 'VerifyPassword', 'VerifyPassword_plain');
$object->setRequired($required_fields);
}
/**
* Load item if id is available
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function LoadItem(kEvent $event)
{
$id = $this->getPassedID($event);
if ( $id < 0 ) {
// when root, guest and so on
$object = $event->getObject();
/* @var $object kDBItem */
$object->Clear($id);
return;
}
parent::LoadItem($event);
}
/**
* Occurs just after login (for hooking)
*
* @param kEvent $event
*/
function OnAfterLogin($event)
{
if ( is_object($event->MasterEvent) && !$this->Application->isAdmin ) {
$event->MasterEvent->SetRedirectParam('login', 1);
}
}
/**
* Occurs just before logout (for hooking)
*
* @param kEvent $event
*/
function OnBeforeLogout($event)
{
if ( is_object($event->MasterEvent) && !$this->Application->isAdmin ) {
$event->MasterEvent->SetRedirectParam('logout', 1);
}
}
/**
* Generates password
*
* @param kEvent $event
*/
function OnGeneratePassword($event)
{
$event->status = kEvent::erSTOP;
if ( $this->Application->isAdminUser ) {
echo kUtil::generatePassword();
}
}
/**
* Changes user's password and logges him in
*
* @param kEvent $event
*/
function OnResetLostPassword($event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$event->CallSubEvent('OnUpdate');
if ( $event->status == kEvent::erSUCCESS ) {
/* @var $user_helper UserHelper */
$user_helper = $this->Application->recallObject('UserHelper');
$user =& $user_helper->getUserObject();
$user->Load( $object->GetID() );
if ( $user_helper->checkLoginPermission() ) {
$user_helper->loginUserById( $user->GetID() );
}
}
}
/**
* Generates new Root password and email it
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnResetRootPassword($event)
{
$password_formatter = $this->Application->recallObject('kPasswordFormatter');
/* @var $password_formatter kPasswordFormatter */
$new_root_password = kUtil::generatePassword();
$this->Application->SetConfigValue('RootPass', $password_formatter->hashPassword($new_root_password));
$this->Application->emailAdmin('ROOT.RESET.PASSWORD', null, Array ('password' => $new_root_password));
$event->SetRedirectParam('reset', 1);
$event->SetRedirectParam('pass', 'm');
}
/**
* Perform login of user, selected in Admin Console, on Front-End in a separate window
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnLoginAs(kEvent $event)
{
/* @var $user_helper UserHelper */
$user_helper = $this->Application->recallObject('UserHelper');
$user =& $user_helper->getUserObject();
$user->Load( $this->Application->GetVar('user_id') );
if ( !$user->isLoaded() ) {
return ;
}
if ( $user_helper->checkLoginPermission() ) {
$user_helper->loginUserById( $user->GetID() );
}
}
}
Index: branches/5.3.x/core/units/users/users_item.php
===================================================================
--- branches/5.3.x/core/units/users/users_item.php (revision 15937)
+++ branches/5.3.x/core/units/users/users_item.php (revision 15938)
@@ -1,198 +1,200 @@
<?php
/**
* @version $Id$
* @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!');
class UsersItem extends kDBItem {
/**
* Returns IDs of groups to which user belongs and membership is not expired
*
* @param bool $force_reload
* @return Array
* @access public
*/
public function getMembershipGroups($force_reload = false)
{
$user_groups = $this->Application->RecallVar('UserGroups');
if ( $user_groups === false || $force_reload ) {
// primary group goes first
$sql = 'SELECT GroupId
FROM ' . TABLE_PREFIX . 'UserGroupRelations
WHERE (PortalUserId = ' . $this->GetID() . ') AND ( (MembershipExpires IS NULL) OR (MembershipExpires >= ' . time() . ') )
ORDER BY IF(GroupId = ' . $this->GetDBField('PrimaryGroupId') . ', 1, 0) DESC';
$groups = $this->Conn->GetCol($sql);
$user_helper = $this->Application->recallObject('UserHelper');
/* @var $user_helper UserHelper */
$user_groups = Array ();
$ip_restrictions = $user_helper->getGroupsWithIPRestrictions();
foreach ($groups as $group_id) {
if ( !isset($ip_restrictions[$group_id]) || kUtil::ipMatch($ip_restrictions[$group_id], "\n") ) {
$user_groups[] = $group_id;
}
}
return $user_groups;
}
return explode(',', $user_groups);
}
function sendEmails()
{
+ $send_params = $this->getEmailParams();
+
switch ( $this->GetDBField('Status') ) {
case STATUS_ACTIVE:
$event_name = $this->Application->ConfigValue('User_Password_Auto') ? 'USER.VALIDATE' : 'USER.ADD';
- $this->Application->emailAdmin($event_name);
- $this->Application->emailUser($event_name, $this->GetID());
+ $this->Application->emailUser($event_name, $this->GetID(), $send_params);
+ $this->Application->emailAdmin($event_name, null, $send_params);
break;
case STATUS_PENDING:
- $this->Application->emailAdmin('USER.ADD.PENDING');
- $this->Application->emailUser('USER.ADD.PENDING', $this->GetID());
+ $this->Application->emailUser('USER.ADD.PENDING', $this->GetID(), $send_params);
+ $this->Application->emailAdmin('USER.ADD.PENDING', null, $send_params);
break;
}
}
/**
* Checks that user is subscriber only
*
* @return bool
*/
public function isSubscriberOnly()
{
return $this->GetDBField('PrimaryGroupId') == $this->Application->ConfigValue('User_SubscriberGroup');
}
/**
* Checks that user is subscribed
*
* @return bool
*/
public function isSubscribed()
{
$group_id = $this->Application->ConfigValue('User_SubscriberGroup');
$sql = 'SELECT GroupId
FROM ' . TABLE_PREFIX . 'UserGroupRelations
WHERE (PortalUserId = ' . $this->GetID() . ') AND (GroupId = ' . $group_id . ')';
return $this->Conn->GetOne($sql);
}
/**
* Creates a record in the database table with current item' values
*
* @param mixed $force_id Set to TRUE to force creating of item's own ID or to value to force creating of passed id. Do not pass 1 for true, pass exactly TRUE!
* @param bool $system_create
* @return bool
* @access public
*/
public function Create($force_id = false, $system_create = false)
{
$ret = parent::Create($force_id, $system_create);
if ( $ret ) {
// find out how to synchronize user only when it's copied to live table
$sync_manager = $this->Application->recallObject('UsersSyncronizeManager', null, Array (), Array ('InPortalSyncronize'));
/* @var $sync_manager UsersSyncronizeManager */
$sync_manager->performAction('createUser', $this->FieldValues);
}
return $ret;
}
/**
* Updates previously loaded record with current item' values
*
* @access public
* @param int $id Primary Key Id to update
* @param Array $update_fields
* @param bool $system_update
* @return bool
* @access public
*/
public function Update($id = null, $update_fields = null, $system_update = false)
{
$ret = parent::Update($id, $update_fields, $system_update);
if ( $ret ) {
// find out how to synchronize user only when it's copied to live table
$sync_manager = $this->Application->recallObject('UsersSyncronizeManager', null, Array (), Array ('InPortalSyncronize'));
/* @var $sync_manager UsersSyncronizeManager */
$sync_manager->performAction('updateUser', $this->FieldValues);
}
return $ret;
}
/**
* Deletes the record from database
*
* @param int $id
* @return bool
* @access public
*/
public function Delete($id = null)
{
$ret = parent::Delete($id);
if ( $ret ) {
$sync_manager = $this->Application->recallObject('UsersSyncronizeManager', null, Array (), Array ('InPortalSyncronize'));
/* @var $sync_manager UsersSyncronizeManager */
$sync_manager->performAction('deleteUser', $this->FieldValues);
}
return $ret;
}
function setName($full_name)
{
$full_name = explode(' ', $full_name);
if (count($full_name) > 2) {
$last_name = array_pop($full_name);
$first_name = implode(' ', $full_name);
}
else {
$last_name = $full_name[1];
$first_name = $full_name[0];
}
$this->SetDBField('FirstName', $first_name);
$this->SetDBField('LastName', $last_name);
}
/**
* Generates new password for given user
*
* @param int $length
* @return string
* @access public
*/
public function generatePassword($length = 10)
{
$password = kUtil::generatePassword($length);
$this->SetField('Password', $password);
$this->SetField('VerifyPassword', $password);
return $password;
}
}
\ No newline at end of file
Index: branches/5.3.x/core/units/logs/email_logs/email_logs_config.php
===================================================================
--- branches/5.3.x/core/units/logs/email_logs/email_logs_config.php (revision 15937)
+++ branches/5.3.x/core/units/logs/email_logs/email_logs_config.php (revision 15938)
@@ -1,110 +1,134 @@
<?php
/**
* @version $Id$
* @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',
+ 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),
'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),
'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),
),
),
),
);
\ No newline at end of file
Index: branches/5.3.x/core/units/reviews/reviews_event_handler.php
===================================================================
--- branches/5.3.x/core/units/reviews/reviews_event_handler.php (revision 15937)
+++ branches/5.3.x/core/units/reviews/reviews_event_handler.php (revision 15938)
@@ -1,643 +1,645 @@
<?php
/**
* @version $Id$
* @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!');
class ReviewsEventHandler extends kDBEventHandler
{
/**
* Returns special of main item for linking with sub-item
*
* @param kEvent $event
* @return string
* @access protected
*/
protected function getMainSpecial(kEvent $event)
{
if ( $event->Special == 'product' && !$this->Application->isAdmin ) {
// rev.product should auto-link
return '';
}
return parent::getMainSpecial($event);
}
/**
* Checks REVIEW/REVIEW.PENDING permission by main object primary category (not current category)
*
* @param kEvent $event
* @return bool
* @access public
*/
public function CheckPermission(kEvent $event)
{
if ( $event->Name == 'OnAddReview' || $event->Name == 'OnCreate' ) {
$perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$parent_prefix = $event->getUnitConfig()->getParentPrefix();
$main_object = $this->Application->recallObject($parent_prefix);
/* @var $main_object kCatDBItem */
$perm_name = $this->getPermPrefix($event).'.REVIEW';
$res = $this->Application->CheckPermission($perm_name, 0, $main_object->GetDBField('CategoryId')) ||
$this->Application->CheckPermission($perm_name.'.PENDING', 0, $main_object->GetDBField('CategoryId'));
if ( !$res ) {
$event->status = kEvent::erPERM_FAIL;
}
return $res;
}
$check_events = Array (
'OnItemBuild', 'OnUpdate', /*'OnMassApprove', 'OnMassDecline'*/
);
$perm_category = $this->_getReviewCategory($event);
if ( in_array($event->Name, $check_events) ) {
// check for PRODUCT.VIEW permission
$perm_helper = $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$perm_prefix = $this->getPermPrefix($event);
if ( $perm_category === false ) {
// no item id present -> allow
return true;
}
switch ($event->Name) {
case 'OnItemBuild':
$res = $this->Application->CheckPermission($perm_prefix . '.VIEW', 0, $perm_category);
break;
case 'OnUpdate':
case 'OnMassApprove':
case 'OnMassDecline':
$res = $this->Application->CheckPermission($perm_prefix . '.ADD', 0, $perm_category) ||
$this->Application->CheckPermission($perm_prefix . '.MODIFY', 0, $perm_category);
break;
default:
$res = false;
break;
}
if ( !$res ) {
$event->status = kEvent::erPERM_FAIL;
}
return $res;
}
return parent::CheckPermission($event);
}
/**
* Returns primary category of review's main item
*
* @param kEvent $event
* @return int
*/
function _getReviewCategory($event)
{
$items_info = $this->Application->GetVar($event->getPrefixSpecial());
if ($items_info) {
// rev:PresetFormFields is used to initialize new review creation
list ($review_id, ) = each($items_info);
}
else {
// when adding new review in admin
$review_id = false;
}
if (!$review_id) {
return false;
}
$object = $event->getObject();
/* @var $object kDBItem */
// 1. get main item resource id (use object, because of temp tables in admin)
$sql = 'SELECT ItemId
FROM ' . $object->TableName . '
WHERE ' . $object->IDField . ' = ' . $review_id;
$resource_id = $this->Conn->GetOne($sql);
// 2. set main item id (for permission checks)
$parent_prefix = $event->getUnitConfig()->getParentPrefix();
$parent_config = $this->Application->getUnitConfig($parent_prefix);
$sql = 'SELECT ' . $parent_config->getIDField() .'
FROM ' . $parent_config->getTableName() .'
WHERE ResourceId = ' . $resource_id;
$this->Application->SetVar($parent_prefix . '_id', $this->Conn->GetOne($sql));
// 3. get main item category
$sql = 'SELECT CategoryId
FROM ' . $this->Application->getUnitConfig('ci')->getTableName() .'
WHERE ItemResourceId = ' . $resource_id .' AND PrimaryCat = 1';
return $this->Conn->GetOne($sql);
}
/**
* Returns prefix for permissions
*
* @param kEvent $event
*/
function getPermPrefix($event)
{
$main_prefix = $this->Application->GetTopmostPrefix($event->Prefix, true);
// this will return LINK for l, ARTICLE for n, TOPIC for bb, PRODUCT for p
return $this->Application->getUnitConfig($main_prefix)->getPermItemPrefix();
}
/**
* Apply any custom changes to list's sql query
*
* @param kEvent $event
* @access protected
* @see OnListBuild
*/
protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
$object = $event->getObject();
/* @var $object kDBList */
if ( !$this->Application->isAdminUser ) {
$object->addFilter('active', '%1$s.Status = ' . STATUS_ACTIVE);
}
switch ($event->Special) {
case 'showall':
$object->clearFilters();
break;
case 'item': // used ?
$object->clearFilters();
$parent_info = $object->getLinkedInfo();
$parent = $this->Application->recallObject($parent_info['ParentPrefix']);
/* @var $parent kDBItem */
$object->addFilter('item_reviews', '%1$s.ItemId = ' . $parent->GetDBField('ResourceId'));
break;
case 'products': // used in In-Portal (Structure & Data -> Reviews section)
$object->removeFilter('parent_filter'); // this is important
$object->addFilter('product_reviews', 'pr.ResourceId IS NOT NULL');
break;
}
if ( preg_match('/(.*)-rev/', $event->Prefix, $regs) ) {
// "Structure & Data" -> "Reviews" (section in K4)
$item_type = $this->Application->getUnitConfig($regs[1])->getItemType();
$object->addFilter('itemtype_filter', '%1$s.ItemType = ' . $item_type);
if ( $this->Application->isAdmin ) {
// temporarily solution so we can see sub-items on separate grid in Admin
$object->removeFilter('parent_filter');
}
}
if ( $event->getEventParam('type') == 'current_user' ) {
$object->addFilter('current_user', '%1$s.CreatedById = ' . $this->Application->RecallVar('user_id'));
$object->addFilter('current_ip', '%1$s.IPAddress = "' . $this->Application->getClientIp() . '"');
}
}
/**
* Adds review from front in case if user is logged in
*
* @param kEvent $event
*/
function OnAddReview($event)
{
$event->CallSubEvent('OnCreate');
}
/**
* Get new review status on user review permission
*
* @param kEvent $event
* @return int
*/
function getReviewStatus($event)
{
$parent_prefix = $event->getUnitConfig()->getParentPrefix();
$main_object = $this->Application->recallObject($parent_prefix);
/* @var $main_object kCatDBItem */
$ret = STATUS_DISABLED;
$perm_name = $this->getPermPrefix($event).'.REVIEW';
if ($this->Application->CheckPermission($perm_name, 0, $main_object->GetDBField('CategoryId'))) {
$ret = STATUS_ACTIVE;
}
else if ($this->Application->CheckPermission($perm_name.'.PENDING', 0, $main_object->GetDBField('CategoryId'))) {
$ret = STATUS_PENDING;
}
return $ret;
}
/**
* Prefills all fields on front-end
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
$object = $event->getObject();
/* @var $object kDBItem */
$parent_info = $object->getLinkedInfo();
$item_type = $this->Application->getUnitConfig($parent_info['ParentPrefix'])->getItemType();
$object->SetDBField('IPAddress', $this->Application->getClientIp());
$object->SetDBField('ItemType', $item_type);
$object->SetDBField('Module', $this->Application->findModule('Var', $parent_info['ParentPrefix'], 'Name'));
if ( $this->Application->isAdminUser ) {
// don't perform spam control on admin
return ;
}
$spam_helper = $this->Application->recallObject('SpamHelper');
/* @var $spam_helper SpamHelper */
$spam_helper->InitHelper($parent_info['ParentId'], 'Review', 0);
if ( $spam_helper->InSpamControl() ) {
$event->status = kEvent::erFAIL;
$object->SetError('ReviewText', 'too_frequent', 'lu_ferror_review_duplicate');
return;
}
$rating = $object->GetDBField('Rating');
if ( $rating < 1 || $rating > 5 ) {
$object->SetDBField('Rating', null);
}
$object->SetDBField('ItemId', $parent_info['ParentId']); // ResourceId
$object->SetDBField('CreatedById', $this->Application->RecallVar('user_id'));
$object->SetDBField('Status', $this->getReviewStatus($event));
$object->SetDBField('TextFormat', 0); // set plain text format directly
}
/**
* Sets correct rating value
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
$object = $event->getObject();
/* @var $object kDBItem */
$rating = $object->GetDBField('Rating');
if ( !$rating ) {
$object->SetDBField('Rating', null);
}
}
/**
* Updates item review counter
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
$this->updateSubitemCounters($event);
if ( !$this->Application->isAdminUser ) {
$spam_helper = $this->Application->recallObject('SpamHelper');
/* @var $spam_helper SpamHelper */
$object = $event->getObject();
/* @var $object kDBItem */
$parent_info = $object->getLinkedInfo();
$config_mapping = $event->getUnitConfig()->getConfigMapping();
$review_settings = $config_mapping['ReviewDelayValue'] . ':' . $config_mapping['ReviewDelayInterval'];
$spam_helper->InitHelper($parent_info['ParentId'], 'Review', $review_settings);
$spam_helper->AddToSpamControl();
$review_status = $object->GetDBField('Status');
if ( $review_status == STATUS_ACTIVE || $review_status == STATUS_PENDING ) {
+ $send_params = $object->getEmailParams();
$email_event = $this->getPermPrefix($event) . '.REVIEW.' . ($review_status == STATUS_ACTIVE ? 'ADD' : 'ADD.PENDING');
- $this->Application->emailUser($email_event, $object->GetDBField('CreatedById'));
- $this->Application->emailAdmin($email_event);
+
+ $this->Application->emailUser($email_event, $object->GetDBField('CreatedById'), $send_params);
+ $this->Application->emailAdmin($email_event, null, $send_params);
}
}
}
/**
* Updates item review counter
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
$this->updateSubitemCounters($event);
$object = $event->getObject();
/* @var $object kDBItem */
if ( $this->Application->isAdminUser && !$object->IsTempTable() ) {
// send email on review status change from reviews grid in admin
$review_status = $object->GetDBField('Status');
$process_status = Array (STATUS_ACTIVE, STATUS_DISABLED);
if ( ($review_status != $object->GetOriginalField('Status')) && in_array($review_status, $process_status) ) {
$this->_loadMainObject($event);
$email_event = $this->getPermPrefix($event) . '.REVIEW.' . ($review_status == STATUS_ACTIVE ? 'APPROVE' : 'DENY');
- $this->Application->emailUser($email_event, $object->GetDBField('CreatedById'));
+ $this->Application->emailUser($email_event, $object->GetDBField('CreatedById'), $object->getEmailParams());
}
}
}
/**
* Loads main object of review (link, article, etc.)
*
* @param kEvent $event
* @return kCatDBItem
*/
function _loadMainObject($event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$config = $event->getUnitConfig();
$parent_prefix = $config->getParentPrefix();
$main_object = $this->Application->recallObject($parent_prefix, null, Array ('skip_autoload' => true));
/* @var $main_object kDBItem */
$main_object->Load($object->GetDBField($config->getForeignKey()), $config->getParentTableKey());
}
/**
* Updates total review counter, cached rating, votes count
*
* @param kEvent $event
*/
function updateSubitemCounters($event)
{
if ( $event->Special == '-item' ) {
// ignore Main Item Copy/Pasting and Deleting
return;
}
$object = $event->getObject();
/* @var $object kDBItem */
$parent_prefix = $event->getUnitConfig()->getParentPrefix();
$parent_table = $this->Application->getUnitConfig($parent_prefix)->getTableName();
if ( $object->IsTempTable() ) {
$parent_table = $this->Application->GetTempName($parent_table, 'prefix:' . $object->Prefix);
}
$fields_hash = Array ('CachedReviewsQty' => 0, 'CachedRating' => 0, 'CachedVotesQty' => 0);
// 1. update review counter
$sql = 'SELECT COUNT(ReviewId)
FROM ' . $object->TableName . '
WHERE ItemId = ' . $object->GetDBField('ItemId');
$fields_hash['CachedReviewsQty'] = $this->Conn->GetOne($sql);
// 2. update votes counter + rating
$rating = $object->GetDBField('Rating');
$sql = 'SELECT CachedRating, CachedVotesQty
FROM ' . $parent_table . '
WHERE ResourceId = ' . $object->GetDBField('ItemId');
$parent_data = $this->Conn->GetRow($sql);
$avg_rating = $parent_data['CachedRating'];
$votes_count = $parent_data['CachedVotesQty'];
switch ($event->Name) {
case 'OnAfterItemCreate': // adding new review with rating
$this->changeRating($avg_rating, $votes_count, $rating, '+');
break;
case 'OnAfterItemDelete':
$this->changeRating($avg_rating, $votes_count, $rating, '-');
break;
case 'OnAfterItemUpdate':
$this->changeRating($avg_rating, $votes_count, $object->GetOriginalField('Rating'), '-');
$this->changeRating($avg_rating, $votes_count, $rating, '+');
break;
}
$fields_hash['CachedRating'] = "$avg_rating";
$fields_hash['CachedVotesQty'] = $votes_count;
$this->Conn->doUpdate($fields_hash, $parent_table, 'ResourceId = ' . $object->GetDBField('ItemId'));
}
/**
* Changes average rating and votes count based on requested operation
*
* @param float $avg_rating average rating before new vote
* @param int $votes_count votes count before new vote
* @param int $rating new vote (from 1 to 5)
* @param string $operation requested operation (+ / -)
*/
function changeRating(&$avg_rating, &$votes_count, $rating, $operation)
{
if ( $rating < 1 || $rating > 5 ) {
return;
}
if ( $operation == '+' ) {
$avg_rating = (($avg_rating * $votes_count) + $rating) / ($votes_count + 1);
++$votes_count;
}
else {
if ( $votes_count > 1 ) { // escape division by 0
$avg_rating = (($avg_rating * $votes_count) - $rating) / ($votes_count - 1);
}
else {
$avg_rating = (($avg_rating * $votes_count) - $rating) / 1;
}
--$votes_count;
}
}
/**
* Updates main item cached review counter
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
$this->updateSubitemCounters($event);
}
/**
* Creates review & redirect to confirmation template
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnCreate(kEvent $event)
{
parent::OnCreate($event);
if ( $event->status != kEvent::erSUCCESS || $this->Application->isAdmin ) {
return;
}
$object = $event->getObject();
/* @var $object kDBItem */
if ( $this->Application->GetVar('ajax') == 'yes' ) {
$ajax_form_helper = $this->Application->recallObject('AjaxFormHelper');
/* @var $ajax_form_helper AjaxFormHelper */
$params = Array ('status' => 'OK');
if ( $event->status != kEvent::erSUCCESS ) {
$ajax_form_helper->prepareJSONErrors($event, $params);
}
// let FormManager decide what template to show
$params['review_status'] = $object->GetDBField('Status');
$ajax_form_helper->sendResponse($event, $params);
}
else {
$event->SetRedirectParam('opener', 's');
$next_template = $object->GetDBField('Status') == STATUS_ACTIVE ? 'success_template' : 'success_pending_template';
$event->redirect = $this->Application->GetVar($next_template);
$parent_prefix = $event->getUnitConfig()->getParentPrefix();
$event->SetRedirectParam('pass', 'm,'.$parent_prefix);
}
}
/**
* Makes left join to item's table, when in separate grid
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterConfigRead(kEvent $event)
{
parent::OnAfterConfigRead($event);
if (preg_match('/(.*)-rev/', $event->Prefix, $regs) && $this->Application->prefixRegistred($regs[1])) {
// "Structure & Data" -> "Reviews" (section in K4)
$config = $event->getUnitConfig();
$item_config = $this->Application->getUnitConfig($regs[1]);
// 1. add join to items table (for "Structure & Data" -> "Reviews" section)
$item_table = $item_config->getTableName();
$ci_table = $this->Application->getUnitConfig('ci')->getTableName();
$list_sql = $config->getListSQLsBySpecial('');
$list_sql .= ' LEFT JOIN '.$item_table.' item_table ON item_table.ResourceId = %1$s.ItemId';
$list_sql .= ' LEFT JOIN '.$ci_table.' ci ON item_table.ResourceId = ci.ItemResourceId AND ci.PrimaryCat = 1';
$config->setListSQLsBySpecial('', $list_sql);
// 2. add calculated field
$config->addCalculatedFieldsBySpecial('', Array (
'CatalogItemName' => 'item_table.' . $this->getTitleField($regs[1]),
'CatalogItemId' => 'item_table.' . $item_config->getIDField(),
'CatalogItemCategory' => 'ci.CategoryId',
));
}
}
/**
* Convert TitleField field of kMultiLanguage formatter used for it
*
* @param string $prefix
* @return string
*/
function getTitleField($prefix)
{
$config = $this->Application->getUnitConfig($prefix);
$lang_prefix = 'l'.$this->Application->GetVar('m_lang').'_';
$title_field = $config->getTitleField();
$field_options = $config->getFieldByName($title_field);
$formatter_class = isset($field_options['formatter']) ? $field_options['formatter'] : '';
if ($formatter_class == 'kMultiLanguage' && !isset($field_options['master_field'])) {
$title_field = $lang_prefix.$title_field;
}
return $title_field;
}
/**
* Set's new perpage for Category Item Reviews (used on Front-end)
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnSetPerPage(kEvent $event)
{
parent::OnSetPerPage($event);
$parent_prefix = $event->getUnitConfig()->getParentPrefix();
$event->SetRedirectParam('pass', 'm,' . $event->getPrefixSpecial() . ',' . $parent_prefix);
}
}
\ No newline at end of file
Index: branches/5.3.x/core/units/forms/form_submissions/form_submissions_eh.php
===================================================================
--- branches/5.3.x/core/units/forms/form_submissions/form_submissions_eh.php (revision 15937)
+++ branches/5.3.x/core/units/forms/form_submissions/form_submissions_eh.php (revision 15938)
@@ -1,544 +1,544 @@
<?php
/**
* @version $Id$
* @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!');
class FormSubmissionsEventHandler extends kDBEventHandler {
/**
* Checks user permission to execute given $event
*
* @param kEvent $event
* @return bool
* @access public
*/
public function CheckPermission(kEvent $event)
{
if ( !$this->Application->isAdmin ) {
if ( $event->Name == 'OnCreate' ) {
// anybody can submit forms on front
return true;
}
}
$section = $event->getSection();
$form_id = $this->Application->GetVar('form_id');
$event->setEventParam('PermSection', $section . ':' . $form_id);
return parent::CheckPermission($event);
}
/**
* Always allow to view feedback form
*
* @return void
* @access protected
* @see kEventHandler::$permMapping
*/
protected function mapPermissions()
{
parent::mapPermissions();
$permissions = Array (
'OnItemBuild' => Array ('self' => true),
'OnEdit' => Array ('self' => 'view', 'subitem' => 'view'),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
/**
* Returns filter block based on field element type
*
* @param string $element_type
* @return string
*/
function _getFilterBlock($element_type)
{
$mapping = Array (
'text' => 'grid_like_filter',
'select' => 'grid_options_filter',
'radio' => 'grid_options_filter',
'checkbox' => 'grid_options_filter',
'password' => 'grid_like_filter',
'textarea' => 'grid_like_filter',
'label' => 'grid_like_filter',
'upload' => 'grid_empty_filter',
);
return $mapping[$element_type];
}
protected function OnBuildFormFields(kEvent $event)
{
$form_id = $this->Application->GetVar('form_id');
if ( !$form_id ) {
return;
}
$config = $event->getUnitConfig();
$helper = $this->Application->recallObject('InpCustomFieldsHelper');
/* @var $helper InpCustomFieldsHelper */
$sql = 'SELECT *
FROM ' . TABLE_PREFIX . 'FormFields
WHERE FormId = ' . (int)$form_id . '
ORDER BY Priority DESC';
$fields = $this->Conn->Query($sql, 'FormFieldId');
$use_options = Array ('radio', 'select', 'checkbox');
$check_visibility = $this->Application->LoggedIn() && !$this->Application->isAdminUser;
foreach ($fields as $field_id => $options) {
$field_visible = $check_visibility ? $options['Visibility'] == SubmissionFormField::VISIBILITY_EVERYONE : true;
$field_options = Array ('type' => 'string', 'default' => $options['DefaultValue']);
if ( $options['Required'] && $field_visible ) {
$field_options['required'] = 1;
}
if ( $options['Validation'] == 1 ) {
$field_options['formatter'] = 'kFormatter';
$field_options['regexp'] = '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i';
}
if ( $options['DisplayInGrid'] ) {
$title = $options['Prompt'];
if ( substr($title, 0, 1) == '+' ) {
$this->Application->Phrases->AddCachedPhrase('form_col_title' . $field_id, substr($title, 1));
$title = 'form_col_title' . $field_id;
}
$grid_field_options = Array (
'title' => $title, 'no_special' => 1, 'nl2br' => 1, 'first_chars' => 200,
'filter_block' => $this->_getFilterBlock($options['ElementType'])
);
if ( $options['ElementType'] == 'upload' ) {
$grid_field_options['data_block'] = 'grid_upload_td';
}
if ( $options['Validation'] == 1 ) {
$grid_field_options['data_block'] = 'grid_email_td';
}
$config->addGridFields('Default', $grid_field_options, 'fld_' . $field_id);
}
if ( $options['ElementType'] == 'checkbox' && !$options['ValueList'] ) {
// fix case, when user haven't defined any options for checkbox
$options['ValueList'] = '1=la_Yes||0=la_No';
}
if ( in_array($options['ElementType'], $use_options) && $options['ValueList'] ) {
// field type can have options and user have defined them too
$field_options['options'] = $helper->GetValuesHash($options['ValueList']);
$field_options['formatter'] = 'kOptionsFormatter';
}
if ( $options['ElementType'] == 'password' ) {
$field_options['formatter'] = 'kPasswordFormatter';
$field_options['hashing_method'] = PasswordHashingMethod::NONE;
$field_options['verify_field'] = 'fld_' . $field_id . '_verify';
}
if ( $options['ElementType'] == 'upload' ) {
$field_options['formatter'] = 'kUploadFormatter';
$field_options['upload_dir'] = WRITEBALE_BASE . DIRECTORY_SEPARATOR . 'user_files' . DIRECTORY_SEPARATOR . 'form_submissions';
if ( $options['UploadMaxSize'] ) {
$field_options['max_size'] = $options['UploadMaxSize'] * 1024; // convert Kbytes to bytes
}
if ( $options['UploadExtensions'] ) {
$field_options['file_types'] = '*.' . implode(';*.', explode(',', $options['UploadExtensions']));
}
}
$config->addFields($field_options, 'fld_' . $field_id);
}
}
/**
* Apply any custom changes to list's sql query
*
* @param kEvent $event
* @return void
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
protected function SetCustomQuery(kEvent $event)
{
parent::SetCustomQuery($event);
$object = $event->getObject();
/* @var $object kDBList */
$object->addFilter('form_filter', '%1$s.FormId = ' . (int)$this->Application->GetVar('form_id'));
}
/**
* Allows user to see it's last feedback form data
*
* @param kEvent $event
* @return int
* @access public
*/
public function getPassedID(kEvent $event)
{
if ( $event->Special == 'last' ) {
// allow user to see his last submitted form
return $this->Application->RecallVar('last_submission_id');
}
if ( $this->Application->isAdminUser ) {
// don't check ids in admin
return parent::getPassedID($event);
}
// no way to see other user's form submission by giving it's ID directly in url
return 0;
}
/**
* Creates new form submission from Front-End
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnCreate(kEvent $event)
{
parent::OnCreate($event);
if ( $event->status != kEvent::erSUCCESS ) {
return;
}
$object = $event->getObject();
/* @var $object kDBItem */
// allows user to view only it's last submission
$this->Application->StoreVar('last_submission_id', $object->GetID());
$form_submission_helper = $this->Application->recallObject('FormSubmissionHelper');
/* @var $form_submission_helper FormSubmissionHelper */
$form =& $form_submission_helper->getForm($object);
$notify_email = $form->GetDBField('SubmitNotifyEmail');
if ( $notify_email ) {
- $send_params = Array (
+ $send_params = $object->getEmailParams(Array (
'to_name' => $notify_email,
'to_email' => $notify_email,
- );
+ ));
$this->Application->emailAdmin('FORM.SUBMITTED', null, $send_params);
}
else {
- $this->Application->emailAdmin('FORM.SUBMITTED');
+ $this->Application->emailAdmin('FORM.SUBMITTED', null, $object->getEmailParams());
}
// $this->Application->emailUser('FORM.SUBMITTED', null, Array ('to_email' => ''));
$event->SetRedirectParam('opener', 's');
$event->SetRedirectParam('m_cat_id', 0);
$theme = $this->Application->recallObject('theme.current');
/* @var $theme kDBItem */
$template = htmlspecialchars_decode($this->Application->GetVar('success_template')); // kHTTPQuery do kUtil::escape() on everything on Front-End
$alias_template = $theme->GetField('TemplateAliases', $template);
$event->redirect = $alias_template ? $alias_template : $template;
}
/**
* Processes Captcha code
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
$object = $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('IPAddress', $this->Application->getClientIp());
if ( !$object->GetDBField('ReferrerURL') ) {
$referrer = $this->Application->GetVar('original_referrer');
if ( !$referrer ) {
$base_url = preg_quote($this->Application->BaseURL(), '/');
$referrer = preg_replace('/^' . $base_url . '/', '/', $_SERVER['HTTP_REFERER'], 1);
}
$object->SetDBField('ReferrerURL', $referrer);
}
$form_submission_helper = $this->Application->recallObject('FormSubmissionHelper');
/* @var $form_submission_helper FormSubmissionHelper */
$form =& $form_submission_helper->getForm($object);
// validate captcha code
if ( $form->GetDBField('UseSecurityImage') && !$this->Application->LoggedIn() ) {
$captcha_helper = $this->Application->recallObject('CaptchaHelper');
/* @var $captcha_helper kCaptchaHelper */
$captcha_helper->validateCode($event, false);
}
}
/**
* Checks, that target submission was selected for merging
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
$object = $event->getObject();
/* @var $object kDBItem */
$object->setRequired('MergeToSubmission', $object->GetDBField('IsMergeToSubmission'));
}
/**
* Passes form_id, when using "Prev"/"Next" toolbar buttons
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnPreSaveAndGo(kEvent $event)
{
parent::OnPreSaveAndGo($event);
if ( $event->status == kEvent::erSUCCESS ) {
$event->SetRedirectParam('pass', 'm,form,formsubs');
}
}
/**
* Saves edited item in temp table and goes
* to passed tabs, by redirecting to it with OnPreSave event
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnPreSaveAndGoToTab(kEvent $event)
{
parent::OnPreSaveAndGoToTab($event);
if ( $event->status == kEvent::erSUCCESS ) {
$event->SetRedirectParam('pass', 'm,form,formsubs');
}
}
/**
* Set's new per-page for grid
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnSetPerPage(kEvent $event)
{
parent::OnSetPerPage($event);
$event->SetRedirectParam('pass', 'm,form,' . $event->getPrefixSpecial());
}
/**
* Occurs when page is changed (only for hooking)
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnSetPage(kEvent $event)
{
parent::OnSetPage($event);
$event->SetRedirectParam('pass', 'm,form,' . $event->getPrefixSpecial());
}
/**
* Fills merge-to dropdown
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemLoad(kEvent $event)
{
parent::OnAfterItemLoad($event);
if ($event->Special == 'merge-to') {
return ;
}
$object = $event->getObject();
/* @var $object kDBItem */
$form_id = $object->GetDBField('FormId');
$email_field = $this->getFieldNameByRole($form_id, SubmissionFormField::COMMUNICATION_ROLE_EMAIL);
if (!$email_field) {
return ;
}
$merge_to = $this->Application->recallObject($event->Prefix . '.merge-to', null, Array ('skip_autoload' => true));
/* @var $merge_to kDBItem */
$sql = $merge_to->GetSelectSQL() . ' WHERE (FormId = ' . $form_id . ') AND (' . $email_field . ' = ' . $this->Conn->qstr( $object->GetDBField($email_field) ) . ')';
$submissions = $this->Conn->Query($sql, $object->IDField);
// remove this submission
unset($submissions[ $object->GetID() ]);
if (!$submissions) {
return ;
}
$options = Array ();
$name_field = $this->getFieldNameByRole($form_id, SubmissionFormField::COMMUNICATION_ROLE_NAME);
$subject_field = $this->getFieldNameByRole($form_id, SubmissionFormField::COMMUNICATION_ROLE_SUBJECT);
$language = $this->Application->recallObject('lang.current');
/* @var $language kDBItem */
$date_format = $language->GetDBField('DateFormat');
foreach ($submissions as $submission_id => $submission_data) {
$option_title = ''; // SenderName (email@address.com) - Subject (06/29/2010)
$merge_to->LoadFromHash($submission_data);
if ($name_field) {
$option_title = $merge_to->GetDBField($name_field) . ' (' . $merge_to->GetDBField($email_field) . ') - ';
}
else {
$option_title = $merge_to->GetDBField($email_field) . ' - ';
}
if ($subject_field) {
$option_title .= $merge_to->GetField($subject_field) . ' (' . $merge_to->GetField('SubmissionTime', $date_format) . ')';
}
else {
$option_title .= $merge_to->GetField('SubmissionTime', $date_format);
}
$options[$submission_id] = $option_title;
}
$object->SetFieldOption('MergeToSubmission', 'options', $options);
}
/**
* Returns submission field name based on given role
*
* @param int $form_id
* @param string $role
* @return string
* @see FormSubmissionHelper::getFieldByRole()
*/
function getFieldNameByRole($form_id, $role)
{
$form_submission_helper = $this->Application->recallObject('FormSubmissionHelper');
/* @var $form_submission_helper FormSubmissionHelper */
return $form_submission_helper->getFieldNameByRole($form_id, $role);
}
/**
* Performs submission merge
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnUpdate(kEvent $event)
{
parent::OnUpdate($event);
if ($event->status == kEvent::erSUCCESS) {
$object = $event->getObject();
/* @var $object kDBItem */
$merge_to = $object->GetDBField('MergeToSubmission');
if (!$merge_to) {
return ;
}
$form_id = $object->GetDBField('FormId');
$sql = 'SELECT *
FROM ' . TABLE_PREFIX . 'Forms
WHERE FormId = ' . $form_id;
$form_info = $this->Conn->GetRow($sql);
$reply = $this->Application->recallObject('submission-log.merge', null, Array ('skip_autoload' => true));
/* @var $reply kDBItem */
$email_field = $this->getFieldNameByRole($form_id, SubmissionFormField::COMMUNICATION_ROLE_EMAIL);
$subject_field = $this->getFieldNameByRole($form_id, SubmissionFormField::COMMUNICATION_ROLE_SUBJECT);
$body_field = $this->getFieldNameByRole($form_id, SubmissionFormField::COMMUNICATION_ROLE_BODY);
$reply->SetDBField('FormSubmissionId', $merge_to);
if ($email_field) {
$reply->SetDBField('FromEmail', $object->GetDBField($email_field));
}
$reply->SetDBField('ToEmail', $form_info['ReplyFromEmail']);
if ($subject_field) {
$reply->SetDBField('Subject', $object->GetDBField($subject_field));
}
if ($body_field) {
$reply->SetDBField('Message', $object->GetDBField($body_field));
}
$reply->SetDBField('SentOn_date', $object->GetDBField('SubmissionTime'));
$reply->SetDBField('SentOn_time', $object->GetDBField('SubmissionTime'));
$reply->SetDBField('MessageId', $object->GetDBField('MessageId'));
$reply->SetDBField('SentStatus', SUBMISSION_LOG_SENT);
// as if emails was really received via mailbox
$this->Application->SetVar('client_mode', 1);
if ($reply->Create()) {
// delete submission, since it was merged
$object->Delete();
}
}
}
}
\ No newline at end of file
Index: branches/5.3.x/core/units/forms/forms/forms_eh.php
===================================================================
--- branches/5.3.x/core/units/forms/forms/forms_eh.php (revision 15937)
+++ branches/5.3.x/core/units/forms/forms/forms_eh.php (revision 15938)
@@ -1,631 +1,631 @@
<?php
/**
* @version $Id$
* @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!');
class FormsEventHandler extends kDBEventHandler {
/**
* Allows to override standard permission mapping
*
* @return void
* @access protected
* @see kEventHandler::$permMapping
*/
protected function mapPermissions()
{
parent::mapPermissions();
$permissions = Array (
// user can view any form on front-end
'OnItemBuild' => Array ('self' => true),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
protected function OnCreateSubmissionNodes(kEvent $event)
{
if ( defined('IS_INSTALL') && IS_INSTALL ) {
// skip any processing, because Forms table doesn't exists until install is finished
return;
}
$forms = $this->getForms();
if ( !$forms ) {
return;
}
$form_subsection = Array (
'parent' => 'in-portal:forms',
'icon' => 'form_submission',
'label' => '',
'url' => Array ('t' => 'submissions/submissions_list', 'pass' => 'm,form'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 1,
'type' => stTREE,
);
$priority = 1;
$config = $event->getUnitConfig();
foreach ($forms as $form_id => $form_name) {
$this->Application->Phrases->AddCachedPhrase('form_sub_label_'.$form_id, $form_name);
$this->Application->Phrases->AddCachedPhrase('la_description_in-portal:submissions:'.$form_id, $form_name.' Submissions');
$form_subsection['label'] = 'form_sub_label_'.$form_id;
$form_subsection['url']['form_id'] = $form_id;
$form_subsection['priority'] = $priority++;
$config->addSections($form_subsection, 'in-portal:submissions:' . $form_id);
}
}
protected function getForms()
{
$cache_key = 'forms[%FormSerial%]';
$forms = $this->Application->getCache($cache_key);
if ( $forms === false ) {
$this->Conn->nextQueryCachable = true;
$sql = 'SELECT Title, FormId
FROM ' . TABLE_PREFIX . 'Forms
ORDER BY Title ASC';
$forms = $this->Conn->GetCol($sql, 'FormId');
$this->Application->setCache($cache_key, $forms);
}
return $forms;
}
/**
* Saves content of temp table into live and
* redirects to event' default redirect (normally grid template)
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnSave(kEvent $event)
{
parent::OnSave($event);
if ( $event->status == kEvent::erSUCCESS ) {
$this->OnCreateFormFields($event);
$this->_deleteSectionCache();
}
}
/**
* Deletes all selected items.
* Automatically recurse into sub-items using temp handler, and deletes sub-items
* by calling its Delete method if sub-item has AutoDelete set to true in its config file
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnMassDelete(kEvent $event)
{
parent::OnMassDelete($event);
if ( $event->status == kEvent::erSUCCESS ) {
$this->_deleteSectionCache();
}
}
function _deleteSectionCache()
{
$this->Application->HandleEvent(new kEvent('adm:OnResetSections'));
$this->Application->StoreVar('RefreshStructureTree', 1);
}
/**
* Dynamically fills custom data config
*
* @param kEvent $event
*/
function OnCreateFormFields($event)
{
$cur_fields = $this->Conn->Query('DESCRIBE '.TABLE_PREFIX.'FormSubmissions', 'Field');
$cur_fields = array_keys($cur_fields);
// keep all fields, that are not created on the fly (includes ones, that are added during customizations)
foreach ($cur_fields as $field_index => $field_name) {
if (!preg_match('/^fld_[\d]+/', $field_name)) {
unset($cur_fields[$field_index]);
}
}
$desired_fields = $this->Conn->GetCol('SELECT CONCAT(\'fld_\', FormFieldId) FROM '.TABLE_PREFIX.'FormFields ORDER BY FormFieldId');
$sql = array();
$fields_to_add = array_diff($desired_fields, $cur_fields);
foreach ($fields_to_add as $field) {
$field_expression = $field.' Text NULL';
$sql[] = 'ADD COLUMN '.$field_expression;
}
$fields_to_drop = array_diff($cur_fields, $desired_fields);
foreach ($fields_to_drop as $field) {
$sql[] = 'DROP COLUMN '.$field;
}
if ($sql) {
$query = 'ALTER TABLE '.TABLE_PREFIX.'FormSubmissions '.implode(', ', $sql);
$this->Conn->Query($query);
}
}
/**
* Enter description here...
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnFormSubmit($event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$fields = explode(',', $this->Application->GetVar('fields'));
$required_fields = explode(',', $this->Application->GetVar('required_fields'));
$fields_params = $this->Application->GetVar('fields_params');
$virtual_fields = $event->getUnitConfig()->getVirtualFields();
foreach ($fields as $field) {
$virtual_fields[$field] = Array ();
if ( in_array($field, $required_fields) ) {
$virtual_fields[$field]['required'] = 1;
}
$params = getArrayValue($fields_params, $field);
if ( $params !== false ) {
if ( getArrayValue($params, 'Type') == 'email' ) {
$virtual_fields[$field]['formatter'] = 'kFormatter';
$virtual_fields[$field]['regexp'] = '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i';
$virtual_fields[$field]['error_msgs'] = Array ('invalid_format' => '!la_invalid_email!');
}
if ( getArrayValue($params, 'Type') == 'file' ) {
$virtual_fields[$field]['formatter'] = 'kUploadFormatter';
$virtual_fields[$field]['upload_dir'] = '/uploads/sketches/';
}
}
}
$object->SetVirtualFields($virtual_fields);
$field_values = $this->getSubmittedFields($event);
$checkboxes = explode(',', $this->Application->GetVar('checkbox_fields')); // MailingList,In-Link,In-Newz,In-Bulletin
foreach ($checkboxes as $checkbox) {
if ( isset($field_values[$checkbox]) ) {
$field_values[$checkbox] = 1;
}
else {
$field_values[$checkbox] = '0';
}
}
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
$event->setEventParam('form_data', $field_values);
if ( $object->Validate() ) {
$event->redirect = $this->Application->GetVar('success_template');
- $this->Application->emailAdmin($this->Application->GetVar('email_event'));
- $send_params = Array (
+ $this->Application->emailAdmin($this->Application->GetVar('email_event'), null, $object->getEmailParams());
+
+ $send_params = $object->getEmailParams(Array (
'to_email' => $field_values[$this->Application->GetVar('email_field')],
'to_name' => $field_values[$this->Application->GetVar('name_field')]
- );
-
+ ));
$this->Application->emailUser($this->Application->GetVar('email_event'), null, $send_params);
if ( $field_values['MailingList'] ) {
$this->Application->StoreVar('SubscriberEmail', $field_values['Email']);
$this->Application->HandleEvent(new kEvent('u:OnSubscribeUser', Array ('no_unsubscribe' => 1)));
}
}
else {
$event->status = kEvent::erFAIL;
}
}
/**
* Don't use security image, when form requires login
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
$this->itemChanged($event);
}
/**
* Don't use security image, when form requires login
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
$this->itemChanged($event);
}
/**
* Occurs before item is changed
*
* @param kEvent $event
*/
function itemChanged($event)
{
$this->_validatePopSettings($event);
$this->_disableSecurityImage($event);
$this->_setRequired($event);
}
/**
* Validates POP3 settings (performs test connect)
*
* @param kEvent $event
*/
function _validatePopSettings($event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$modes = Array ('Reply', 'Bounce');
$fields = Array ('Server', 'Port', 'Username', 'Password');
$changed_fields = array_keys( $object->GetChangedFields() );
foreach ($modes as $mode) {
$set = true;
$changed = false;
foreach ($fields as $field) {
$value = $object->GetDBField($mode . $field);
if (strlen( trim($value) ) == 0) {
$set = false;
break;
}
if (!$changed && in_array($mode . $field, $changed_fields)) {
$changed = true;
}
}
if ($set && $changed) {
// fields are set and at least on of them is changed
$connection_info = Array ();
foreach ($fields as $field) {
$connection_info[ strtolower($field) ] = $object->GetDBField($mode . $field);
}
$pop3_helper = $this->Application->makeClass('POP3Helper', Array ($connection_info, 10));
/* @var $pop3_helper POP3Helper */
switch ( $pop3_helper->initMailbox(true) ) {
case 'socket':
$object->SetError($mode . 'Server', 'connection_failed');
break;
case 'login':
$object->SetError($mode . 'Username', 'login_failed');
break;
case 'list':
$object->SetError($mode . 'Server', 'message_listing_failed');
break;
}
}
}
}
/**
* Makes email communication fields required, when form uses email communication
*
* @param kEvent $event
*/
function _setRequired($event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$required = $object->GetDBField('EnableEmailCommunication');
$fields = Array (
'ReplyFromName', 'ReplyFromEmail', 'ReplyServer', 'ReplyPort', 'ReplyUsername', 'ReplyPassword',
);
if ($required && $object->GetDBField('BounceEmail')) {
$bounce_fields = Array ('BounceEmail', 'BounceServer', 'BouncePort', 'BounceUsername', 'BouncePassword');
$fields = array_merge($fields, $bounce_fields);
}
$object->setRequired($fields, $required);
}
/**
* Don't use security image, when form requires login
*
* @param kEvent $event
*/
function _disableSecurityImage($event)
{
$object = $event->getObject();
/* @var $object kDBItem */
if ($object->GetDBField('RequireLogin')) {
$object->SetDBField('UseSecurityImage', 0);
}
}
/**
* Queries pop3 server about new incoming mail
*
* @param kEvent $event
*/
function OnProcessReplies($event)
{
$this->_processMailbox($event, false);
}
/**
* Queries pop3 server about new incoming mail
*
* @param kEvent $event
*/
function OnProcessBouncedReplies($event)
{
$this->_processMailbox($event, true);
}
/**
* Queries pop3 server about new incoming mail
*
* @param kEvent $event
* @param bool $bounce_mode
*/
function _processMailbox($event, $bounce_mode = false)
{
$config = $event->getUnitConfig();
$this->Application->SetVar('client_mode', 1);
$sql = 'SELECT *
FROM ' . $config->getTableName() . '
WHERE EnableEmailCommunication = 1';
$forms = $this->Conn->Query($sql, $config->getIDField());
$mailbox_helper = $this->Application->recallObject('MailboxHelper');
/* @var $mailbox_helper MailboxHelper */
$field_prefix = $bounce_mode ? 'Bounce' : 'Reply';
foreach ($forms as $form_id => $form_info) {
$recipient_email = $bounce_mode ? $form_info['BounceEmail'] : $form_info['ReplyFromEmail'];
if ( !$recipient_email ) {
continue;
}
$mailbox_helper->process(
Array (
'server' => $form_info[$field_prefix . 'Server'],
'port' => $form_info[$field_prefix . 'Port'],
'username' => $form_info[$field_prefix . 'Username'],
'password' => $form_info[$field_prefix . 'Password']
),
Array (&$this, 'isValidRecipient'),
Array (&$this, 'processEmail'),
Array (
'recipient_email' => $recipient_email,
'bounce_mode' => $bounce_mode,
'form_info' => $form_info,
)
);
}
}
function isValidRecipient($params)
{
$mailbox_helper = $this->Application->recallObject('MailboxHelper');
/* @var $mailbox_helper MailboxHelper */
$recipients = $mailbox_helper->getRecipients();
$recipient_email = $params['recipient_email'];
$emails_found = preg_match_all('/((' . REGEX_EMAIL_USER . ')(@' . REGEX_EMAIL_DOMAIN . '))/i', $recipients, $all_emails);
if (is_array($all_emails)) {
for ($i = 0; $i < $emails_found; $i++) {
if ($all_emails[1][$i] == $recipient_email) {
// only read messages, that are addresses to submission reply email
return true;
}
}
}
// If this is a forwarded message - we drop all the other aliases and deliver only to the x-forward to address;
if (preg_match('/((' . REGEX_EMAIL_USER . ')(@' . REGEX_EMAIL_DOMAIN . '))/i', $mailbox_helper->headers['x-forward-to'], $get_to_email)) {
if ($get_to_email[1] == $recipient_email) {
// only read messages, that are addresses to submission reply email
return true;
}
}
return false;
}
function processEmail($params, &$fields_hash)
{
if ( $params['bounce_mode'] ) {
// mark original message as bounced
$mailbox_helper = $this->Application->recallObject('MailboxHelper');
/* @var $mailbox_helper MailboxHelper */
if ( !array_key_exists('attachments', $mailbox_helper->parsedMessage) ) {
// for now only parse bounces based on attachments, skip other bounce types
return false;
}
for ($i = 0; $i < count($mailbox_helper->parsedMessage['attachments']); $i++) {
$attachment =& $mailbox_helper->parsedMessage['attachments'][$i];
switch ( $attachment['headers']['content-type'] ) {
case 'message/delivery-status':
// save as BounceInfo
$mime_decode_helper = $this->Application->recallObject('MimeDecodeHelper');
/* @var $mime_decode_helper MimeDecodeHelper */
$charset = $mailbox_helper->parsedMessage[$fields_hash['MessageType']][0]['charset'];
$fields_hash['Message'] = $mime_decode_helper->convertEncoding($charset, $attachment['data']);
break;
case 'message/rfc822':
// undelivered message
$fields_hash['Subject'] = $attachment['filename2'] ? $attachment['filename2'] : $attachment['filename'];
break;
}
}
}
if ( !preg_match('/^(.*) #verify(.*)$/', $fields_hash['Subject'], $regs) ) {
// incorrect subject, no verification code
$form_info = $params['form_info'];
if ( $form_info['ProcessUnmatchedEmails'] && ($fields_hash['FromEmail'] != $params['recipient_email']) ) {
// it's requested to convert unmatched emails to new submissions
$form_id = $form_info['FormId'];
$this->Application->SetVar('form_id', $form_id);
$form_submission_config = $this->Application->getUnitConfig('formsubs');
$sql = 'SELECT ' . $form_submission_config->getIDField() . '
FROM ' . $form_submission_config->getTableName() . '
WHERE MessageId = ' . $this->Conn->qstr($fields_hash['MessageId']);
$found = $this->Conn->GetOne($sql);
if ( $found ) {
// don't process same message twice
return false;
}
$sql = 'SELECT *
FROM ' . TABLE_PREFIX . 'FormFields
WHERE (FormId = ' . $form_info['FormId'] . ') AND (EmailCommunicationRole > 0)';
$form_fields = $this->Conn->Query($sql, 'EmailCommunicationRole');
// what roles are filled from what fields
$role_mapping = Array (
SubmissionFormField::COMMUNICATION_ROLE_EMAIL => 'FromEmail',
SubmissionFormField::COMMUNICATION_ROLE_NAME => 'FromName',
SubmissionFormField::COMMUNICATION_ROLE_SUBJECT => 'Subject',
SubmissionFormField::COMMUNICATION_ROLE_BODY => 'Message',
);
$submission_fields = Array ();
foreach ($role_mapping as $role => $email_field) {
if ( array_key_exists($role, $form_fields) ) {
$submission_fields['fld_' . $form_fields[$role]['FormFieldId']] = $fields_hash[$email_field];
}
}
if ( $submission_fields ) {
// remove object, because it's linked to single form upon creation forever
$this->Application->removeObject('formsubs.-item');
$form_submission = $this->Application->recallObject('formsubs.-item', null, Array ('skip_autoload' => true));
/* @var $form_submission kDBItem */
// in case that other non-role mapped fields are required
$form_submission->IgnoreValidation = true;
$form_submission->SetDBFieldsFromHash($submission_fields);
$form_submission->SetDBField('FormId', $form_id);
$form_submission->SetDBField('MessageId', $fields_hash['MessageId']);
$form_submission->SetDBField('SubmissionTime_date', time());
$form_submission->SetDBField('SubmissionTime_time', time());
$form_submission->SetDBField('ReferrerURL', $this->Application->Phrase('la_Text_Email'));
return $form_submission->Create();
}
}
return false;
}
$submission_log_config = $this->Application->getUnitConfig('submission-log');
$sql = 'SELECT ' . $submission_log_config->getIDField() . '
FROM ' . $submission_log_config->getTableName() . '
WHERE MessageId = ' . $this->Conn->qstr($fields_hash['MessageId']);
$found = $this->Conn->GetOne($sql);
if ( $found ) {
// don't process same message twice
return false;
}
$reply_to = $this->Application->recallObject('submission-log.-reply-to', null, Array ('skip_autoload' => true));
/* @var $reply_to kDBItem */
$reply_to->Load($regs[2], 'VerifyCode');
if ( !$reply_to->isLoaded() ) {
// fake verification code OR feedback, containing submission log was deleted
return false;
}
if ( $params['bounce_mode'] ) {
// mark original message as bounced
$reply_to->SetDBField('BounceInfo', $fields_hash['Message']);
$reply_to->SetDBField('BounceDate_date', TIMENOW);
$reply_to->SetDBField('BounceDate_time', TIMENOW);
$reply_to->SetDBField('SentStatus', SUBMISSION_LOG_BOUNCE);
$reply_to->Update();
return true;
}
$reply = $this->Application->recallObject('submission-log.-reply', null, Array ('skip_autoload' => true));
/* @var $reply kDBItem */
$reply->SetDBFieldsFromHash($fields_hash);
$reply->SetDBField('ReplyTo', $reply_to->GetID());
$reply->SetDBField('FormSubmissionId', $reply_to->GetDBField('FormSubmissionId'));
$reply->SetDBField('ToEmail', $params['recipient_email']);
$reply->SetDBField('Subject', $regs[1]); // save subject without verification code
$reply->SetDBField('SentStatus', SUBMISSION_LOG_SENT);
return $reply->Create();
}
}
\ No newline at end of file
Index: branches/5.3.x/core/units/forms/submission_log/submission_log_eh.php
===================================================================
--- branches/5.3.x/core/units/forms/submission_log/submission_log_eh.php (revision 15937)
+++ branches/5.3.x/core/units/forms/submission_log/submission_log_eh.php (revision 15938)
@@ -1,686 +1,686 @@
<?php
/**
* @version $Id$
* @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!');
class SubmissionLogEventHandler extends kDBEventHandler {
/**
* Allows to override standard permission mapping
*
* @return void
* @access protected
* @see kEventHandler::$permMapping
*/
protected function mapPermissions()
{
parent::mapPermissions();
$permissions = Array (
'OnResendReply' => Array ('subitem' => 'add|edit'),
'OnSaveDraft' => Array ('subitem' => 'add|edit'),
'OnUseDraft' => Array ('subitem' => 'add|edit'),
'OnDeleteDraft' => Array ('subitem' => 'add|edit'),
'OnProcessBounceMail' => Array ('subitem' => true),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
/**
* Checks user permission to execute given $event
*
* @param kEvent $event
* @return bool
* @access public
*/
public function CheckPermission(kEvent $event)
{
$section = $event->getSection();
$form_id = $this->Application->GetVar('form_id');
if ( $form_id ) {
// copy form_id to env to be passed info upload links
$this->Application->SetVar($event->getPrefixSpecial() . '_form_id', $form_id);
}
else {
$form_id = $this->Application->GetVar($event->getPrefixSpecial() . '_form_id');
}
$event->setEventParam('PermSection', $section . ':' . $form_id);
return parent::CheckPermission($event);
}
/**
* Prepares new kDBItem object
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnNew(kEvent $event)
{
parent::OnNew($event);
$object = $event->getObject();
/* @var $object kDBItem */
$form_submission = $this->Application->recallObject('formsubs');
/* @var $form_submission kDBItem */
$form_submission_helper = $this->Application->recallObject('FormSubmissionHelper');
/* @var $form_submission_helper FormSubmissionHelper */
$form =& $form_submission_helper->getForm($form_submission);
/* @var $form kDBItem */
$from_email = $form->GetDBField('ReplyFromEmail');
$to_email = $form_submission_helper->getFieldByRole($form_submission, SubmissionFormField::COMMUNICATION_ROLE_EMAIL);
if ( $this->Application->GetVar('client_mode') ) {
// debug code for sending email from client
$object->SetDBField('FromEmail', $to_email);
$object->SetDBField('ToEmail', $from_email);
}
else {
$object->SetDBField('FromEmail', $from_email);
$object->SetDBField('ToEmail', $to_email);
}
$object->SetDBField('Cc', $form->GetDBField('ReplyCc'));
$object->SetDBField('Bcc', $form->GetDBField('ReplyBcc'));
$ids = $this->StoreSelectedIDs($event);
if ( $ids ) {
$org_message = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
/* @var $org_message kDBItem */
$org_message->Load(array_shift($ids));
// client could reply from different email, so compare to admin email!
if ( $org_message->GetDBField('ToEmail') == $from_email ) {
// can reply only to client email, not own :)
// transform subject
$message_subject = $org_message->GetDBField('Subject');
if ( $message_subject ) {
$object->SetDBField('Subject', $this->_transformSubject($message_subject, 'Re'));
}
// add signature
$message_body = $form->GetDBField('ReplyMessageSignature');
if ( $org_message->GetDBField('Message') ) {
// add replied marks
$message_body .= '> ' . preg_replace('/([\r]*\n)/', '\\1> ', $org_message->GetDBField('Message'));
}
$object->SetDBField('ToEmail', $org_message->GetDBField('FromEmail')); // user client's email from reply
$object->SetDBField('Message', $message_body);
$object->SetDBField('ReplyTo', $org_message->GetID());
}
}
else {
$sql = 'SELECT COUNT(*)
FROM ' . $object->TableName . '
WHERE FormSubmissionId = ' . $form_submission->GetID();
$replies_found = $this->Conn->GetOne($sql);
if ( !$replies_found ) {
// 1st message from admin -> quote subject & text from feedback
$message_subject = $form_submission_helper->getFieldByRole($form_submission, SubmissionFormField::COMMUNICATION_ROLE_SUBJECT, true);
if ( $message_subject ) {
$object->SetDBField('Subject', $this->_transformSubject($message_subject, 'Re'));
}
// add signature
$message_body = $form->GetDBField('ReplyMessageSignature');
// add replied marks
$original_message_body = $form_submission_helper->getFieldByRole($form_submission, SubmissionFormField::COMMUNICATION_ROLE_BODY);
if ( $original_message_body ) {
$message_body .= '> ' . preg_replace('/([\r]*\n)/', '\\1> ', $original_message_body);
}
$object->SetDBField('Message', $message_body);
}
}
$this->clearSelectedIDs($event);
}
/**
* Parses $search string in subject and reformats it
* Used for replying and forwarding
*
* @param string $subject
* @param string $search
* @return string
*/
function _transformSubject($subject, $search = 'Re')
{
$regex = '/'.$search.'(\[([\d]+)\]){0,1}:/i';
preg_match_all($regex, $subject, $regs);
if ($regs[2]) {
$reply_count = 0; // reply count without numbers (equals to "re[1]")
$max_reply_number = 0; // maximal reply number
sort($regs[2], SORT_NUMERIC); // sort ascending (non-numeric replies first)
foreach ($regs[2] as $match) {
if (!$match) {
// found "re:"
$reply_count++;
}
elseif ($match > $max_reply) {
// found "re:[number]"
$max_reply_number = $match;
}
}
return $search.'['.($reply_count + $max_reply_number + 1).']: '.trim(preg_replace($regex, '', $subject));
}
return $search.': '.$subject;
}
/**
* Resends reply, that was not sent last time
*
* @param kEvent $event
*/
function OnResendReply($event)
{
$ids = $this->StoreSelectedIDs($event);
if (!$ids) {
return ;
}
$object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$sql = 'SELECT f.ReplyFromEmail, sl.' . $object->IDField . '
FROM ' . $object->TableName . ' sl
JOIN ' . $this->Application->getUnitConfig('formsubs')->getTableName() . ' fs ON fs.FormSubmissionId = sl.FormSubmissionId
JOIN ' . $this->Application->getUnitConfig('form')->getTableName() . ' f ON f.FormId = fs.FormId
WHERE sl.' . $object->IDField . ' IN (' . implode(',', $ids) . ')';
$reply_emails = $this->Conn->GetCol($sql, $object->IDField);
foreach ($ids as $id) {
$object->Load($id);
// allow to send messages, that were successfully sended before :(
if (($object->GetDBField('ToEmail') != $reply_emails[$id]) && ($object->GetDBField('SentStatus') != SUBMISSION_LOG_SENT)) {
$object->SetOriginalField('SentStatus', 0); // reset sent status to update sent date automatically
$this->_sendEmail($object); // resend email here
}
}
$this->clearSelectedIDs($event);
if (!$this->Application->GetVar('from_list')) {
$event->SetRedirectParam('opener', 'u');
}
}
/**
* Updates last operation dates for log record
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
$this->_validateRecipients($event);
$this->_updateStatusDates($event);
}
/**
* Updates last operation dates for log record
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
$this->_validateRecipients($event);
$this->_updateStatusDates($event);
}
/**
* Validates email recipients
*
* @param kEvent $event
*/
function _validateRecipients($event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$esender = $this->Application->recallObject('EmailSender');
/* @var $esender kEmailSendingHelper */
$cc = $object->GetDBField('Cc');
if ($cc && ($esender->GetRecipients($cc) === false)) {
$object->SetError('Cc', 'invalid_format');
}
$bcc = $object->GetDBField('Bcc');
if ($bcc && ($esender->GetRecipients($bcc) === false)) {
$object->SetError('Bcc', 'invalid_format');
}
}
/**
* Generates verification code and sets it inside sent message
*
* @param kDBItem $object
* @return string
*/
function _generateVerificationCode(&$object)
{
$code = Array (
$object->GetDBField('FromEmail'),
$object->GetDBField('ToEmail'),
$object->GetID(),
microtime(true)
);
$object->SetDBField('VerifyCode', md5( implode('-', $code) ));
}
/**
* Sends email based on fields from given submission-log record
*
* @param kDBItem $object
*/
function _sendEmail(&$object)
{
if ($this->Application->GetVar('client_mode')) {
return ;
}
if (!$object->GetDBField('VerifyCode')) {
$this->_generateVerificationCode($object);
}
$form_submission_helper = $this->Application->recallObject('FormSubmissionHelper');
/* @var $form_submission_helper FormSubmissionHelper */
$form_submission = $form_submission_helper->getSubmissionFromLog($object);
$form =& $form_submission_helper->getForm($form_submission);
$send_params = Array (
'from_name' => $form->GetDBField('ReplyFromName'),
'from_email' => $object->GetDBField('FromEmail'),
'to_email' => $object->GetDBField('ToEmail'),
'subject' => $object->GetDBField('Subject'),
'message' => $object->GetDBField('Message'),
);
$to_name = $form_submission_helper->getFieldByRole($form_submission, SubmissionFormField::COMMUNICATION_ROLE_NAME);
if ($to_name) {
$send_params['to_name'] = $to_name;
}
$esender = $this->Application->recallObject('EmailSender');
/* @var $esender kEmailSendingHelper */
$esender->SetReturnPath( $form->GetDBField('BounceEmail') );
if ($object->GetDBField('Cc')) {
$recipients = $esender->GetRecipients( $object->GetDBField('Cc') );
foreach ($recipients as $recipient_info) {
$esender->AddCc($recipient_info['Email'], $recipient_info['Name']);
}
}
if ($object->GetDBField('Bcc')) {
$recipients = $esender->GetRecipients( $object->GetDBField('Bcc') );
foreach ($recipients as $recipient_info) {
$esender->AddBcc($recipient_info['Email'], $recipient_info['Name']);
}
}
if ($object->GetDBField('Attachment')) {
$attachments = explode('|', $object->GetField('Attachment', 'file_paths'));
foreach ($attachments as $attachment) {
$esender->AddAttachment($attachment);
}
}
- $this->Application->emailAdmin('FORM.SUBMISSION.REPLY.TO.USER', null, $send_params);
+ $this->Application->emailAdmin('FORM.SUBMISSION.REPLY.TO.USER', null, $object->getEmailParams($send_params));
// mark as sent after sending is finished
$object->SetDBField('SentStatus', SUBMISSION_LOG_SENT);
// reset bounce status before (re-)sending
$object->SetDBField('BounceInfo', NULL);
$object->SetDBField('BounceDate_date', NULL);
$object->SetDBField('BounceDate_time', NULL);
if ($object->GetDBField('DraftId')) {
$temp_handler = $this->Application->recallObject('draft_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems('draft', '', Array ($object->GetDBField('DraftId')));
$object->SetDBField('DraftId', 0);
}
$object->Update();
}
/**
* Sends new email after log record was created
* Updates last update time for submission
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
$object = $event->getObject();
/* @var $object kDBItem */
$this->_sendEmail($object); // send email
$this->_updateSubmission($event);
$reply_to = $object->GetDBField('ReplyTo');
if ( !$reply_to ) {
$reply_to = $this->_getLastMessageId($event, !$this->Application->GetVar('client_mode'));
}
if ( $reply_to ) {
// this is reply to other message -> mark it as replied
$org_message = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
/* @var $org_message kDBItem */
$org_message->Load($reply_to);
$org_message->SetDBField('ReplyStatus', SUBMISSION_LOG_REPLIED);
$org_message->Update();
}
if ( $this->Application->GetVar('client_mode') ) {
// new reply from client received -> send notification about it
- $this->Application->emailAdmin('FORM.SUBMISSION.REPLY.FROM.USER');
+ $this->Application->emailAdmin('FORM.SUBMISSION.REPLY.FROM.USER', null, $object->getEmailParams());
}
}
/**
* Returns last message id (client OR admin)
*
* @param kEvent $event
* @param bool $from_client
* @return int
*/
function _getLastMessageId($event, $from_client = false)
{
$object = $event->getObject();
/* @var $object kDBItem */
$form_submission_helper = $this->Application->recallObject('FormSubmissionHelper');
/* @var $form_submission_helper FormSubmissionHelper */
$form_submission = $form_submission_helper->getSubmissionFromLog($object);
$form =& $form_submission_helper->getForm($form_submission);
$reply_email = $form->GetDBField('ReplyFromEmail');
$sql = 'SELECT MAX(' . $object->IDField . ')
FROM ' . $object->TableName . '
WHERE (FormSubmissionId = ' . $form_submission->GetID() . ') AND (ToEmail' . ($from_client ? ' = ' : ' <> ') . $this->Conn->qstr($reply_email) . ')';
return $this->Conn->GetOne($sql);
}
/**
* Updates last update time for submission
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
$this->_updateSubmission($event);
$object = $event->getObject();
/* @var $object kDBItem */
// send out email event to admin for bouncing
$sent_status = $object->GetDBField('SentStatus');
if ( $object->GetOriginalField('SentStatus') != $sent_status && $sent_status == SUBMISSION_LOG_BOUNCE ) {
- $this->Application->emailAdmin('FORM.SUBMISSION.REPLY.FROM.USER.BOUNCED');
+ $this->Application->emailAdmin('FORM.SUBMISSION.REPLY.FROM.USER.BOUNCED', null, $object->getEmailParams());
}
}
/**
* Sets last sent/reply dates based on field changes in log record
*
* @param kEvent $event
*/
function _updateStatusDates($event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$now = time();
$sent_status = $object->GetDBField('SentStatus');
if (($event->Special != 'merge') && ($sent_status == SUBMISSION_LOG_SENT) && ($sent_status != $object->GetOriginalField('SentStatus'))) {
// sent status was set
$object->SetDBField('SentOn_date', $now);
$object->SetDBField('SentOn_time', $now);
}
$reply_status = $object->GetDBField('ReplyStatus');
if (($reply_status == SUBMISSION_LOG_REPLIED) && ($reply_status != $object->GetOriginalField('ReplyStatus'))) {
// sent status was set
$object->SetDBField('RepliedOn_date', $now);
$object->SetDBField('RepliedOn_time', $now);
}
}
/**
* Sets last updated field for form submission
*
* @param kEvent $event
*/
function _updateSubmission($event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$form_submission_helper = $this->Application->recallObject('FormSubmissionHelper');
/* @var $form_submission_helper FormSubmissionHelper */
$form_submission = $form_submission_helper->getSubmissionFromLog($object);
// 1. set last updated
$last_updated = max ($object->GetDBField('SentOn'), $object->GetDBField('RepliedOn'));
if ($form_submission->GetDBField('LastUpdatedOn') < $last_updated) {
// don't set smaller last update, that currenly set
$form_submission->SetDBField('LastUpdatedOn_date', $last_updated);
$form_submission->SetDBField('LastUpdatedOn_time', $last_updated);
}
// 2. update submission status
$form =& $form_submission_helper->getForm($form_submission);
$client_responce = $form->GetDBField('ReplyFromEmail') == $object->GetDBField('ToEmail');
$replied = $object->GetDBField('ReplyStatus') == SUBMISSION_LOG_REPLIED;
if (!$client_responce && !$replied) {
// admin sends new email to client
$form_submission->SetDBField('LogStatus', SUBMISSION_REPLIED);
}
elseif ($client_responce) {
// client email becomes replied OR receiving new unreplied email from client
$form_submission->SetDBField('LogStatus', $replied ? SUBMISSION_REPLIED : SUBMISSION_NEW_EMAIL);
}
if ($object->GetDBField('SentStatus') == SUBMISSION_LOG_BOUNCE) {
// propagate bounce status from reply
$form_submission->SetDBField('LogStatus', SUBMISSION_BOUNCE);
}
$form_submission->Update();
}
/**
* Saves current unsent message as draft
*
* @param kEvent $event
*/
function OnSaveDraft($event)
{
$object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$draft = $this->Application->recallObject('draft', null, Array('skip_autoload' => true));
/* @var $draft kDBItem */
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if ($items_info) {
foreach ($items_info as $id => $field_values) {
$object->setID($id);
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
$load_keys = Array (
'FormSubmissionId' => $object->GetDBField('FormSubmissionId'),
'CreatedById' => $this->Application->RecallVar('user_id'),
);
// get existing draft for given submission and user
$draft->Load($load_keys);
$draft->SetDBField('Message', $object->GetDBField('Message'));
if ($draft->isLoaded()) {
$draft->Update();
}
else {
$draft->SetDBFieldsFromHash($load_keys);
$draft->Create();
}
}
}
$this->Application->SetVar($event->getPrefixSpecial() . '_SaveEvent', 'OnCreate');
$event->SetRedirectParam('opener', 'u');
}
/**
* Uses found draft instead of submission reply body
*
* @param kEvent $event
*/
function OnUseDraft($event)
{
$object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$draft = $this->Application->recallObject('draft', null, Array('skip_autoload' => true));
/* @var $draft kDBItem */
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if ($items_info) {
foreach ($items_info as $id => $field_values) {
$object->setID($id);
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
$load_keys = Array (
'FormSubmissionId' => $object->GetDBField('FormSubmissionId'),
'CreatedById' => $this->Application->RecallVar('user_id'),
);
// get existing draft for given submission and user
$draft->Load($load_keys);
if ($draft->isLoaded()) {
$object->SetDBField('Message', $draft->GetDBField('Message'));
$object->SetDBField('DraftId', $draft->GetID());
}
}
}
$this->Application->SetVar($event->getPrefixSpecial() . '_SaveEvent', 'OnCreate');
$event->redirect = false;
}
/**
* Deletes draft, that matches given user and form submission
*
* @param kEvent $event
*/
function OnDeleteDraft($event)
{
$object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$draft = $this->Application->recallObject('draft', null, Array('skip_autoload' => true));
/* @var $draft kDBItem */
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if ($items_info) {
foreach ($items_info as $id => $field_values) {
$object->setID($id);
$object->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
$object->SetDBField('DraftId', 0);
$load_keys = Array (
'FormSubmissionId' => $object->GetDBField('FormSubmissionId'),
'CreatedById' => $this->Application->RecallVar('user_id'),
);
// get existing draft for given submission and user
$draft->Load($load_keys);
if ($draft->isLoaded()) {
$temp_handler = $this->Application->recallObject('draft_TempHandler', 'kTempTablesHandler', Array ('parent_event' => $event));
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems('draft', '', Array ($draft->GetID()));
}
}
}
$this->Application->SetVar($event->getPrefixSpecial() . '_SaveEvent', 'OnCreate');
$event->redirect = false;
}
}
\ No newline at end of file
Index: branches/5.3.x/core/units/spam_reports/spam_report_eh.php
===================================================================
--- branches/5.3.x/core/units/spam_reports/spam_report_eh.php (revision 15937)
+++ branches/5.3.x/core/units/spam_reports/spam_report_eh.php (revision 15938)
@@ -1,147 +1,147 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @copyright Copyright (C) 1997 - 2011 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!');
class SpamReportEventHandler extends kDBEventHandler {
/**
* Allows to override standard permission mapping
*
* @return void
* @access protected
* @see kEventHandler::$permMapping
*/
protected function mapPermissions()
{
parent::mapPermissions();
$permissions = Array (
'OnNewReport' => Array ('self' => true),
'OnDeleteAssocItem' => Array ('self' => 'delete'),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
/**
* Checks permissions
*
* @param kEvent $event
*/
// function CheckPermission($event)
// {
// if ( $event->Name == 'OnNewReport' ) {
// $perm_helper = $this->Application->recallObject('PermissionsHelper');
// /* @var $perm_helper kPermissionsHelper */
//
// return $perm_helper->finalizePermissionCheck($event, $this->Application->LoggedIn());
// }
//
// return parent::CheckPermission($event);
// }
/**
* Prefills missing fields
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
$object = $event->getObject();
/* @var $object kDBItem */
$item_prefix = $this->Application->GetVar('item_prefix');
$item_id = $this->Application->GetVar($item_prefix . '_id');
if ( $item_id ) {
$object->SetDBField('ItemPrefix', $item_prefix);
$object->SetDBField('ItemId', $item_id);
}
$object->SetDBField('ReportedById', $this->Application->RecallVar('user_id'));
}
/**
* Send e-mail after new spam report was created
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemCreate(kEvent $event)
{
parent::OnAfterItemCreate($event);
$object = $event->getObject();
/* @var $object kDBItem */
$item_prefix = $object->GetDBField('ItemPrefix');
if ( preg_match('/rev$/', $item_prefix) ) {
$item = $this->Application->recallObject($item_prefix);
/* @var $item kDBItem */
$object->SetDBField('ItemName', $item->GetDBField('ReviewText'));
}
- $this->Application->emailAdmin('SPAM.REPORT');
+ $this->Application->emailAdmin('SPAM.REPORT', null, $object->getEmailParams());
}
/**
* Sends new spam report
*
* @param kEvent $event
*/
function OnNewReport($event)
{
$ajax_form_helper = $this->Application->recallObject('AjaxFormHelper');
/* @var $ajax_form_helper AjaxFormHelper */
$ajax_form_helper->transitEvent($event, 'OnCreate');
}
/**
* Deletes item, associated with given spam report
*
* @param kEvent $event
*/
function OnDeleteAssocItem($event)
{
$temp_handlers = Array ();
$ids = $this->StoreSelectedIDs($event);
$object = $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
foreach ($ids as $id) {
$object->Load($id);
$item_prefix = $object->GetDBField('ItemPrefix');
if ( !isset($temp_handlers[$item_prefix]) ) {
$temp_handlers[$item_prefix] = $this->Application->recallObject($item_prefix . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => $event));
}
$temp_handlers[$item_prefix]->DeleteItems($item_prefix, '', Array ($object->GetDBField('ItemId')));
}
$this->clearSelectedIDs($event);
$event->SetRedirectParam('opener', 'u');
}
}
\ No newline at end of file
Index: branches/5.3.x/core/admin_templates/logs/email_logs/email_log_edit.tpl
===================================================================
--- branches/5.3.x/core/admin_templates/logs/email_logs/email_log_edit.tpl (revision 15937)
+++ branches/5.3.x/core/admin_templates/logs/email_logs/email_log_edit.tpl (revision 15938)
@@ -1,103 +1,109 @@
<inp2:adm_SetPopupSize width="950" height="700"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:emaillog" prefix="email-log" title_preset="email_log_edit"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
<inp2:m_RenderElement design="toolbar_button" icon="cancel" title="la_ToolTip_Close">
submit_event('email-log', 'OnGoBack');
</inp2:m_RenderElement>
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
<inp2:m_RenderElement design="toolbar_button" icon="prev" title="la_ToolTip_Prev">
go_to_id('email-log', '<inp2:email-log_PrevId/>');
</inp2:m_RenderElement>
<inp2:m_RenderElement design="toolbar_button" icon="next" title="la_ToolTip_Next">
go_to_id('email-log', '<inp2:email-log_NextId/>');
</inp2:m_RenderElement>
a_toolbar.Render();
<inp2:m_if check="email-log_IsSingle">
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="email-log_IsLast">a_toolbar.DisableButton('next');</inp2:m_if>
<inp2:m_if check="email-log_IsFirst">a_toolbar.DisableButton('prev');</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:email-log_SaveWarning name="grid_save_warning"/>
<inp2:email-log_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="inp_id_label" prefix="email-log" field="EmailLogId" title="la_fld_Id"/>
<inp2:m_if check="email-log_Field" name="TemplateName" db="db">
<inp2:m_RenderElement name="inp_label" prefix="email-log" field="TemplateName"/>
<inp2:m_RenderElement name="inp_label" prefix="email-log" field="EventType" title="la_fld_Type"/>
</inp2:m_if>
<inp2:m_RenderElement name="inp_label" prefix="email-log" field="From" title="la_fld_Sender"/>
<inp2:m_RenderElement name="inp_label" prefix="email-log" field="To" title="la_fld_Recipient"/>
<inp2:m_DefineElement name="recipient_element">
<inp2:m_Param name="recipient_name"/> &lt;<inp2:m_Param name="recipient_email"/>&gt;
<inp2:m_ifnot check="m_Param" name="is_last">; </inp2:m_ifnot>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="recipient_type_element">
<strong><inp2:RecipientType/>:</strong> <inp2:RecipientsByType render_as="recipient_element" strip_nl="2"/>
</inp2:m_DefineElement>
<inp2:m_RenderElement design="form_row" prefix="email-log" field="OtherRecipients">
<td class="control-cell" valign="top">
<inp2:$prefix_PrintOtherRecipients render_as="recipient_type_element"/>
</td>
</inp2:m_RenderElement>
<inp2:m_RenderElement name="inp_label" prefix="email-log" field="Subject"/>
<inp2:m_RenderElement design="form_row" prefix="email-log" field="HtmlBody" title="la_fld_HtmlVersion">
<td class="control-cell" valign="top">
<iframe src="<inp2:m_Link {$prefix}_event='OnGetHtmlBody' pass='m,$prefix'/>" style="border: 1px solid black;" width="640" height="250" align="left">
You browser doesn't support frames!
</iframe>
</td>
</inp2:m_RenderElement>
<inp2:m_RenderElement design="form_row" prefix="email-log" field="TextBody" title="la_fld_TextVersion">
<td class="control-cell" valign="top">
<div class="highlight-area" style="width: 624px; height: 234px;">
<inp2:$prefix_Field name="$field" nl2br="1"/>
</div>
</td>
</inp2:m_RenderElement>
<inp2:m_RenderElement name="inp_label" prefix="email-log" field="SentOn"/>
+ <inp2:m_RenderElement name="inp_label" prefix="email-log" field="ToUser" title="la_fld_RecipientUser"/>
+
+ <inp2:m_if check="email-log_Field" name="ItemId" db="db">
+ <inp2:m_RenderElement name="inp_label" prefix="email-log" field="ItemPrefix" no_special="no_special"/>
+ <inp2:m_RenderElement name="inp_label" prefix="email-log" field="ItemId"/>
+ </inp2:m_if>
<!--##
<inp2:m_RenderElement name="inp_label" prefix="email-log" field="EventParams"/>
<inp2:m_RenderElement name="inp_label" prefix="email-log" field="AccessKey"/>
##-->
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.3.x/core/install/install_schema.sql
===================================================================
--- branches/5.3.x/core/install/install_schema.sql (revision 15937)
+++ branches/5.3.x/core/install/install_schema.sql (revision 15938)
@@ -1,1439 +1,1442 @@
CREATE TABLE CategoryPermissionsConfig (
PermissionConfigId int(11) NOT NULL auto_increment,
PermissionName varchar(255) NOT NULL default '',
Description varchar(255) NOT NULL default '',
ModuleId varchar(20) NOT NULL default '0',
IsSystem tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (PermissionConfigId),
KEY PermissionName (PermissionName)
);
CREATE TABLE Permissions (
PermissionId int(11) NOT NULL auto_increment,
Permission varchar(255) NOT NULL default '',
GroupId int(11) default '0',
PermissionValue int(11) NOT NULL default '0',
`Type` tinyint(4) NOT NULL default '0',
CatId int(11) NOT NULL default '0',
PRIMARY KEY (PermissionId),
UNIQUE KEY PermIndex (Permission,GroupId,CatId,`Type`)
);
CREATE TABLE CustomFields (
CustomFieldId int(11) NOT NULL auto_increment,
`Type` int(11) NOT NULL default '0',
FieldName varchar(255) NOT NULL default '',
FieldLabel varchar(40) default NULL,
MultiLingual tinyint(3) unsigned NOT NULL default '1',
Heading varchar(60) default NULL,
Prompt varchar(60) default NULL,
ElementType varchar(50) NOT NULL default '',
ValueList text,
DefaultValue varchar(255) NOT NULL default '',
DisplayOrder int(11) NOT NULL default '0',
OnGeneralTab tinyint(4) NOT NULL default '0',
IsSystem tinyint(3) unsigned NOT NULL default '0',
IsRequired tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (CustomFieldId),
KEY `Type` (`Type`),
KEY MultiLingual (MultiLingual),
KEY DisplayOrder (DisplayOrder),
KEY OnGeneralTab (OnGeneralTab),
KEY IsSystem (IsSystem),
KEY DefaultValue (DefaultValue)
);
CREATE TABLE SystemSettings (
VariableId int(11) NOT NULL AUTO_INCREMENT,
VariableName varchar(255) NOT NULL DEFAULT '',
VariableValue text,
ModuleOwner varchar(20) DEFAULT 'In-Portal',
Section varchar(255) NOT NULL DEFAULT '',
Heading varchar(255) NOT NULL DEFAULT '',
Prompt varchar(255) NOT NULL DEFAULT '',
ElementType varchar(255) NOT NULL DEFAULT '',
Validation text,
ValueList text,
DisplayOrder double NOT NULL DEFAULT '0',
GroupDisplayOrder double NOT NULL DEFAULT '0',
`Install` int(11) NOT NULL DEFAULT '1',
HintLabel varchar(255) DEFAULT NULL,
PRIMARY KEY (VariableId),
UNIQUE KEY VariableName (VariableName),
KEY DisplayOrder (DisplayOrder),
KEY GroupDisplayOrder (GroupDisplayOrder),
KEY `Install` (`Install`),
KEY HintLabel (HintLabel)
);
CREATE TABLE EmailQueue (
EmailQueueId int(10) unsigned NOT NULL AUTO_INCREMENT,
ToEmail varchar(255) NOT NULL DEFAULT '',
`Subject` varchar(255) NOT NULL DEFAULT '',
MessageHeaders text,
MessageBody longtext,
Queued int(10) unsigned DEFAULT NULL,
SendRetries int(10) unsigned NOT NULL DEFAULT '0',
LastSendRetry int(10) unsigned DEFAULT NULL,
MailingId int(10) unsigned NOT NULL DEFAULT '0',
LogData longtext,
PRIMARY KEY (EmailQueueId),
KEY LastSendRetry (LastSendRetry),
KEY SendRetries (SendRetries),
KEY MailingId (MailingId)
);
CREATE TABLE EmailTemplates (
TemplateId int(11) NOT NULL AUTO_INCREMENT,
TemplateName varchar(40) NOT NULL DEFAULT '',
ReplacementTags text,
AllowChangingSender tinyint(4) NOT NULL DEFAULT '0',
CustomSender tinyint(4) NOT NULL DEFAULT '0',
SenderName varchar(255) NOT NULL DEFAULT '',
SenderAddressType tinyint(4) NOT NULL DEFAULT '0',
SenderAddress varchar(255) NOT NULL DEFAULT '',
AllowChangingRecipient tinyint(4) NOT NULL DEFAULT '0',
CustomRecipient tinyint(4) NOT NULL DEFAULT '0',
Recipients text,
l1_Subject text,
l2_Subject text,
l3_Subject text,
l4_Subject text,
l5_Subject text,
l1_HtmlBody longtext,
l2_HtmlBody longtext,
l3_HtmlBody longtext,
l4_HtmlBody longtext,
l5_HtmlBody longtext,
l1_PlainTextBody longtext,
l2_PlainTextBody longtext,
l3_PlainTextBody longtext,
l4_PlainTextBody longtext,
l5_PlainTextBody longtext,
l1_TranslateFrom int(11) NOT NULL DEFAULT '0',
l2_TranslateFrom int(11) NOT NULL DEFAULT '0',
l3_TranslateFrom int(11) NOT NULL DEFAULT '0',
l4_TranslateFrom int(11) NOT NULL DEFAULT '0',
l5_TranslateFrom int(11) NOT NULL DEFAULT '0',
Headers text,
Enabled int(11) NOT NULL DEFAULT '1',
FrontEndOnly tinyint(3) unsigned NOT NULL DEFAULT '0',
Module varchar(40) NOT NULL DEFAULT 'Core',
Description text,
`Type` int(11) NOT NULL DEFAULT '0',
LastChanged int(10) unsigned DEFAULT NULL,
BindToSystemEvent varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (TemplateId),
KEY `Type` (`Type`),
KEY Enabled (Enabled),
KEY `Event` (TemplateName),
KEY FrontEndOnly (FrontEndOnly),
KEY AllowChangingSender (AllowChangingSender),
KEY CustomSender (CustomSender),
KEY SenderAddressType (SenderAddressType),
KEY AllowChangingRecipient (AllowChangingRecipient),
KEY CustomRecipient (CustomRecipient),
KEY l1_HtmlBody (l1_HtmlBody(5)),
KEY l2_HtmlBody (l2_HtmlBody(5)),
KEY l3_HtmlBody (l3_HtmlBody(5)),
KEY l4_HtmlBody (l4_HtmlBody(5)),
KEY l5_HtmlBody (l5_HtmlBody(5)),
KEY l1_PlainTextBody (l1_PlainTextBody(5)),
KEY l2_PlainTextBody (l2_PlainTextBody(5)),
KEY l3_PlainTextBody (l3_PlainTextBody(5)),
KEY l4_PlainTextBody (l4_PlainTextBody(5)),
KEY l5_PlainTextBody (l5_PlainTextBody(5)),
KEY l1_TranslateFrom (l1_TranslateFrom)
);
CREATE TABLE SystemEventSubscriptions (
SubscriptionId int(11) NOT NULL AUTO_INCREMENT,
EmailTemplateId int(11) DEFAULT NULL,
SubscriberEmail varchar(255) NOT NULL DEFAULT '',
UserId int(11) DEFAULT NULL,
CategoryId int(11) DEFAULT NULL,
IncludeSublevels tinyint(4) NOT NULL DEFAULT '1',
ItemId int(11) DEFAULT NULL,
ParentItemId int(11) DEFAULT NULL,
SubscribedOn int(11) DEFAULT NULL,
PRIMARY KEY (SubscriptionId),
KEY EmailEventId (EmailTemplateId)
);
CREATE TABLE IdGenerator (
lastid int(11) default NULL
);
CREATE TABLE Languages (
LanguageId int(11) NOT NULL AUTO_INCREMENT,
PackName varchar(40) NOT NULL DEFAULT '',
LocalName varchar(40) NOT NULL DEFAULT '',
Enabled int(11) NOT NULL DEFAULT '1',
PrimaryLang int(11) NOT NULL DEFAULT '0',
AdminInterfaceLang tinyint(3) unsigned NOT NULL DEFAULT '0',
Priority int(11) NOT NULL DEFAULT '0',
IconURL varchar(255) DEFAULT NULL,
IconDisabledURL varchar(255) DEFAULT NULL,
DateFormat varchar(50) NOT NULL DEFAULT 'm/d/Y',
ShortDateFormat varchar(255) NOT NULL DEFAULT 'm/d',
TimeFormat varchar(50) NOT NULL DEFAULT 'g:i:s A',
ShortTimeFormat varchar(255) NOT NULL DEFAULT 'g:i A',
InputDateFormat varchar(50) NOT NULL DEFAULT 'm/d/Y',
InputTimeFormat varchar(50) NOT NULL DEFAULT 'g:i:s A',
DecimalPoint varchar(10) NOT NULL DEFAULT '.',
ThousandSep varchar(10) NOT NULL DEFAULT '',
`Charset` varchar(20) NOT NULL DEFAULT 'utf-8',
UnitSystem tinyint(4) NOT NULL DEFAULT '1',
FilenameReplacements text,
Locale varchar(10) NOT NULL DEFAULT 'en-US',
UserDocsUrl varchar(255) NOT NULL DEFAULT '',
SynchronizationModes varchar(255) NOT NULL DEFAULT '',
HtmlEmailTemplate text,
TextEmailTemplate text,
PRIMARY KEY (LanguageId),
KEY Enabled (Enabled),
KEY PrimaryLang (PrimaryLang),
KEY AdminInterfaceLang (AdminInterfaceLang),
KEY Priority (Priority)
);
CREATE TABLE Modules (
`Name` varchar(255) NOT NULL DEFAULT '',
Path varchar(255) NOT NULL DEFAULT '',
ClassNamespace varchar(255) NOT NULL DEFAULT '',
Var varchar(100) NOT NULL DEFAULT '',
Version varchar(10) NOT NULL DEFAULT '0.0.0',
Loaded tinyint(4) NOT NULL DEFAULT '1',
LoadOrder tinyint(4) NOT NULL DEFAULT '0',
TemplatePath varchar(255) NOT NULL DEFAULT '',
RootCat int(11) NOT NULL DEFAULT '0',
BuildDate int(10) unsigned DEFAULT NULL,
AppliedDBRevisions text,
PRIMARY KEY (`Name`),
KEY Loaded (Loaded),
KEY LoadOrder (LoadOrder)
);
CREATE TABLE UserPersistentSessionData (
VariableId bigint(20) NOT NULL AUTO_INCREMENT,
PortalUserId int(11) NOT NULL DEFAULT '0',
VariableName varchar(255) NOT NULL DEFAULT '',
VariableValue text,
PRIMARY KEY (VariableId),
KEY UserId (PortalUserId),
KEY VariableName (VariableName)
);
CREATE TABLE LanguageLabels (
PhraseId int(11) NOT NULL AUTO_INCREMENT,
Phrase varchar(255) NOT NULL DEFAULT '',
PhraseKey varchar(255) NOT NULL DEFAULT '',
l1_Translation text,
l2_Translation text,
l3_Translation text,
l4_Translation text,
l5_Translation text,
l1_HintTranslation text,
l2_HintTranslation text,
l3_HintTranslation text,
l4_HintTranslation text,
l5_HintTranslation text,
l1_ColumnTranslation text,
l2_ColumnTranslation text,
l3_ColumnTranslation text,
l4_ColumnTranslation text,
l5_ColumnTranslation text,
l1_TranslateFrom int(11) NOT NULL DEFAULT '0',
l2_TranslateFrom int(11) NOT NULL DEFAULT '0',
l3_TranslateFrom int(11) NOT NULL DEFAULT '0',
l4_TranslateFrom int(11) NOT NULL DEFAULT '0',
l5_TranslateFrom int(11) NOT NULL DEFAULT '0',
PhraseType int(11) NOT NULL DEFAULT '0',
LastChanged int(10) unsigned DEFAULT NULL,
LastChangeIP varchar(15) NOT NULL DEFAULT '',
Module varchar(30) NOT NULL DEFAULT 'In-Portal',
PRIMARY KEY (PhraseId),
KEY Phrase_Index (Phrase),
KEY PhraseKey (PhraseKey),
KEY l1_Translation (l1_Translation(5)),
KEY l1_HintTranslation (l1_HintTranslation(5)),
KEY l1_ColumnTranslation (l1_ColumnTranslation(5)),
KEY l1_TranslateFrom (l1_TranslateFrom)
);
CREATE TABLE PhraseCache (
Template varchar(40) NOT NULL DEFAULT '',
PhraseList text,
CacheDate int(11) NOT NULL DEFAULT '0',
ThemeId int(11) NOT NULL DEFAULT '0',
StylesheetId int(10) unsigned NOT NULL DEFAULT '0',
ConfigVariables text,
PRIMARY KEY (Template),
KEY CacheDate (CacheDate),
KEY ThemeId (ThemeId),
KEY StylesheetId (StylesheetId)
);
CREATE TABLE UserGroups (
GroupId int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(255) NOT NULL DEFAULT '',
Description varchar(255) DEFAULT NULL,
CreatedOn int(10) unsigned DEFAULT NULL,
System tinyint(4) NOT NULL DEFAULT '0',
Personal tinyint(4) NOT NULL DEFAULT '0',
Enabled tinyint(4) NOT NULL DEFAULT '1',
FrontRegistration tinyint(3) unsigned NOT NULL DEFAULT '0',
IPRestrictions text,
PRIMARY KEY (GroupId),
UNIQUE KEY `Name` (`Name`),
KEY Personal (Personal),
KEY Enabled (Enabled),
KEY CreatedOn (CreatedOn)
);
CREATE TABLE Users (
PortalUserId int(11) NOT NULL AUTO_INCREMENT,
Username varchar(255) NOT NULL DEFAULT '',
`Password` varchar(255) DEFAULT 'd41d8cd98f00b204e9800998ecf8427e',
PasswordHashingMethod tinyint(4) NOT NULL DEFAULT '3',
FirstName varchar(255) NOT NULL DEFAULT '',
LastName varchar(255) NOT NULL DEFAULT '',
Company varchar(255) NOT NULL DEFAULT '',
Email varchar(255) NOT NULL DEFAULT '',
PrevEmails text,
CreatedOn int(11) DEFAULT NULL,
Phone varchar(255) NOT NULL DEFAULT '',
Fax varchar(255) NOT NULL DEFAULT '',
Street varchar(255) NOT NULL DEFAULT '',
Street2 varchar(255) NOT NULL DEFAULT '',
City varchar(255) NOT NULL DEFAULT '',
State varchar(20) NOT NULL DEFAULT '',
Zip varchar(20) NOT NULL DEFAULT '',
Country varchar(20) NOT NULL DEFAULT '',
ResourceId int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '1',
EmailVerified tinyint(4) NOT NULL,
Modified int(11) DEFAULT NULL,
dob int(11) DEFAULT NULL,
TimeZone varchar(255) NOT NULL DEFAULT '',
IPAddress varchar(15) NOT NULL DEFAULT '',
IsBanned tinyint(1) NOT NULL DEFAULT '0',
PwResetConfirm varchar(255) NOT NULL DEFAULT '',
PwRequestTime int(11) unsigned DEFAULT NULL,
FrontLanguage int(11) DEFAULT NULL,
AdminLanguage int(11) DEFAULT NULL,
DisplayToPublic text,
UserType tinyint(4) NOT NULL,
PrimaryGroupId int(11) DEFAULT NULL,
OldStyleLogin tinyint(4) NOT NULL,
IPRestrictions text,
PRIMARY KEY (PortalUserId),
UNIQUE KEY ResourceId (ResourceId),
KEY CreatedOn (CreatedOn),
KEY `Status` (`Status`),
KEY Modified (Modified),
KEY dob (dob),
KEY IsBanned (IsBanned),
KEY UserType (UserType),
KEY Username (Username)
);
CREATE TABLE UserCustomData (
CustomDataId int(11) NOT NULL auto_increment,
ResourceId int(10) unsigned NOT NULL default '0',
KEY ResourceId (ResourceId),
PRIMARY KEY (CustomDataId)
);
CREATE TABLE UserSessionData (
SessionKey varchar(50) NOT NULL DEFAULT '',
VariableName varchar(255) NOT NULL DEFAULT '',
VariableValue longtext,
PRIMARY KEY (SessionKey,VariableName),
KEY SessionKey (SessionKey),
KEY VariableName (VariableName)
);
CREATE TABLE Themes (
ThemeId int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(40) NOT NULL DEFAULT '',
Enabled int(11) NOT NULL DEFAULT '1',
Description varchar(255) DEFAULT NULL,
PrimaryTheme int(11) NOT NULL DEFAULT '0',
CacheTimeout int(11) NOT NULL DEFAULT '0',
StylesheetId int(10) unsigned NOT NULL DEFAULT '0',
LanguagePackInstalled tinyint(3) unsigned NOT NULL DEFAULT '0',
TemplateAliases text,
ImageResizeRules text,
PRIMARY KEY (ThemeId),
KEY Enabled (Enabled),
KEY StylesheetId (StylesheetId),
KEY PrimaryTheme (PrimaryTheme),
KEY LanguagePackInstalled (LanguagePackInstalled)
);
CREATE TABLE ThemeFiles (
FileId int(11) NOT NULL AUTO_INCREMENT,
ThemeId int(11) NOT NULL DEFAULT '0',
FileName varchar(255) NOT NULL DEFAULT '',
FilePath varchar(255) NOT NULL DEFAULT '',
TemplateAlias varchar(255) NOT NULL DEFAULT '',
Description varchar(255) DEFAULT NULL,
FileType int(11) NOT NULL DEFAULT '0',
FileFound tinyint(3) unsigned NOT NULL DEFAULT '0',
FileMetaInfo text,
PRIMARY KEY (FileId),
KEY theme (ThemeId),
KEY FileName (FileName),
KEY FilePath (FilePath),
KEY FileFound (FileFound),
KEY TemplateAlias (TemplateAlias)
);
CREATE TABLE UserGroupRelations (
PortalUserId int(11) NOT NULL DEFAULT '0',
GroupId int(11) NOT NULL DEFAULT '0',
MembershipExpires int(10) unsigned DEFAULT NULL,
ExpirationReminderSent tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (PortalUserId,GroupId),
KEY GroupId (GroupId),
KEY MembershipExpires (MembershipExpires),
KEY ExpirationReminderSent (ExpirationReminderSent)
);
CREATE TABLE UserSessions (
SessionKey int(10) unsigned NOT NULL DEFAULT '0',
LastAccessed int(10) unsigned NOT NULL DEFAULT '0',
PortalUserId int(11) NOT NULL DEFAULT '-2',
`Language` int(11) NOT NULL DEFAULT '1',
Theme int(11) NOT NULL DEFAULT '1',
GroupId int(11) NOT NULL DEFAULT '0',
IpAddress varchar(20) NOT NULL DEFAULT '0.0.0.0',
`Status` int(11) NOT NULL DEFAULT '1',
GroupList varchar(255) DEFAULT NULL,
TimeZone varchar(255) NOT NULL DEFAULT '',
BrowserSignature varchar(32) NOT NULL DEFAULT '',
PRIMARY KEY (SessionKey),
KEY UserId (PortalUserId),
KEY LastAccessed (LastAccessed),
KEY BrowserSignature (BrowserSignature)
);
CREATE TABLE EmailLog (
EmailLogId int(11) NOT NULL AUTO_INCREMENT,
`From` varchar(255) NOT NULL DEFAULT '',
`To` varchar(255) NOT NULL DEFAULT '',
OtherRecipients text,
`Subject` varchar(255) NOT NULL DEFAULT '',
HtmlBody longtext,
TextBody longtext,
SentOn int(11) DEFAULT NULL,
TemplateName varchar(255) NOT NULL DEFAULT '',
EventType tinyint(4) DEFAULT NULL,
EventParams text,
AccessKey varchar(32) NOT NULL DEFAULT '',
+ ToUserId int(11) DEFAULT NULL,
+ ItemPrefix varchar(50) NOT NULL DEFAULT '',
+ ItemId int(11) DEFAULT NULL,
PRIMARY KEY (EmailLogId),
KEY `timestamp` (SentOn)
);
CREATE TABLE SystemLog (
LogId int(11) NOT NULL AUTO_INCREMENT,
LogUniqueId int(11) DEFAULT NULL,
LogLevel tinyint(4) NOT NULL DEFAULT '7',
LogType tinyint(4) NOT NULL DEFAULT '3',
LogCode int(11) DEFAULT NULL,
LogMessage longtext,
LogTimestamp int(11) DEFAULT NULL,
LogDate datetime DEFAULT NULL,
LogEventName varchar(100) NOT NULL DEFAULT '',
LogHostname varchar(255) NOT NULL DEFAULT '',
LogRequestSource tinyint(4) DEFAULT NULL,
LogRequestURI varchar(255) NOT NULL DEFAULT '',
LogRequestData longtext,
LogUserId int(11) DEFAULT NULL,
LogInterface tinyint(4) DEFAULT NULL,
IpAddress varchar(15) NOT NULL DEFAULT '',
LogSessionKey int(11) DEFAULT NULL,
LogSessionData longtext,
LogBacktrace longtext,
LogSourceFilename varchar(255) NOT NULL DEFAULT '',
LogSourceFileLine int(11) DEFAULT NULL,
LogProcessId bigint(20) unsigned DEFAULT NULL,
LogMemoryUsed bigint(20) unsigned NOT NULL,
LogUserData longtext NOT NULL,
LogNotificationStatus tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (LogId),
KEY LogLevel (LogLevel),
KEY LogType (LogType),
KEY LogNotificationStatus (LogNotificationStatus)
);
CREATE TABLE SystemCache (
VarName varchar(255) NOT NULL default '',
Data longtext,
Cached int(11) default NULL,
LifeTime int(11) NOT NULL default '-1',
PRIMARY KEY (VarName),
KEY Cached (Cached)
);
CREATE TABLE CountryStates (
CountryStateId int(11) NOT NULL AUTO_INCREMENT,
`Type` int(11) NOT NULL DEFAULT '1',
StateCountryId int(11) DEFAULT NULL,
l1_Name varchar(255) NOT NULL DEFAULT '',
l2_Name varchar(255) NOT NULL DEFAULT '',
l3_Name varchar(255) NOT NULL DEFAULT '',
l4_Name varchar(255) NOT NULL DEFAULT '',
l5_Name varchar(255) NOT NULL DEFAULT '',
IsoCode char(3) NOT NULL DEFAULT '',
ShortIsoCode char(2) DEFAULT NULL,
PRIMARY KEY (CountryStateId),
KEY `Type` (`Type`),
KEY StateCountryId (StateCountryId),
KEY l1_Name (l1_Name(5))
);
CREATE TABLE Categories (
CategoryId int(11) NOT NULL AUTO_INCREMENT,
`Type` int(11) NOT NULL DEFAULT '1',
SymLinkCategoryId int(10) unsigned DEFAULT NULL,
ParentId int(11) NOT NULL DEFAULT '0',
`Name` varchar(255) NOT NULL DEFAULT '',
l1_Name varchar(255) NOT NULL DEFAULT '',
l2_Name varchar(255) NOT NULL DEFAULT '',
l3_Name varchar(255) NOT NULL DEFAULT '',
l4_Name varchar(255) NOT NULL DEFAULT '',
l5_Name varchar(255) NOT NULL DEFAULT '',
Filename varchar(255) NOT NULL DEFAULT '',
AutomaticFilename tinyint(3) unsigned NOT NULL DEFAULT '1',
Description text,
l1_Description text,
l2_Description text,
l3_Description text,
l4_Description text,
l5_Description text,
CreatedOn int(11) DEFAULT NULL,
EditorsPick tinyint(4) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '1',
Priority int(11) NOT NULL DEFAULT '0',
MetaKeywords text,
CachedDescendantCatsQty int(11) NOT NULL DEFAULT '0',
CachedNavbar text,
l1_CachedNavbar text,
l2_CachedNavbar text,
l3_CachedNavbar text,
l4_CachedNavbar text,
l5_CachedNavbar text,
CreatedById int(11) DEFAULT NULL,
ResourceId int(11) DEFAULT NULL,
ParentPath text,
TreeLeft bigint(20) NOT NULL DEFAULT '0',
TreeRight bigint(20) NOT NULL DEFAULT '0',
NamedParentPath text,
NamedParentPathHash int(10) unsigned NOT NULL DEFAULT '0',
MetaDescription text,
HotItem int(11) NOT NULL DEFAULT '2',
NewItem int(11) NOT NULL DEFAULT '2',
PopItem int(11) NOT NULL DEFAULT '2',
Modified int(11) DEFAULT NULL,
ModifiedById int(11) DEFAULT NULL,
CachedTemplate varchar(255) NOT NULL DEFAULT '',
CachedTemplateHash int(10) unsigned NOT NULL DEFAULT '0',
Template varchar(255) NOT NULL DEFAULT '#inherit#',
UseExternalUrl tinyint(3) unsigned NOT NULL DEFAULT '0',
ExternalUrl varchar(255) NOT NULL DEFAULT '',
UseMenuIconUrl tinyint(3) unsigned NOT NULL DEFAULT '0',
MenuIconUrl varchar(255) NOT NULL DEFAULT '',
l1_Title varchar(255) DEFAULT '',
l2_Title varchar(255) DEFAULT '',
l3_Title varchar(255) DEFAULT '',
l4_Title varchar(255) DEFAULT '',
l5_Title varchar(255) DEFAULT '',
l1_MenuTitle varchar(255) NOT NULL DEFAULT '',
l2_MenuTitle varchar(255) NOT NULL DEFAULT '',
l3_MenuTitle varchar(255) NOT NULL DEFAULT '',
l4_MenuTitle varchar(255) NOT NULL DEFAULT '',
l5_MenuTitle varchar(255) NOT NULL DEFAULT '',
MetaTitle text,
IndexTools text,
IsMenu tinyint(4) NOT NULL DEFAULT '1',
Protected tinyint(4) NOT NULL DEFAULT '0',
FormId int(11) DEFAULT NULL,
FormSubmittedTemplate varchar(255) DEFAULT NULL,
FriendlyURL varchar(255) NOT NULL DEFAULT '',
ThemeId int(10) unsigned NOT NULL DEFAULT '0',
EnablePageCache tinyint(4) NOT NULL DEFAULT '0',
OverridePageCacheKey tinyint(4) NOT NULL DEFAULT '0',
PageCacheKey varchar(255) NOT NULL DEFAULT '',
PageExpiration int(11) DEFAULT NULL,
LiveRevisionNumber int(11) NOT NULL DEFAULT '1',
DirectLinkEnabled tinyint(4) NOT NULL DEFAULT '1',
DirectLinkAuthKey varchar(20) NOT NULL DEFAULT '',
PromoBlockGroupId int(10) unsigned NOT NULL DEFAULT '0',
RequireSSL tinyint(4) NOT NULL DEFAULT '0',
RequireLogin tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (CategoryId),
UNIQUE KEY ResourceId (ResourceId),
KEY ParentId (ParentId),
KEY Modified (Modified),
KEY Priority (Priority),
KEY sorting (`Name`,Priority),
KEY Filename (Filename(5)),
KEY l1_Name (l1_Name(5)),
KEY l2_Name (l2_Name(5)),
KEY l3_Name (l3_Name(5)),
KEY l4_Name (l4_Name(5)),
KEY l5_Name (l5_Name(5)),
KEY l1_Description (l1_Description(5)),
KEY l2_Description (l2_Description(5)),
KEY l3_Description (l3_Description(5)),
KEY l4_Description (l4_Description(5)),
KEY l5_Description (l5_Description(5)),
KEY TreeLeft (TreeLeft),
KEY TreeRight (TreeRight),
KEY SymLinkCategoryId (SymLinkCategoryId),
KEY `Status` (`Status`),
KEY CreatedOn (CreatedOn),
KEY EditorsPick (EditorsPick),
KEY ThemeId (ThemeId),
KEY EnablePageCache (EnablePageCache),
KEY OverridePageCacheKey (OverridePageCacheKey),
KEY PageExpiration (PageExpiration),
KEY Protected (Protected),
KEY LiveRevisionNumber (LiveRevisionNumber),
KEY PromoBlockGroupId (PromoBlockGroupId),
KEY NamedParentPathHash (NamedParentPathHash),
KEY CachedTemplateHash (CachedTemplateHash)
);
CREATE TABLE CategoryCustomData (
CustomDataId int(11) NOT NULL auto_increment,
ResourceId int(10) unsigned NOT NULL default '0',
KEY ResourceId (ResourceId),
PRIMARY KEY (CustomDataId)
);
CREATE TABLE CategoryItems (
CategoryId int(11) NOT NULL default '0',
ItemResourceId int(11) NOT NULL default '0',
PrimaryCat tinyint(4) NOT NULL default '0',
ItemPrefix varchar(50) NOT NULL default '',
Filename varchar(255) NOT NULL default '',
UNIQUE KEY CategoryId (CategoryId,ItemResourceId),
KEY PrimaryCat (PrimaryCat),
KEY ItemPrefix (ItemPrefix),
KEY ItemResourceId (ItemResourceId),
KEY Filename (Filename)
);
CREATE TABLE CategoryPermissionsCache (
PermCacheId int(11) NOT NULL auto_increment,
CategoryId int(11) NOT NULL default '0',
PermId int(11) NOT NULL default '0',
ACL varchar(255) NOT NULL default '',
PRIMARY KEY (PermCacheId),
KEY CategoryId (CategoryId),
KEY PermId (PermId),
KEY ACL (ACL)
);
CREATE TABLE PopupSizes (
PopupId int(10) unsigned NOT NULL auto_increment,
TemplateName varchar(255) NOT NULL default '',
PopupWidth int(11) NOT NULL default '0',
PopupHeight int(11) NOT NULL default '0',
PRIMARY KEY (PopupId),
KEY TemplateName (TemplateName)
);
CREATE TABLE Counters (
CounterId int(10) unsigned NOT NULL auto_increment,
Name varchar(100) NOT NULL default '',
CountQuery text,
CountValue text,
LastCounted int(10) unsigned default NULL,
LifeTime int(10) unsigned NOT NULL default '3600',
IsClone tinyint(3) unsigned NOT NULL default '0',
TablesAffected text,
PRIMARY KEY (CounterId),
UNIQUE KEY Name (Name),
KEY IsClone (IsClone),
KEY LifeTime (LifeTime),
KEY LastCounted (LastCounted)
);
CREATE TABLE AdminSkins (
SkinId int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(255) DEFAULT NULL,
CSS text,
Logo varchar(255) DEFAULT NULL,
LogoBottom varchar(255) NOT NULL DEFAULT '',
LogoLogin varchar(255) NOT NULL DEFAULT '',
`Options` text,
LastCompiled int(11) NOT NULL DEFAULT '0',
IsPrimary int(1) NOT NULL DEFAULT '0',
DisplaySiteNameInHeader tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (SkinId),
KEY IsPrimary (IsPrimary),
KEY LastCompiled (LastCompiled)
);
CREATE TABLE ChangeLogs (
ChangeLogId bigint(20) NOT NULL AUTO_INCREMENT,
PortalUserId int(11) NOT NULL DEFAULT '0',
SessionLogId int(11) NOT NULL DEFAULT '0',
`Action` tinyint(4) NOT NULL DEFAULT '0',
OccuredOn int(11) DEFAULT NULL,
Prefix varchar(255) NOT NULL DEFAULT '',
ItemId bigint(20) NOT NULL DEFAULT '0',
Changes text,
MasterPrefix varchar(255) NOT NULL DEFAULT '',
MasterId bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (ChangeLogId),
KEY PortalUserId (PortalUserId),
KEY SessionLogId (SessionLogId),
KEY `Action` (`Action`),
KEY OccuredOn (OccuredOn),
KEY Prefix (Prefix),
KEY MasterPrefix (MasterPrefix)
);
CREATE TABLE UserSessionLogs (
SessionLogId bigint(20) NOT NULL AUTO_INCREMENT,
PortalUserId int(11) NOT NULL DEFAULT '0',
SessionId int(10) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '1',
SessionStart int(11) DEFAULT NULL,
SessionEnd int(11) DEFAULT NULL,
IP varchar(15) NOT NULL DEFAULT '',
AffectedItems int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (SessionLogId),
KEY SessionId (SessionId),
KEY `Status` (`Status`),
KEY PortalUserId (PortalUserId)
);
CREATE TABLE StatisticsCapture (
StatisticsId int(10) unsigned NOT NULL auto_increment,
TemplateName varchar(255) NOT NULL default '',
Hits int(10) unsigned NOT NULL default '0',
LastHit int(11) NOT NULL default '0',
ScriptTimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
ScriptTimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
ScriptTimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlTimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlTimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlTimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlCountMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlCountAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlCountMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
PRIMARY KEY (StatisticsId),
KEY TemplateName (TemplateName),
KEY Hits (Hits),
KEY LastHit (LastHit),
KEY ScriptTimeMin (ScriptTimeMin),
KEY ScriptTimeAvg (ScriptTimeAvg),
KEY ScriptTimeMax (ScriptTimeMax),
KEY SqlTimeMin (SqlTimeMin),
KEY SqlTimeAvg (SqlTimeAvg),
KEY SqlTimeMax (SqlTimeMax),
KEY SqlCountMin (SqlCountMin),
KEY SqlCountAvg (SqlCountAvg),
KEY SqlCountMax (SqlCountMax)
);
CREATE TABLE SlowSqlCapture (
CaptureId int(10) unsigned NOT NULL AUTO_INCREMENT,
TemplateNames text,
Hits int(10) unsigned NOT NULL DEFAULT '0',
LastHit int(11) NOT NULL DEFAULT '0',
SqlQuery text,
TimeMin decimal(40,20) unsigned NOT NULL DEFAULT '0.00000000000000000000',
TimeAvg decimal(40,20) unsigned NOT NULL DEFAULT '0.00000000000000000000',
TimeMax decimal(40,20) unsigned NOT NULL DEFAULT '0.00000000000000000000',
QueryCrc bigint(11) NOT NULL DEFAULT '0',
PRIMARY KEY (CaptureId),
KEY Hits (Hits),
KEY LastHit (LastHit),
KEY TimeMin (TimeMin),
KEY TimeAvg (TimeAvg),
KEY TimeMax (TimeMax),
KEY QueryCrc (QueryCrc)
);
CREATE TABLE ScheduledTasks (
ScheduledTaskId int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(255) NOT NULL DEFAULT '',
`Type` tinyint(3) unsigned NOT NULL DEFAULT '1',
`Status` tinyint(3) unsigned NOT NULL DEFAULT '1',
`Event` varchar(255) NOT NULL DEFAULT '',
RunSchedule varchar(255) NOT NULL DEFAULT '* * * * *',
LastRunOn int(10) unsigned DEFAULT NULL,
LastRunStatus tinyint(3) unsigned NOT NULL DEFAULT '1',
NextRunOn int(11) DEFAULT NULL,
RunTime int(10) unsigned NOT NULL DEFAULT '0',
Timeout int(10) unsigned DEFAULT NULL,
LastTimeoutOn int(10) unsigned DEFAULT NULL,
SiteDomainLimitation varchar(255) NOT NULL DEFAULT '',
Settings text,
PRIMARY KEY (ScheduledTaskId),
KEY `Status` (`Status`),
KEY LastRunOn (LastRunOn),
KEY LastRunStatus (LastRunStatus),
KEY RunTime (RunTime),
KEY NextRunOn (NextRunOn),
KEY SiteDomainLimitation (SiteDomainLimitation),
KEY Timeout (Timeout),
KEY `Type` (`Type`)
);
CREATE TABLE SpellingDictionary (
SpellingDictionaryId int(11) NOT NULL auto_increment,
MisspelledWord varchar(255) NOT NULL default '',
SuggestedCorrection varchar(255) NOT NULL default '',
PRIMARY KEY (SpellingDictionaryId),
KEY MisspelledWord (MisspelledWord),
KEY SuggestedCorrection (SuggestedCorrection)
);
CREATE TABLE Thesaurus (
ThesaurusId int(11) NOT NULL auto_increment,
SearchTerm varchar(255) NOT NULL default '',
ThesaurusTerm varchar(255) NOT NULL default '',
ThesaurusType tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (ThesaurusId),
KEY ThesaurusType (ThesaurusType),
KEY SearchTerm (SearchTerm)
);
CREATE TABLE LocalesList (
LocaleId int(11) NOT NULL auto_increment,
LocaleIdentifier varchar(6) NOT NULL default '',
LocaleName varchar(255) NOT NULL default '',
Locale varchar(20) NOT NULL default '',
ScriptTag varchar(255) NOT NULL default '',
ANSICodePage varchar(10) NOT NULL default '',
PRIMARY KEY (LocaleId)
);
CREATE TABLE UserBanRules (
RuleId int(11) NOT NULL auto_increment,
RuleType tinyint(4) NOT NULL default '0',
ItemField varchar(255) default NULL,
ItemVerb tinyint(4) NOT NULL default '0',
ItemValue varchar(255) NOT NULL default '',
ItemType int(11) NOT NULL default '0',
Priority int(11) NOT NULL default '0',
Status tinyint(4) NOT NULL default '1',
ErrorTag varchar(255) default NULL,
PRIMARY KEY (RuleId),
KEY Status (Status),
KEY Priority (Priority),
KEY ItemType (ItemType)
);
CREATE TABLE CountCache (
ListType int(11) NOT NULL default '0',
ItemType int(11) NOT NULL default '-1',
Value int(11) NOT NULL default '0',
CountCacheId int(11) NOT NULL auto_increment,
LastUpdate int(11) NOT NULL default '0',
ExtraId varchar(50) default NULL,
TodayOnly tinyint(4) NOT NULL default '0',
PRIMARY KEY (CountCacheId)
);
CREATE TABLE UserFavorites (
FavoriteId int(11) NOT NULL auto_increment,
PortalUserId int(11) NOT NULL default '0',
ResourceId int(11) NOT NULL default '0',
ItemTypeId int(11) NOT NULL default '0',
Modified int(11) NOT NULL default '0',
PRIMARY KEY (FavoriteId),
UNIQUE KEY main (PortalUserId,ResourceId),
KEY Modified (Modified),
KEY ItemTypeId (ItemTypeId)
);
CREATE TABLE CatalogImages (
ImageId int(11) NOT NULL auto_increment,
ResourceId int(11) NOT NULL default '0',
Url varchar(255) NOT NULL default '',
Name varchar(255) NOT NULL default '',
AltName VARCHAR(255) NOT NULL DEFAULT '',
ImageIndex int(11) NOT NULL default '0',
LocalImage tinyint(4) NOT NULL default '1',
LocalPath varchar(240) NOT NULL default '',
Enabled int(11) NOT NULL default '1',
DefaultImg int(11) NOT NULL default '0',
ThumbUrl varchar(255) default NULL,
Priority int(11) NOT NULL default '0',
ThumbPath varchar(255) default NULL,
LocalThumb tinyint(4) NOT NULL default '1',
SameImages tinyint(4) NOT NULL default '1',
PRIMARY KEY (ImageId),
KEY ResourceId (ResourceId),
KEY Enabled (Enabled),
KEY Priority (Priority)
);
CREATE TABLE CatalogRatings (
RatingId int(11) NOT NULL auto_increment,
IPAddress varchar(255) NOT NULL default '',
CreatedOn INT UNSIGNED NULL DEFAULT NULL,
RatingValue int(11) NOT NULL default '0',
ItemId int(11) NOT NULL default '0',
PRIMARY KEY (RatingId),
KEY CreatedOn (CreatedOn),
KEY ItemId (ItemId),
KEY RatingValue (RatingValue)
);
CREATE TABLE CatalogReviews (
ReviewId int(11) NOT NULL AUTO_INCREMENT,
CreatedOn int(10) unsigned DEFAULT NULL,
ReviewText longtext,
Rating tinyint(3) unsigned NOT NULL DEFAULT '0',
IPAddress varchar(255) NOT NULL DEFAULT '',
ItemId int(11) NOT NULL DEFAULT '0',
CreatedById int(11) DEFAULT NULL,
ItemType tinyint(4) NOT NULL DEFAULT '0',
Priority int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '2',
TextFormat int(11) NOT NULL DEFAULT '0',
Module varchar(255) NOT NULL DEFAULT '',
HelpfulCount int(11) NOT NULL,
NotHelpfulCount int(11) NOT NULL,
PRIMARY KEY (ReviewId),
KEY CreatedOn (CreatedOn),
KEY ItemId (ItemId),
KEY ItemType (ItemType),
KEY Priority (Priority),
KEY `Status` (`Status`)
);
CREATE TABLE ItemFilters (
FilterId int(11) NOT NULL AUTO_INCREMENT,
ItemPrefix varchar(255) NOT NULL DEFAULT '',
FilterField varchar(255) NOT NULL DEFAULT '',
FilterType varchar(100) NOT NULL DEFAULT '',
Enabled tinyint(4) NOT NULL DEFAULT '1',
RangeCount int(11) DEFAULT NULL,
PRIMARY KEY (FilterId),
KEY ItemPrefix (ItemPrefix),
KEY Enabled (Enabled)
);
CREATE TABLE SpamReports (
ReportId int(11) NOT NULL AUTO_INCREMENT,
ItemPrefix varchar(255) NOT NULL DEFAULT '',
ItemId int(11) NOT NULL,
MessageText text,
ReportedOn int(11) DEFAULT NULL,
ReportedById int(11) DEFAULT NULL,
PRIMARY KEY (ReportId),
KEY ItemPrefix (ItemPrefix),
KEY ItemId (ItemId),
KEY ReportedById (ReportedById)
);
CREATE TABLE ItemTypes (
ItemType int(11) NOT NULL default '0',
Module varchar(50) NOT NULL default '',
Prefix varchar(20) NOT NULL default '',
SourceTable varchar(100) NOT NULL default '',
TitleField varchar(50) default NULL,
CreatorField varchar(255) NOT NULL default '',
PopField varchar(255) default NULL,
RateField varchar(255) default NULL,
LangVar varchar(255) NOT NULL default '',
PrimaryItem int(11) NOT NULL default '0',
EditUrl varchar(255) NOT NULL default '',
ClassName varchar(40) NOT NULL default '',
ItemName varchar(50) NOT NULL default '',
PRIMARY KEY (ItemType),
KEY Module (Module)
);
CREATE TABLE CatalogFiles (
FileId int(11) NOT NULL AUTO_INCREMENT,
ResourceId int(11) unsigned NOT NULL DEFAULT '0',
FileName varchar(255) NOT NULL DEFAULT '',
FilePath varchar(255) NOT NULL DEFAULT '',
Size int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '1',
CreatedOn int(11) unsigned DEFAULT NULL,
CreatedById int(11) DEFAULT NULL,
MimeType varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (FileId),
KEY ResourceId (ResourceId),
KEY CreatedOn (CreatedOn),
KEY `Status` (`Status`)
);
CREATE TABLE CatalogRelationships (
RelationshipId int(11) NOT NULL auto_increment,
SourceId int(11) default NULL,
TargetId int(11) default NULL,
SourceType tinyint(4) NOT NULL default '0',
TargetType tinyint(4) NOT NULL default '0',
Type int(11) NOT NULL default '0',
Enabled int(11) NOT NULL default '1',
Priority int(11) NOT NULL default '0',
PRIMARY KEY (RelationshipId),
KEY RelSource (SourceId),
KEY RelTarget (TargetId),
KEY `Type` (`Type`),
KEY Enabled (Enabled),
KEY Priority (Priority),
KEY SourceType (SourceType),
KEY TargetType (TargetType)
);
CREATE TABLE SearchConfig (
TableName varchar(40) NOT NULL default '',
FieldName varchar(40) NOT NULL default '',
SimpleSearch tinyint(4) NOT NULL default '1',
AdvancedSearch tinyint(4) NOT NULL default '1',
Description varchar(255) default NULL,
DisplayName varchar(80) default NULL,
ModuleName VARCHAR(20) NOT NULL DEFAULT 'In-Portal',
ConfigHeader varchar(255) default NULL,
DisplayOrder int(11) NOT NULL default '0',
SearchConfigId int(11) NOT NULL auto_increment,
Priority int(11) NOT NULL default '0',
FieldType varchar(20) NOT NULL default 'text',
ForeignField TEXT,
JoinClause TEXT,
IsWhere text,
IsNotWhere text,
ContainsWhere text,
NotContainsWhere text,
CustomFieldId int(11) default NULL,
PRIMARY KEY (SearchConfigId),
KEY SimpleSearch (SimpleSearch),
KEY AdvancedSearch (AdvancedSearch),
KEY DisplayOrder (DisplayOrder),
KEY Priority (Priority),
KEY CustomFieldId (CustomFieldId)
);
CREATE TABLE SearchLogs (
SearchLogId int(11) NOT NULL auto_increment,
Keyword varchar(255) NOT NULL default '',
Indices bigint(20) NOT NULL default '0',
SearchType int(11) NOT NULL default '0',
PRIMARY KEY (SearchLogId),
KEY Keyword (Keyword),
KEY SearchType (SearchType)
);
CREATE TABLE SpamControl (
ItemResourceId int(11) NOT NULL default '0',
IPaddress varchar(20) NOT NULL default '',
Expire INT UNSIGNED NULL DEFAULT NULL,
PortalUserId int(11) NOT NULL default '0',
DataType varchar(20) default NULL,
KEY PortalUserId (PortalUserId),
KEY Expire (Expire),
KEY DataType (DataType),
KEY ItemResourceId (ItemResourceId)
);
CREATE TABLE StatItem (
StatItemId int(11) NOT NULL auto_increment,
Module varchar(20) NOT NULL default '',
ValueSQL varchar(255) default NULL,
ResetSQL varchar(255) default NULL,
ListLabel varchar(255) NOT NULL default '',
Priority int(11) NOT NULL default '0',
AdminSummary int(11) NOT NULL default '0',
PRIMARY KEY (StatItemId),
KEY AdminSummary (AdminSummary),
KEY Priority (Priority)
);
CREATE TABLE ImportScripts (
ImportId int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(255) NOT NULL DEFAULT '',
Description text,
Prefix varchar(10) NOT NULL DEFAULT '',
Module varchar(50) NOT NULL DEFAULT '',
ExtraFields varchar(255) NOT NULL DEFAULT '',
`Type` varchar(10) NOT NULL DEFAULT '',
`Status` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (ImportId),
KEY Module (Module),
KEY `Status` (`Status`)
);
CREATE TABLE UserVisits (
VisitId int(11) NOT NULL AUTO_INCREMENT,
VisitDate int(10) unsigned DEFAULT NULL,
Referer varchar(255) NOT NULL DEFAULT '',
IPAddress varchar(15) NOT NULL DEFAULT '',
AffiliateId int(10) unsigned NOT NULL DEFAULT '0',
PortalUserId int(11) NOT NULL DEFAULT '-2',
PRIMARY KEY (VisitId),
KEY PortalUserId (PortalUserId),
KEY AffiliateId (AffiliateId),
KEY VisitDate (VisitDate)
);
CREATE TABLE ImportCache (
CacheId int(11) NOT NULL AUTO_INCREMENT,
CacheName varchar(255) NOT NULL DEFAULT '',
VarName bigint(11) NOT NULL DEFAULT '0',
VarValue text,
PRIMARY KEY (CacheId),
KEY CacheName (CacheName),
KEY VarName (VarName)
);
CREATE TABLE CategoryRelatedSearches (
RelatedSearchId int(11) NOT NULL auto_increment,
ResourceId int(11) NOT NULL default '0',
Keyword varchar(255) NOT NULL default '',
ItemType tinyint(4) NOT NULL default '0',
Enabled tinyint(4) NOT NULL default '1',
Priority int(11) NOT NULL default '0',
PRIMARY KEY (RelatedSearchId),
KEY Enabled (Enabled),
KEY ItemType (ItemType),
KEY ResourceId (ResourceId)
);
CREATE TABLE StopWords (
StopWordId int(11) NOT NULL auto_increment,
StopWord varchar(255) NOT NULL default '',
PRIMARY KEY (StopWordId),
KEY StopWord (StopWord)
);
CREATE TABLE MailingLists (
MailingId int(10) unsigned NOT NULL AUTO_INCREMENT,
PortalUserId int(11) NOT NULL DEFAULT '-1',
`To` longtext,
ToParsed longtext,
Attachments text,
`Subject` varchar(255) NOT NULL DEFAULT '',
MessageText longtext,
MessageHtml longtext,
`Status` tinyint(3) unsigned NOT NULL DEFAULT '1',
EmailsQueuedTotal int(10) unsigned NOT NULL DEFAULT '0',
EmailsSent int(10) unsigned NOT NULL DEFAULT '0',
EmailsTotal int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (MailingId),
KEY EmailsTotal (EmailsTotal),
KEY EmailsSent (EmailsSent),
KEY EmailsQueued (EmailsQueuedTotal),
KEY `Status` (`Status`),
KEY PortalUserId (PortalUserId)
);
CREATE TABLE PageContent (
PageContentId int(11) NOT NULL AUTO_INCREMENT,
ContentNum bigint(11) NOT NULL DEFAULT '0',
PageId int(11) NOT NULL DEFAULT '0',
RevisionId int(11) NOT NULL,
l1_Content text,
l2_Content text,
l3_Content text,
l4_Content text,
l5_Content text,
PRIMARY KEY (PageContentId),
KEY ContentNum (ContentNum,PageId),
KEY RevisionId (RevisionId)
);
CREATE TABLE PageRevisions (
RevisionId int(11) NOT NULL AUTO_INCREMENT,
PageId int(11) NOT NULL,
RevisionNumber int(11) NOT NULL,
IsDraft tinyint(4) NOT NULL,
FromRevisionId int(11) NOT NULL,
CreatedById int(11) DEFAULT NULL,
CreatedOn int(11) DEFAULT NULL,
AutoSavedOn int(11) DEFAULT NULL,
`Status` tinyint(4) NOT NULL DEFAULT '2',
PRIMARY KEY (RevisionId),
KEY PageId (PageId),
KEY RevisionNumber (RevisionNumber),
KEY IsDraft (IsDraft),
KEY `Status` (`Status`)
);
CREATE TABLE FormFields (
FormFieldId int(11) NOT NULL AUTO_INCREMENT,
FormId int(11) NOT NULL DEFAULT '0',
`Type` int(11) NOT NULL DEFAULT '0',
FieldName varchar(255) NOT NULL DEFAULT '',
FieldLabel varchar(255) DEFAULT NULL,
Heading varchar(255) DEFAULT NULL,
Prompt varchar(255) DEFAULT NULL,
ElementType varchar(50) NOT NULL DEFAULT '',
ValueList varchar(255) DEFAULT NULL,
Priority int(11) NOT NULL DEFAULT '0',
IsSystem tinyint(3) unsigned NOT NULL DEFAULT '0',
Required tinyint(1) NOT NULL DEFAULT '0',
DisplayInGrid tinyint(1) NOT NULL DEFAULT '1',
DefaultValue text,
Validation tinyint(4) NOT NULL DEFAULT '0',
UploadExtensions varchar(255) NOT NULL DEFAULT '',
UploadMaxSize int(11) DEFAULT NULL,
Visibility tinyint(4) NOT NULL DEFAULT '1',
EmailCommunicationRole tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (FormFieldId),
KEY `Type` (`Type`),
KEY FormId (FormId),
KEY Priority (Priority),
KEY IsSystem (IsSystem),
KEY DisplayInGrid (DisplayInGrid),
KEY Visibility (Visibility),
KEY EmailCommunicationRole (EmailCommunicationRole)
);
CREATE TABLE FormSubmissions (
FormSubmissionId int(11) NOT NULL AUTO_INCREMENT,
FormId int(11) NOT NULL DEFAULT '0',
SubmissionTime int(11) DEFAULT NULL,
IPAddress varchar(15) NOT NULL DEFAULT '',
ReferrerURL text NULL,
LogStatus tinyint(3) unsigned NOT NULL DEFAULT '2',
LastUpdatedOn int(10) unsigned DEFAULT NULL,
Notes text,
MessageId varchar(255) DEFAULT NULL,
PRIMARY KEY (FormSubmissionId),
KEY FormId (FormId),
KEY SubmissionTime (SubmissionTime),
KEY LogStatus (LogStatus),
KEY LastUpdatedOn (LastUpdatedOn),
KEY MessageId (MessageId)
);
CREATE TABLE FormSubmissionReplies (
SubmissionLogId int(11) NOT NULL AUTO_INCREMENT,
FormSubmissionId int(10) unsigned NOT NULL,
FromEmail varchar(255) NOT NULL DEFAULT '',
ToEmail varchar(255) NOT NULL DEFAULT '',
Cc text,
Bcc text,
`Subject` varchar(255) NOT NULL DEFAULT '',
Message text,
Attachment text,
ReplyStatus tinyint(3) unsigned NOT NULL DEFAULT '0',
SentStatus tinyint(3) unsigned NOT NULL DEFAULT '0',
SentOn int(10) unsigned DEFAULT NULL,
RepliedOn int(10) unsigned DEFAULT NULL,
VerifyCode varchar(32) NOT NULL DEFAULT '',
DraftId int(10) unsigned NOT NULL DEFAULT '0',
MessageId varchar(255) NOT NULL DEFAULT '',
BounceInfo text,
BounceDate int(11) DEFAULT NULL,
PRIMARY KEY (SubmissionLogId),
KEY FormSubmissionId (FormSubmissionId),
KEY ReplyStatus (ReplyStatus),
KEY SentStatus (SentStatus),
KEY SentOn (SentOn),
KEY RepliedOn (RepliedOn),
KEY VerifyCode (VerifyCode),
KEY DraftId (DraftId),
KEY BounceDate (BounceDate),
KEY MessageId (MessageId)
);
CREATE TABLE FormSubmissionReplyDrafts (
DraftId int(11) NOT NULL AUTO_INCREMENT,
FormSubmissionId int(10) unsigned NOT NULL DEFAULT '0',
CreatedOn int(10) unsigned DEFAULT NULL,
CreatedById int(11) DEFAULT NULL,
Message text,
PRIMARY KEY (DraftId),
KEY FormSubmissionId (FormSubmissionId),
KEY CreatedOn (CreatedOn),
KEY CreatedById (CreatedById)
);
CREATE TABLE Forms (
FormId int(11) NOT NULL AUTO_INCREMENT,
Title varchar(255) NOT NULL DEFAULT '',
Description text,
RequireLogin tinyint(4) NOT NULL DEFAULT '0',
UseSecurityImage tinyint(4) NOT NULL DEFAULT '0',
SubmitNotifyEmail varchar(255) NOT NULL DEFAULT '',
EnableEmailCommunication tinyint(4) NOT NULL DEFAULT '0',
ProcessUnmatchedEmails tinyint(4) NOT NULL DEFAULT '0',
ReplyFromName varchar(255) NOT NULL DEFAULT '',
ReplyFromEmail varchar(255) NOT NULL DEFAULT '',
ReplyCc varchar(255) NOT NULL DEFAULT '',
ReplyBcc varchar(255) NOT NULL DEFAULT '',
ReplyMessageSignature text,
ReplyServer varchar(255) NOT NULL DEFAULT '',
ReplyPort int(11) NOT NULL DEFAULT '110',
ReplyUsername varchar(255) NOT NULL DEFAULT '',
ReplyPassword varchar(255) NOT NULL DEFAULT '',
BounceEmail varchar(255) NOT NULL DEFAULT '',
BounceServer varchar(255) NOT NULL DEFAULT '',
BouncePort int(11) NOT NULL DEFAULT '110',
BounceUsername varchar(255) NOT NULL DEFAULT '',
BouncePassword varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (FormId),
KEY UseSecurityImage (UseSecurityImage),
KEY RequireLogin (RequireLogin),
KEY EnableEmailCommunication (EnableEmailCommunication),
KEY ProcessUnmatchedEmails (ProcessUnmatchedEmails)
);
CREATE TABLE Semaphores (
SemaphoreId int(11) NOT NULL AUTO_INCREMENT,
SessionKey int(10) unsigned NOT NULL DEFAULT '0',
`Timestamp` int(10) unsigned NOT NULL DEFAULT '0',
MainPrefix varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (SemaphoreId),
KEY SessionKey (SessionKey),
KEY `Timestamp` (`Timestamp`),
KEY MainPrefix (MainPrefix)
);
CREATE TABLE CachedUrls (
UrlId int(11) NOT NULL AUTO_INCREMENT,
Url varchar(255) NOT NULL DEFAULT '',
DomainId int(11) NOT NULL DEFAULT '0',
`Hash` bigint(11) NOT NULL DEFAULT '0',
Prefixes varchar(255) NOT NULL DEFAULT '',
ParsedVars text,
Cached int(10) unsigned DEFAULT NULL,
LifeTime int(11) NOT NULL DEFAULT '-1',
PRIMARY KEY (UrlId),
KEY Url (Url),
KEY `Hash` (`Hash`),
KEY Prefixes (Prefixes),
KEY Cached (Cached),
KEY LifeTime (LifeTime),
KEY DomainId (DomainId)
);
CREATE TABLE SiteDomains (
DomainId int(11) NOT NULL AUTO_INCREMENT,
DomainName varchar(255) NOT NULL DEFAULT '',
DomainNameUsesRegExp tinyint(4) NOT NULL DEFAULT '0',
SSLUrl varchar(255) NOT NULL DEFAULT '',
SSLUrlUsesRegExp tinyint(4) NOT NULL DEFAULT '0',
AdminEmail varchar(255) NOT NULL DEFAULT '',
DefaultEmailRecipients text,
Country varchar(3) NOT NULL DEFAULT '',
PrimaryLanguageId int(11) NOT NULL DEFAULT '0',
Languages varchar(255) NOT NULL DEFAULT '',
PrimaryThemeId int(11) NOT NULL DEFAULT '0',
Themes varchar(255) NOT NULL DEFAULT '',
DomainIPRange text,
ExternalUrl varchar(255) NOT NULL DEFAULT '',
RedirectOnIPMatch tinyint(4) NOT NULL DEFAULT '0',
Priority int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (DomainId),
KEY DomainName (DomainName),
KEY DomainNameUsesRegExp (DomainNameUsesRegExp),
KEY SSLUrl (SSLUrl),
KEY SSLUrlUsesRegExp (SSLUrlUsesRegExp),
KEY AdminEmail (AdminEmail),
KEY Country (Country),
KEY PrimaryLanguageId (PrimaryLanguageId),
KEY Languages (Languages),
KEY PrimaryThemeId (PrimaryThemeId),
KEY Themes (Themes),
KEY ExternalUrl (ExternalUrl),
KEY RedirectOnIPMatch (RedirectOnIPMatch),
KEY Priority (Priority)
);
CREATE TABLE CurlLog (
LogId int(11) NOT NULL AUTO_INCREMENT,
Message varchar(255) NOT NULL DEFAULT '',
PageUrl varchar(255) NOT NULL DEFAULT '',
RequestUrl varchar(255) NOT NULL DEFAULT '',
PortalUserId int(11) NOT NULL,
SessionKey int(11) NOT NULL,
IsAdmin tinyint(4) NOT NULL,
PageData text,
RequestData text,
ResponseData text,
RequestDate int(11) DEFAULT NULL,
ResponseDate int(11) DEFAULT NULL,
ResponseHttpCode int(11) NOT NULL,
CurlError varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (LogId),
KEY Message (Message),
KEY PageUrl (PageUrl),
KEY RequestUrl (RequestUrl),
KEY PortalUserId (PortalUserId),
KEY SessionKey (SessionKey),
KEY IsAdmin (IsAdmin),
KEY RequestDate (RequestDate),
KEY ResponseDate (ResponseDate),
KEY ResponseHttpCode (ResponseHttpCode),
KEY CurlError (CurlError)
);
CREATE TABLE PromoBlocks (
BlockId int(11) NOT NULL AUTO_INCREMENT,
l1_Title varchar(50) NOT NULL DEFAULT '',
l2_Title varchar(50) NOT NULL DEFAULT '',
l3_Title varchar(50) NOT NULL DEFAULT '',
l4_Title varchar(50) NOT NULL DEFAULT '',
l5_Title varchar(50) NOT NULL DEFAULT '',
l1_ButtonText varchar(255) NOT NULL DEFAULT '',
l2_ButtonText varchar(255) NOT NULL DEFAULT '',
l3_ButtonText varchar(255) NOT NULL DEFAULT '',
l4_ButtonText varchar(255) NOT NULL DEFAULT '',
l5_ButtonText varchar(255) NOT NULL DEFAULT '',
Priority int(11) NOT NULL DEFAULT '0',
`Status` tinyint(1) NOT NULL DEFAULT '1',
l1_Image varchar(255) NOT NULL DEFAULT '',
l2_Image varchar(255) NOT NULL DEFAULT '',
l3_Image varchar(255) NOT NULL DEFAULT '',
l4_Image varchar(255) NOT NULL DEFAULT '',
l5_Image varchar(255) NOT NULL DEFAULT '',
CSSClassName varchar(255) NOT NULL DEFAULT '',
LinkType tinyint(1) NOT NULL DEFAULT '1',
CategoryId int(11) DEFAULT NULL,
ExternalLink varchar(255) NOT NULL DEFAULT '',
OpenInNewWindow tinyint(3) unsigned NOT NULL DEFAULT '0',
ScheduleFromDate int(11) DEFAULT NULL,
ScheduleToDate int(11) DEFAULT NULL,
NumberOfClicks int(11) NOT NULL DEFAULT '0',
NumberOfViews int(11) NOT NULL DEFAULT '0',
Sticky tinyint(1) NOT NULL DEFAULT '0',
l1_Html text,
l2_Html text,
l3_Html text,
l4_Html text,
l5_Html text,
PromoBlockGroupId int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (BlockId),
KEY OpenInNewWindow (OpenInNewWindow),
KEY PromoBlockGroupId (PromoBlockGroupId),
KEY l1_Title (l1_Title(5)),
KEY l2_Title (l2_Title(5)),
KEY l3_Title (l3_Title(5)),
KEY l4_Title (l4_Title(5)),
KEY l5_Title (l5_Title(5)),
KEY l1_ButtonText (l1_ButtonText(5)),
KEY l2_ButtonText (l2_ButtonText(5)),
KEY l3_ButtonText (l3_ButtonText(5)),
KEY l4_ButtonText (l4_ButtonText(5)),
KEY l5_ButtonText (l5_ButtonText(5))
);
CREATE TABLE PromoBlockGroups (
PromoBlockGroupId int(11) NOT NULL AUTO_INCREMENT,
Title varchar(255) NOT NULL DEFAULT '',
CreatedOn int(10) unsigned DEFAULT NULL,
`Status` tinyint(1) NOT NULL DEFAULT '1',
RotationDelay decimal(9,2) DEFAULT NULL,
TransitionTime decimal(9,2) DEFAULT NULL,
TransitionControls tinyint(1) NOT NULL DEFAULT '1',
TransitionEffect varchar(255) NOT NULL DEFAULT '',
TransitionEffectCustom varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (PromoBlockGroupId)
);
\ No newline at end of file
Index: branches/5.3.x/core/install/upgrades.sql
===================================================================
--- branches/5.3.x/core/install/upgrades.sql (revision 15937)
+++ branches/5.3.x/core/install/upgrades.sql (revision 15938)
@@ -1,2950 +1,2957 @@
# ===== v 4.0.1 =====
ALTER TABLE EmailLog ADD EventParams TEXT NOT NULL;
INSERT INTO ConfigurationAdmin VALUES ('MailFunctionHeaderSeparator', 'la_Text_smtp_server', 'la_config_MailFunctionHeaderSeparator', 'radio', NULL, '1=la_Linux,2=la_Windows', 30.08, 0, 0);
INSERT INTO ConfigurationValues VALUES (0, 'MailFunctionHeaderSeparator', 1, 'In-Portal', 'in-portal:configure_general');
ALTER TABLE PersistantSessionData DROP PRIMARY KEY ;
ALTER TABLE PersistantSessionData ADD INDEX ( `PortalUserId` ) ;
# ===== v 4.1.0 =====
ALTER TABLE EmailMessage ADD ReplacementTags TEXT AFTER Template;
ALTER TABLE Phrase
CHANGE Translation Translation TEXT NOT NULL,
CHANGE Module Module VARCHAR(30) NOT NULL DEFAULT 'In-Portal';
ALTER TABLE Category
CHANGE Description Description TEXT,
CHANGE l1_Description l1_Description TEXT,
CHANGE l2_Description l2_Description TEXT,
CHANGE l3_Description l3_Description TEXT,
CHANGE l4_Description l4_Description TEXT,
CHANGE l5_Description l5_Description TEXT,
CHANGE CachedNavbar CachedNavbar text,
CHANGE l1_CachedNavbar l1_CachedNavbar text,
CHANGE l2_CachedNavbar l2_CachedNavbar text,
CHANGE l3_CachedNavbar l3_CachedNavbar text,
CHANGE l4_CachedNavbar l4_CachedNavbar text,
CHANGE l5_CachedNavbar l5_CachedNavbar text,
CHANGE ParentPath ParentPath TEXT NULL DEFAULT NULL,
CHANGE NamedParentPath NamedParentPath TEXT NULL DEFAULT NULL;
ALTER TABLE ConfigurationAdmin CHANGE ValueList ValueList TEXT;
ALTER TABLE EmailQueue
CHANGE `Subject` `Subject` TEXT,
CHANGE toaddr toaddr TEXT,
CHANGE fromaddr fromaddr TEXT;
ALTER TABLE Category DROP Pop;
ALTER TABLE PortalUser
CHANGE CreatedOn CreatedOn INT DEFAULT NULL,
CHANGE dob dob INT(11) NULL DEFAULT NULL,
CHANGE PassResetTime PassResetTime INT(11) UNSIGNED NULL DEFAULT NULL,
CHANGE PwRequestTime PwRequestTime INT(11) UNSIGNED NULL DEFAULT NULL,
CHANGE `Password` `Password` VARCHAR(255) NULL DEFAULT 'd41d8cd98f00b204e9800998ecf8427e';
ALTER TABLE Modules
CHANGE BuildDate BuildDate INT UNSIGNED NULL DEFAULT NULL,
CHANGE Version Version VARCHAR(10) NOT NULL DEFAULT '0.0.0',
CHANGE `Var` `Var` VARCHAR(100) NOT NULL DEFAULT '';
ALTER TABLE Language
CHANGE Enabled Enabled INT(11) NOT NULL DEFAULT '1',
CHANGE InputDateFormat InputDateFormat VARCHAR(50) NOT NULL DEFAULT 'm/d/Y',
CHANGE InputTimeFormat InputTimeFormat VARCHAR(50) NOT NULL DEFAULT 'g:i:s A',
CHANGE DecimalPoint DecimalPoint VARCHAR(10) NOT NULL DEFAULT '',
CHANGE ThousandSep ThousandSep VARCHAR(10) NOT NULL DEFAULT '';
ALTER TABLE Events CHANGE FromUserId FromUserId INT(11) NOT NULL DEFAULT '-1';
ALTER TABLE StdDestinations CHANGE DestAbbr2 DestAbbr2 CHAR(2) NULL DEFAULT NULL;
ALTER TABLE PermCache DROP DACL;
ALTER TABLE PortalGroup CHANGE CreatedOn CreatedOn INT UNSIGNED NULL DEFAULT NULL;
ALTER TABLE UserSession
CHANGE SessionKey SessionKey INT UNSIGNED NULL DEFAULT NULL ,
CHANGE CurrentTempKey CurrentTempKey INT UNSIGNED NULL DEFAULT NULL ,
CHANGE PrevTempKey PrevTempKey INT UNSIGNED NULL DEFAULT NULL ,
CHANGE LastAccessed LastAccessed INT UNSIGNED NOT NULL DEFAULT '0',
CHANGE PortalUserId PortalUserId INT(11) NOT NULL DEFAULT '-2',
CHANGE Language Language INT(11) NOT NULL DEFAULT '1',
CHANGE Theme Theme INT(11) NOT NULL DEFAULT '1';
CREATE TABLE Counters (
CounterId int(10) unsigned NOT NULL auto_increment,
Name varchar(100) NOT NULL default '',
CountQuery text,
CountValue text,
LastCounted int(10) unsigned default NULL,
LifeTime int(10) unsigned NOT NULL default '3600',
IsClone tinyint(3) unsigned NOT NULL default '0',
TablesAffected text,
PRIMARY KEY (CounterId),
UNIQUE KEY Name (Name)
);
CREATE TABLE Skins (
`SkinId` int(11) NOT NULL auto_increment,
`Name` varchar(255) default NULL,
`CSS` text,
`Logo` varchar(255) default NULL,
`Options` text,
`LastCompiled` int(11) NOT NULL default '0',
`IsPrimary` int(1) NOT NULL default '0',
PRIMARY KEY (`SkinId`)
);
INSERT INTO Skins VALUES (DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n font-size: 9pt;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: #000000;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\n.head-table tr td {\r\n background-color: @@HeadBgColor@@;\r\n color: @@HeadColor@@\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background-color: @@HeadBarBgColor@@;\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n color: #FFFFFF;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: @@HeadBarColor@@;\r\n background-color: @@HeadBarBgColor@@;\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(@@base_url@@/proj-base/admin_templates/img/button_back.gif) #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(@@base_url@@/proj-base/admin_templates/img/button_back_disabled.gif) #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n}\r\n\r\n.tab-active {\r\n background-color: #2D79D6;\r\n border-bottom: 1px solid #2D79D6;\r\n}\r\n\r\n.tab a {\r\n color: #00659C;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #fff;\r\n font-weight: bold;\r\n}\r\n\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n height: 30px;\r\n overflow: hidden;\r\n /* border-right: 1px solid black; */\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n /* border-right: 1px solid black; */\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-0 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter {\r\n margin-bottom: 0px;\r\n width: 85%;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-1 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-1 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-1 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: none;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-0 td.grid-header-col-0 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-0 td.grid-header-col-0 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(@@base_url@@/proj-base/admin_templates/img/bgr_input_name_line.gif) no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 150px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(@@base_url@@/proj-base/admin_templates/img/bgr_mid.gif) repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(@@base_url@@/proj-base/admin_templates/img/bgr_input_line.gif) no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n\r\n.error-cell {\r\n background-color: #fff;\r\n color: red;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n\r\n/* Uploader */\r\n\r\n.uploader-main {\r\n position: absolute;\r\n display: none;\r\n z-index: 10;\r\n border: 1px solid #777;\r\n padding: 10px;\r\n width: 350px;\r\n height: 120px;\r\n overflow: hidden;\r\n background-color: #fff;\r\n}\r\n\r\n.uploader-percent {\r\n width: 100%;\r\n padding-top: 3px;\r\n text-align: center;\r\n position: relative;\r\n z-index: 20;\r\n float: left;\r\n font-weight: bold;\r\n}\r\n\r\n.uploader-left {\r\n width: 100%;\r\n border: 1px solid black;\r\n height: 20px;\r\n background: #fff url(@@base_url@@/core/admin_templates/img/progress_left.gif);\r\n}\r\n\r\n.uploader-done {\r\n width: 0%;\r\n background-color: green;\r\n height: 20px;\r\n background: #4A92CE url(@@base_url@@/core/admin_templates/img/progress_done.gif);\r\n}\r\n\r\n\r\n/* To be sorted */\r\n\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: @@SectionColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left sid of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px 0px 2px 2px;\r\n}\r\n\r\n.tree tr.highlighted td a {\r\n background-color: @@TreeHighBgColor@@;\r\n color: @@TreeHighColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: #fff;\r\n}\r\n\r\n.tree tr td a:hover {\r\n color: #000000;\r\n}', 'just_logo.gif', 'a:20:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#1961B8";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#CCFF00";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#006F99";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#4A92CE";}}', 1178706881, 1);
INSERT INTO Permissions VALUES (0, 'in-portal:skins.view', 11, 1, 1, 0), (0, 'in-portal:skins.add', 11, 1, 1, 0), (0, 'in-portal:skins.edit', 11, 1, 1, 0), (0, 'in-portal:skins.delete', 11, 1, 1, 0);
# ===== v 4.1.1 =====
DROP TABLE EmailQueue;
CREATE TABLE EmailQueue (
EmailQueueId int(10) unsigned NOT NULL auto_increment,
ToEmail varchar(255) NOT NULL default '',
`Subject` varchar(255) NOT NULL default '',
MessageHeaders text,
MessageBody longtext,
Queued int(10) unsigned NOT NULL default '0',
SendRetries int(10) unsigned NOT NULL default '0',
LastSendRetry int(10) unsigned NOT NULL default '0',
PRIMARY KEY (EmailQueueId),
KEY LastSendRetry (LastSendRetry),
KEY SendRetries (SendRetries)
);
ALTER TABLE Events ADD ReplacementTags TEXT AFTER Event;
# ===== v 4.2.0 =====
ALTER TABLE CustomField ADD MultiLingual TINYINT UNSIGNED NOT NULL DEFAULT '1' AFTER FieldLabel;
ALTER TABLE Category
ADD TreeLeft BIGINT NOT NULL AFTER ParentPath,
ADD TreeRight BIGINT NOT NULL AFTER TreeLeft;
ALTER TABLE Category ADD INDEX (TreeLeft);
ALTER TABLE Category ADD INDEX (TreeRight);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CategoriesRebuildSerial', '0', 'In-Portal', '');
UPDATE ConfigurationAdmin SET `element_type` = 'textarea' WHERE `VariableName` IN ('Category_MetaKey', 'Category_MetaDesc');
ALTER TABLE PortalUser
CHANGE FirstName FirstName VARCHAR(255) NOT NULL DEFAULT '',
CHANGE LastName LastName VARCHAR(255) NOT NULL DEFAULT '';
# ===== v 4.2.1 =====
INSERT INTO ConfigurationAdmin VALUES ('UseSmallHeader', 'la_Text_Website', 'la_config_UseSmallHeader', 'checkbox', '', '', 10.21, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseSmallHeader', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('User_Default_Registration_Country', 'la_Text_General', 'la_config_DefaultRegistrationCountry', 'select', NULL , '=+,<SQL>SELECT DestName AS OptionName, DestId AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>', 10.111, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_Default_Registration_Country', '', 'In-Portal:Users', 'in-portal:configure_users');
ALTER TABLE Category ADD SymLinkCategoryId INT UNSIGNED NULL DEFAULT NULL AFTER `Type`, ADD INDEX (SymLinkCategoryId);
ALTER TABLE ConfigurationValues CHANGE VariableValue VariableValue TEXT NULL DEFAULT NULL;
ALTER TABLE Language
ADD AdminInterfaceLang TINYINT UNSIGNED NOT NULL AFTER PrimaryLang,
ADD Priority INT NOT NULL AFTER AdminInterfaceLang;
UPDATE Language SET AdminInterfaceLang = 1 WHERE PrimaryLang = 1;
DELETE FROM PersistantSessionData WHERE VariableName = 'lang_columns_.';
ALTER TABLE SessionData CHANGE VariableValue VariableValue longtext NOT NULL;
INSERT INTO ConfigurationAdmin VALUES ('CSVExportDelimiter', 'la_Text_CSV_Export', 'la_config_CSVExportDelimiter', 'select', NULL, '0=la_Tab,1=la_Comma,2=la_Semicolon,3=la_Space,4=la_Colon', 40.1, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('CSVExportEnclosure', 'la_Text_CSV_Export', 'la_config_CSVExportEnclosure', 'radio', NULL, '0=la_Doublequotes,1=la_Quotes', 40.2, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('CSVExportSeparator', 'la_Text_CSV_Export', 'la_config_CSVExportSeparator', 'radio', NULL, '0=la_Linux,1=la_Windows', 40.3, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('CSVExportEncoding', 'la_Text_CSV_Export', 'la_config_CSVExportEncoding', 'radio', NULL, '0=la_Unicode,1=la_Regular', 40.4, 0, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CSVExportDelimiter', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CSVExportEnclosure', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CSVExportSeparator', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CSVExportEncoding', '0', 'In-Portal', 'in-portal:configure_general');
# ===== v 4.2.2 =====
INSERT INTO ConfigurationAdmin VALUES ('UseColumnFreezer', 'la_Text_Website', 'la_config_UseColumnFreezer', 'checkbox', '', '', 10.22, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseColumnFreezer', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('TrimRequiredFields', 'la_Text_Website', 'la_config_TrimRequiredFields', 'checkbox', '', '', 10.23, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'TrimRequiredFields', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('MenuFrameWidth', 'la_title_General', 'la_prompt_MenuFrameWidth', 'text', NULL, NULL, '11', '0', '0');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'MenuFrameWidth', 200, 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('DefaultSettingsUserId', 'la_title_General', 'la_prompt_DefaultUserId', 'text', NULL, NULL, '12', '0', '0');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'DefaultSettingsUserId', -1, 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('KeepSessionOnBrowserClose', 'la_title_General', 'la_prompt_KeepSessionOnBrowserClose', 'checkbox', NULL, NULL, '13', '0', '0');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'KeepSessionOnBrowserClose', 0, 'In-Portal', 'in-portal:configure_general');
ALTER TABLE PersistantSessionData ADD VariableId BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
# ===== v 4.3.0 =====
INSERT INTO ConfigurationAdmin VALUES ('u_MaxImageCount', 'la_section_ImageSettings', 'la_config_MaxImageCount', 'text', '', '', 30.01, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('u_ThumbnailImageWidth', 'la_section_ImageSettings', 'la_config_ThumbnailImageWidth', 'text', '', '', 30.02, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('u_ThumbnailImageHeight', 'la_section_ImageSettings', 'la_config_ThumbnailImageHeight', 'text', '', '', 30.03, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('u_FullImageWidth', 'la_section_ImageSettings', 'la_config_FullImageWidth', 'text', '', '', 30.04, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('u_FullImageHeight', 'la_section_ImageSettings', 'la_config_FullImageHeight', 'text', '', '', 30.05, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'u_MaxImageCount', 5, 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'u_ThumbnailImageWidth', 120, 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'u_ThumbnailImageHeight', 120, 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'u_FullImageWidth', 450, 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'u_FullImageHeight', 450, 'In-Portal:Users', 'in-portal:configure_users');
CREATE TABLE ChangeLogs (
ChangeLogId bigint(20) NOT NULL auto_increment,
PortalUserId int(11) NOT NULL default '0',
SessionLogId int(11) NOT NULL default '0',
`Action` tinyint(4) NOT NULL default '0',
OccuredOn int(11) NOT NULL default '0',
Prefix varchar(255) NOT NULL default '',
ItemId bigint(20) NOT NULL default '0',
Changes text NOT NULL,
MasterPrefix varchar(255) NOT NULL default '',
MasterId bigint(20) NOT NULL default '0',
PRIMARY KEY (ChangeLogId),
KEY PortalUserId (PortalUserId),
KEY SessionLogId (SessionLogId),
KEY `Action` (`Action`),
KEY OccuredOn (OccuredOn),
KEY Prefix (Prefix),
KEY MasterPrefix (MasterPrefix)
);
CREATE TABLE SessionLogs (
SessionLogId bigint(20) NOT NULL auto_increment,
PortalUserId int(11) NOT NULL default '0',
SessionId int(10) NOT NULL default '0',
`Status` tinyint(4) NOT NULL default '1',
SessionStart int(11) NOT NULL default '0',
SessionEnd int(11) default NULL,
IP varchar(15) NOT NULL default '',
AffectedItems int(11) NOT NULL default '0',
PRIMARY KEY (SessionLogId),
KEY SessionId (SessionId),
KEY `Status` (`Status`),
KEY PortalUserId (PortalUserId)
);
ALTER TABLE CustomField ADD INDEX (MultiLingual), ADD INDEX (DisplayOrder), ADD INDEX (OnGeneralTab), ADD INDEX (IsSystem);
ALTER TABLE ConfigurationAdmin ADD INDEX (DisplayOrder), ADD INDEX (GroupDisplayOrder), ADD INDEX (Install);
ALTER TABLE EmailSubscribers ADD INDEX (EmailMessageId), ADD INDEX (PortalUserId);
ALTER TABLE Events ADD INDEX (`Type`), ADD INDEX (Enabled);
ALTER TABLE Language ADD INDEX (Enabled), ADD INDEX (PrimaryLang), ADD INDEX (AdminInterfaceLang), ADD INDEX (Priority);
ALTER TABLE Modules ADD INDEX (Loaded), ADD INDEX (LoadOrder);
ALTER TABLE PhraseCache ADD INDEX (CacheDate), ADD INDEX (ThemeId), ADD INDEX (StylesheetId);
ALTER TABLE PortalGroup ADD INDEX (CreatedOn);
ALTER TABLE PortalUser ADD INDEX (Status), ADD INDEX (Modified), ADD INDEX (dob), ADD INDEX (IsBanned);
ALTER TABLE Theme ADD INDEX (Enabled), ADD INDEX (StylesheetId), ADD INDEX (PrimaryTheme);
ALTER TABLE UserGroup ADD INDEX (MembershipExpires), ADD INDEX (ExpirationReminderSent);
ALTER TABLE EmailLog ADD INDEX (`timestamp`);
ALTER TABLE StdDestinations ADD INDEX (DestType), ADD INDEX (DestParentId);
ALTER TABLE Category ADD INDEX (Status), ADD INDEX (CreatedOn), ADD INDEX (EditorsPick);
ALTER TABLE Stylesheets ADD INDEX (Enabled), ADD INDEX (LastCompiled);
ALTER TABLE Counters ADD INDEX (IsClone), ADD INDEX (LifeTime), ADD INDEX (LastCounted);
ALTER TABLE Skins ADD INDEX (IsPrimary), ADD INDEX (LastCompiled);
INSERT INTO ConfigurationAdmin VALUES ('UseChangeLog', 'la_Text_Website', 'la_config_UseChangeLog', 'checkbox', '', '', 10.25, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseChangeLog', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('AutoRefreshIntervals', 'la_Text_Website', 'la_config_AutoRefreshIntervals', 'text', '', '', 10.26, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'AutoRefreshIntervals', '1,5,15,30,60,120,240', 'In-Portal', 'in-portal:configure_general');
DELETE FROM Cache WHERE SUBSTRING(VarName, 1, 7) = 'mod_rw_';
ALTER TABLE Category CHANGE `Status` `Status` TINYINT(4) NOT NULL DEFAULT '2';
# ===== v 4.3.1 =====
INSERT INTO ConfigurationAdmin VALUES ('RememberLastAdminTemplate', 'la_Text_General', 'la_config_RememberLastAdminTemplate', 'checkbox', '', '', 10.13, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'RememberLastAdminTemplate', '', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationAdmin VALUES ('AllowSelectGroupOnFront', 'la_Text_General', 'la_config_AllowSelectGroupOnFront', 'checkbox', NULL, NULL, 10.13, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'AllowSelectGroupOnFront', '0', 'In-Portal:Users', 'in-portal:configure_users');
CREATE TABLE StatisticsCapture (
StatisticsId int(10) unsigned NOT NULL auto_increment,
TemplateName varchar(255) NOT NULL default '',
Hits int(10) unsigned NOT NULL default '0',
LastHit int(11) NOT NULL default '0',
ScriptTimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
ScriptTimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
ScriptTimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlTimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlTimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlTimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlCountMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlCountAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlCountMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
PRIMARY KEY (StatisticsId),
KEY TemplateName (TemplateName),
KEY Hits (Hits),
KEY LastHit (LastHit),
KEY ScriptTimeMin (ScriptTimeMin),
KEY ScriptTimeAvg (ScriptTimeAvg),
KEY ScriptTimeMax (ScriptTimeMax),
KEY SqlTimeMin (SqlTimeMin),
KEY SqlTimeAvg (SqlTimeAvg),
KEY SqlTimeMax (SqlTimeMax),
KEY SqlCountMin (SqlCountMin),
KEY SqlCountAvg (SqlCountAvg),
KEY SqlCountMax (SqlCountMax)
);
CREATE TABLE SlowSqlCapture (
CaptureId int(10) unsigned NOT NULL auto_increment,
TemplateNames text,
Hits int(10) unsigned NOT NULL default '0',
LastHit int(11) NOT NULL default '0',
SqlQuery text,
TimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
TimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
TimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
QueryCrc int(11) NOT NULL default '0',
PRIMARY KEY (CaptureId),
KEY Hits (Hits),
KEY LastHit (LastHit),
KEY TimeMin (TimeMin),
KEY TimeAvg (TimeAvg),
KEY TimeMax (TimeMax),
KEY QueryCrc (QueryCrc)
);
ALTER TABLE PortalGroup ADD FrontRegistration TINYINT UNSIGNED NOT NULL;
UPDATE PortalGroup SET FrontRegistration = 1 WHERE GroupId = 13;
INSERT INTO ConfigurationAdmin VALUES ('ForceImageMagickResize', 'la_Text_Website', 'la_config_ForceImageMagickResize', 'checkbox', '', '', 10.28, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'ForceImageMagickResize', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('AdminSSL_URL', 'la_Text_Website', 'la_config_AdminSSL_URL', 'text', '', '', 10.091, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'AdminSSL_URL', '', 'In-Portal', 'in-portal:configure_general');
# ===== v 4.3.9 =====
ALTER TABLE CustomField
CHANGE ValueList ValueList TEXT NULL DEFAULT NULL,
ADD DefaultValue VARCHAR(255) NOT NULL AFTER ValueList,
ADD INDEX (DefaultValue);
UPDATE CustomField SET ValueList = REPLACE(ValueList, ',', '||');
CREATE TABLE Agents (
AgentId int(11) NOT NULL auto_increment,
AgentName varchar(255) NOT NULL default '',
AgentType tinyint(3) unsigned NOT NULL default '1',
Status tinyint(3) unsigned NOT NULL default '1',
Event varchar(255) NOT NULL default '',
RunInterval int(10) unsigned NOT NULL default '0',
RunMode tinyint(3) unsigned NOT NULL default '2',
LastRunOn int(10) unsigned default NULL,
LastRunStatus tinyint(3) unsigned NOT NULL default '1',
NextRunOn int(11) default NULL,
RunTime int(10) unsigned NOT NULL default '0',
PRIMARY KEY (AgentId),
KEY Status (Status),
KEY RunInterval (RunInterval),
KEY RunMode (RunMode),
KEY AgentType (AgentType),
KEY LastRunOn (LastRunOn),
KEY LastRunStatus (LastRunStatus),
KEY RunTime (RunTime),
KEY NextRunOn (NextRunOn)
);
INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:agents.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:agents.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:agents.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:agents.view', 11, 1, 1, 0);
INSERT INTO ConfigurationAdmin VALUES ('FilenameSpecialCharReplacement', 'la_Text_General', 'la_config_FilenameSpecialCharReplacement', 'select', NULL, '_=+_,-=+-', 10.16, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'FilenameSpecialCharReplacement', '_', 'In-Portal', 'in-portal:configure_categories');
CREATE TABLE SpellingDictionary (
SpellingDictionaryId int(11) NOT NULL auto_increment,
MisspelledWord varchar(255) NOT NULL default '',
SuggestedCorrection varchar(255) NOT NULL default '',
PRIMARY KEY (SpellingDictionaryId),
KEY MisspelledWord (MisspelledWord),
KEY SuggestedCorrection (SuggestedCorrection)
);
INSERT INTO ConfigurationValues VALUES(NULL, 'YahooApplicationId', '', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationAdmin VALUES('YahooApplicationId', 'la_Text_General', 'la_config_YahooApplicationId', 'text', NULL, NULL, 10.15, 0, 0);
CREATE TABLE Thesaurus (
ThesaurusId int(11) NOT NULL auto_increment,
SearchTerm varchar(255) NOT NULL default '',
ThesaurusTerm varchar(255) NOT NULL default '',
ThesaurusType tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (ThesaurusId),
KEY ThesaurusType (ThesaurusType),
KEY SearchTerm (SearchTerm)
);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:ban_rulelist.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:ban_rulelist.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:ban_rulelist.add', 11, 1, 1, 0);
ALTER TABLE Language ADD FilenameReplacements TEXT NULL AFTER UnitSystem;
ALTER TABLE Language ADD Locale varchar(10) NOT NULL default 'en-US' AFTER FilenameReplacements;
CREATE TABLE LocalesList (
LocaleId int(11) NOT NULL auto_increment,
LocaleIdentifier varchar(6) NOT NULL default '',
LocaleName varchar(255) NOT NULL default '',
Locale varchar(20) NOT NULL default '',
ScriptTag varchar(255) NOT NULL default '',
ANSICodePage varchar(10) NOT NULL default '',
PRIMARY KEY (LocaleId)
);
INSERT INTO LocalesList VALUES
(1, '0x0436', 'Afrikaans (South Africa)', 'af-ZA', 'Latn', '1252'),
(2, '0x041c', 'Albanian (Albania)', 'sq-AL', 'Latn', '1252'),
(3, '0x0484', 'Alsatian (France)', 'gsw-FR', '', ''),
(4, '0x045e', 'Amharic (Ethiopia)', 'am-ET', '', 'UTF-8'),
(5, '0x1401', 'Arabic (Algeria)', 'ar-DZ', 'Arab', '1256'),
(6, '0x3c01', 'Arabic (Bahrain)', 'ar-BH', 'Arab', '1256'),
(7, '0x0c01', 'Arabic (Egypt)', 'ar-EG', 'Arab', '1256'),
(8, '0x0801', 'Arabic (Iraq)', 'ar-IQ', 'Arab', '1256'),
(9, '0x2c01', 'Arabic (Jordan)', 'ar-JO', 'Arab', '1256'),
(10, '0x3401', 'Arabic (Kuwait)', 'ar-KW', 'Arab', '1256'),
(11, '0x3001', 'Arabic (Lebanon)', 'ar-LB', 'Arab', '1256'),
(12, '0x1001', 'Arabic (Libya)', 'ar-LY', 'Arab', '1256'),
(13, '0x1801', 'Arabic (Morocco)', 'ar-MA', 'Arab', '1256'),
(14, '0x2001', 'Arabic (Oman)', 'ar-OM', 'Arab', '1256'),
(15, '0x4001', 'Arabic (Qatar)', 'ar-QA', 'Arab', '1256'),
(16, '0x0401', 'Arabic (Saudi Arabia)', 'ar-SA', 'Arab', '1256'),
(17, '0x2801', 'Arabic (Syria)', 'ar-SY', 'Arab', '1256'),
(18, '0x1c01', 'Arabic (Tunisia)', 'ar-TN', 'Arab', '1256'),
(19, '0x3801', 'Arabic (U.A.E.)', 'ar-AE', 'Arab', '1256'),
(20, '0x2401', 'Arabic (Yemen)', 'ar-YE', 'Arab', '1256'),
(21, '0x042b', 'Armenian (Armenia)', 'hy-AM', 'Armn', 'UTF-8'),
(22, '0x044d', 'Assamese (India)', 'as-IN', '', 'UTF-8'),
(23, '0x082c', 'Azeri (Azerbaijan, Cyrillic)', 'az-Cyrl-AZ', 'Cyrl', '1251'),
(24, '0x042c', 'Azeri (Azerbaijan, Latin)', 'az-Latn-AZ', 'Latn', '1254'),
(25, '0x046d', 'Bashkir (Russia)', 'ba-RU', '', ''),
(26, '0x042d', 'Basque (Basque)', 'eu-ES', 'Latn', '1252'),
(27, '0x0423', 'Belarusian (Belarus)', 'be-BY', 'Cyrl', '1251'),
(28, '0x0445', 'Bengali (India)', 'bn-IN', 'Beng', 'UTF-8'),
(29, '0x201a', 'Bosnian (Bosnia and Herzegovina, Cyrillic)', 'bs-Cyrl-BA', 'Cyrl', '1251'),
(30, '0x141a', 'Bosnian (Bosnia and Herzegovina, Latin)', 'bs-Latn-BA', 'Latn', '1250'),
(31, '0x047e', 'Breton (France)', 'br-FR', 'Latn', '1252'),
(32, '0x0402', 'Bulgarian (Bulgaria)', 'bg-BG', 'Cyrl', '1251'),
(33, '0x0403', 'Catalan (Catalan)', 'ca-ES', 'Latn', '1252'),
(34, '0x0c04', 'Chinese (Hong Kong SAR, PRC)', 'zh-HK', 'Hant', '950'),
(35, '0x1404', 'Chinese (Macao SAR)', 'zh-MO', 'Hant', '950'),
(36, '0x0804', 'Chinese (PRC)', 'zh-CN', 'Hans', '936'),
(37, '0x1004', 'Chinese (Singapore)', 'zh-SG', 'Hans', '936'),
(38, '0x0404', 'Chinese (Taiwan)', 'zh-TW', 'Hant', '950'),
(39, '0x101a', 'Croatian (Bosnia and Herzegovina, Latin)', 'hr-BA', 'Latn', '1250'),
(40, '0x041a', 'Croatian (Croatia)', 'hr-HR', 'Latn', '1250'),
(41, '0x0405', 'Czech (Czech Republic)', 'cs-CZ', 'Latn', '1250'),
(42, '0x0406', 'Danish (Denmark)', 'da-DK', 'Latn', '1252'),
(43, '0x048c', 'Dari (Afghanistan)', 'prs-AF', 'Arab', '1256'),
(44, '0x0465', 'Divehi (Maldives)', 'dv-MV', 'Thaa', 'UTF-8'),
(45, '0x0813', 'Dutch (Belgium)', 'nl-BE', 'Latn', '1252'),
(46, '0x0413', 'Dutch (Netherlands)', 'nl-NL', 'Latn', '1252'),
(47, '0x0c09', 'English (Australia)', 'en-AU', 'Latn', '1252'),
(48, '0x2809', 'English (Belize)', 'en-BZ', 'Latn', '1252'),
(49, '0x1009', 'English (Canada)', 'en-CA', 'Latn', '1252'),
(50, '0x2409', 'English (Caribbean)', 'en-029', 'Latn', '1252'),
(51, '0x4009', 'English (India)', 'en-IN', 'Latn', '1252'),
(52, '0x1809', 'English (Ireland)', 'en-IE', 'Latn', '1252'),
(53, '0x2009', 'English (Jamaica)', 'en-JM', 'Latn', '1252'),
(54, '0x4409', 'English (Malaysia)', 'en-MY', 'Latn', '1252'),
(55, '0x1409', 'English (New Zealand)', 'en-NZ', 'Latn', '1252'),
(56, '0x3409', 'English (Philippines)', 'en-PH', 'Latn', '1252'),
(57, '0x4809', 'English (Singapore)', 'en-SG', 'Latn', '1252'),
(58, '0x1c09', 'English (South Africa)', 'en-ZA', 'Latn', '1252'),
(59, '0x2c09', 'English (Trinidad and Tobago)', 'en-TT', 'Latn', '1252'),
(60, '0x0809', 'English (United Kingdom)', 'en-GB', 'Latn', '1252'),
(61, '0x0409', 'English (United States)', 'en-US', 'Latn', '1252'),
(62, '0x3009', 'English (Zimbabwe)', 'en-ZW', 'Latn', '1252'),
(63, '0x0425', 'Estonian (Estonia)', 'et-EE', 'Latn', '1257'),
(64, '0x0438', 'Faroese (Faroe Islands)', 'fo-FO', 'Latn', '1252'),
(65, '0x0464', 'Filipino (Philippines)', 'fil-PH', 'Latn', '1252'),
(66, '0x040b', 'Finnish (Finland)', 'fi-FI', 'Latn', '1252'),
(67, '0x080c', 'French (Belgium)', 'fr-BE', 'Latn', '1252'),
(68, '0x0c0c', 'French (Canada)', 'fr-CA', 'Latn', '1252'),
(69, '0x040c', 'French (France)', 'fr-FR', 'Latn', '1252'),
(70, '0x140c', 'French (Luxembourg)', 'fr-LU', 'Latn', '1252'),
(71, '0x180c', 'French (Monaco)', 'fr-MC', 'Latn', '1252'),
(72, '0x100c', 'French (Switzerland)', 'fr-CH', 'Latn', '1252'),
(73, '0x0462', 'Frisian (Netherlands)', 'fy-NL', 'Latn', '1252'),
(74, '0x0456', 'Galician (Spain)', 'gl-ES', 'Latn', '1252'),
(75, '0x0437', 'Georgian (Georgia)', 'ka-GE', 'Geor', 'UTF-8'),
(76, '0x0c07', 'German (Austria)', 'de-AT', 'Latn', '1252'),
(77, '0x0407', 'German (Germany)', 'de-DE', 'Latn', '1252'),
(78, '0x1407', 'German (Liechtenstein)', 'de-LI', 'Latn', '1252'),
(79, '0x1007', 'German (Luxembourg)', 'de-LU', 'Latn', '1252'),
(80, '0x0807', 'German (Switzerland)', 'de-CH', 'Latn', '1252'),
(81, '0x0408', 'Greek (Greece)', 'el-GR', 'Grek', '1253'),
(82, '0x046f', 'Greenlandic (Greenland)', 'kl-GL', 'Latn', '1252'),
(83, '0x0447', 'Gujarati (India)', 'gu-IN', 'Gujr', 'UTF-8'),
(84, '0x0468', 'Hausa (Nigeria, Latin)', 'ha-Latn-NG', 'Latn', '1252'),
(85, '0x040d', 'Hebrew (Israel)', 'he-IL', 'Hebr', '1255'),
(86, '0x0439', 'Hindi (India)', 'hi-IN', 'Deva', 'UTF-8'),
(87, '0x040e', 'Hungarian (Hungary)', 'hu-HU', 'Latn', '1250'),
(88, '0x040f', 'Icelandic (Iceland)', 'is-IS', 'Latn', '1252'),
(89, '0x0470', 'Igbo (Nigeria)', 'ig-NG', '', ''),
(90, '0x0421', 'Indonesian (Indonesia)', 'id-ID', 'Latn', '1252'),
(91, '0x085d', 'Inuktitut (Canada, Latin)', 'iu-Latn-CA', 'Latn', '1252'),
(92, '0x045d', 'Inuktitut (Canada, Syllabics)', 'iu-Cans-CA', 'Cans', 'UTF-8'),
(93, '0x083c', 'Irish (Ireland)', 'ga-IE', 'Latn', '1252'),
(94, '0x0410', 'Italian (Italy)', 'it-IT', 'Latn', '1252'),
(95, '0x0810', 'Italian (Switzerland)', 'it-CH', 'Latn', '1252'),
(96, '0x0411', 'Japanese (Japan)', 'ja-JP', 'Hani;Hira;Kana', '932'),
(97, '0x044b', 'Kannada (India)', 'kn-IN', 'Knda', 'UTF-8'),
(98, '0x043f', 'Kazakh (Kazakhstan)', 'kk-KZ', 'Cyrl', '1251'),
(99, '0x0453', 'Khmer (Cambodia)', 'kh-KH', 'Khmr', 'UTF-8'),
(100, '0x0486', 'K''iche (Guatemala)', 'qut-GT', 'Latn', '1252'),
(101, '0x0487', 'Kinyarwanda (Rwanda)', 'rw-RW', 'Latn', '1252'),
(102, '0x0457', 'Konkani (India)', 'kok-IN', 'Deva', 'UTF-8'),
(103, '0x0812', 'Windows 95, Windows NT 4.0 only: Korean (Johab)', '', '', ''),
(104, '0x0412', 'Korean (Korea)', 'ko-KR', 'Hang;Hani', '949'),
(105, '0x0440', 'Kyrgyz (Kyrgyzstan)', 'ky-KG', 'Cyrl', '1251'),
(106, '0x0454', 'Lao (Lao PDR)', 'lo-LA', 'Laoo', 'UTF-8'),
(107, '0x0426', 'Latvian (Latvia)', 'lv-LV', 'Latn', '1257'),
(108, '0x0427', 'Lithuanian (Lithuania)', 'lt-LT', 'Latn', '1257'),
(109, '0x082e', 'Lower Sorbian (Germany)', 'dsb-DE', 'Latn', '1252'),
(110, '0x046e', 'Luxembourgish (Luxembourg)', 'lb-LU', 'Latn', '1252'),
(111, '0x042f', 'Macedonian (Macedonia, FYROM)', 'mk-MK', 'Cyrl', '1251'),
(112, '0x083e', 'Malay (Brunei Darussalam)', 'ms-BN', 'Latn', '1252'),
(113, '0x043e', 'Malay (Malaysia)', 'ms-MY', 'Latn', '1252'),
(114, '0x044c', 'Malayalam (India)', 'ml-IN', 'Mlym', 'UTF-8'),
(115, '0x043a', 'Maltese (Malta)', 'mt-MT', 'Latn', '1252'),
(116, '0x0481', 'Maori (New Zealand)', 'mi-NZ', 'Latn', '1252'),
(117, '0x047a', 'Mapudungun (Chile)', 'arn-CL', 'Latn', '1252'),
(118, '0x044e', 'Marathi (India)', 'mr-IN', 'Deva', 'UTF-8'),
(119, '0x047c', 'Mohawk (Canada)', 'moh-CA', 'Latn', '1252'),
(120, '0x0450', 'Mongolian (Mongolia)', 'mn-Cyrl-MN', 'Cyrl', '1251'),
(121, '0x0850', 'Mongolian (PRC)', 'mn-Mong-CN', 'Mong', 'UTF-8'),
(122, '0x0850', 'Nepali (India)', 'ne-IN', '__', 'UTF-8'),
(123, '0x0461', 'Nepali (Nepal)', 'ne-NP', 'Deva', 'UTF-8'),
(124, '0x0414', 'Norwegian (Bokmål, Norway)', 'nb-NO', 'Latn', '1252'),
(125, '0x0814', 'Norwegian (Nynorsk, Norway)', 'nn-NO', 'Latn', '1252'),
(126, '0x0482', 'Occitan (France)', 'oc-FR', 'Latn', '1252'),
(127, '0x0448', 'Oriya (India)', 'or-IN', 'Orya', 'UTF-8'),
(128, '0x0463', 'Pashto (Afghanistan)', 'ps-AF', '', ''),
(129, '0x0429', 'Persian (Iran)', 'fa-IR', 'Arab', '1256'),
(130, '0x0415', 'Polish (Poland)', 'pl-PL', 'Latn', '1250'),
(131, '0x0416', 'Portuguese (Brazil)', 'pt-BR', 'Latn', '1252'),
(132, '0x0816', 'Portuguese (Portugal)', 'pt-PT', 'Latn', '1252'),
(133, '0x0446', 'Punjabi (India)', 'pa-IN', 'Guru', 'UTF-8'),
(134, '0x046b', 'Quechua (Bolivia)', 'quz-BO', 'Latn', '1252'),
(135, '0x086b', 'Quechua (Ecuador)', 'quz-EC', 'Latn', '1252'),
(136, '0x0c6b', 'Quechua (Peru)', 'quz-PE', 'Latn', '1252'),
(137, '0x0418', 'Romanian (Romania)', 'ro-RO', 'Latn', '1250'),
(138, '0x0417', 'Romansh (Switzerland)', 'rm-CH', 'Latn', '1252'),
(139, '0x0419', 'Russian (Russia)', 'ru-RU', 'Cyrl', '1251'),
(140, '0x243b', 'Sami (Inari, Finland)', 'smn-FI', 'Latn', '1252'),
(141, '0x103b', 'Sami (Lule, Norway)', 'smj-NO', 'Latn', '1252'),
(142, '0x143b', 'Sami (Lule, Sweden)', 'smj-SE', 'Latn', '1252'),
(143, '0x0c3b', 'Sami (Northern, Finland)', 'se-FI', 'Latn', '1252'),
(144, '0x043b', 'Sami (Northern, Norway)', 'se-NO', 'Latn', '1252'),
(145, '0x083b', 'Sami (Northern, Sweden)', 'se-SE', 'Latn', '1252'),
(146, '0x203b', 'Sami (Skolt, Finland)', 'sms-FI', 'Latn', '1252'),
(147, '0x183b', 'Sami (Southern, Norway)', 'sma-NO', 'Latn', '1252'),
(148, '0x1c3b', 'Sami (Southern, Sweden)', 'sma-SE', 'Latn', '1252'),
(149, '0x044f', 'Sanskrit (India)', 'sa-IN', 'Deva', 'UTF-8'),
(150, '0x1c1a', 'Serbian (Bosnia and Herzegovina, Cyrillic)', 'sr-Cyrl-BA', 'Cyrl', '1251'),
(151, '0x181a', 'Serbian (Bosnia and Herzegovina, Latin)', 'sr-Latn-BA', 'Latn', '1250'),
(152, '0x0c1a', 'Serbian (Serbia, Cyrillic)', 'sr-Cyrl-CS', 'Cyrl', '1251'),
(153, '0x081a', 'Serbian (Serbia, Latin)', 'sr-Latn-CS', 'Latn', '1250'),
(154, '0x046c', 'Sesotho sa Leboa/Northern Sotho (South Africa)', 'ns-ZA', 'Latn', '1252'),
(155, '0x0432', 'Setswana/Tswana (South Africa)', 'tn-ZA', 'Latn', '1252'),
(156, '0x045b', 'Sinhala (Sri Lanka)', 'si-LK', 'Sinh', 'UTF-8'),
(157, '0x041b', 'Slovak (Slovakia)', 'sk-SK', 'Latn', '1250'),
(158, '0x0424', 'Slovenian (Slovenia)', 'sl-SI', 'Latn', '1250'),
(159, '0x2c0a', 'Spanish (Argentina)', 'es-AR', 'Latn', '1252'),
(160, '0x400a', 'Spanish (Bolivia)', 'es-BO', 'Latn', '1252'),
(161, '0x340a', 'Spanish (Chile)', 'es-CL', 'Latn', '1252'),
(162, '0x240a', 'Spanish (Colombia)', 'es-CO', 'Latn', '1252'),
(163, '0x140a', 'Spanish (Costa Rica)', 'es-CR', 'Latn', '1252'),
(164, '0x1c0a', 'Spanish (Dominican Republic)', 'es-DO', 'Latn', '1252'),
(165, '0x300a', 'Spanish (Ecuador)', 'es-EC', 'Latn', '1252'),
(166, '0x440a', 'Spanish (El Salvador)', 'es-SV', 'Latn', '1252'),
(167, '0x100a', 'Spanish (Guatemala)', 'es-GT', 'Latn', '1252'),
(168, '0x480a', 'Spanish (Honduras)', 'es-HN', 'Latn', '1252'),
(169, '0x080a', 'Spanish (Mexico)', 'es-MX', 'Latn', '1252'),
(170, '0x4c0a', 'Spanish (Nicaragua)', 'es-NI', 'Latn', '1252'),
(171, '0x180a', 'Spanish (Panama)', 'es-PA', 'Latn', '1252'),
(172, '0x3c0a', 'Spanish (Paraguay)', 'es-PY', 'Latn', '1252'),
(173, '0x280a', 'Spanish (Peru)', 'es-PE', 'Latn', '1252'),
(174, '0x500a', 'Spanish (Puerto Rico)', 'es-PR', 'Latn', '1252'),
(175, '0x0c0a', 'Spanish (Spain)', 'es-ES', 'Latn', '1252'),
(176, '0x040a', 'Spanish (Spain, Traditional Sort)', 'es-ES_tradnl', 'Latn', '1252'),
(177, '0x540a', 'Spanish (United States)', 'es-US', '', ''),
(178, '0x380a', 'Spanish (Uruguay)', 'es-UY', 'Latn', '1252'),
(179, '0x200a', 'Spanish (Venezuela)', 'es-VE', 'Latn', '1252'),
(180, '0x0441', 'Swahili (Kenya)', 'sw-KE', 'Latn', '1252'),
(181, '0x081d', 'Swedish (Finland)', 'sv-FI', 'Latn', '1252'),
(182, '0x041d', 'Swedish (Sweden)', 'sv-SE', 'Latn', '1252'),
(183, '0x045a', 'Syriac (Syria)', 'syr-SY', 'Syrc', 'UTF-8'),
(184, '0x0428', 'Tajik (Tajikistan)', 'tg-Cyrl-TJ', 'Cyrl', '1251'),
(185, '0x085f', 'Tamazight (Algeria, Latin)', 'tzm-Latn-DZ', 'Latn', '1252'),
(186, '0x0449', 'Tamil (India)', 'ta-IN', 'Taml', 'UTF-8'),
(187, '0x0444', 'Tatar (Russia)', 'tt-RU', 'Cyrl', '1251'),
(188, '0x044a', 'Telugu (India)', 'te-IN', 'Telu', 'UTF-8'),
(189, '0x041e', 'Thai (Thailand)', 'th-TH', 'Thai', '874'),
(190, '0x0851', 'Tibetan (Bhutan)', 'bo-BT', 'Tibt', 'UTF-8'),
(191, '0x0451', 'Tibetan (PRC)', 'bo-CN', 'Tibt', 'UTF-8'),
(192, '0x041f', 'Turkish (Turkey)', 'tr-TR', 'Latn', '1254'),
(193, '0x0442', 'Turkmen (Turkmenistan)', 'tk-TM', 'Cyrl', '1251'),
(194, '0x0480', 'Uighur (PRC)', 'ug-CN', 'Arab', '1256'),
(195, '0x0422', 'Ukrainian (Ukraine)', 'uk-UA', 'Cyrl', '1251'),
(196, '0x042e', 'Upper Sorbian (Germany)', 'wen-DE', 'Latn', '1252'),
(197, '0x0820', 'Urdu (India)', 'tr-IN', '', ''),
(198, '0x0420', 'Urdu (Pakistan)', 'ur-PK', 'Arab', '1256'),
(199, '0x0843', 'Uzbek (Uzbekistan, Cyrillic)', 'uz-Cyrl-UZ', 'Cyrl', '1251'),
(200, '0x0443', 'Uzbek (Uzbekistan, Latin)', 'uz-Latn-UZ', 'Latn', '1254'),
(201, '0x042a', 'Vietnamese (Vietnam)', 'vi-VN', 'Latn', '1258'),
(202, '0x0452', 'Welsh (United Kingdom)', 'cy-GB', 'Latn', '1252'),
(203, '0x0488', 'Wolof (Senegal)', 'wo-SN', 'Latn', '1252'),
(204, '0x0434', 'Xhosa/isiXhosa (South Africa)', 'xh-ZA', 'Latn', '1252'),
(205, '0x0485', 'Yakut (Russia)', 'sah-RU', 'Cyrl', '1251'),
(206, '0x0478', 'Yi (PRC)', 'ii-CN', 'Yiii', 'UTF-8'),
(207, '0x046a', 'Yoruba (Nigeria)', 'yo-NG', '', ''),
(208, '0x0435', 'Zulu/isiZulu (South Africa)', 'zu-ZA', 'Latn', '1252');
UPDATE Phrase SET Module = 'Core' WHERE Module IN ('Proj-Base', 'In-Portal');
UPDATE Phrase SET Module = 'Core' WHERE Phrase IN ('la_fld_Phone', 'la_fld_City', 'la_fld_State', 'la_fld_Zip');
UPDATE Phrase SET Module = 'Core' WHERE Phrase IN ('la_col_Image', 'la_col_Username', 'la_fld_AddressLine1', 'la_fld_AddressLine2', 'la_fld_Comments', 'la_fld_Country', 'la_fld_Email', 'la_fld_Language', 'la_fld_Login', 'la_fld_MessageText', 'la_fld_MetaDescription', 'la_fld_MetaKeywords', 'la_fld_Password', 'la_fld_Username', 'la_fld_Type');
UPDATE Phrase SET Phrase = 'la_Add' WHERE Phrase = 'LA_ADD';
UPDATE Phrase SET Phrase = 'la_col_MembershipExpires' WHERE Phrase = 'la_col_membershipexpires';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_Clone' WHERE Phrase = 'la_shorttooltip_clone';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_Edit' WHERE Phrase = 'LA_SHORTTOOLTIP_EDIT';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_Export' WHERE Phrase = 'LA_SHORTTOOLTIP_EXPORT';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_GoUp' WHERE Phrase = 'LA_SHORTTOOLTIP_GOUP';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_Import' WHERE Phrase = 'LA_SHORTTOOLTIP_IMPORT';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_MoveUp' WHERE Phrase = 'la_shorttooltip_moveup';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_MoveDown' WHERE Phrase = 'la_shorttooltip_movedown';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_RescanThemes' WHERE Phrase = 'la_shorttooltip_rescanthemes';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_SetPrimary' WHERE Phrase = 'LA_SHORTTOOLTIP_SETPRIMARY';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_Rebuild' WHERE Phrase = 'LA_SHORTTOOLTIP_REBUILD';
UPDATE Phrase SET Phrase = 'la_Tab_Service' WHERE Phrase = 'la_tab_service';
UPDATE Phrase SET Phrase = 'la_tab_Files' WHERE Phrase = 'la_tab_files';
UPDATE Phrase SET Phrase = 'la_ToolTipShort_Edit_Current_Category' WHERE Phrase = 'LA_TOOLTIPSHORT_EDIT_CURRENT_CATEGORY';
UPDATE Phrase SET Phrase = 'la_ToolTip_Add' WHERE Phrase = 'LA_TOOLTIP_ADD';
UPDATE Phrase SET Phrase = 'la_ToolTip_Add_Product' WHERE Phrase = 'LA_TOOLTIP_ADD_PRODUCT';
UPDATE Phrase SET Phrase = 'la_ToolTip_NewSearchConfig' WHERE Phrase = 'LA_TOOLTIP_NEWSEARCHCONFIG';
UPDATE Phrase SET Phrase = 'la_ToolTip_Prev' WHERE Phrase = 'la_tooltip_prev';
UPDATE Phrase SET Phrase = 'la_Invalid_Password' WHERE Phrase = 'la_invalid_password';
UPDATE Events SET Module = REPLACE(Module, 'In-Portal', 'Core');
DROP TABLE ImportScripts;
CREATE TABLE BanRules (
RuleId int(11) NOT NULL auto_increment,
RuleType tinyint(4) NOT NULL default '0',
ItemField varchar(255) default NULL,
ItemVerb tinyint(4) NOT NULL default '0',
ItemValue varchar(255) NOT NULL default '',
ItemType int(11) NOT NULL default '0',
Priority int(11) NOT NULL default '0',
Status tinyint(4) NOT NULL default '1',
ErrorTag varchar(255) default NULL,
PRIMARY KEY (RuleId),
KEY Status (Status),
KEY Priority (Priority),
KEY ItemType (ItemType)
);
CREATE TABLE CountCache (
ListType int(11) NOT NULL default '0',
ItemType int(11) NOT NULL default '-1',
Value int(11) NOT NULL default '0',
CountCacheId int(11) NOT NULL auto_increment,
LastUpdate int(11) NOT NULL default '0',
ExtraId varchar(50) default NULL,
TodayOnly tinyint(4) NOT NULL default '0',
PRIMARY KEY (CountCacheId)
);
CREATE TABLE Favorites (
FavoriteId int(11) NOT NULL auto_increment,
PortalUserId int(11) NOT NULL default '0',
ResourceId int(11) NOT NULL default '0',
ItemTypeId int(11) NOT NULL default '0',
Modified int(11) NOT NULL default '0',
PRIMARY KEY (FavoriteId),
UNIQUE KEY main (PortalUserId,ResourceId),
KEY Modified (Modified),
KEY ItemTypeId (ItemTypeId)
);
CREATE TABLE Images (
ImageId int(11) NOT NULL auto_increment,
ResourceId int(11) NOT NULL default '0',
Url varchar(255) NOT NULL default '',
Name varchar(255) NOT NULL default '',
AltName VARCHAR(255) NOT NULL DEFAULT '',
ImageIndex int(11) NOT NULL default '0',
LocalImage tinyint(4) NOT NULL default '1',
LocalPath varchar(240) NOT NULL default '',
Enabled int(11) NOT NULL default '1',
DefaultImg int(11) NOT NULL default '0',
ThumbUrl varchar(255) default NULL,
Priority int(11) NOT NULL default '0',
ThumbPath varchar(255) default NULL,
LocalThumb tinyint(4) NOT NULL default '1',
SameImages tinyint(4) NOT NULL default '1',
PRIMARY KEY (ImageId),
KEY ResourceId (ResourceId),
KEY Enabled (Enabled),
KEY Priority (Priority)
);
CREATE TABLE ItemRating (
RatingId int(11) NOT NULL auto_increment,
IPAddress varchar(255) NOT NULL default '',
CreatedOn INT UNSIGNED NULL DEFAULT NULL,
RatingValue int(11) NOT NULL default '0',
ItemId int(11) NOT NULL default '0',
PRIMARY KEY (RatingId),
KEY CreatedOn (CreatedOn),
KEY ItemId (ItemId),
KEY RatingValue (RatingValue)
);
CREATE TABLE ItemReview (
ReviewId int(11) NOT NULL auto_increment,
CreatedOn INT UNSIGNED NULL DEFAULT NULL,
ReviewText longtext NOT NULL,
Rating tinyint(3) unsigned default NULL,
IPAddress varchar(255) NOT NULL default '',
ItemId int(11) NOT NULL default '0',
CreatedById int(11) NOT NULL default '-1',
ItemType tinyint(4) NOT NULL default '0',
Priority int(11) NOT NULL default '0',
Status tinyint(4) NOT NULL default '2',
TextFormat int(11) NOT NULL default '0',
Module varchar(255) NOT NULL default '',
PRIMARY KEY (ReviewId),
KEY CreatedOn (CreatedOn),
KEY ItemId (ItemId),
KEY ItemType (ItemType),
KEY Priority (Priority),
KEY Status (Status)
);
CREATE TABLE ItemTypes (
ItemType int(11) NOT NULL default '0',
Module varchar(50) NOT NULL default '',
Prefix varchar(20) NOT NULL default '',
SourceTable varchar(100) NOT NULL default '',
TitleField varchar(50) default NULL,
CreatorField varchar(255) NOT NULL default '',
PopField varchar(255) default NULL,
RateField varchar(255) default NULL,
LangVar varchar(255) NOT NULL default '',
PrimaryItem int(11) NOT NULL default '0',
EditUrl varchar(255) NOT NULL default '',
ClassName varchar(40) NOT NULL default '',
ItemName varchar(50) NOT NULL default '',
PRIMARY KEY (ItemType),
KEY Module (Module)
);
CREATE TABLE ItemFiles (
FileId int(11) NOT NULL auto_increment,
ResourceId int(11) unsigned NOT NULL default '0',
FileName varchar(255) NOT NULL default '',
FilePath varchar(255) NOT NULL default '',
Size int(11) NOT NULL default '0',
`Status` tinyint(4) NOT NULL default '1',
CreatedOn int(11) unsigned NOT NULL default '0',
CreatedById int(11) NOT NULL default '-1',
MimeType varchar(255) NOT NULL default '',
PRIMARY KEY (FileId),
KEY ResourceId (ResourceId),
KEY CreatedOn (CreatedOn),
KEY Status (Status)
);
CREATE TABLE Relationship (
RelationshipId int(11) NOT NULL auto_increment,
SourceId int(11) default NULL,
TargetId int(11) default NULL,
SourceType tinyint(4) NOT NULL default '0',
TargetType tinyint(4) NOT NULL default '0',
Type int(11) NOT NULL default '0',
Enabled int(11) NOT NULL default '1',
Priority int(11) NOT NULL default '0',
PRIMARY KEY (RelationshipId),
KEY RelSource (SourceId),
KEY RelTarget (TargetId),
KEY `Type` (`Type`),
KEY Enabled (Enabled),
KEY Priority (Priority),
KEY SourceType (SourceType),
KEY TargetType (TargetType)
);
CREATE TABLE SearchConfig (
TableName varchar(40) NOT NULL default '',
FieldName varchar(40) NOT NULL default '',
SimpleSearch tinyint(4) NOT NULL default '1',
AdvancedSearch tinyint(4) NOT NULL default '1',
Description varchar(255) default NULL,
DisplayName varchar(80) default NULL,
ModuleName VARCHAR(20) NOT NULL DEFAULT 'In-Portal',
ConfigHeader varchar(255) default NULL,
DisplayOrder int(11) NOT NULL default '0',
SearchConfigId int(11) NOT NULL auto_increment,
Priority int(11) NOT NULL default '0',
FieldType varchar(20) NOT NULL default 'text',
ForeignField TEXT,
JoinClause TEXT,
IsWhere text,
IsNotWhere text,
ContainsWhere text,
NotContainsWhere text,
CustomFieldId int(11) default NULL,
PRIMARY KEY (SearchConfigId),
KEY SimpleSearch (SimpleSearch),
KEY AdvancedSearch (AdvancedSearch),
KEY DisplayOrder (DisplayOrder),
KEY Priority (Priority),
KEY CustomFieldId (CustomFieldId)
);
CREATE TABLE SearchLog (
SearchLogId int(11) NOT NULL auto_increment,
Keyword varchar(255) NOT NULL default '',
Indices bigint(20) NOT NULL default '0',
SearchType int(11) NOT NULL default '0',
PRIMARY KEY (SearchLogId),
KEY SearchType (SearchType)
);
CREATE TABLE IgnoreKeywords (
keyword varchar(20) NOT NULL default '',
PRIMARY KEY (keyword)
);
CREATE TABLE SpamControl (
ItemResourceId int(11) NOT NULL default '0',
IPaddress varchar(20) NOT NULL default '',
Expire INT UNSIGNED NULL DEFAULT NULL,
PortalUserId int(11) NOT NULL default '0',
DataType varchar(20) default NULL,
KEY PortalUserId (PortalUserId),
KEY Expire (Expire),
KEY ItemResourceId (ItemResourceId)
);
CREATE TABLE StatItem (
StatItemId int(11) NOT NULL auto_increment,
Module varchar(20) NOT NULL default '',
ValueSQL varchar(255) default NULL,
ResetSQL varchar(255) default NULL,
ListLabel varchar(255) NOT NULL default '',
Priority int(11) NOT NULL default '0',
AdminSummary int(11) NOT NULL default '0',
PRIMARY KEY (StatItemId),
KEY AdminSummary (AdminSummary),
KEY Priority (Priority)
);
CREATE TABLE SuggestMail (
email varchar(255) NOT NULL default '',
sent INT UNSIGNED NULL DEFAULT NULL,
PRIMARY KEY (email),
KEY sent (sent)
);
CREATE TABLE SysCache (
SysCacheId int(11) NOT NULL auto_increment,
Name varchar(255) NOT NULL default '',
Value mediumtext,
Expire INT UNSIGNED NULL DEFAULT NULL,
Module varchar(20) default NULL,
Context varchar(255) default NULL,
GroupList varchar(255) NOT NULL default '',
PRIMARY KEY (SysCacheId),
KEY Name (Name)
);
CREATE TABLE TagLibrary (
TagId int(11) NOT NULL auto_increment,
name varchar(255) NOT NULL default '',
description text,
example text,
scope varchar(20) NOT NULL default 'global',
PRIMARY KEY (TagId)
);
CREATE TABLE TagAttributes (
AttrId int(11) NOT NULL auto_increment,
TagId int(11) NOT NULL default '0',
Name varchar(255) NOT NULL default '',
AttrType varchar(20) default NULL,
DefValue varchar(255) default NULL,
Description TEXT,
Required int(11) NOT NULL default '0',
PRIMARY KEY (AttrId),
KEY TagId (TagId)
);
CREATE TABLE ImportScripts (
ImportId INT(11) NOT NULL auto_increment,
Name VARCHAR(255) NOT NULL DEFAULT '',
Description TEXT NOT NULL,
Prefix VARCHAR(10) NOT NULL DEFAULT '',
Module VARCHAR(50) NOT NULL DEFAULT '',
ExtraFields VARCHAR(255) NOT NULL DEFAULT '',
Type VARCHAR(10) NOT NULL DEFAULT '',
Status TINYINT NOT NULL,
PRIMARY KEY (ImportId),
KEY Module (Module),
KEY Status (Status)
);
CREATE TABLE StylesheetSelectors (
SelectorId int(11) NOT NULL auto_increment,
StylesheetId int(11) NOT NULL default '0',
Name varchar(255) NOT NULL default '',
SelectorName varchar(255) NOT NULL default '',
SelectorData text NOT NULL,
Description text NOT NULL,
Type tinyint(4) NOT NULL default '0',
AdvancedCSS text NOT NULL,
ParentId int(11) NOT NULL default '0',
PRIMARY KEY (SelectorId),
KEY StylesheetId (StylesheetId),
KEY ParentId (ParentId),
KEY `Type` (`Type`)
);
CREATE TABLE Visits (
VisitId int(11) NOT NULL auto_increment,
VisitDate int(10) unsigned NOT NULL default '0',
Referer varchar(255) NOT NULL default '',
IPAddress varchar(15) NOT NULL default '',
AffiliateId int(10) unsigned NOT NULL default '0',
PortalUserId int(11) NOT NULL default '-2',
PRIMARY KEY (VisitId),
KEY PortalUserId (PortalUserId),
KEY AffiliateId (AffiliateId),
KEY VisitDate (VisitDate)
);
CREATE TABLE ImportCache (
CacheId int(11) NOT NULL auto_increment,
CacheName varchar(255) NOT NULL default '',
VarName int(11) NOT NULL default '0',
VarValue text NOT NULL,
PRIMARY KEY (CacheId),
KEY CacheName (CacheName),
KEY VarName (VarName)
);
CREATE TABLE RelatedSearches (
RelatedSearchId int(11) NOT NULL auto_increment,
ResourceId int(11) NOT NULL default '0',
Keyword varchar(255) NOT NULL default '',
ItemType tinyint(4) NOT NULL default '0',
Enabled tinyint(4) NOT NULL default '1',
Priority int(11) NOT NULL default '0',
PRIMARY KEY (RelatedSearchId),
KEY Enabled (Enabled),
KEY ItemType (ItemType),
KEY ResourceId (ResourceId)
);
UPDATE Modules SET Path = 'core/', Version='4.3.9' WHERE Name = 'In-Portal';
UPDATE Skins SET Logo = 'just_logo.gif' WHERE Logo = 'just_logo_1.gif';
UPDATE ConfigurationAdmin SET prompt = 'la_config_PathToWebsite' WHERE VariableName = 'Site_Path';
# ===== v 5.0.0 =====
CREATE TABLE StopWords (
StopWordId int(11) NOT NULL auto_increment,
StopWord varchar(255) NOT NULL default '',
PRIMARY KEY (StopWordId),
KEY StopWord (StopWord)
);
INSERT INTO StopWords VALUES (90, '~'),(152, 'on'),(157, 'see'),(156, 'put'),(128, 'and'),(154, 'or'),(155, 'other'),(153, 'one'),(126, 'as'),(127, 'at'),(125, 'are'),(91, '!'),(92, '@'),(93, '#'),(94, '$'),(95, '%'),(96, '^'),(97, '&'),(98, '*'),(99, '('),(100, ')'),(101, '-'),(102, '_'),(103, '='),(104, '+'),(105, '['),(106, '{'),(107, ']'),(108, '}'),(109, '\\'),(110, '|'),(111, ';'),(112, ':'),(113, ''''),(114, '"'),(115, '<'),(116, '.'),(117, '>'),(118, '/'),(119, '?'),(120, 'ah'),(121, 'all'),(122, 'also'),(123, 'am'),(124, 'an'),(151, 'of'),(150, 'note'),(149, 'not'),(148, 'no'),(147, 'may'),(146, 'its'),(145, 'it'),(144, 'is'),(143, 'into'),(142, 'in'),(141, 'had'),(140, 'has'),(139, 'have'),(138, 'from'),(137, 'form'),(136, 'for'),(135, 'end'),(134, 'each'),(133, 'can'),(132, 'by'),(130, 'be'),(131, 'but'),(129, 'any'),(158, 'that'),(159, 'the'),(160, 'their'),(161, 'there'),(162, 'these'),(163, 'they'),(164, 'this'),(165, 'through'),(166, 'thus'),(167, 'to'),(168, 'two'),(169, 'too'),(170, 'up'),(171, 'where'),(172, 'which'),(173, 'with'),(174, 'were'),(175, 'was'),(176, 'you'),(177, 'yet');
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:stop_words.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:stop_words.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:stop_words.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:stop_words.delete', 11, 1, 1, 0);
INSERT INTO ConfigurationAdmin VALUES ('CheckStopWords', 'la_Text_Website', 'la_config_CheckStopWords', 'checkbox', '', '', 10.29, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CheckStopWords', '0', 'In-Portal', 'in-portal:configure_general');
ALTER TABLE SpamControl ADD INDEX (DataType);
CREATE TABLE MailingLists (
MailingId int(10) unsigned NOT NULL auto_increment,
PortalUserId int(11) NOT NULL default '-1',
`To` longtext,
ToParsed longtext,
Attachments text,
`Subject` varchar(255) NOT NULL,
MessageText longtext,
MessageHtml longtext,
`Status` tinyint(3) unsigned NOT NULL default '1',
EmailsQueued int(10) unsigned NOT NULL,
EmailsSent int(10) unsigned NOT NULL,
EmailsTotal int(10) unsigned NOT NULL,
PRIMARY KEY (MailingId),
KEY EmailsTotal (EmailsTotal),
KEY EmailsSent (EmailsSent),
KEY EmailsQueued (EmailsQueued),
KEY `Status` (`Status`),
KEY PortalUserId (PortalUserId)
);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mailing_lists.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mailing_lists.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mailing_lists.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mailing_lists.delete', 11, 1, 1, 0);
ALTER TABLE EmailQueue
ADD MailingId INT UNSIGNED NOT NULL,
ADD INDEX (MailingId);
INSERT INTO ConfigurationAdmin VALUES ('MailingListQueuePerStep', 'la_Text_smtp_server', 'la_config_MailingListQueuePerStep', 'text', NULL, NULL, 30.09, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'MailingListQueuePerStep', 10, 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('MailingListSendPerStep', 'la_Text_smtp_server', 'la_config_MailingListSendPerStep', 'text', NULL, NULL, 30.10, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'MailingListSendPerStep', 10, 'In-Portal', 'in-portal:configure_general');
ALTER TABLE Events ADD INDEX (Event);
ALTER TABLE SearchLog ADD INDEX (Keyword);
ALTER TABLE Skins
ADD LogoBottom VARCHAR(255) NOT NULL AFTER Logo,
ADD LogoLogin VARCHAR(255) NOT NULL AFTER LogoBottom;
UPDATE Skins
SET Logo = 'in-portal_logo_img.jpg', LogoBottom = 'in-portal_logo_img2.jpg', LogoLogin = 'in-portal_logo_login.gif'
WHERE Logo = 'just_logo_1.gif' OR Logo = 'just_logo.gif';
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SiteNameSubTitle', '', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('SiteNameSubTitle', 'la_Text_Website', 'la_config_SiteNameSubTitle', 'text', '', '', 10.021, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('ResizableFrames', 'la_Text_Website', 'la_config_ResizableFrames', 'checkbox', '', '', 10.30, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'ResizableFrames', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('QuickCategoryPermissionRebuild', 'la_Text_General', 'la_config_QuickCategoryPermissionRebuild', 'checkbox', NULL , NULL , 10.12, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'QuickCategoryPermissionRebuild', '1', 'In-Portal', 'in-portal:configure_categories');
ALTER TABLE Language ADD UserDocsUrl VARCHAR(255) NOT NULL;
UPDATE Category SET Template = CategoryTemplate WHERE CategoryTemplate <> '';
ALTER TABLE Category
ADD ThemeId INT UNSIGNED NOT NULL,
ADD INDEX (ThemeId),
ADD COLUMN UseExternalUrl tinyint(3) unsigned NOT NULL default '0' AFTER Template,
ADD COLUMN ExternalUrl varchar(255) NOT NULL default '' AFTER UseExternalUrl,
ADD COLUMN UseMenuIconUrl tinyint(3) unsigned NOT NULL default '0' AFTER ExternalUrl,
ADD COLUMN MenuIconUrl varchar(255) NOT NULL default '' AFTER UseMenuIconUrl,
CHANGE MetaKeywords MetaKeywords TEXT,
CHANGE MetaDescription MetaDescription TEXT,
CHANGE CachedCategoryTemplate CachedTemplate VARCHAR(255) NOT NULL,
DROP CategoryTemplate;
UPDATE Category SET l1_MenuTitle = l1_Name WHERE l1_MenuTitle = '' OR l1_MenuTitle LIKE '_Auto: %';
UPDATE Category SET l2_MenuTitle = l2_Name WHERE l2_MenuTitle = '' OR l2_MenuTitle LIKE '_Auto: %';
UPDATE Category SET l3_MenuTitle = l3_Name WHERE l3_MenuTitle = '' OR l3_MenuTitle LIKE '_Auto: %';
UPDATE Category SET l4_MenuTitle = l4_Name WHERE l4_MenuTitle = '' OR l4_MenuTitle LIKE '_Auto: %';
UPDATE Category SET l5_MenuTitle = l5_Name WHERE l5_MenuTitle = '' OR l5_MenuTitle LIKE '_Auto: %';
UPDATE Category SET Template = '/platform/designs/general' WHERE Template = '/in-edit/designs/general';
UPDATE Category SET CachedTemplate = '/platform/designs/general' WHERE CachedTemplate = '/in-edit/designs/general';
UPDATE Category SET CachedTemplate = Template WHERE Template <> '';
CREATE TABLE PageContent (
PageContentId int(11) NOT NULL auto_increment,
ContentNum int(11) NOT NULL default '0',
PageId int(11) NOT NULL default '0',
l1_Content text,
l2_Content text,
l3_Content text,
l4_Content text,
l5_Content text,
l1_Translated tinyint(4) NOT NULL default '0',
l2_Translated tinyint(4) NOT NULL default '0',
l3_Translated tinyint(4) NOT NULL default '0',
l4_Translated tinyint(4) NOT NULL default '0',
l5_Translated tinyint(4) NOT NULL default '0',
PRIMARY KEY (PageContentId),
KEY ContentNum (ContentNum,PageId)
);
CREATE TABLE FormFields (
FormFieldId int(11) NOT NULL auto_increment,
FormId int(11) NOT NULL default '0',
Type int(11) NOT NULL default '0',
FieldName varchar(255) NOT NULL default '',
FieldLabel varchar(255) default NULL,
Heading varchar(255) default NULL,
Prompt varchar(255) default NULL,
ElementType varchar(50) NOT NULL default '',
ValueList varchar(255) default NULL,
Priority int(11) NOT NULL default '0',
IsSystem tinyint(3) unsigned NOT NULL default '0',
Required tinyint(1) NOT NULL default '0',
DisplayInGrid tinyint(1) NOT NULL default '1',
DefaultValue text NOT NULL,
Validation TINYINT NOT NULL DEFAULT '0',
PRIMARY KEY (FormFieldId),
KEY `Type` (`Type`),
KEY FormId (FormId),
KEY Priority (Priority),
KEY IsSystem (IsSystem),
KEY DisplayInGrid (DisplayInGrid)
);
CREATE TABLE FormSubmissions (
FormSubmissionId int(11) NOT NULL auto_increment,
FormId int(11) NOT NULL default '0',
SubmissionTime int(11) NOT NULL default '0',
PRIMARY KEY (FormSubmissionId),
KEY FormId (FormId),
KEY SubmissionTime (SubmissionTime)
);
CREATE TABLE Forms (
FormId int(11) NOT NULL auto_increment,
Title VARCHAR(255) NOT NULL DEFAULT '',
Description text,
PRIMARY KEY (FormId)
);
UPDATE Events SET Module = 'Core:Category', Description = 'la_event_FormSubmitted' WHERE Event = 'FORM.SUBMITTED';
DELETE FROM PersistantSessionData WHERE VariableName LIKE '%img%';
UPDATE Modules SET TemplatePath = Path WHERE TemplatePath <> '';
UPDATE ConfigurationValues SET VariableValue = '/platform/designs/general' WHERE VariableName = 'cms_DefaultDesign';
UPDATE ConfigurationValues SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_categories' WHERE VariableName = 'cms_DefaultDesign';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.15 WHERE VariableName = 'cms_DefaultDesign';
UPDATE Phrase SET Phrase = 'la_Regular' WHERE Phrase = 'la_regular';
UPDATE Phrase SET Module = 'Core' WHERE Phrase IN ('la_Hide', 'la_Show', 'la_fld_Requied', 'la_col_Modified', 'la_col_Referer', 'la_Regular');
UPDATE Phrase SET Phrase = 'la_title_Editing_E-mail' WHERE Phrase = 'la_title_editing_e-mail';
ALTER TABLE Phrase ADD UNIQUE (LanguageId, Phrase);
ALTER TABLE CustomField ADD IsRequired tinyint(3) unsigned NOT NULL default '0';
DELETE FROM Permissions
WHERE
(Permission LIKE 'proj-cms:structure%') OR
(Permission LIKE 'proj-cms:submissions%') OR
(Permission LIKE 'proj-base:users%') OR
(Permission LIKE 'proj-base:system_variables%') OR
(Permission LIKE 'proj-base:email_settings%') OR
(Permission LIKE 'proj-base:other_settings%') OR
(Permission LIKE 'proj-base:sysconfig%');
UPDATE Permissions SET Permission = REPLACE(Permission, 'proj-cms:browse', 'in-portal:browse_site');
UPDATE Permissions SET Permission = REPLACE(Permission, 'proj-cms:', 'in-portal:');
UPDATE Permissions SET Permission = REPLACE(Permission, 'proj-base:', 'in-portal:');
ALTER TABLE CategoryItems ADD INDEX (ItemResourceId);
ALTER TABLE CategoryItems DROP INDEX Filename;
ALTER TABLE CategoryItems ADD INDEX Filename(Filename);
DROP TABLE Pages;
DELETE FROM PermissionConfig WHERE PermissionName LIKE 'PAGE.%';
DELETE FROM Permissions WHERE Permission LIKE 'PAGE.%';
DELETE FROM SearchConfig WHERE TableName = 'Pages';
DELETE FROM ConfigurationAdmin WHERE VariableName LIKE '%_pages';
DELETE FROM ConfigurationValues WHERE VariableName LIKE '%_pages';
DELETE FROM ConfigurationAdmin WHERE VariableName LIKE 'PerPage_Pages%';
DELETE FROM ConfigurationValues WHERE VariableName LIKE 'PerPage_Pages%';
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:website_setting_folder.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_setting_folder.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_advanced.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_advanced.edit', 11, 1, 1, 0);
#INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.delete', 11, 1, 1, 0);
#INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.edit', 11, 1, 1, 0);
#INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.add', 11, 1, 1, 0);
#INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.view', 11, 1, 1, 0);
UPDATE ConfigurationValues
SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_general'
WHERE ModuleOwner = 'Proj-Base' AND Section IN ('proj-base:system_variables', 'proj-base:email_settings');
UPDATE ConfigurationValues
SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_advanced'
WHERE ModuleOwner = 'Proj-Base' AND Section IN ('proj-base:other_settings', 'proj-base:sysconfig');
UPDATE ConfigurationAdmin SET heading = 'la_Text_General' WHERE VariableName IN ('AdvancedUserManagement', 'RememberLastAdminTemplate', 'DefaultSettingsUserId');
UPDATE ConfigurationAdmin SET DisplayOrder = 10.011 WHERE VariableName = 'AdvancedUserManagement';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.14 WHERE VariableName = 'RememberLastAdminTemplate';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.15 WHERE VariableName = 'DefaultSettingsUserId';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.13 WHERE VariableName = 'FilenameSpecialCharReplacement';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.14 WHERE VariableName = 'YahooApplicationId';
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsMailling', prompt = 'la_prompt_AdminMailFrom', ValueList = 'size="40"', DisplayOrder = 30.07 WHERE VariableName = 'Smtp_AdminMailFrom';
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsWebsite' WHERE VariableName IN ('Site_Path','SiteNameSubTitle','UseModRewrite','Config_Server_Time','Config_Site_Time','ErrorTemplate','NoPermissionTemplate','UsePageHitCounter','ForceImageMagickResize','CheckStopWords','Site_Name');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsSession' WHERE VariableName IN ('CookieSessions','SessionCookieName','SessionTimeout','KeepSessionOnBrowserClose','SessionReferrerCheck','UseJSRedirect');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsSSL' WHERE VariableName IN ('SSL_URL','AdminSSL_URL','Require_SSL','Require_AdminSSL','Force_HTTP_When_SSL_Not_Required','UseModRewriteWithSSL');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsAdmin' WHERE VariableName IN ('UseToolbarLabels','UseSmallHeader','UseColumnFreezer','UsePopups','UseDoubleSorting','MenuFrameWidth','ResizableFrames','AutoRefreshIntervals');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsMailling' WHERE VariableName IN ('Smtp_Server','Smtp_Port','Smtp_Authenticate','Smtp_User','Smtp_Pass','Smtp_DefaultHeaders','MailFunctionHeaderSeparator','MailingListQueuePerStep','MailingListSendPerStep');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsSystem' WHERE VariableName IN ('UseOutputCompression','OutputCompressionLevel','TrimRequiredFields','UseCronForRegularEvent','UseChangeLog','Backup_Path','SystemTagCache','SocketBlockingMode');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsCSVExport' WHERE VariableName IN ('CSVExportDelimiter','CSVExportEnclosure','CSVExportSeparator','CSVExportEncoding');
UPDATE ConfigurationAdmin SET DisplayOrder = 10.01 WHERE VariableName = 'Site_Path';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.02 WHERE VariableName = 'SiteNameSubTitle';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.03 WHERE VariableName = 'UseModRewrite';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.04 WHERE VariableName = 'Config_Server_Time';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.05 WHERE VariableName = 'Config_Site_Time';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.06 WHERE VariableName = 'ErrorTemplate';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.07 WHERE VariableName = 'NoPermissionTemplate';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.08 WHERE VariableName = 'UsePageHitCounter';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.09 WHERE VariableName = 'ForceImageMagickResize';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.10 WHERE VariableName = 'CheckStopWords';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.01 WHERE VariableName = 'CookieSessions';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.02 WHERE VariableName = 'SessionCookieName';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.03 WHERE VariableName = 'SessionTimeout';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.04 WHERE VariableName = 'KeepSessionOnBrowserClose';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.05 WHERE VariableName = 'SessionReferrerCheck';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.06 WHERE VariableName = 'UseJSRedirect';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.01 WHERE VariableName = 'SSL_URL';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.02 WHERE VariableName = 'AdminSSL_URL';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.03 WHERE VariableName = 'Require_SSL';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.04 WHERE VariableName = 'Require_AdminSSL';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.05 WHERE VariableName = 'Force_HTTP_When_SSL_Not_Required';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.06 WHERE VariableName = 'UseModRewriteWithSSL';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.01 WHERE VariableName = 'UseToolbarLabels';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.02 WHERE VariableName = 'UseSmallHeader';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.03 WHERE VariableName = 'UseColumnFreezer';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.04 WHERE VariableName = 'UsePopups';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.05 WHERE VariableName = 'UseDoubleSorting';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.06 WHERE VariableName = 'MenuFrameWidth';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.07 WHERE VariableName = 'ResizableFrames';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.08 WHERE VariableName = 'AutoRefreshIntervals';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.01 WHERE VariableName = 'Smtp_Server';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.02 WHERE VariableName = 'Smtp_Port';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.03 WHERE VariableName = 'Smtp_Authenticate';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.04 WHERE VariableName = 'Smtp_User';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.05 WHERE VariableName = 'Smtp_Pass';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.06 WHERE VariableName = 'Smtp_DefaultHeaders';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.07 WHERE VariableName = 'MailFunctionHeaderSeparator';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.08 WHERE VariableName = 'MailingListQueuePerStep';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.09 WHERE VariableName = 'MailingListSendPerStep';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.01 WHERE VariableName = 'UseOutputCompression';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.02 WHERE VariableName = 'OutputCompressionLevel';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.03 WHERE VariableName = 'TrimRequiredFields';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.04 WHERE VariableName = 'UseCronForRegularEvent';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.05 WHERE VariableName = 'UseChangeLog';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.06 WHERE VariableName = 'Backup_Path';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.07 WHERE VariableName = 'SystemTagCache';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.08 WHERE VariableName = 'SocketBlockingMode';
UPDATE ConfigurationAdmin SET DisplayOrder = 70.01 WHERE VariableName = 'CSVExportDelimiter';
UPDATE ConfigurationAdmin SET DisplayOrder = 70.02 WHERE VariableName = 'CSVExportEnclosure';
UPDATE ConfigurationAdmin SET DisplayOrder = 70.03 WHERE VariableName = 'CSVExportSeparator';
UPDATE ConfigurationAdmin SET DisplayOrder = 70.04 WHERE VariableName = 'CSVExportEncoding';
UPDATE Phrase SET Phrase = 'la_section_SettingsWebsite' WHERE Phrase = 'la_Text_Website';
UPDATE Phrase SET Phrase = 'la_section_SettingsMailling' WHERE Phrase = 'la_Text_smtp_server';
UPDATE Phrase SET Phrase = 'la_section_SettingsCSVExport' WHERE Phrase = 'la_Text_CSV_Export';
DELETE FROM Phrase WHERE Phrase IN (
'la_Text_BackupPath', 'la_config_AllowManualFilenames', 'la_fld_cat_MenuLink', 'la_fld_UseCategoryTitle',
'la_In-Edit', 'la_ItemTab_Pages', 'la_Text_Pages', 'la_title_Pages', 'la_title_Page_Categories', 'lu_Pages',
'lu_page_HtmlTitle', 'lu_page_OnPageTitle', 'la_tab_AllPages', 'la_title_AllPages', 'la_title_ContentManagement',
'la_title_ContentManagment', 'lu_ViewSubPages', 'la_CMS_FormSubmitted'
);
DELETE FROM Phrase WHERE (Phrase LIKE 'la_Description_In-Edit%') OR (Phrase LIKE 'la_Pages_PerPage%') OR (Phrase LIKE 'lu_PermName_Page.%');
UPDATE ConfigurationValues
SET VariableValue = 1, ModuleOwner = 'In-Portal:Users', Section = 'in-portal:configure_users'
WHERE VariableName = 'RememberLastAdminTemplate';
UPDATE ConfigurationValues
SET ModuleOwner = 'In-Portal:Users', Section = 'in-portal:configure_users'
WHERE VariableName IN ('AdvancedUserManagement', 'DefaultSettingsUserId');
INSERT INTO ConfigurationAdmin VALUES ('Search_MinKeyword_Length', 'la_Text_General', 'la_config_Search_MinKeyword_Length', 'text', NULL, NULL, 10.19, 0, 0);
UPDATE ConfigurationValues SET Section = 'in-portal:configure_categories' WHERE VariableName = 'Search_MinKeyword_Length';
UPDATE ConfigurationAdmin
SET ValueList = '=+,<SQL>SELECT DestName AS OptionName, DestId AS OptionValue FROM <PREFIX>StdDestinations WHERE COALESCE(DestParentId, 0) = 0 ORDER BY OptionName</SQL>'
WHERE VariableName = 'User_Default_Registration_Country';
UPDATE ConfigurationValues
SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_advanced'
WHERE VariableName IN (
'Site_Path', 'SiteNameSubTitle', 'CookieSessions', 'SessionCookieName', 'SessionTimeout', 'SessionReferrerCheck',
'SystemTagCache', 'SocketBlockingMode', 'SSL_URL', 'AdminSSL_URL', 'Require_SSL', 'Force_HTTP_When_SSL_Not_Required',
'UseModRewrite', 'UseModRewriteWithSSL', 'UseJSRedirect', 'UseCronForRegularEvent', 'ErrorTemplate',
'NoPermissionTemplate', 'UseOutputCompression', 'OutputCompressionLevel', 'UseToolbarLabels', 'UseSmallHeader',
'UseColumnFreezer', 'TrimRequiredFields', 'UsePageHitCounter', 'UseChangeLog', 'AutoRefreshIntervals',
'KeepSessionOnBrowserClose', 'ForceImageMagickResize', 'CheckStopWords', 'ResizableFrames', 'Config_Server_Time',
'Config_Site_Time', 'Smtp_Server', 'Smtp_Port', 'Smtp_Authenticate', 'Smtp_User', 'Smtp_Pass', 'Smtp_DefaultHeaders',
'MailFunctionHeaderSeparator', 'MailingListQueuePerStep', 'MailingListSendPerStep', 'Backup_Path',
'CSVExportDelimiter', 'CSVExportEnclosure', 'CSVExportSeparator', 'CSVExportEncoding'
);
DELETE FROM ConfigurationValues WHERE VariableName IN (
'Columns_Category', 'Perpage_Archive', 'debug', 'Perpage_User', 'Perpage_LangEmail', 'Default_FromAddr',
'email_replyto', 'email_footer', 'Default_Theme', 'Default_Language', 'User_SortField', 'User_SortOrder',
'Suggest_MinInterval', 'SubCat_ListCount', 'Timeout_Rating', 'Perpage_Relations', 'Group_SortField',
'Group_SortOrder', 'Default_FromName', 'Relation_LV_Sortfield', 'ampm_time', 'Perpage_Template',
'Perpage_Phrase', 'Perpage_Sessionlist', 'Perpage_Items', 'GuestSessions', 'Perpage_Email',
'LinksValidation_LV_Sortfield', 'CustomConfig_LV_Sortfield', 'Event_LV_SortField', 'Theme_LV_SortField',
'Template_LV_SortField', 'Lang_LV_SortField', 'Phrase_LV_SortField', 'LangEmail_LV_SortField',
'CustomData_LV_SortField', 'Summary_SortField', 'Session_SortField', 'SearchLog_SortField', 'Perpage_StatItem',
'Perpage_Groups', 'Perpage_Event', 'Perpage_BanRules', 'Perpage_SearchLog', 'Perpage_LV_lang',
'Perpage_LV_Themes', 'Perpage_LV_Catlist', 'Perpage_Reviews', 'Perpage_Modules', 'Perpage_Grouplist',
'Perpage_Images', 'EmailsL_SortField', 'Perpage_EmailsL', 'Perpage_CustomData', 'Perpage_Review',
'SearchRel_DefaultIncrease', 'SearchRel_DefaultKeyword', 'SearchRel_DefaultPop', 'SearchRel_DefaultRating',
'Category_Highlight_OpenTag', 'Category_Highlight_CloseTag', 'DomainSelect', 'MetaKeywords', 'MetaDescription',
'Config_Name', 'Config_Company', 'Config_Reg_Number', 'Config_Website_Name', 'Config_Web_Address',
'Smtp_SendHTML', 'ProjCMSAllowManualFilenames'
);
DELETE FROM ConfigurationAdmin WHERE VariableName IN ('Domain_Detect', 'Server_Name', 'ProjCMSAllowManualFilenames');
DROP TABLE SuggestMail;
ALTER TABLE ThemeFiles ADD FileMetaInfo TEXT NULL;
UPDATE SearchConfig
SET SimpleSearch = 0
WHERE FieldType NOT IN ('text', 'range') AND SimpleSearch = 1;
DELETE FROM PersistantSessionData WHERE VariableName IN ('c_columns_.', 'c.showall_columns_.', 'emailevents_columns_.', 'emailmessages_columns_.');
INSERT INTO ConfigurationAdmin VALUES ('DebugOnlyFormConfigurator', 'la_section_SettingsAdmin', 'la_config_DebugOnlyFormConfigurator', 'checkbox', '', '', 40.09, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'DebugOnlyFormConfigurator', '0', 'In-Portal', 'in-portal:configure_advanced');
CREATE TABLE Semaphores (
SemaphoreId int(11) NOT NULL auto_increment,
SessionKey int(10) unsigned NOT NULL,
Timestamp int(10) unsigned NOT NULL,
MainPrefix varchar(255) NOT NULL,
PRIMARY KEY (SemaphoreId),
KEY SessionKey (SessionKey),
KEY Timestamp (Timestamp),
KEY MainPrefix (MainPrefix)
);
ALTER TABLE Language ADD IconDisabledURL VARCHAR(255) NULL DEFAULT NULL AFTER IconURL;
UPDATE Phrase
SET Translation = REPLACE(Translation, 'category', 'section')
WHERE (Phrase IN (
'la_confirm_maintenance', 'la_error_move_subcategory', 'la_error_RootCategoriesDelete',
'la_error_unknown_category', 'la_fld_IsBaseCategory', 'la_nextcategory', 'la_prevcategory',
'la_prompt_max_import_category_levels', 'la_prompt_root_name', 'la_SeparatedCategoryPath',
'la_title_category_select'
) OR Phrase LIKE 'la_Description_%') AND (PhraseType = 1);
UPDATE Phrase SET Translation = REPLACE(Translation, 'Category', 'Section') WHERE PhraseType = 1;
UPDATE Phrase
SET Translation = REPLACE(Translation, 'categories', 'sections')
WHERE (Phrase IN (
'la_category_perpage_prompt', 'la_category_showpick_prompt', 'la_category_sortfield_prompt',
'la_Description_in-portal:advanced_view', 'la_Description_in-portal:browse', 'la_Description_in-portal:site',
'la_error_copy_subcategory', 'la_Msg_PropagateCategoryStatus', 'la_Text_DataType_1'
)) AND (PhraseType = 1);
UPDATE Phrase SET Translation = REPLACE(Translation, 'Categories', 'Sections') WHERE PhraseType = 1;
UPDATE Phrase
SET Translation = REPLACE(Translation, 'Page', 'Section')
WHERE (Phrase IN ('la_col_PageTitle', 'la_col_System', 'la_fld_IsIndex', 'la_fld_PageTitle', 'la_section_Page')) AND (PhraseType = 1);
DELETE FROM Phrase WHERE Phrase IN ('la_title_Adding_Page', 'la_title_Editing_Page', 'la_title_New_Page', 'la_fld_PageId');
INSERT INTO ConfigurationAdmin VALUES ('UseModalWindows', 'la_section_SettingsAdmin', 'la_config_UseModalWindows', 'checkbox', '', '', 40.10, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseModalWindows', '1', 'In-Portal', 'in-portal:configure_advanced');
UPDATE Language SET UserDocsUrl = 'http://docs.in-portal.org/eng/index.php';
DELETE FROM Modules WHERE Name = 'Proj-Base';
DELETE FROM Phrase WHERE Phrase IN ('la_fld_ImageId', 'la_fld_RelationshipId', 'la_fld_ReviewId', 'la_prompt_CensorhipId', 'my_account_title', 'Next Theme', 'Previous Theme', 'test 1', 'la_article_reviewed', 'la_configerror_review', 'la_link_reviewed', 'la_Prompt_ReviewedBy', 'la_prompt_ReviewId', 'la_prompt_ReviewText', 'la_reviewer', 'la_review_added', 'la_review_alreadyreviewed', 'la_review_error', 'la_tab_Editing_Review', 'la_tab_Review', 'la_ToolTip_New_Review', 'la_topic_reviewed', 'lu_add_review', 'lu_article_reviews', 'lu_ferror_review_duplicate', 'lu_link_addreview_confirm_pending_text', 'lu_link_reviews', 'lu_link_review_confirm', 'lu_link_review_confirm_pending', 'lu_link_addreview_confirm_text', 'lu_news_addreview_confirm_text', 'lu_news_addreview_confirm__pending_text', 'lu_news_review_confirm', 'lu_news_review_confirm_pending', 'lu_prompt_review', 'lu_reviews_updated', 'lu_review_access_denied', 'lu_review_article', 'lu_review_link', 'lu_review_news', 'lu_review_this_article', 'lu_fld_Review', 'lu_product_reviews', 'lu_ReviewProduct', ' lu_resetpw_confirm_text', 'lu_resetpw_confirm_text');
UPDATE Modules SET Version = '5.0.0', Loaded = 1 WHERE Name = 'In-Portal';
# ===== v 5.0.1 =====
UPDATE ConfigurationAdmin
SET ValueList = '1=la_opt_UserInstantRegistration,2=la_opt_UserNotAllowedRegistration,3=la_opt_UserUponApprovalRegistration,4=la_opt_UserEmailActivation'
WHERE VariableName = 'User_Allow_New';
UPDATE ConfigurationValues SET VariableValue = '1' WHERE VariableName = 'ResizableFrames';
UPDATE Phrase
SET Translation = REPLACE(Translation, 'Page', 'Section')
WHERE (Phrase IN ('la_col_PageTitle', 'la_col_System', 'la_fld_IsIndex', 'la_fld_PageTitle', 'la_section_Page')) AND (PhraseType = 1);
DELETE FROM Phrase WHERE Phrase IN ('la_Tab', 'la_Colon', 'la_Semicolon', 'la_Space', 'la_Colon', 'la_User_Instant', 'la_User_Not_Allowed', 'la_User_Upon_Approval', 'lu_title_PrivacyPolicy');
UPDATE ConfigurationAdmin SET ValueList = '0=la_opt_Tab,1=la_opt_Comma,2=la_opt_Semicolon,3=la_opt_Space,4=la_opt_Colon'
WHERE VariableName = 'CSVExportDelimiter';
UPDATE ConfigurationAdmin SET ValueList = '0=lu_opt_QueryString,1=lu_opt_Cookies,2=lu_opt_AutoDetect'
WHERE VariableName = 'CookieSessions';
UPDATE ConfigurationAdmin SET ValueList = 'Name=la_opt_Title,Description=la_opt_Description,CreatedOn=la_opt_CreatedOn,EditorsPick=la_opt_EditorsPick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>'
WHERE VariableName = 'Category_Sortfield';
UPDATE ConfigurationAdmin SET ValueList = 'Name=la_opt_Title,Description=la_opt_Description,CreatedOn=la_opt_CreatedOn,EditorsPick=la_opt_EditorsPick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>'
WHERE VariableName = 'Category_Sortfield2';
UPDATE Category SET Template = '#inherit#' WHERE COALESCE(Template, '') = '';
ALTER TABLE Category CHANGE Template Template VARCHAR(255) NOT NULL DEFAULT '#inherit#';
UPDATE Phrase SET Phrase = 'la_config_DefaultDesignTemplate' WHERE Phrase = 'la_prompt_DefaultDesignTemplate';
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsWebsite', prompt = 'la_config_DefaultDesignTemplate', DisplayOrder = 10.06 WHERE VariableName = 'cms_DefaultDesign';
UPDATE ConfigurationValues SET Section = 'in-portal:configure_advanced' WHERE VariableName = 'cms_DefaultDesign';
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder + 0.01 WHERE VariableName IN ('ErrorTemplate', 'NoPermissionTemplate');
UPDATE ConfigurationAdmin SET DisplayOrder = 10.15 WHERE VariableName = 'Search_MinKeyword_Length';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.01 WHERE VariableName = 'Site_Name';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.01 WHERE VariableName = 'FirstDayOfWeek';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.01 WHERE VariableName = 'Smtp_AdminMailFrom';
UPDATE ConfigurationAdmin SET heading = 'la_Text_Date_Time_Settings', DisplayOrder = DisplayOrder + 9.98 WHERE VariableName IN ('Config_Server_Time', 'Config_Site_Time');
UPDATE ConfigurationValues SET Section = 'in-portal:configure_general' WHERE VariableName IN ('Config_Server_Time', 'Config_Site_Time');
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder - 0.02 WHERE VariableName IN ('cms_DefaultDesign', 'ErrorTemplate', 'NoPermissionTemplate', 'UsePageHitCounter', 'ForceImageMagickResize', 'CheckStopWords');
UPDATE ConfigurationAdmin SET DisplayOrder = 40.01 WHERE VariableName = 'SessionTimeout';
UPDATE ConfigurationValues SET Section = 'in-portal:configure_general' WHERE VariableName = 'SessionTimeout';
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder - 0.01 WHERE VariableName IN ('KeepSessionOnBrowserClose', 'SessionReferrerCheck', 'UseJSRedirect');
ALTER TABLE Events
ADD FrontEndOnly TINYINT UNSIGNED NOT NULL DEFAULT '0' AFTER Enabled,
ADD INDEX (FrontEndOnly);
UPDATE Events SET FrontEndOnly = 1 WHERE Enabled = 2;
UPDATE Events SET Enabled = 1 WHERE Enabled = 2;
ALTER TABLE Events CHANGE FromUserId FromUserId INT(11) NULL DEFAULT NULL;
UPDATE Events SET FromUserId = NULL WHERE FromUserId = 0;
DELETE FROM ConfigurationAdmin WHERE VariableName = 'SiteNameSubTitle';
DELETE FROM ConfigurationValues WHERE VariableName = 'SiteNameSubTitle';
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder - 0.01 WHERE VariableName IN ('UseModRewrite', 'cms_DefaultDesign', 'ErrorTemplate' 'NoPermissionTemplate', 'UsePageHitCounter', 'ForceImageMagickResize', 'CheckStopWords');
ALTER TABLE ConfigurationAdmin CHANGE validation Validation TEXT NULL DEFAULT NULL;
UPDATE ConfigurationAdmin SET Validation = 'a:3:{s:4:"type";s:3:"int";s:13:"min_value_inc";i:1;s:8:"required";i:1;}' WHERE VariableName = 'SessionTimeout';
INSERT INTO ConfigurationAdmin VALUES ('AdminConsoleInterface', 'la_section_SettingsAdmin', 'la_config_AdminConsoleInterface', 'select', '', 'simple=+simple,advanced=+advanced,custom=+custom', 50.01, 0, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'AdminConsoleInterface', 'simple', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('AllowAdminConsoleInterfaceChange', 'la_section_SettingsAdmin', 'la_config_AllowAdminConsoleInterfaceChange', 'checkbox', NULL , NULL , 40.01, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'AllowAdminConsoleInterfaceChange', '1', 'In-Portal', 'in-portal:configure_advanced');
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder + 0.01 WHERE VariableName IN ('UseToolbarLabels', 'UseSmallHeader', 'UseColumnFreezer', 'UsePopups', 'UseDoubleSorting', 'MenuFrameWidth', 'ResizableFrames', 'AutoRefreshIntervals', 'DebugOnlyFormConfigurator', 'UseModalWindows');
INSERT INTO ConfigurationAdmin VALUES ('UseTemplateCompression', 'la_section_SettingsSystem', 'la_config_UseTemplateCompression', 'checkbox', '', '', 60.03, 0, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseTemplateCompression', '0', 'In-Portal', 'in-portal:configure_advanced');
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder + 0.01 WHERE VariableName IN ('TrimRequiredFields', 'UseCronForRegularEvent', 'UseChangeLog', 'Backup_Path', 'SystemTagCache', 'SocketBlockingMode');
DELETE FROM ConfigurationAdmin WHERE VariableName = 'UseModalWindows';
DELETE FROM ConfigurationValues WHERE VariableName = 'UseModalWindows';
DELETE FROM Phrase WHERE Phrase = 'la_config_UseModalWindows';
UPDATE ConfigurationAdmin SET element_type = 'select', ValueList = '0=la_opt_SameWindow,1=la_opt_PopupWindow,2=la_opt_ModalWindow' WHERE VariableName = 'UsePopups';
UPDATE Phrase SET Translation = 'Editing Window Style' WHERE Phrase = 'la_config_UsePopups';
INSERT INTO ConfigurationAdmin VALUES ('UseVisitorTracking', 'la_section_SettingsWebsite', 'la_config_UseVisitorTracking', 'checkbox', '', '', 10.09, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseVisitorTracking', '0', 'In-Portal', 'in-portal:configure_advanced');
DELETE FROM ConfigurationAdmin WHERE VariableName = 'SessionReferrerCheck';
DELETE FROM ConfigurationValues WHERE VariableName = 'SessionReferrerCheck';
DELETE FROM Phrase WHERE Phrase = 'la_promt_ReferrerCheck';
INSERT INTO ConfigurationAdmin VALUES ('SessionBrowserSignatureCheck', 'la_section_SettingsSession', 'la_config_SessionBrowserSignatureCheck', 'checkbox', NULL, NULL, 20.04, 0, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SessionBrowserSignatureCheck', '0', 'In-Portal', 'in-portal:configure_advanced');
INSERT INTO ConfigurationAdmin VALUES ('SessionIPAddressCheck', 'la_section_SettingsSession', 'la_config_SessionIPAddressCheck', 'checkbox', NULL, NULL, 20.05, 0, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SessionIPAddressCheck', '0', 'In-Portal', 'in-portal:configure_advanced');
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder + 0.01 WHERE VariableName = 'UseJSRedirect';
ALTER TABLE UserSession
DROP CurrentTempKey,
DROP PrevTempKey,
ADD BrowserSignature VARCHAR(32) NOT NULL,
ADD INDEX (BrowserSignature);
UPDATE ConfigurationAdmin
SET DisplayOrder = DisplayOrder + 0.01
WHERE heading = 'la_section_SettingsAdmin' AND DisplayOrder > 40 AND DisplayOrder < 50;
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsAdmin', DisplayOrder = 40.01 WHERE VariableName = 'RootPass';
UPDATE ConfigurationValues SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_advanced' WHERE VariableName = 'RootPass';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.12 WHERE VariableName = 'User_Default_Registration_Country';
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsAdmin', DisplayOrder = 40.12 WHERE VariableName = 'RememberLastAdminTemplate';
UPDATE ConfigurationValues SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_advanced' WHERE VariableName = 'RememberLastAdminTemplate';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.14 WHERE VariableName = 'DefaultSettingsUserId';
INSERT INTO ConfigurationAdmin VALUES ('UseHTTPAuth', 'la_section_SettingsAdmin', 'la_config_UseHTTPAuth', 'checkbox', '', '', 40.13, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseHTTPAuth', '0', 'In-Portal', 'in-portal:configure_advanced');
INSERT INTO ConfigurationAdmin VALUES ('HTTPAuthUsername', 'la_section_SettingsAdmin', 'la_config_HTTPAuthUsername', 'text', '', '', 40.14, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'HTTPAuthUsername', '', 'In-Portal', 'in-portal:configure_advanced');
INSERT INTO ConfigurationAdmin VALUES ('HTTPAuthPassword', 'la_section_SettingsAdmin', 'la_config_HTTPAuthPassword', 'password', NULL, NULL, 40.15, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'HTTPAuthPassword', '', 'In-Portal', 'in-portal:configure_advanced');
INSERT INTO ConfigurationAdmin VALUES ('HTTPAuthBypassIPs', 'la_section_SettingsAdmin', 'la_config_HTTPAuthBypassIPs', 'text', '', '', 40.15, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'HTTPAuthBypassIPs', '', 'In-Portal', 'in-portal:configure_advanced');
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:service.edit', 11, 1, 1, 0);
UPDATE Phrase SET Phrase = 'la_col_Rating' WHERE Phrase = 'la_col_rating';
UPDATE Phrase SET Phrase = 'la_text_Review' WHERE Phrase = 'la_text_review';
UPDATE Phrase SET Phrase = 'la_title_Reviews' WHERE Phrase = 'la_title_reviews';
UPDATE Phrase SET Phrase = 'la_ToolTip_cancel' WHERE Phrase = 'la_tooltip_cancel';
ALTER TABLE Phrase
ADD PhraseKey VARCHAR(255) NOT NULL AFTER Phrase,
ADD INDEX (PhraseKey);
UPDATE Phrase SET PhraseKey = UPPER(Phrase);
UPDATE Modules SET Loaded = 1 WHERE `Name` = 'In-Portal';
# ===== v 5.0.2-B1 =====
ALTER TABLE PortalGroup DROP ResourceId;
ALTER TABLE Category
DROP l1_Translated,
DROP l2_Translated,
DROP l3_Translated,
DROP l4_Translated,
DROP l5_Translated;
ALTER TABLE PageContent
DROP l1_Translated,
DROP l2_Translated,
DROP l3_Translated,
DROP l4_Translated,
DROP l5_Translated;
ALTER TABLE Category
CHANGE CachedTemplate CachedTemplate varchar(255) NOT NULL DEFAULT '',
CHANGE ThemeId ThemeId int(10) unsigned NOT NULL DEFAULT '0';
ALTER TABLE UserSession CHANGE BrowserSignature BrowserSignature varchar(32) NOT NULL DEFAULT '';
ALTER TABLE ChangeLogs
CHANGE Changes Changes text NULL,
CHANGE OccuredOn OccuredOn INT(11) NULL DEFAULT NULL;
ALTER TABLE EmailLog CHANGE EventParams EventParams text NULL;
ALTER TABLE FormFields CHANGE DefaultValue DefaultValue text NULL;
ALTER TABLE ImportCache CHANGE VarValue VarValue text NULL;
ALTER TABLE ImportScripts CHANGE Description Description text NULL;
ALTER TABLE PersistantSessionData CHANGE VariableValue VariableValue text NULL;
ALTER TABLE Phrase
CHANGE `Translation` `Translation` text NULL,
CHANGE PhraseKey PhraseKey VARCHAR(255) NOT NULL DEFAULT '',
CHANGE LastChanged LastChanged INT(10) UNSIGNED NULL DEFAULT NULL;
ALTER TABLE PhraseCache CHANGE PhraseList PhraseList text NULL;
ALTER TABLE Stylesheets
CHANGE AdvancedCSS AdvancedCSS text NULL,
CHANGE LastCompiled LastCompiled INT(10) UNSIGNED NULL DEFAULT NULL;
ALTER TABLE StylesheetSelectors
CHANGE SelectorData SelectorData text NULL,
CHANGE Description Description text NULL,
CHANGE AdvancedCSS AdvancedCSS text NULL;
ALTER TABLE Category
CHANGE `Status` `Status` TINYINT(4) NOT NULL DEFAULT '1',
CHANGE CreatedOn CreatedOn INT(11) NULL DEFAULT NULL,
CHANGE Modified Modified INT(11) NULL DEFAULT NULL;
ALTER TABLE Language CHANGE UserDocsUrl UserDocsUrl VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE MailingLists
CHANGE Subject Subject VARCHAR(255) NOT NULL DEFAULT '',
CHANGE EmailsQueued EmailsQueued INT(10) UNSIGNED NOT NULL DEFAULT '0',
CHANGE EmailsSent EmailsSent INT(10) UNSIGNED NOT NULL DEFAULT '0',
CHANGE EmailsTotal EmailsTotal INT(10) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE EmailQueue
CHANGE MailingId MailingId INT(10) UNSIGNED NOT NULL DEFAULT '0',
CHANGE Queued Queued INT(10) UNSIGNED NULL DEFAULT NULL,
CHANGE LastSendRetry LastSendRetry INT(10) UNSIGNED NULL DEFAULT NULL;
ALTER TABLE ImportScripts CHANGE `Status` `Status` TINYINT(4) NOT NULL DEFAULT '1';
ALTER TABLE Semaphores
CHANGE SessionKey SessionKey INT(10) UNSIGNED NOT NULL DEFAULT '0',
CHANGE `Timestamp` `Timestamp` INT(10) UNSIGNED NOT NULL DEFAULT '0',
CHANGE MainPrefix MainPrefix VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE Skins
CHANGE LogoBottom LogoBottom VARCHAR(255) NOT NULL DEFAULT '',
CHANGE LogoLogin LogoLogin VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE ItemReview CHANGE ReviewText ReviewText LONGTEXT NULL;
ALTER TABLE SessionData CHANGE VariableValue VariableValue LONGTEXT NULL;
ALTER TABLE PortalUser
CHANGE `Status` `Status` TINYINT(4) NOT NULL DEFAULT '1',
CHANGE Modified Modified INT(11) NULL DEFAULT NULL;
ALTER TABLE ItemFiles CHANGE CreatedOn CreatedOn INT(11) UNSIGNED NULL DEFAULT NULL;
ALTER TABLE FormSubmissions CHANGE SubmissionTime SubmissionTime INT(11) NULL DEFAULT NULL;
ALTER TABLE SessionLogs CHANGE SessionStart SessionStart INT(11) NULL DEFAULT NULL;
ALTER TABLE Visits CHANGE VisitDate VisitDate INT(10) UNSIGNED NULL DEFAULT NULL;
# ===== v 5.0.2-B2 =====
ALTER TABLE Theme
ADD LanguagePackInstalled TINYINT UNSIGNED NOT NULL DEFAULT '0',
ADD TemplateAliases TEXT,
ADD INDEX (LanguagePackInstalled);
ALTER TABLE ThemeFiles
ADD TemplateAlias VARCHAR(255) NOT NULL DEFAULT '' AFTER FilePath,
ADD INDEX (TemplateAlias);
UPDATE Phrase SET PhraseType = 1 WHERE Phrase IN ('la_ToolTip_MoveUp', 'la_ToolTip_MoveDown', 'la_invalid_state', 'la_Pending', 'la_text_sess_expired', 'la_ToolTip_Export');
DELETE FROM Phrase WHERE Phrase IN ('la_ToolTip_Move_Up', 'la_ToolTip_Move_Down');
UPDATE Phrase SET Phrase = 'lu_btn_SendPassword' WHERE Phrase = 'LU_BTN_SENDPASSWORD';
ALTER TABLE Category DROP IsIndex;
DELETE FROM Phrase WHERE Phrase IN ('la_CategoryIndex', 'la_Container', 'la_fld_IsIndex', 'lu_text_Redirecting', 'lu_title_Redirecting', 'lu_zip_code');
ALTER TABLE PortalUser
ADD AdminLanguage INT(11) NULL DEFAULT NULL,
ADD INDEX (AdminLanguage);
# ===== v 5.0.2-RC1 =====
# ===== v 5.0.2 =====
# ===== v 5.0.3-B1 =====
ALTER TABLE PermCache ADD INDEX (ACL);
INSERT INTO ConfigurationAdmin VALUES ('cms_DefaultTrackingCode', 'la_section_SettingsWebsite', 'la_config_DefaultTrackingCode', 'textarea', NULL, 'COLS=40 ROWS=5', 10.10, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'cms_DefaultTrackingCode', '', 'In-Portal', 'in-portal:configure_advanced');
UPDATE Phrase
SET Module = 'Core'
WHERE Phrase IN ('la_fld_Image', 'la_fld_Qty');
# ===== v 5.0.3-B2 =====
UPDATE CustomField SET ValueList = REPLACE(ValueList, '=+||', '') WHERE ElementType = 'radio';
# ===== v 5.0.3-RC1 =====
# ===== v 5.0.3 =====
# ===== v 5.0.4-B1 =====
# ===== v 5.0.4-B2 =====
# ===== v 5.0.4 =====
# ===== v 5.1.0-B1 =====
DROP TABLE EmailMessage;
DELETE FROM PersistantSessionData WHERE VariableName = 'emailevents_columns_.';
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId)
SELECT 'in-portal:configemail.add' AS Permission, GroupId, PermissionValue, Type, CatId
FROM <%TABLE_PREFIX%>Permissions
WHERE Permission = 'in-portal:configemail.edit';
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId)
SELECT 'in-portal:configemail.delete' AS Permission, GroupId, PermissionValue, Type, CatId
FROM <%TABLE_PREFIX%>Permissions
WHERE Permission = 'in-portal:configemail.edit';
ALTER TABLE Events ADD l1_Description text;
UPDATE Events e
SET e.l1_Description = (
SELECT p.l<%PRIMARY_LANGUAGE%>_Translation
FROM <%TABLE_PREFIX%>Phrase p
WHERE p.Phrase = e.Description
);
UPDATE Events SET Description = l1_Description;
ALTER TABLE Events
DROP l1_Description,
CHANGE Description Description TEXT NULL;
DELETE FROM Phrase WHERE Phrase LIKE 'la_event_%';
DELETE FROM PersistantSessionData WHERE VariableName = 'phrases_columns_.';
UPDATE Category SET FormId = NULL WHERE FormId = 0;
INSERT INTO ConfigurationAdmin VALUES ('MemcacheServers', 'la_section_SettingsCaching', 'la_config_MemcacheServers', 'text', '', '', 80.02, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'MemcacheServers', 'localhost:11211', 'In-Portal', 'in-portal:configure_advanced');
ALTER TABLE Category
ADD EnablePageCache TINYINT NOT NULL DEFAULT '0',
ADD OverridePageCacheKey TINYINT NOT NULL DEFAULT '0',
ADD PageCacheKey VARCHAR(255) NOT NULL DEFAULT '',
ADD PageExpiration INT NULL DEFAULT NULL ,
ADD INDEX (EnablePageCache),
ADD INDEX (OverridePageCacheKey),
ADD INDEX (PageExpiration);
DELETE FROM Cache WHERE VarName LIKE 'mod_rw_%';
CREATE TABLE CachedUrls (
UrlId int(11) NOT NULL AUTO_INCREMENT,
Url varchar(255) NOT NULL DEFAULT '',
DomainId int(11) NOT NULL DEFAULT '0',
`Hash` int(11) NOT NULL DEFAULT '0',
Prefixes varchar(255) NOT NULL DEFAULT '',
ParsedVars text NOT NULL,
Cached int(10) unsigned DEFAULT NULL,
LifeTime int(11) NOT NULL DEFAULT '-1',
PRIMARY KEY (UrlId),
KEY Url (Url),
KEY `Hash` (`Hash`),
KEY Prefixes (Prefixes),
KEY Cached (Cached),
KEY LifeTime (LifeTime),
KEY DomainId (DomainId)
);
INSERT INTO ConfigurationAdmin VALUES ('CacheHandler', 'la_section_SettingsCaching', 'la_config_CacheHandler', 'select', NULL, 'Fake=la_None||Memcache=+Memcached||Apc=+Alternative PHP Cache||XCache=+XCache', 80.01, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CacheHandler', 'Fake', 'In-Portal', 'in-portal:configure_advanced');
ALTER TABLE ConfigurationValues
ADD Heading varchar(255) NOT NULL DEFAULT '',
ADD Prompt varchar(255) NOT NULL DEFAULT '',
ADD ElementType varchar(255) NOT NULL DEFAULT '',
ADD Validation text,
ADD ValueList text,
ADD DisplayOrder double NOT NULL DEFAULT '0',
ADD GroupDisplayOrder double NOT NULL DEFAULT '0',
ADD Install int(11) NOT NULL DEFAULT '1',
ADD INDEX (DisplayOrder),
ADD INDEX (GroupDisplayOrder),
ADD INDEX (Install);
UPDATE ConfigurationValues cv
SET
cv.Heading = (SELECT ca1.heading FROM <%TABLE_PREFIX%>ConfigurationAdmin ca1 WHERE ca1.VariableName = cv.VariableName),
cv.Prompt = (SELECT ca2.prompt FROM <%TABLE_PREFIX%>ConfigurationAdmin ca2 WHERE ca2.VariableName = cv.VariableName),
cv.ElementType = (SELECT ca3.element_type FROM <%TABLE_PREFIX%>ConfigurationAdmin ca3 WHERE ca3.VariableName = cv.VariableName),
cv.Validation = (SELECT ca4.Validation FROM <%TABLE_PREFIX%>ConfigurationAdmin ca4 WHERE ca4.VariableName = cv.VariableName),
cv.ValueList = (SELECT ca5.ValueList FROM <%TABLE_PREFIX%>ConfigurationAdmin ca5 WHERE ca5.VariableName = cv.VariableName),
cv.DisplayOrder = (SELECT ca6.DisplayOrder FROM <%TABLE_PREFIX%>ConfigurationAdmin ca6 WHERE ca6.VariableName = cv.VariableName),
cv.GroupDisplayOrder = (SELECT ca7.GroupDisplayOrder FROM <%TABLE_PREFIX%>ConfigurationAdmin ca7 WHERE ca7.VariableName = cv.VariableName),
cv.`Install` = (SELECT ca8.`Install` FROM <%TABLE_PREFIX%>ConfigurationAdmin ca8 WHERE ca8.VariableName = cv.VariableName);
DROP TABLE ConfigurationAdmin;
UPDATE ConfigurationValues
SET ValueList = '=+||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>'
WHERE ValueList = '=+||<SQL>SELECT DestName AS OptionName, DestId AS OptionValue FROM <PREFIX>StdDestinations WHERE COALESCE(DestParentId, 0) = 0 ORDER BY OptionName</SQL>';
ALTER TABLE Forms
ADD RequireLogin TINYINT NOT NULL DEFAULT '0',
ADD INDEX (RequireLogin),
ADD UseSecurityImage TINYINT NOT NULL DEFAULT '0',
ADD INDEX (UseSecurityImage),
ADD EnableEmailCommunication TINYINT NOT NULL DEFAULT '0',
ADD INDEX (EnableEmailCommunication),
ADD ReplyFromName VARCHAR(255) NOT NULL DEFAULT '',
ADD ReplyFromEmail VARCHAR(255) NOT NULL DEFAULT '',
ADD ReplyCc VARCHAR(255) NOT NULL DEFAULT '',
ADD ReplyBcc VARCHAR(255) NOT NULL DEFAULT '',
ADD ReplyMessageSignature TEXT,
ADD ReplyServer VARCHAR(255) NOT NULL DEFAULT '',
ADD ReplyPort INT(10) NOT NULL DEFAULT '110',
ADD ReplyUsername VARCHAR(255) NOT NULL DEFAULT '',
ADD ReplyPassword VARCHAR(255) NOT NULL DEFAULT '',
ADD BounceEmail VARCHAR(255) NOT NULL DEFAULT '',
ADD BounceServer VARCHAR(255) NOT NULL DEFAULT '',
ADD BouncePort INT(10) NOT NULL DEFAULT '110',
ADD BounceUsername VARCHAR(255) NOT NULL DEFAULT '',
ADD BouncePassword VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE FormFields
ADD Visibility TINYINT NOT NULL DEFAULT '1',
ADD INDEX (Visibility),
ADD EmailCommunicationRole TINYINT NOT NULL DEFAULT '0',
ADD INDEX (EmailCommunicationRole);
ALTER TABLE FormSubmissions
ADD IPAddress VARCHAR(15) NOT NULL DEFAULT '' AFTER SubmissionTime,
ADD ReferrerURL VARCHAR(255) NOT NULL DEFAULT '' AFTER IPAddress,
ADD LogStatus TINYINT UNSIGNED NOT NULL DEFAULT '2' AFTER ReferrerURL,
ADD LastUpdatedOn INT UNSIGNED NULL AFTER LogStatus,
ADD Notes TEXT NULL AFTER LastUpdatedOn,
ADD INDEX (LogStatus),
ADD INDEX (LastUpdatedOn);
CREATE TABLE SubmissionLog (
SubmissionLogId int(11) NOT NULL AUTO_INCREMENT,
FormSubmissionId int(10) unsigned NOT NULL,
FromEmail varchar(255) NOT NULL DEFAULT '',
ToEmail varchar(255) NOT NULL DEFAULT '',
Cc text,
Bcc text,
`Subject` varchar(255) NOT NULL DEFAULT '',
Message text,
Attachment text,
ReplyStatus tinyint(3) unsigned NOT NULL DEFAULT '0',
SentStatus tinyint(3) unsigned NOT NULL DEFAULT '0',
SentOn int(10) unsigned DEFAULT NULL,
RepliedOn int(10) unsigned DEFAULT NULL,
VerifyCode varchar(32) NOT NULL DEFAULT '',
DraftId int(10) unsigned NOT NULL DEFAULT '0',
MessageId varchar(255) NOT NULL DEFAULT '',
BounceInfo text,
BounceDate int(11) DEFAULT NULL,
PRIMARY KEY (SubmissionLogId),
KEY FormSubmissionId (FormSubmissionId),
KEY ReplyStatus (ReplyStatus),
KEY SentStatus (SentStatus),
KEY SentOn (SentOn),
KEY RepliedOn (RepliedOn),
KEY VerifyCode (VerifyCode),
KEY DraftId (DraftId),
KEY BounceDate (BounceDate),
KEY MessageId (MessageId)
);
CREATE TABLE Drafts (
DraftId int(11) NOT NULL AUTO_INCREMENT,
FormSubmissionId int(10) unsigned NOT NULL DEFAULT '0',
CreatedOn int(10) unsigned DEFAULT NULL,
CreatedById int(11) NOT NULL,
Message text,
PRIMARY KEY (DraftId),
KEY FormSubmissionId (FormSubmissionId),
KEY CreatedOn (CreatedOn),
KEY CreatedById (CreatedById)
);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.TO.USER', NULL, 1, 0, NULL, 'Core:Category', 'Admin Reply to User Form Submission', 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER', NULL, 1, 0, NULL, 'Core:Category', 'User Replied to It\'s Form Submission', 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER.BOUNCED', NULL, 1, 0, NULL, 'Core:Category', 'Form Submission Admin Reply Delivery Failure', 1);
ALTER TABLE ConfigurationValues
ADD HintLabel VARCHAR(255) NULL DEFAULT NULL,
ADD INDEX (HintLabel);
UPDATE ConfigurationValues SET HintLabel = 'la_hint_MemcacheServers' WHERE VariableName = 'MemcacheServers';
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ModRewriteUrlEnding', '.html', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ModRewriteUrlEnding', 'select', '', '=+||/=+/||.html=+.html', 10.021, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ForceModRewriteUrlEnding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceModRewriteUrlEnding', 'checkbox', '', NULL, 10.022, 0, 0, 'la_hint_ForceModRewriteUrlEnding');
UPDATE Phrase
SET l<%PRIMARY_LANGUAGE%>_Translation = 'Enable SEO-friendly URLs mode (MOD-REWRITE)'
WHERE Phrase = 'la_config_use_modrewrite' AND l<%PRIMARY_LANGUAGE%>_Translation = 'Use MOD REWRITE';
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseContentLanguageNegotiation', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UseContentLanguageNegotiation', 'checkbox', '', '', 10.023, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionCookieDomains', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_config_SessionCookieDomains', 'textarea', '', 'rows="5" cols="40"', 20.021, 0, 0, NULL);
CREATE TABLE SiteDomains (
DomainId int(11) NOT NULL AUTO_INCREMENT,
DomainName varchar(255) NOT NULL DEFAULT '',
DomainNameUsesRegExp tinyint(4) NOT NULL DEFAULT '0',
SSLUrl varchar(255) NOT NULL DEFAULT '',
SSLUrlUsesRegExp tinyint(4) NOT NULL DEFAULT '0',
AdminEmail varchar(255) NOT NULL DEFAULT '',
Country varchar(3) NOT NULL DEFAULT '',
PrimaryLanguageId int(11) NOT NULL DEFAULT '0',
Languages varchar(255) NOT NULL DEFAULT '',
PrimaryThemeId int(11) NOT NULL DEFAULT '0',
Themes varchar(255) NOT NULL DEFAULT '',
DomainIPRange text,
ExternalUrl varchar(255) NOT NULL DEFAULT '',
RedirectOnIPMatch tinyint(4) NOT NULL DEFAULT '0',
Priority int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (DomainId),
KEY DomainName (DomainName),
KEY DomainNameUsesRegExp (DomainNameUsesRegExp),
KEY SSLUrl (SSLUrl),
KEY SSLUrlUsesRegExp (SSLUrlUsesRegExp),
KEY AdminEmail (AdminEmail),
KEY Country (Country),
KEY PrimaryLanguageId (PrimaryLanguageId),
KEY Languages (Languages),
KEY PrimaryThemeId (PrimaryThemeId),
KEY Themes (Themes),
KEY ExternalUrl (ExternalUrl),
KEY RedirectOnIPMatch (RedirectOnIPMatch),
KEY Priority (Priority)
);
DELETE FROM Phrase WHERE Phrase = 'la_config_time_server';
DELETE FROM ConfigurationValues WHERE VariableName = 'Config_Server_Time';
UPDATE ConfigurationValues SET ValueList = NULL, DisplayOrder = 20.02 WHERE VariableName = 'Config_Site_Time';
UPDATE ConfigurationValues SET VariableValue = '' WHERE VariableName = 'Config_Site_Time' AND VariableValue = 14;
UPDATE Events SET AllowChangingSender = 1, AllowChangingRecipient = 1;
UPDATE Events SET Module = 'Core' WHERE Module LIKE 'Core:%';
DELETE FROM Permissions WHERE Permission LIKE 'in-portal:configuration_email%';
DELETE FROM Permissions WHERE Permission LIKE 'in-portal:user_email%';
DELETE FROM Phrase WHERE Phrase IN ('la_fld_FromToUser', 'la_col_FromToUser');
# ===== v 5.1.0-B2 =====
# ===== v 5.1.0-RC1 =====
UPDATE Phrase SET Module = 'Core' WHERE Phrase = 'la_fld_Group';
UPDATE PermissionConfig
SET
Description = REPLACE(Description, 'lu_PermName_', 'la_PermName_'),
ErrorMessage = REPLACE(ErrorMessage, 'lu_PermName_', 'la_PermName_');
UPDATE Phrase
SET
Phrase = REPLACE(Phrase, 'lu_PermName_', 'la_PermName_'),
PhraseKey = REPLACE(PhraseKey, 'LU_PERMNAME_', 'LA_PERMNAME_'),
PhraseType = 1
WHERE PhraseKey LIKE 'LU_PERMNAME_%';
UPDATE Phrase
SET
Phrase = 'la_no_permissions',
PhraseKey = 'LA_NO_PERMISSIONS',
PhraseType = 1
WHERE PhraseKey = 'LU_NO_PERMISSIONS';
UPDATE Phrase
SET PhraseType = 0
WHERE PhraseKey IN (
'LU_FERROR_FORGOTPW_NODATA', 'LU_FERROR_UNKNOWN_USERNAME', 'LU_FERROR_UNKNOWN_EMAIL'
);
DELETE FROM ConfigurationValues WHERE VariableName = 'Root_Name';
DELETE FROM Phrase WHERE PhraseKey = 'LA_PROMPT_ROOT_NAME';
UPDATE ConfigurationValues
SET DisplayOrder = DisplayOrder - 0.01
WHERE ModuleOwner = 'In-Portal' AND `Section` = 'in-portal:configure_categories' AND DisplayOrder > 10.07;
# ===== v 5.1.0 =====
UPDATE Events SET Headers = NULL WHERE Headers = '';
UPDATE Events
SET MessageType = 'text'
WHERE Event = 'FORM.SUBMISSION.REPLY.TO.USER';
ALTER TABLE Forms
ADD ProcessUnmatchedEmails TINYINT NOT NULL DEFAULT '0' AFTER EnableEmailCommunication,
ADD INDEX (ProcessUnmatchedEmails);
ALTER TABLE FormSubmissions
ADD MessageId VARCHAR(255) NULL DEFAULT NULL AFTER Notes,
ADD INDEX (MessageId);
# ===== v 5.1.1-B1 =====
ALTER TABLE PortalUser ADD DisplayToPublic TEXT NULL;
UPDATE Phrase
SET l<%PRIMARY_LANGUAGE%>_Translation = 'Comments'
WHERE PhraseKey = 'LA_FLD_COMMENTS';
ALTER TABLE Category
CHANGE `Type` `Type` INT(11) NOT NULL DEFAULT '1',
CHANGE `IsSystem` `Protected` TINYINT( 4 ) NOT NULL DEFAULT '0',
ADD INDEX ( `Protected` );
UPDATE Category SET `Type` = IF(`Protected` = 1, 2, 1);
UPDATE Category SET `Protected` = 1 WHERE ThemeId > 0;
ALTER TABLE Category CHANGE CachedDescendantCatsQty CachedDescendantCatsQty INT(11) NOT NULL DEFAULT '0';
ALTER TABLE Events CHANGE `Module` `Module` VARCHAR(40) NOT NULL DEFAULT 'Core';
ALTER TABLE Language
CHANGE DateFormat DateFormat VARCHAR(50) NOT NULL DEFAULT 'm/d/Y',
CHANGE TimeFormat TimeFormat VARCHAR(50) NOT NULL DEFAULT 'g:i:s A',
CHANGE DecimalPoint DecimalPoint VARCHAR(10) NOT NULL DEFAULT '.',
CHANGE Charset Charset VARCHAR(20) NOT NULL DEFAULT 'utf-8';
ALTER TABLE ItemReview CHANGE Rating Rating TINYINT(3) UNSIGNED NOT NULL DEFAULT '0';
UPDATE PortalUser SET tz = NULL;
ALTER TABLE Category
CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL,
CHANGE ModifiedById ModifiedById INT(11) NULL DEFAULT NULL;
UPDATE Category SET CreatedById = NULL WHERE CreatedById = 0;
UPDATE Category SET ModifiedById = NULL WHERE ModifiedById = 0;
ALTER TABLE ItemFiles CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL;
ALTER TABLE Drafts CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL;
UPDATE Drafts SET CreatedById = NULL WHERE CreatedById = 0;
ALTER TABLE ItemReview CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL;
# ===== v 5.1.1-B2 =====
UPDATE Phrase SET `Module` = 'Core' WHERE PhraseKey = 'LU_SECTION_FILES';
# ===== v 5.1.1-RC1 =====
ALTER TABLE PortalUser
CHANGE Phone Phone VARCHAR(255) NOT NULL DEFAULT '',
CHANGE City City VARCHAR(255) NOT NULL DEFAULT '',
CHANGE Street Street VARCHAR(255) NOT NULL DEFAULT '',
CHANGE Zip Zip VARCHAR(20) NOT NULL DEFAULT '',
CHANGE ip ip VARCHAR(20) NOT NULL DEFAULT '';
UPDATE Phrase
SET l<%PRIMARY_LANGUAGE%>_Translation = 'Use Cron to run Agents'
WHERE PhraseKey = 'LA_USECRONFORREGULAREVENT' AND l<%PRIMARY_LANGUAGE%>_Translation = 'Use Cron for Running Regular Events';
# ===== v 5.1.1 =====
# ===== v 5.1.2-B1 =====
DROP TABLE EmailSubscribers;
DROP TABLE IgnoreKeywords;
DROP TABLE IgnoreKeywords;
ALTER TABLE PermissionConfig DROP ErrorMessage;
# ===== v 5.1.2-B2 =====
# ===== v 5.1.2-RC1 =====
DROP TABLE Stylesheets;
DROP TABLE StylesheetSelectors;
DROP TABLE SysCache;
DROP TABLE TagAttributes;
DROP TABLE TagLibrary;
DELETE FROM Phrase WHERE PhraseKey IN (
'LA_FLD_STYLESHEETID', 'LA_PROMPT_STYLESHEET', 'LA_TAB_STYLESHEETS', 'LA_TITLE_ADDING_STYLESHEET',
'LA_TITLE_EDITING_STYLESHEET', 'LA_TITLE_NEW_STYLESHEET', 'LA_TITLE_STYLESHEETS', 'LA_TOOLTIP_NEWSTYLESHEET',
'LA_COL_SELECTORNAME', 'LA_COL_BASEDON', 'LA_FLD_SELECTORBASE', 'LA_FLD_SELECTORDATA', 'LA_FLD_SELECTORID',
'LA_FLD_SELECTORNAME'
);
# ===== v 5.1.2 =====
# ===== v 5.1.3-B1 =====
ALTER TABLE FormSubmissions CHANGE ReferrerURL ReferrerURL TEXT NULL;
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UserEmailActivationTimeout', '', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_UserEmailActivationTimeout', 'text', NULL, NULL, 10.051, 0, 0, NULL);
# ===== v 5.1.3-B2 =====
ALTER TABLE Modules ADD AppliedDBRevisions TEXT NULL;
# ===== v 5.1.3-RC1 =====
# ===== v 5.1.3-RC2 =====
UPDATE Events
SET l<%PRIMARY_LANGUAGE%>_Subject = 'New User Registration (<inp2:u_Field name="Login"/><inp2:m_if check="m_GetConfig" name="User_Allow_New" equals_to="4"> - Activation Email</inp2:m_if>)'
WHERE Event = 'USER.ADD.PENDING' AND `Type` = 0 AND l<%PRIMARY_LANGUAGE%>_Subject LIKE '%<inp2:m_if check="m_GetConfig" name="User_Allow_New" equals_to="4"> - Activation Email</inp2:m_if>)%';
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MaxUserName', '', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_text_min_username', 'text', '', 'style="width: 50px;"', 10.03, 2, 0, NULL);
UPDATE ConfigurationValues
SET GroupDisplayOrder = 1, ValueList = 'style="width: 50px;"'
WHERE VariableName = 'Min_UserName';
UPDATE Phrase
SET l<%PRIMARY_LANGUAGE%>_Translation = 'User name length (min - max)'
WHERE PhraseKey = 'LA_TEXT_MIN_USERNAME' AND l<%PRIMARY_LANGUAGE%>_Translation = 'Minimum user name length';
# ===== v 5.1.3 =====
UPDATE PortalUser
SET Modified = NULL;
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:site_domains.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:site_domains.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:site_domains.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:site_domains.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:country_states.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:country_states.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:country_states.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:country_states.view', 11, 1, 1, 0);
# ===== v 5.2.0-B1 =====
ALTER TABLE PortalUser
ADD UserType TINYINT NOT NULL,
ADD PrimaryGroupId INT NULL,
ADD INDEX (UserType);
UPDATE PortalUser u
SET u.PrimaryGroupId = (SELECT ug.GroupId FROM <%TABLE_PREFIX%>UserGroup ug WHERE ug.PortalUserId = u.PortalUserId AND ug.PrimaryGroup = 1);
UPDATE PortalUser u SET u.UserType = IF(u.PrimaryGroupId = 11, 1, 0);
ALTER TABLE UserGroup DROP PrimaryGroup;
UPDATE ConfigurationValues
SET DisplayOrder = DisplayOrder + 0.01
WHERE `ModuleOwner` = 'In-Portal:Users' AND `Section` = 'in-portal:configure_users' AND DisplayOrder BETWEEN 10.12 AND 20.00;
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_AdminGroup', '11', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_admin_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.12, 0, 1, NULL);
ALTER TABLE PortalUser
DROP INDEX Login,
ADD INDEX Login (Login);
ALTER TABLE PortalUser CHANGE Login Login VARCHAR(255) NOT NULL;
ALTER TABLE PortalUser ADD OldStyleLogin TINYINT NOT NULL;
UPDATE PortalUser
SET OldStyleLogin = 1
WHERE (Login <> '') AND (Login NOT REGEXP '^[A-Z0-9_\\-\\.]+$');
DELETE FROM Events WHERE Event = 'USER.PSWD';
UPDATE Phrase
SET l<%PRIMARY_LANGUAGE%>_Translation = 'Your password has been reset.'
WHERE PhraseKey = 'LU_TEXT_FORGOTPASSHASBEENRESET' AND l<%PRIMARY_LANGUAGE%>_Translation = 'Your password has been reset. The new password has been sent to your e-mail address. You may now login with the new password.';
ALTER TABLE PortalUser
DROP MinPwResetDelay,
DROP PassResetTime,
CHANGE PwResetConfirm PwResetConfirm VARCHAR(255) NOT NULL;
UPDATE PortalUser SET PwRequestTime = NULL WHERE PwRequestTime = 0;
ALTER TABLE Category
ADD DirectLinkEnabled TINYINT NOT NULL DEFAULT '1',
ADD DirectLinkAuthKey VARCHAR(20) NOT NULL;
UPDATE Category
SET DirectLinkAuthKey = SUBSTRING( MD5( CONCAT(CategoryId, ':', ParentId, ':', l<%PRIMARY_LANGUAGE%>_Name, ':b38') ), 1, 20)
WHERE DirectLinkAuthKey = '';
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ExcludeTemplateSectionsFromSearch', '0', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_ExcludeTemplateSectionsFromSearch', 'checkbox', '', '', 10.15, 0, 0, NULL);
ALTER TABLE Agents
ADD SiteDomainLimitation VARCHAR(255) NOT NULL,
ADD INDEX (SiteDomainLimitation);
UPDATE ConfigurationValues
SET DisplayOrder = DisplayOrder + 0.01
WHERE VariableName = 'HTTPAuthBypassIPs';
UPDATE ConfigurationValues
SET DisplayOrder = DisplayOrder + 0.01
WHERE ModuleOwner = 'In-Portal' AND `Section` = 'in-portal:configure_advanced' AND Heading = 'la_section_SettingsAdmin' AND DisplayOrder > 40.06;
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'StickyGridSelection', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_StickyGridSelection', 'radio', '', '1=la_Yes||0=la_No', 40.07, 0, 0, NULL);
ALTER TABLE Forms
ADD SubmitNotifyEmail VARCHAR(255) NOT NULL DEFAULT '' AFTER UseSecurityImage;
ALTER TABLE FormFields
ADD UploadExtensions VARCHAR(255) NOT NULL DEFAULT '' AFTER Validation,
ADD UploadMaxSize INT NULL AFTER UploadExtensions;
ALTER TABLE Language ADD SynchronizationModes VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE PortalUser
CHANGE ip IPAddress VARCHAR(15) NOT NULL,
ADD IPRestrictions TEXT NULL;
ALTER TABLE PortalGroup ADD IPRestrictions TEXT NULL;
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ROOT.RESET.PASSWORD', NULL, 1, 0, 'Core', 'Root Reset Password', 1, 1, 0);
ALTER TABLE Skins ADD DisplaySiteNameInHeader TINYINT(1) NOT NULL DEFAULT '1';
DELETE FROM PersistantSessionData WHERE VariableName LIKE 'formsubs_Sort%' AND VariableValue = 'FormFieldId';
ALTER TABLE ItemReview
ADD HelpfulCount INT NOT NULL ,
ADD NotHelpfulCount INT NOT NULL;
ALTER TABLE PermissionConfig ADD IsSystem TINYINT(1) NOT NULL DEFAULT '0';
UPDATE PermissionConfig SET IsSystem = 1;
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.delete', 11, 1, 1, 0);
ALTER TABLE Agents
ADD Timeout INT(10) UNSIGNED NULL AFTER RunTime,
ADD LastTimeoutOn int(10) unsigned default NULL AFTER Timeout,
ADD INDEX (Timeout);
CREATE TABLE CurlLog (
LogId int(11) NOT NULL AUTO_INCREMENT,
Message varchar(255) NOT NULL,
PageUrl varchar(255) NOT NULL,
RequestUrl varchar(255) NOT NULL,
PortalUserId int(11) NOT NULL,
SessionKey int(11) NOT NULL,
IsAdmin tinyint(4) NOT NULL,
PageData text,
RequestData text,
ResponseData text,
RequestDate int(11) DEFAULT NULL,
ResponseDate int(11) DEFAULT NULL,
ResponseHttpCode int(11) NOT NULL,
CurlError varchar(255) NOT NULL,
PRIMARY KEY (LogId),
KEY Message (Message),
KEY PageUrl (PageUrl),
KEY RequestUrl (RequestUrl),
KEY PortalUserId (PortalUserId),
KEY SessionKey (SessionKey),
KEY IsAdmin (IsAdmin),
KEY RequestDate (RequestDate),
KEY ResponseDate (ResponseDate),
KEY ResponseHttpCode (ResponseHttpCode),
KEY CurlError (CurlError)
);
DELETE FROM ConfigurationValues WHERE VariableName = 'Site_Path';
UPDATE ConfigurationValues
SET DisplayOrder = DisplayOrder + 0.01
WHERE `Section` = 'in-portal:configure_advanced' AND Heading = 'la_section_SettingsWebsite';
UPDATE ItemTypes
SET TitleField = 'Username'
WHERE SourceTable = 'PortalUser' AND TitleField = 'Login';
UPDATE SearchConfig
SET FieldName = 'Username'
WHERE TableName = 'PortalUser' AND FieldName = 'Login';
ALTER TABLE PortalUser DROP INDEX Login;
ALTER TABLE PortalUser CHANGE Login Username VARCHAR(255) NOT NULL;
ALTER TABLE PortalUser ADD INDEX Username (Username);
UPDATE Events
SET
l<%PRIMARY_LANGUAGE%>_Subject = REPLACE(l<%PRIMARY_LANGUAGE%>_Subject, 'name="Login"', 'name="Username"'),
l<%PRIMARY_LANGUAGE%>_Body = REPLACE(l<%PRIMARY_LANGUAGE%>_Body, 'name="Login"', 'name="Username"');
DELETE FROM PersistantSessionData
WHERE (VariableName LIKE 'u%]columns_.') OR (VariableName LIKE 'u%_sort%');
DELETE FROM Phrase
WHERE Phrase = 'LU_FLD_LOGIN';
UPDATE BanRules
SET ItemField = 'Username'
WHERE ItemField = 'Login';
DELETE FROM Phrase
WHERE PhraseKey IN (
'LU_USERNAME', 'LU_EMAIL', 'LU_PASSWORD', 'LA_TEXT_LOGIN', 'LA_PROMPT_PASSWORD',
'LA_USE_EMAILS_AS_LOGIN', 'LU_USER_AND_EMAIL_ALREADY_EXIST', 'LU_ENTERFORGOTEMAIL'
);
UPDATE ConfigurationValues
SET VariableName = 'RegistrationUsernameRequired', Prompt = 'la_config_RegistrationUsernameRequired'
WHERE VariableName = 'Email_As_Login';
UPDATE ConfigurationValues
SET VariableValue = IF(VariableValue = 1, 0, 1)
WHERE VariableName = 'RegistrationUsernameRequired';
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PerformExactSearch', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_PerformExactSearch', 'checkbox', '', '', '10.10', 0, 0, 'la_hint_PerformExactSearch');
UPDATE Phrase
SET PhraseType = 1
WHERE PhraseKey IN (
'LA_USERS_SUBSCRIBER_GROUP', 'LA_PROMPT_DUPREVIEWS', 'LA_PROMPT_DUPREVIEWS', 'LA_PROMPT_DUPRATING',
'LA_PROMPT_OVERWRITEPHRASES', 'LA_TEXT_BACKUP_ACCESS', 'LA_PHRASETYPE_BOTH', 'LA_TOOLTIP_NEWLISTING'
);
UPDATE Phrase
SET PhraseType = 0
WHERE PhraseKey IN ('LU_TITLE_SHIPPINGINFORMATION', 'LU_COMM_LASTQUATER');
UPDATE Phrase
SET Phrase = REPLACE(Phrase, 'lu_', 'la_'), PhraseKey = UPPER(Phrase)
WHERE PhraseKey IN ('LU_OPT_AUTODETECT', 'LU_OPT_COOKIES', 'LU_OPT_QUERYSTRING');
UPDATE ConfigurationValues
SET ValueList = REPLACE(ValueList, 'lu_', 'la_')
WHERE VariableName = 'CookieSessions';
DELETE FROM Phrase WHERE PhraseKey IN ('LU_INVALID_PASSWORD', 'LA_OF', 'LU_TITLE_REVIEWPRODUCT');
UPDATE Phrase
SET PhraseType = 2
WHERE PhraseType = 1 AND (PhraseKey LIKE 'lu_field_%' OR PhraseKey = 'LA_TEXT_VALID');
UPDATE Phrase
SET Phrase = REPLACE(Phrase, 'la_', 'lc_'), PhraseKey = UPPER(Phrase)
WHERE PhraseType = 2;
UPDATE Phrase
SET Phrase = REPLACE(Phrase, 'lu_', 'lc_'), PhraseKey = UPPER(Phrase)
WHERE PhraseType = 2;
UPDATE SearchConfig
SET DisplayName = REPLACE(DisplayName, 'lu_', 'lc_')
WHERE DisplayName IN (
'lu_field_newitem', 'lu_field_popitem', 'lu_field_hotitem', 'lu_field_resourceid', 'lu_field_createdbyid',
'lu_field_priority', 'lu_field_status', 'lu_field_createdon', 'lu_field_description', 'lu_field_name',
'lu_field_modified', 'lu_field_modifiedbyid', 'lu_field_ParentPath', 'lu_field_ParentId', 'lu_field_MetaKeywords',
'lu_field_MetaDescription', 'lu_field_EditorsPick', 'lu_field_CategoryId', 'lu_field_CachedNavBar',
'lu_field_CachedDescendantCatsQty', 'lu_field_hits', 'lu_field_cachedrating', 'lu_field_cachedvotesqty',
'lu_field_cachedreviewsqty', 'lu_field_orgid'
);
CREATE TABLE SpamReports (
ReportId int(11) NOT NULL AUTO_INCREMENT,
ItemPrefix varchar(255) NOT NULL,
ItemId int(11) NOT NULL,
MessageText text,
ReportedOn int(11) DEFAULT NULL,
ReportedById int(11) DEFAULT NULL,
PRIMARY KEY (ReportId),
KEY ItemPrefix (ItemPrefix),
KEY ItemId (ItemId),
KEY ReportedById (ReportedById)
);
DELETE FROM Phrase
WHERE PhraseKey IN (
'LA_SECTION_SETTINGSCACHING', 'LA_CONFIG_CACHEHANDLER', 'LA_CONFIG_MEMCACHESERVERS', 'LA_HINT_MEMCACHESERVERS'
);
DELETE FROM ConfigurationValues WHERE VariableName IN ('CacheHandler', 'MemcacheServers');
CREATE TABLE PromoBlocks (
BlockId int(11) NOT NULL AUTO_INCREMENT,
Title varchar(50) NOT NULL DEFAULT '',
Priority int(11) NOT NULL DEFAULT '0',
Status tinyint(1) NOT NULL DEFAULT '0',
l1_Image varchar(255) NOT NULL DEFAULT '',
l2_Image varchar(255) NOT NULL DEFAULT '',
l3_Image varchar(255) NOT NULL DEFAULT '',
l4_Image varchar(255) NOT NULL DEFAULT '',
l5_Image varchar(255) NOT NULL DEFAULT '',
CSSClassName varchar(255) NOT NULL DEFAULT '',
LinkType tinyint(1) NOT NULL DEFAULT '1',
CategoryId int(11) NOT NULL DEFAULT '0',
ExternalLink varchar(255) NOT NULL DEFAULT '',
OpenInNewWindow tinyint(3) unsigned NOT NULL DEFAULT '0',
ScheduleFromDate int(11) DEFAULT NULL,
ScheduleToDate int(11) DEFAULT NULL,
NumberOfClicks int(11) NOT NULL DEFAULT '0',
NumberOfViews int(11) NOT NULL DEFAULT '0',
Sticky tinyint(1) NOT NULL DEFAULT '0',
Html text,
l1_Html text,
l2_Html text,
l3_Html text,
l4_Html text,
l5_Html text,
PRIMARY KEY (BlockId),
KEY OpenInNewWindow (OpenInNewWindow)
);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoRotationDelay', '7', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoRotationDelay', 'text', '', '', 10.01, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoTransitionTime', '0.6', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoTransitionTime', 'text', '', '', 10.02, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoTransitionControls', '1', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoTransitionControls', 'select', '', '1=la_Enabled||0=la_Disabled', 10.03, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PromoTransitionEffect', 'fade', 'In-Portal', 'in-portal:configure_promo_blocks', 'la_Text_PromoSettings', 'la_config_PromoTransitionEffect', 'select', '', 'fade=la_opt_AnimationFade||slide=la_opt_AnimationSlide', 10.04, 0, 0, NULL);
UPDATE Phrase
SET l<%PRIMARY_LANGUAGE%>_ColumnTranslation = l<%PRIMARY_LANGUAGE%>_Translation
WHERE PhraseKey IN ('LA_FLD_CATEGORY', 'LA_FLD_ORDER');
CREATE TABLE PageRevisions (
RevisionId int(11) NOT NULL AUTO_INCREMENT,
PageId int(11) NOT NULL,
RevisionNumber int(11) NOT NULL,
IsDraft tinyint(4) NOT NULL,
FromRevisionId int(11) NOT NULL,
CreatedById int(11) DEFAULT NULL,
CreatedOn int(11) DEFAULT NULL,
AutoSavedOn int(11) DEFAULT NULL,
`Status` tinyint(4) NOT NULL DEFAULT '2',
PRIMARY KEY (RevisionId),
KEY PageId (PageId),
KEY RevisionNumber (RevisionNumber),
KEY IsDraft (IsDraft),
KEY `Status` (`Status`)
);
ALTER TABLE Category
ADD LiveRevisionNumber INT NOT NULL DEFAULT '1' AFTER PageExpiration,
ADD INDEX (LiveRevisionNumber);
ALTER TABLE PageContent
ADD RevisionId INT NOT NULL AFTER PageId,
ADD INDEX (RevisionId);
ALTER TABLE PermissionConfig CHANGE PermissionName PermissionName VARCHAR(255) NOT NULL DEFAULT '';
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.REVISION.ADD', 'la_PermName_Category.Revision.Add_desc', 'In-Portal', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.REVISION.ADD.PENDING', 'la_PermName_Category.Revision.Add.Pending_desc', 'In-Portal', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.REVISION.MODERATE', 'la_PermName_Category.Revision.Moderate_desc', 'In-Portal', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.REVISION.HISTORY.VIEW', 'la_PermName_Category.Revision.History.View_desc', 'In-Portal', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.REVISION.HISTORY.RESTORE', 'la_PermName_Category.Revision.History.Restore_desc', 'In-Portal', 1);
INSERT INTO Permissions VALUES(DEFAULT, 'CATEGORY.REVISION.ADD', 11, 1, 0, 1);
INSERT INTO Permissions VALUES(DEFAULT, 'CATEGORY.REVISION.HISTORY.VIEW', 11, 1, 0, 1);
INSERT INTO Permissions VALUES(DEFAULT, 'CATEGORY.REVISION.HISTORY.RESTORE', 11, 1, 0, 1);
ALTER TABLE EmailQueue ADD `LogData` TEXT;
UPDATE Permissions
SET Permission = REPLACE(Permission, 'agents', 'scheduled_tasks')
WHERE Permission LIKE 'in-portal:agents%';
DELETE FROM Phrase
WHERE PhraseKey IN (
'LA_TITLE_ADDINGAGENT', 'LA_TITLE_EDITINGAGENT', 'LA_TITLE_NEWAGENT', 'LA_TITLE_AGENTS', 'LA_TOOLTIP_NEWAGENT'
);
UPDATE Phrase
SET l<%PRIMARY_LANGUAGE%>_Translation = REPLACE(l<%PRIMARY_LANGUAGE%>_Translation, 'Agents', 'Scheduled Tasks')
WHERE PhraseKey IN (
'LA_USECRONFORREGULAREVENT', 'LA_HINT_SYSTEMTOOLSRESETPARSEDCACHEDDATA', 'LA_HINT_SYSTEMTOOLSRESETCONFIGSANDPARSEDDATA'
);
DELETE FROM PersistantSessionData
WHERE VariableName LIKE 'agent%';
RENAME TABLE <%TABLE_PREFIX%>Agents TO <%TABLE_PREFIX%>ScheduledTasks;
ALTER TABLE ScheduledTasks
CHANGE AgentId ScheduledTaskId INT(11) NOT NULL AUTO_INCREMENT,
CHANGE AgentName Name VARCHAR(255) NOT NULL DEFAULT '',
CHANGE AgentType `Type` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1';
ALTER TABLE ScheduledTasks
DROP INDEX AgentType,
ADD INDEX `Type` (`Type`);
UPDATE ConfigurationValues
SET VariableName = 'RunScheduledTasksFromCron'
WHERE VariableName = 'UseCronForRegularEvent';
CREATE TABLE ItemFilters (
FilterId int(11) NOT NULL AUTO_INCREMENT,
ItemPrefix varchar(255) NOT NULL,
FilterField varchar(255) NOT NULL,
FilterType varchar(100) NOT NULL,
Enabled tinyint(4) NOT NULL DEFAULT '1',
RangeCount int(11) DEFAULT NULL,
PRIMARY KEY (FilterId),
KEY ItemPrefix (ItemPrefix),
KEY Enabled (Enabled)
);
UPDATE ConfigurationValues
SET HintLabel = CONCAT('hint:', Prompt)
WHERE VariableName IN ('ForceModRewriteUrlEnding', 'PerformExactSearch');
DELETE FROM Phrase
WHERE PhraseKey IN (
'LA_TEXT_PROMOSETTINGS', 'LA_CONFIG_PROMOROTATIONDELAY', 'LA_CONFIG_PROMOTRANSITIONTIME',
'LA_CONFIG_PROMOTRANSITIONCONTROLS', 'LA_CONFIG_PROMOTRANSITIONEFFECT'
);
DELETE FROM ConfigurationValues WHERE VariableName IN ('PromoRotationDelay', 'PromoTransitionTime', 'PromoTransitionControls', 'PromoTransitionEffect');
DELETE FROM Permissions WHERE Permission LIKE 'in-portal:promo_blocks.%';
CREATE TABLE PromoBlockGroups (
PromoBlockGroupId int(11) NOT NULL AUTO_INCREMENT,
Title varchar(255) NOT NULL DEFAULT '',
CreatedOn int(10) unsigned DEFAULT NULL,
`Status` tinyint(1) NOT NULL DEFAULT '1',
RotationDelay decimal(9,2) DEFAULT NULL,
TransitionTime decimal(9,2) DEFAULT NULL,
TransitionControls tinyint(1) NOT NULL DEFAULT '1',
TransitionEffect varchar(255) NOT NULL DEFAULT '',
TransitionEffectCustom varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (PromoBlockGroupId)
);
ALTER TABLE Category
ADD PromoBlockGroupId int(10) unsigned NOT NULL DEFAULT '0',
ADD INDEX (PromoBlockGroupId);
ALTER TABLE PromoBlocks
ADD PromoBlockGroupId int(10) unsigned NOT NULL DEFAULT '0',
ADD INDEX (PromoBlockGroupId);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'DebugOnlyPromoBlockGroupConfigurator', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_DebugOnlyPromoBlockGroupConfigurator', 'checkbox', '', '', 40.13, 0, 0, NULL);
UPDATE ConfigurationValues
SET DisplayOrder = DisplayOrder + 0.01
WHERE VariableName IN ('RememberLastAdminTemplate', 'UseHTTPAuth', 'HTTPAuthUsername', 'HTTPAuthPassword', 'HTTPAuthBypassIPs');
INSERT INTO PromoBlockGroups VALUES (DEFAULT, 'Default Group', UNIX_TIMESTAMP(), '1', '7.00', '0.60', '1', 'fade', '');
UPDATE PromoBlocks SET PromoBlockGroupId = 1;
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_block_groups.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_block_groups.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_block_groups.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:promo_block_groups.delete', 11, 1, 1, 0);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MaintenanceMessageFront', 'Website is currently undergoing the upgrades. Please come back shortly!', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMaintenance', 'la_config_MaintenanceMessageFront', 'textarea', '', 'style="width: 100%; height: 100px;"', '15.01', 0, 0, 'hint:la_config_MaintenanceMessageFront');
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MaintenanceMessageAdmin', 'Website is currently undergoing the upgrades. Please come back shortly!', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMaintenance', 'la_config_MaintenanceMessageAdmin', 'textarea', '', 'style="width: 100%; height: 100px;"', '15.02', 0, 0, 'hint:la_config_MaintenanceMessageAdmin');
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SoftMaintenanceTemplate', 'maintenance', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMaintenance', 'la_config_SoftMaintenanceTemplate', 'text', '', 'style="width: 200px;"', '15.03', 0, 0, 'hint:la_config_SoftMaintenanceTemplate');
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'HardMaintenanceTemplate', 'maintenance', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMaintenance', 'la_config_HardMaintenanceTemplate', 'text', '', 'style="width: 200px;"', '15.04', 0, 0, 'hint:la_config_HardMaintenanceTemplate');
UPDATE ConfigurationValues
SET VariableName = 'DefaultEmailSender'
WHERE VariableName = 'Smtp_AdminMailFrom';
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'DefaultEmailRecipients', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_DefaultEmailRecipients', 'text', NULL, NULL, 50.10, 0, 0, NULL);
ALTER TABLE SiteDomains ADD DefaultEmailRecipients TEXT NULL AFTER AdminEmail;
UPDATE ConfigurationValues
SET Section = 'in-portal:configure_advanced', Heading = 'la_section_Settings3rdPartyAPI', DisplayOrder = 80.01
WHERE VariableName = 'YahooApplicationId';
UPDATE ConfigurationValues
SET DisplayOrder = DisplayOrder - 0.01
WHERE VariableName IN ('Search_MinKeyword_Length', 'ExcludeTemplateSectionsFromSearch');
UPDATE Phrase
SET l<%PRIMARY_LANGUAGE%>_ColumnTranslation = l<%PRIMARY_LANGUAGE%>_Translation
WHERE PhraseKey IN ('LA_FLD_ADDRESSLINE1', 'LA_FLD_ADDRESSLINE2', 'LA_FLD_CITY', 'LA_FLD_COMPANY', 'LA_FLD_FAX', 'LA_FLD_STATE', 'LA_FLD_ZIP');
DELETE FROM Phrase
WHERE PhraseKey IN ('LA_TEXT_RESTRICTIONS', 'LA_USERS_REVIEW_DENY', 'LA_USERS_VOTES_DENY');
DELETE FROM ConfigurationValues
WHERE VariableName IN ('User_Review_Deny', 'User_Votes_Deny');
ALTER TABLE PortalUser ADD FrontLanguage INT(11) NULL AFTER PwRequestTime;
ALTER TABLE PortalUser DROP INDEX AdminLanguage;
UPDATE PortalUser
SET FrontLanguage = 1
WHERE UserType = 0;
ALTER TABLE PortalUser
ADD PrevEmails TEXT NULL AFTER Email,
ADD EmailVerified TINYINT NOT NULL AFTER `Status`;
UPDATE PortalUser SET EmailVerified = 1;
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.EMAIL.CHANGE.VERIFY', NULL, 1, 0, 'Core', 'Changed E-mail Verification', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.EMAIL.CHANGE.UNDO', NULL, 1, 0, 'Core', 'Changed E-mail Rollback', 0, 1, 1);
ALTER TABLE Category
ADD RequireSSL TINYINT NOT NULL DEFAULT '0',
ADD RequireLogin TINYINT NOT NULL DEFAULT '0';
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UpdateCountersOnFilterChange', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_UpdateCountersOnFilterChange', 'checkbox', '', '', 10.15, 0, 0, NULL);
# use new table name (see /core/install.php:390)!
ALTER TABLE UserSessions DROP `tz`;
ALTER TABLE UserSessions ADD `TimeZone` VARCHAR(255) NOT NULL AFTER `GroupList`;
ALTER TABLE PortalUser DROP `tz`;
ALTER TABLE PortalUser ADD `TimeZone` VARCHAR(255) NOT NULL AFTER `dob`;
UPDATE SearchConfig
SET FieldName = 'TimeZone'
WHERE FieldName = 'tz' AND TableName = 'PortalUser';
RENAME TABLE <%TABLE_PREFIX%>BanRules TO <%TABLE_PREFIX%>UserBanRules;
RENAME TABLE <%TABLE_PREFIX%>Cache TO <%TABLE_PREFIX%>SystemCache;
RENAME TABLE <%TABLE_PREFIX%>ConfigurationValues TO <%TABLE_PREFIX%>SystemSettings;
RENAME TABLE <%TABLE_PREFIX%>Category TO <%TABLE_PREFIX%>Categories;
UPDATE ItemTypes SET SourceTable = 'Categories' WHERE ItemType = 1;
UPDATE ItemTypes SET SourceTable = 'Users' WHERE ItemType = 6;
UPDATE SearchConfig SET TableName = 'Categories' WHERE TableName = 'Category';
UPDATE SearchConfig SET TableName = 'CustomFields' WHERE TableName = 'CustomField';
UPDATE SearchConfig SET TableName = 'Users' WHERE TableName = 'PortalUser';
UPDATE StatItem SET ValueSQL = REPLACE(ValueSQL, '<%prefix%>Category', '<%prefix%>Categories');
UPDATE StatItem SET ValueSQL = REPLACE(ValueSQL, '<%prefix%>ItemReview', '<%prefix%>CatalogReviews');
UPDATE StatItem SET ValueSQL = REPLACE(ValueSQL, '<%prefix%>Language', '<%prefix%>Languages');
UPDATE StatItem SET ValueSQL = REPLACE(ValueSQL, '<%prefix%>PortalGroup', '<%prefix%>UserGroups');
UPDATE StatItem SET ValueSQL = REPLACE(ValueSQL, '<%prefix%>PortalUser', '<%prefix%>Users');
UPDATE StatItem SET ValueSQL = REPLACE(ValueSQL, '<%prefix%>Theme', '<%prefix%>Themes');
UPDATE StatItem SET ValueSQL = REPLACE(ValueSQL, '<%prefix%>UserSession', '<%prefix%>UserSessions');
UPDATE SystemSettings SET ValueList = REPLACE(ValueList, '<PREFIX>CustomField', '<PREFIX>CustomFields');
UPDATE SystemSettings SET ValueList = REPLACE(ValueList, '<PREFIX>PortalGroup', '<PREFIX>UserGroups');
UPDATE Counters
SET CountQuery = 'SELECT COUNT(*) FROM <%PREFIX%>Users WHERE Status = 1', TablesAffected = '|Users|'
WHERE `Name` = 'members_count';
UPDATE Counters
SET
CountQuery = REPLACE(CountQuery, '<%PREFIX%>UserSession', '<%PREFIX%>UserSessions'),
TablesAffected = REPLACE(TablesAffected, '|UserSession|', '|UserSessions|');
RENAME TABLE <%TABLE_PREFIX%>CustomField TO <%TABLE_PREFIX%>CustomFields;
RENAME TABLE <%TABLE_PREFIX%>Drafts TO <%TABLE_PREFIX%>FormSubmissionReplyDrafts;
RENAME TABLE <%TABLE_PREFIX%>Events TO <%TABLE_PREFIX%>EmailEvents;
DELETE FROM PersistantSessionData WHERE VariableName LIKE '%custom_filter%';
RENAME TABLE <%TABLE_PREFIX%>Favorites TO <%TABLE_PREFIX%>UserFavorites;
RENAME TABLE <%TABLE_PREFIX%>Images TO <%TABLE_PREFIX%>CatalogImages;
RENAME TABLE <%TABLE_PREFIX%>ItemFiles TO <%TABLE_PREFIX%>CatalogFiles;
RENAME TABLE <%TABLE_PREFIX%>ItemRating TO <%TABLE_PREFIX%>CatalogRatings;
RENAME TABLE <%TABLE_PREFIX%>ItemReview TO <%TABLE_PREFIX%>CatalogReviews;
RENAME TABLE <%TABLE_PREFIX%>Language TO <%TABLE_PREFIX%>Languages;
RENAME TABLE <%TABLE_PREFIX%>PermCache TO <%TABLE_PREFIX%>CategoryPermissionsCache;
RENAME TABLE <%TABLE_PREFIX%>PermissionConfig TO <%TABLE_PREFIX%>CategoryPermissionsConfig;
RENAME TABLE <%TABLE_PREFIX%>Phrase TO <%TABLE_PREFIX%>LanguageLabels;
RENAME TABLE <%TABLE_PREFIX%>PortalGroup TO <%TABLE_PREFIX%>UserGroups;
RENAME TABLE <%TABLE_PREFIX%>PersistantSessionData TO <%TABLE_PREFIX%>UserPersistentSessionData;
RENAME TABLE <%TABLE_PREFIX%>PortalUser TO <%TABLE_PREFIX%>Users;
RENAME TABLE <%TABLE_PREFIX%>PortalUserCustomData TO <%TABLE_PREFIX%>UserCustomData;
RENAME TABLE <%TABLE_PREFIX%>RelatedSearches TO <%TABLE_PREFIX%>CategoryRelatedSearches;
RENAME TABLE <%TABLE_PREFIX%>Relationship TO <%TABLE_PREFIX%>CatalogRelationships;
RENAME TABLE <%TABLE_PREFIX%>SearchLog TO <%TABLE_PREFIX%>SearchLogs;
RENAME TABLE <%TABLE_PREFIX%>Skins TO <%TABLE_PREFIX%>AdminSkins;
RENAME TABLE <%TABLE_PREFIX%>SubmissionLog TO <%TABLE_PREFIX%>FormSubmissionReplies;
RENAME TABLE <%TABLE_PREFIX%>Theme TO <%TABLE_PREFIX%>Themes;
RENAME TABLE <%TABLE_PREFIX%>UserGroup TO <%TABLE_PREFIX%>UserGroupRelations;
RENAME TABLE <%TABLE_PREFIX%>Visits TO <%TABLE_PREFIX%>UserVisits;
RENAME TABLE <%TABLE_PREFIX%>SessionLogs TO <%TABLE_PREFIX%>UserSessionLogs;
DELETE FROM LanguageLabels WHERE PhraseKey = 'LA_FLD_RUNMODE';
ALTER TABLE ScheduledTasks DROP RunMode;
INSERT INTO SystemSettings VALUES(DEFAULT, 'CKFinderLicenseName', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_Settings3rdPartyAPI', 'la_config_CKFinderLicenseName', 'text', NULL, NULL, 80.03, 0, 0, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'CKFinderLicenseKey', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_Settings3rdPartyAPI', 'la_config_CKFinderLicenseKey', 'text', NULL, NULL, 80.04, 0, 0, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'EnablePageContentRevisionControl', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_EnablePageContentRevisionControl', 'checkbox', '', '', 40.19, 0, 0, NULL);
# ===== v 5.2.0-B2 =====
ALTER TABLE Users
CHANGE Username Username varchar(255) NOT NULL DEFAULT '',
CHANGE IPAddress IPAddress varchar(15) NOT NULL DEFAULT '',
CHANGE PwResetConfirm PwResetConfirm varchar(255) NOT NULL DEFAULT '';
ALTER TABLE UserSessions
CHANGE TimeZone TimeZone varchar(255) NOT NULL DEFAULT '';
ALTER TABLE CountryStates
CHANGE l1_Name l1_Name varchar(255) NOT NULL DEFAULT '',
CHANGE l2_Name l2_Name varchar(255) NOT NULL DEFAULT '',
CHANGE l3_Name l3_Name varchar(255) NOT NULL DEFAULT '',
CHANGE l4_Name l4_Name varchar(255) NOT NULL DEFAULT '',
CHANGE l5_Name l5_Name varchar(255) NOT NULL DEFAULT '';
ALTER TABLE Categories
CHANGE DirectLinkAuthKey DirectLinkAuthKey varchar(20) NOT NULL DEFAULT '';
ALTER TABLE ScheduledTasks
CHANGE SiteDomainLimitation SiteDomainLimitation varchar(255) NOT NULL DEFAULT '';
ALTER TABLE ItemFilters
CHANGE ItemPrefix ItemPrefix varchar(255) NOT NULL DEFAULT '',
CHANGE FilterField FilterField varchar(255) NOT NULL DEFAULT '',
CHANGE FilterType FilterType varchar(100) NOT NULL DEFAULT '';
ALTER TABLE SpamReports
CHANGE ItemPrefix ItemPrefix varchar(255) NOT NULL DEFAULT '';
ALTER TABLE CachedUrls
CHANGE ParsedVars ParsedVars text;
ALTER TABLE CurlLog
CHANGE Message Message varchar(255) NOT NULL DEFAULT '',
CHANGE PageUrl PageUrl varchar(255) NOT NULL DEFAULT '',
CHANGE RequestUrl RequestUrl varchar(255) NOT NULL DEFAULT '',
CHANGE CurlError CurlError varchar(255) NOT NULL DEFAULT '';
UPDATE SystemSettings
SET DisplayOrder = DisplayOrder + 0.01
WHERE ModuleOwner = 'In-Portal' AND Section = 'in-portal:configure_advanced' AND Heading = 'la_section_SettingsAdmin' AND DisplayOrder > 40.11;
INSERT INTO SystemSettings VALUES(DEFAULT, 'DefaultGridPerPage', '20', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_DefaultGridPerPage', 'select', '', '10=+10||20=+20||50=+50||100=+100||500=+500', 40.12, 0, 0, NULL);
ALTER TABLE EmailEvents ADD LastChanged INT UNSIGNED NULL;
ALTER TABLE PromoBlocks
DROP Html,
CHANGE Status Status TINYINT(1) NOT NULL DEFAULT '1',
CHANGE CategoryId CategoryId INT(11) NULL;
# ===== v 5.2.0-B3 =====
ALTER TABLE Languages
ADD HtmlEmailTemplate TEXT NULL,
ADD TextEmailTemplate TEXT NULL;
ALTER TABLE EmailLog CHANGE fromuser `From` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE EmailLog CHANGE addressto `To` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE EmailLog CHANGE subject `Subject` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE EmailLog CHANGE `timestamp` SentOn INT(11) NULL;
ALTER TABLE EmailLog CHANGE `event` EventName VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE EmailLog ADD OtherRecipients TEXT NULL AFTER `To`;
ALTER TABLE EmailLog
ADD HtmlBody LONGTEXT NULL AFTER `Subject`,
ADD TextBody LONGTEXT NULL AFTER HtmlBody;
ALTER TABLE EmailLog ADD AccessKey VARCHAR(32) NOT NULL DEFAULT '';
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:emaillog.edit', 11, 1, 1, 0);
DELETE FROM LanguageLabels WHERE PhraseKey = 'LA_PROMPT_FROMUSERNAME';
INSERT INTO SystemSettings VALUES(DEFAULT, 'EmailLogRotationInterval', '-1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_EmailLogRotationInterval', 'select', NULL, '=la_opt_EmailLogKeepNever||86400=la_opt_OneDay||604800=la_opt_OneWeek||1209600=la_opt_TwoWeeks||2419200=la_opt_OneMonth||7257600=la_opt_ThreeMonths||29030400=la_opt_OneYear||-1=la_opt_EmailLogKeepForever', 50.11, 0, 0, 'hint:la_config_EmailLogRotationInterval');
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spam_reports.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spam_reports.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spam_reports.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:item_filters.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:item_filters.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:item_filters.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:item_filters.delete', 11, 1, 1, 0);
ALTER TABLE SlowSqlCapture CHANGE QueryCrc QueryCrc BIGINT(11) NOT NULL DEFAULT '0';
UPDATE SlowSqlCapture
SET QueryCrc = CAST((QueryCrc & 0xFFFFFFFF) AS UNSIGNED INTEGER)
WHERE QueryCrc < 0;
ALTER TABLE ImportCache CHANGE VarName VarName BIGINT(11) NOT NULL DEFAULT '0';
UPDATE ImportCache
SET VarName = CAST((VarName & 0xFFFFFFFF) AS UNSIGNED INTEGER)
WHERE VarName < 0;
ALTER TABLE PageContent CHANGE ContentNum ContentNum BIGINT(11) NOT NULL DEFAULT '0';
UPDATE PageContent
SET ContentNum = CAST((ContentNum & 0xFFFFFFFF) AS UNSIGNED INTEGER)
WHERE ContentNum < 0;
ALTER TABLE CachedUrls CHANGE Hash Hash BIGINT(11) NOT NULL DEFAULT '0';
UPDATE CachedUrls
SET Hash = CAST((Hash & 0xFFFFFFFF) AS UNSIGNED INTEGER)
WHERE Hash < 0;
ALTER TABLE EmailEvents ADD BindToSystemEvent VARCHAR(255) NOT NULL DEFAULT '';
CREATE TABLE SystemEventSubscriptions (
SubscriptionId int(11) NOT NULL AUTO_INCREMENT,
EmailEventId int(11) DEFAULT NULL,
SubscriberEmail varchar(255) NOT NULL DEFAULT '',
UserId int(11) DEFAULT NULL,
CategoryId int(11) DEFAULT NULL,
IncludeSublevels tinyint(4) NOT NULL DEFAULT '1',
ItemId int(11) DEFAULT NULL,
ParentItemId int(11) DEFAULT NULL,
SubscribedOn int(11) DEFAULT NULL,
PRIMARY KEY (SubscriptionId),
KEY EmailEventId (EmailEventId)
);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:system_event_subscriptions.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:system_event_subscriptions.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:system_event_subscriptions.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:system_event_subscriptions.delete', 11, 1, 1, 0);
UPDATE LanguageLabels
SET
l1_ColumnTranslation = l1_Translation,
l2_ColumnTranslation = l2_Translation,
l3_ColumnTranslation = l3_Translation,
l4_ColumnTranslation = l4_Translation,
l5_ColumnTranslation = l5_Translation
WHERE PhraseKey IN ('LA_FLD_BINDTOSYSTEMEVENT', 'LA_FLD_CATEGORYID');
UPDATE Categories SET l1_MenuTitle = l1_Name WHERE l1_Name = 'Content';
UPDATE SystemSettings
SET ValueList = '0=la_opt_QueryString||1=la_opt_Cookies||2=la_opt_AutoDetect'
WHERE VariableName = 'CookieSessions';
# ===== v 5.2.0-RC1 =====
UPDATE LanguageLabels SET l<%PRIMARY_LANGUAGE%>_Translation = '&lt;TITLE&gt; Tag' WHERE PhraseKey = 'LA_FLD_PAGECONTENTTITLE';
ALTER TABLE EmailLog ADD EventType TINYINT(4) NULL AFTER EventName;
DELETE FROM UserPersistentSessionData WHERE VariableName IN ('email-log[Default]columns_.', 'promo-block[Default]columns_.');
ALTER TABLE Categories
ADD NamedParentPathHash INT UNSIGNED NOT NULL DEFAULT '0' AFTER NamedParentPath,
ADD CachedTemplateHash INT UNSIGNED NOT NULL DEFAULT '0' AFTER CachedTemplate,
ADD INDEX (NamedParentPathHash),
ADD INDEX (CachedTemplateHash);
# ===== v 5.2.0 =====
INSERT INTO SystemSettings VALUES(DEFAULT, 'CategoryPermissionRebuildMode', '3', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_CategoryPermissionRebuildMode', 'select', NULL, '1=la_opt_Manual||2=la_opt_Silent||3=la_opt_Automatic', 10.11, 0, 0, 'hint:la_config_CategoryPermissionRebuildMode');
DELETE FROM LanguageLabels WHERE PhraseKey = 'LA_CONFIG_QUICKCATEGORYPERMISSIONREBUILD';
ALTER TABLE ScheduledTasks ADD RunSchedule VARCHAR(255) NOT NULL DEFAULT '* * * * *' AFTER Event;
DELETE FROM UserPersistentSessionData WHERE VariableName = 'scheduled-task[Default]columns_.';
DELETE FROM LanguageLabels WHERE PhraseKey = 'LA_FLD_RUNINTERVAL';
ALTER TABLE Languages
ADD ShortDateFormat VARCHAR(255) NOT NULL DEFAULT 'm/d' AFTER DateFormat,
ADD ShortTimeFormat VARCHAR(255) NOT NULL DEFAULT 'g:i A' AFTER TimeFormat;
UPDATE Languages
SET
ShortDateFormat = REPLACE(REPLACE(DateFormat, '/Y', ''), '/y', ''),
ShortTimeFormat = REPLACE(TimeFormat, ':s', '');
UPDATE SystemSettings
SET GroupDisplayOrder = 1
WHERE VariableName = 'AdminConsoleInterface';
UPDATE SystemSettings
SET Section = 'in-portal:configure_general', Prompt = 'la_config_AdminConsoleInterface', DisplayOrder = 50.01, GroupDisplayOrder = 2
WHERE VariableName = 'AllowAdminConsoleInterfaceChange';
DELETE FROM LanguageLabels WHERE PhraseKey = 'LA_CONFIG_ALLOWADMINCONSOLEINTERFACECHANGE';
UPDATE SystemSettings
SET DisplayOrder = DisplayOrder - 0.01
WHERE ModuleOwner = 'In-Portal' AND Section = 'in-portal:configure_advanced' AND DisplayOrder > 40.02 AND DisplayOrder < 50;
UPDATE SystemSettings
SET VariableValue = 1
WHERE VariableName = 'UseOutputCompression';
ALTER TABLE EmailQueue CHANGE LogData LogData LONGTEXT NULL DEFAULT NULL;
DELETE FROM UserPersistentSessionData WHERE VariableName = 'mailing-list[Default]columns_.';
INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:configure_general.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:configure_advanced.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:configure_categories.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:configure_users.add', 11, 1, 1, 0);
# ===== v 5.2.1-B1 =====
UPDATE SystemSettings
SET DisplayOrder = 30.05
WHERE VariableName = 'Force_HTTP_When_SSL_Not_Required';
INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.NEW.PASSWORD', NULL, 1, 0, 'Core', 'Sends new password to an existing user', 0, 1, 0);
INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD.BYADMIN', NULL, 1, 0, 'Core', 'Sends password to a new user', 0, 1, 0);
CREATE TABLE SystemLog (
LogId int(11) NOT NULL AUTO_INCREMENT,
LogUniqueId int(11) DEFAULT NULL,
LogLevel tinyint(4) NOT NULL DEFAULT '7',
LogType tinyint(4) NOT NULL DEFAULT '3',
LogCode int(11) DEFAULT NULL,
LogMessage longtext,
LogTimestamp int(11) DEFAULT NULL,
LogDate datetime DEFAULT NULL,
LogEventName varchar(100) NOT NULL DEFAULT '',
LogHostname varchar(255) NOT NULL DEFAULT '',
LogRequestSource tinyint(4) DEFAULT NULL,
LogRequestURI varchar(255) NOT NULL DEFAULT '',
LogRequestData longtext,
LogUserId int(11) DEFAULT NULL,
LogInterface tinyint(4) DEFAULT NULL,
IpAddress varchar(15) NOT NULL DEFAULT '',
LogSessionKey int(11) DEFAULT NULL,
LogSessionData longtext,
LogBacktrace longtext,
LogSourceFilename varchar(255) NOT NULL DEFAULT '',
LogSourceFileLine int(11) DEFAULT NULL,
LogProcessId bigint(20) unsigned DEFAULT NULL,
LogMemoryUsed bigint(20) unsigned NOT NULL,
LogUserData longtext NOT NULL,
LogNotificationStatus tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (LogId),
KEY LogLevel (LogLevel),
KEY LogType (LogType),
KEY LogNotificationStatus (LogNotificationStatus)
);
INSERT INTO SystemSettings VALUES(DEFAULT, 'EnableEmailLog', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsLogs', 'la_config_EnableEmailLog', 'radio', NULL, '1=la_Yes||0=la_No', 65.01, 0, 1, 'hint:la_config_EnableEmailLog');
UPDATE SystemSettings
SET DisplayOrder = 65.02, Heading = 'la_section_SettingsLogs', ValueList = '86400=la_opt_OneDay||604800=la_opt_OneWeek||1209600=la_opt_TwoWeeks||2419200=la_opt_OneMonth||7257600=la_opt_ThreeMonths||29030400=la_opt_OneYear||-1=la_opt_EmailLogKeepForever'
WHERE VariableName = 'EmailLogRotationInterval';
UPDATE LanguageLabels
SET
l<%PRIMARY_LANGUAGE%>_Translation = 'Keep "E-mail Log" for',
l<%PRIMARY_LANGUAGE%>_HintTranslation = 'This setting allows you to control for how long "E-mail Log" messages will be stored in the log and then automatically deleted. Use option "Forever" with caution since it will completely disable automatic log cleanup and can lead to large size of database table that stores e-mail messages.'
WHERE PhraseKey = 'LA_CONFIG_EMAILLOGROTATIONINTERVAL' AND l<%PRIMARY_LANGUAGE%>_Translation = 'Keep Email Log for';
DELETE FROM LanguageLabels WHERE PhraseKey = 'LA_OPT_EMAILLOGKEEPNEVER';
INSERT INTO SystemSettings VALUES(DEFAULT, 'SystemLogRotationInterval', '2419200', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsLogs', 'la_config_SystemLogRotationInterval', 'select', NULL, '86400=la_opt_OneDay||604800=la_opt_OneWeek||1209600=la_opt_TwoWeeks||2419200=la_opt_OneMonth||7257600=la_opt_ThreeMonths||29030400=la_opt_OneYear||-1=la_opt_SystemLogKeepForever', 65.03, 0, 1, 'hint:la_config_SystemLogRotationInterval');
INSERT INTO SystemSettings VALUES(DEFAULT, 'SystemLogNotificationEmail', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsLogs', 'la_config_SystemLogNotificationEmail', 'text', 'a:5:{s:4:"type";s:6:"string";s:9:"formatter";s:10:"kFormatter";s:6:"regexp";s:85:"/^([-a-zA-Z0-9!\\#$%&*+\\/=?^_`{|}~.]+@[a-zA-Z0-9]{1}[-.a-zA-Z0-9_]*\\.[a-zA-Z]{2,6})$/i";s:10:"error_msgs";a:1:{s:14:"invalid_format";s:18:"!la_invalid_email!";}s:7:"default";s:0:"";}', NULL, 65.04, 0, 1, 'hint:la_config_SystemLogNotificationEmail');
INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'SYSTEM.LOG.NOTIFY', NULL, 1, 0, 'Core', 'Notification about message added to System Log', 1, 1, 1);
ALTER TABLE Users ADD PasswordHashingMethod TINYINT NOT NULL DEFAULT '3' AFTER Password;
UPDATE Users SET PasswordHashingMethod = 1;
INSERT INTO SystemSettings VALUES(DEFAULT, 'TypeKitId', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_Settings3rdPartyAPI', 'la_config_TypeKitId', 'text', NULL, NULL, 80.05, 0, 1, NULL);
ALTER TABLE MailingLists CHANGE EmailsQueued EmailsQueuedTotal INT(10) UNSIGNED NOT NULL DEFAULT '0';
RENAME TABLE <%TABLE_PREFIX%>EmailEvents TO <%TABLE_PREFIX%>EmailTemplates;
ALTER TABLE EmailTemplates CHANGE `Event` TemplateName VARCHAR(40) NOT NULL DEFAULT '';
ALTER TABLE EmailTemplates CHANGE EventId TemplateId INT(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE SystemEventSubscriptions CHANGE EmailEventId EmailTemplateId INT(11) NULL DEFAULT NULL;
DELETE FROM LanguageLabels WHERE PhraseKey IN (
'LA_FLD_EXPORTEMAILEVENTS', 'LA_FLD_EVENT', 'LA_TITLE_EMAILMESSAGES', 'LA_TAB_E-MAILS', 'LA_COL_EMAILEVENTS',
'LA_OPT_EMAILEVENTS', 'LA_FLD_EMAILEVENT', 'LA_TITLE_EMAILEVENTS', 'LA_TITLE_ADDING_E-MAIL', 'LA_TITLE_EDITING_E-MAIL',
'LA_TITLE_EDITINGEMAILEVENT', 'LA_TITLE_NEWEMAILEVENT', 'LA_TAB_EMAILEVENTS'
);
DELETE FROM UserPersistentSessionData WHERE VariableName IN ('system-event-subscription[Default]columns_.', 'email-log[Default]columns_.');
ALTER TABLE EmailLog CHANGE EventName TemplateName VARCHAR(255) NOT NULL DEFAULT '';
# ===== v 5.2.1-B2 =====
DELETE FROM LanguageLabels WHERE PhraseKey = 'LA_TAB_REPORTS';
ALTER TABLE Modules ADD ClassNamespace VARCHAR(255) NOT NULL DEFAULT '' AFTER Path;
UPDATE Modules
SET ClassNamespace = 'Intechnic\\InPortal\\Core'
WHERE `Name` IN ('Core', 'In-Portal');
UPDATE SystemSettings
SET DisplayOrder = DisplayOrder + 0.01
WHERE ModuleOwner = 'In-Portal' AND Section = 'in-portal:configure_categories' AND DisplayOrder > 10.10 AND DisplayOrder < 20;
INSERT INTO SystemSettings VALUES(DEFAULT, 'CheckViewPermissionsInCatalog', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_CheckViewPermissionsInCatalog', 'radio', NULL, '1=la_Yes||0=la_No', 10.11, 0, 1, 'hint:la_config_CheckViewPermissionsInCatalog');
# ===== v 5.2.1-RC1 =====
UPDATE LanguageLabels
SET l1_Translation = REPLACE(l1_Translation, '<br />', '\n')
WHERE PhraseKey = 'LA_EDITINGINPROGRESS';
UPDATE LanguageLabels
SET l1_ColumnTranslation = 'Helpful'
WHERE PhraseKey = 'LA_FLD_HELPFULCOUNT';
UPDATE LanguageLabels
SET l1_ColumnTranslation = 'Not Helpful'
WHERE PhraseKey = 'LA_FLD_NOTHELPFULCOUNT';
UPDATE LanguageLabels
SET Module = 'Core'
WHERE PhraseKey = 'LA_SECTION_FILE';
# ===== v 5.3.0-B1 =====
ALTER TABLE ScheduledTasks ADD Settings TEXT NULL;
ALTER TABLE Themes ADD ImageResizeRules TEXT NULL;
DELETE FROM UserPersistentSessionData WHERE VariableName = 'emailevents[Emails]columns_.';
INSERT INTO <%TABLE_PREFIX%>SystemCache (VarName, Data)
SELECT 'tmp_translation' AS VarName, l<%PRIMARY_LANGUAGE%>_Translation AS Data
FROM <%TABLE_PREFIX%>LanguageLabels
WHERE PhraseKey = 'LC_IMPORTLANG_PHRASEWARNING';
UPDATE <%TABLE_PREFIX%>LanguageLabels
SET
Phrase = 'la_fld_ImportOverwrite',
PhraseKey = 'LA_FLD_IMPORTOVERWRITE',
l<%PRIMARY_LANGUAGE%>_HintTranslation = (SELECT Data FROM <%TABLE_PREFIX%>SystemCache WHERE VarName = 'tmp_translation' LIMIT 1)
WHERE PhraseKey = 'LA_PROMPT_OVERWRITEPHRASES';
DELETE FROM LanguageLabels WHERE PhraseKey = 'LC_IMPORTLANG_PHRASEWARNING';
DELETE FROM LanguageLabels WHERE PhraseKey = 'LA_CONFIG_USETEMPLATECOMPRESSION';
DELETE FROM SystemSettings WHERE VariableName = 'UseTemplateCompression';
UPDATE SystemSettings
SET DisplayOrder = ROUND(DisplayOrder - 0.01, 2)
WHERE (DisplayOrder BETWEEN 60.04 AND 60.10) AND (ModuleOwner = 'In-Portal') AND (Section = 'in-portal:configure_advanced');
INSERT INTO SystemSettings VALUES(DEFAULT, 'RandomString', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_RandomString', 'text', '', '', 60.09, 0, 1, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'PlainTextCookies', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_PlainTextCookies', 'text', '', '', 60.10, 0, 1, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'ForceCanonicalUrls', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceCanonicalUrls', 'checkbox', '', '', 10.0125, 0, 0, NULL);
UPDATE LanguageLabels
SET l1_HintTranslation = '<ul>\r\n<li>This deploy script will apply all Database Changes stored in <b><u>[module]/project_upgrades.sql</u></b> to the current website and save applied Revisions in AppliedDBRevisions.</li>\r\n<li>This deploy script will create all new language phrases by re-importing <b><u>[module]/install/english.lang</u></b> file.</li>\r\n<li>This deploy script will reset all caches at once.</li>\r\n</ul>'
WHERE Phrase = 'la_title_SystemToolsDeploy';
INSERT INTO SystemSettings VALUES(DEFAULT, 'EmailDelivery', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_EmailDelivery', 'radio', NULL, '1=la_opt_EmailDeliveryQueue||2=la_opt_EmailDeliveryImmediate', 50.11, 0, 1, NULL);
DELETE FROM UserPersistentSessionData WHERE VariableName = 'email-queue[Default]columns_.';
+
+ALTER TABLE EmailLog
+ ADD ToUserId INT(11) DEFAULT NULL,
+ ADD ItemPrefix VARCHAR(50) NOT NULL DEFAULT '',
+ ADD ItemId INT(11) DEFAULT NULL;
+
+DELETE FROM UserPersistentSessionData WHERE VariableName = 'email-log[Default]columns_.';
Index: branches/5.3.x/core/install/english.lang
===================================================================
--- branches/5.3.x/core/install/english.lang (revision 15937)
+++ branches/5.3.x/core/install/english.lang (revision 15938)
@@ -1,2232 +1,2233 @@
<?xml version="1.0" encoding="utf-8"?>
<LANGUAGES Version="6">
<LANGUAGE Encoding="base64" PackName="English" LocalName="English" DateFormat="m/d/Y" ShortDateFormat="m/d" TimeFormat="g:i A" ShortTimeFormat="g:i A" InputDateFormat="m/d/Y" InputTimeFormat="g:i:s A" DecimalPoint="." ThousandSep="," UnitSystem="2" Locale="en-US" UserDocsUrl="http://docs.in-portal.org/eng/index.php">
<EMAILDESIGNS>
<HTML>JGJvZHkNCjxici8+PGJyLz4NCg0KU2luY2VyZWx5LDxici8+PGJyLz4NCg0KV2Vic2l0ZSBhZG1pbmlzdHJhdGlvbi4NCg0KPCEtLSMjIDxpbnAyOmVtYWlsLWxvZ19JdGVtTGluayB0ZW1wbGF0ZT0icGxhdGZvcm0vbXlfYWNjb3VudC9lbWFpbCIvPiAjIy0tPg==</HTML>
</EMAILDESIGNS>
<PHRASES>
<PHRASE Label="la_Active" Module="Core" Type="1">QWN0aXZl</PHRASE>
<PHRASE Label="la_Add" Module="Core" Type="1">QWRk</PHRASE>
<PHRASE Label="la_AddTo" Module="Core" Type="1">QWRkIFRv</PHRASE>
<PHRASE Label="la_AdministrativeConsole" Module="Core" Type="1">QWRtaW5pc3RyYXRpdmUgQ29uc29sZQ==</PHRASE>
<PHRASE Label="la_AllowChangingAdminConsoleInterface" Module="Core" Type="1">YWxsb3cgY2hhbmdpbmc=</PHRASE>
<PHRASE Label="la_AllowDeleteRootCats" Module="Core" Type="1">QWxsb3cgZGVsZXRpbmcgTW9kdWxlIFJvb3QgU2VjdGlvbg==</PHRASE>
<PHRASE Label="la_alt_Browse" Module="Core" Type="1">VmlldyBpbiBCcm93c2UgTW9kZQ==</PHRASE>
<PHRASE Label="la_alt_GoInside" Module="Core" Type="1">R28gSW5zaWRl</PHRASE>
<PHRASE Label="la_Always" Module="Core" Type="1">QWx3YXlz</PHRASE>
<PHRASE Label="la_and" Module="Core" Type="1">YW5k</PHRASE>
<PHRASE Label="la_Auto" Module="Core" Type="1">QXV0bw==</PHRASE>
<PHRASE Label="la_Automatic" Module="Core" Type="1">QXV0b21hdGlj</PHRASE>
<PHRASE Label="la_AvailableColumns" Module="Core" Type="1">QXZhaWxhYmxlIENvbHVtbnM=</PHRASE>
<PHRASE Label="la_AvailableItems" Module="Core" Type="1">QXZhaWxhYmxlIEl0ZW1z</PHRASE>
<PHRASE Label="la_Background" Module="Core" Type="1">QmFja2dyb3VuZA==</PHRASE>
<PHRASE Label="la_Borders" Module="Core" Type="1">Qm9yZGVycw==</PHRASE>
<PHRASE Label="la_btn_Add" Module="Core" Type="1">QWRk</PHRASE>
<PHRASE Label="la_btn_AdminEditItem" Module="Core" Type="1">RWRpdCBJdGVt</PHRASE>
<PHRASE Label="la_btn_BrowseMode" Module="Core" Type="1">QnJvd3NlIE1vZGU=</PHRASE>
<PHRASE Label="la_btn_Cancel" Module="Core" Type="1">Q2FuY2Vs</PHRASE>
<PHRASE Label="la_btn_Change" Module="Core" Type="1">Q2hhbmdl</PHRASE>
<PHRASE Label="la_btn_Clear" Module="Core" Type="1">Q2xlYXI=</PHRASE>
<PHRASE Label="la_btn_ContentMode" Module="Core" Type="1">Q29udGVudCBNb2Rl</PHRASE>
<PHRASE Label="la_btn_Delete" Module="Core" Type="1">RGVsZXRl</PHRASE>
<PHRASE Label="la_btn_DeleteDraft" Module="Core" Type="1">RGVsZXRl</PHRASE>
<PHRASE Label="la_btn_DeleteReview" Module="Core" Type="1">ZGVsZXRlIHJldmlldw==</PHRASE>
<PHRASE Label="la_btn_Deploy" Module="Core" Type="1">RGVwbG95</PHRASE>
<PHRASE Label="la_btn_DesignMode" Module="Core" Type="1">RGVzaWduIE1vZGU=</PHRASE>
<PHRASE Label="la_btn_Down" Module="Core" Type="1">RG93bg==</PHRASE>
<PHRASE Label="la_btn_Edit" Module="Core" Type="1">RWRpdA==</PHRASE>
<PHRASE Label="la_btn_EditBlock" Module="Core" Type="1">RWRpdCBCbG9jaw==</PHRASE>
<PHRASE Label="la_btn_EditContent" Module="Core" Type="1">RWRpdCBDb250ZW50</PHRASE>
<PHRASE Label="la_btn_EditDesign" Module="Core" Type="1">RWRpdCBEZXNpZ24=</PHRASE>
<PHRASE Label="la_btn_Generate" Module="Core" Type="1">R2VuZXJhdGU=</PHRASE>
<PHRASE Label="la_btn_GeneratePage" Module="Core" Type="1">R2VuZXJhdGUgUGFnZQ==</PHRASE>
<PHRASE Label="la_btn_GetValue" Module="Core" Type="1">R2V0IFZhbHVl</PHRASE>
<PHRASE Label="la_btn_Locate" Module="Core" Type="1">TG9jYXRl</PHRASE>
<PHRASE Label="la_btn_MoveDown" Module="Core" Type="1">TW92ZSBEb3du</PHRASE>
<PHRASE Label="la_btn_MoveUp" Module="Core" Type="1">TW92ZSBVcA==</PHRASE>
<PHRASE Label="la_btn_PublishingTools" Module="Core" Type="1">UHVibGlzaGluZyBUb29scw==</PHRASE>
<PHRASE Label="la_btn_Rebuild" Module="Core" Type="1">UmVidWlsZA==</PHRASE>
<PHRASE Label="la_btn_Recompile" Module="Core" Type="1">UmVjb21waWxl</PHRASE>
<PHRASE Label="la_btn_Refresh" Module="Core" Type="1">UmVmcmVzaA==</PHRASE>
<PHRASE Label="la_btn_Reset" Module="Core" Type="1">UmVzZXQ=</PHRASE>
<PHRASE Label="la_btn_ResetAndValidateConfigFiles" Module="Core" Type="1">UmVzZXQgJmFtcDsgVmFsaWRhdGUgQ29uZmlnIEZpbGVz</PHRASE>
<PHRASE Label="la_btn_ResetRootPassword" Module="Core" Type="1">UmVzZXQgInJvb3QiIHBhc3N3b3Jk</PHRASE>
<PHRASE Label="la_btn_Save" Module="Core" Type="1">U2F2ZQ==</PHRASE>
<PHRASE Label="la_btn_SaveChanges" Module="Core" Type="1">U2F2ZSBDaGFuZ2Vz</PHRASE>
<PHRASE Label="la_btn_SectionProperties" Module="Core" Type="1">U2VjdGlvbiBQcm9wZXJ0aWVz</PHRASE>
<PHRASE Label="la_btn_SectionTemplate" Module="Core" Type="1">U2VjdGlvbiBUZW1wbGF0ZQ==</PHRASE>
<PHRASE Label="la_btn_SelectAll" Module="Core" Type="1">U2VsZWN0IEFsbA==</PHRASE>
<PHRASE Label="la_btn_SetValue" Module="Core" Type="1">U2V0IFZhbHVl</PHRASE>
<PHRASE Label="la_btn_ShowStructure" Module="Core" Type="1">U2hvdyBTdHJ1Y3R1cmU=</PHRASE>
<PHRASE Label="la_btn_Synchronize" Module="Core" Type="1">U3luY2hyb25pemU=</PHRASE>
<PHRASE Label="la_btn_Unselect" Module="Core" Type="1">VW5zZWxlY3Q=</PHRASE>
<PHRASE Label="la_btn_Up" Module="Core" Type="1">VXA=</PHRASE>
<PHRASE Label="la_btn_UseDraft" Module="Core" Type="1">VXNl</PHRASE>
<PHRASE Label="la_By" Module="Core" Type="1">Ynk=</PHRASE>
<PHRASE Label="la_Cancel" Module="Core" Type="1">Q2FuY2Vs</PHRASE>
<PHRASE Label="la_category" Module="Core" Type="1">U2VjdGlvbg==</PHRASE>
<PHRASE Label="la_category_daysnew_prompt" Module="Core" Type="1">TnVtYmVyIG9mIGRheXMgZm9yIGEgY2F0LiB0byBiZSBORVc=</PHRASE>
<PHRASE Label="la_category_metadesc" Module="Core" Type="1">RGVmYXVsdCBNRVRBIGRlc2NyaXB0aW9u</PHRASE>
<PHRASE Label="la_category_metakey" Module="Core" Type="1">RGVmYXVsdCBNRVRBIEtleXdvcmRz</PHRASE>
<PHRASE Label="la_category_perpage_prompt" Module="Core" Type="1">TnVtYmVyIG9mIHNlY3Rpb25zIHBlciBwYWdl</PHRASE>
<PHRASE Label="la_category_perpage__short_prompt" Module="Core" Type="1">U2VjdGlvbnMgUGVyIFBhZ2UgKFNob3J0bGlzdCk=</PHRASE>
<PHRASE Label="la_category_showpick_prompt" Module="Core" Type="1">RGlzcGxheSBlZGl0b3IgUElDS3MgYWJvdmUgcmVndWxhciBzZWN0aW9ucw==</PHRASE>
<PHRASE Label="la_category_sortfield2_prompt" Module="Core" Type="1">QW5kIHRoZW4gYnk=</PHRASE>
<PHRASE Label="la_category_sortfield_prompt" Module="Core" Type="1">T3JkZXIgc2VjdGlvbnMgYnk=</PHRASE>
<PHRASE Label="la_Close" Module="Core" Type="1">Q2xvc2U=</PHRASE>
<PHRASE Label="la_col_Access" Module="Core" Type="1">QWNjZXNz</PHRASE>
<PHRASE Label="la_col_AdditionalPermissions" Module="Core" Type="1">QWRkaXRpb25hbA==</PHRASE>
<PHRASE Label="la_col_AffectedItems" Module="Core" Type="1">QWZmZWN0ZWQgSXRlbXM=</PHRASE>
<PHRASE Label="la_col_AltName" Module="Core" Type="1">QWx0IFZhbHVl</PHRASE>
<PHRASE Label="la_col_BuildDate" Module="Core" Type="1">QnVpbGQgRGF0ZQ==</PHRASE>
<PHRASE Label="la_col_CategoryName" Module="Core" Type="1">U2VjdGlvbiBOYW1l</PHRASE>
<PHRASE Label="la_col_ColumnPhrase" Module="Core" Type="1">Q29sdW1uIFBocmFzZQ==</PHRASE>
<PHRASE Label="la_col_Effective" Module="Core" Type="1">RWZmZWN0aXZl</PHRASE>
<PHRASE Label="la_col_EmailTemplates" Module="Core" Type="1">RS1tYWlsIFRlbXBsYXRlcw==</PHRASE>
<PHRASE Label="la_col_EnableEmailCommunication" Module="Core" Type="1">RW5hYmxlIEUtbWFpbCBDb21tdW5pY2F0aW9u</PHRASE>
<PHRASE Label="la_col_Error" Module="Core" Type="1">Jm5ic3A7</PHRASE>
<PHRASE Label="la_col_EventDescription" Module="Core" Type="1">RXZlbnQgRGVzY3JpcHRpb24=</PHRASE>
<PHRASE Label="la_col_EventParams" Module="Core" Type="1">RXZlbnQgUGFyYW1z</PHRASE>
<PHRASE Label="la_col_HintPhrase" Module="Core" Type="1">SGludCBQaHJhc2U=</PHRASE>
<PHRASE Label="la_col_ImageEnabled" Module="Core" Type="1">U3RhdHVz</PHRASE>
<PHRASE Label="la_col_ImageName" Module="Core" Type="1">SW1hZ2U=</PHRASE>
<PHRASE Label="la_col_ImageUrl" Module="Core" Type="1">VVJM</PHRASE>
<PHRASE Label="la_col_Inherited" Module="Core" Type="1">SW5oZXJpdGVk</PHRASE>
<PHRASE Label="la_col_InheritedFrom" Module="Core" Type="1">SW5oZXJpdGVkIEZyb20=</PHRASE>
<PHRASE Label="la_col_InMenu" Module="Core" Type="1">SW4gTWVudQ==</PHRASE>
<PHRASE Label="la_col_IP" Module="Core" Type="1">SVAgQWRkcmVzcw==</PHRASE>
<PHRASE Label="la_col_IsPopular" Module="Core" Type="1">UG9wdWxhcg==</PHRASE>
<PHRASE Label="la_col_IsPrimaryLanguage" Module="Core" Type="1">VXNlciBQcmltYXJ5</PHRASE>
<PHRASE Label="la_col_Keyword" Module="Core" Type="1">S2V5d29yZA==</PHRASE>
<PHRASE Label="la_col_Label" Module="Core" Type="1">TGFiZWw=</PHRASE>
<PHRASE Label="la_col_LanguagePackInstalled" Module="Core" Type="1">TGFuZ3VhZ2UgUGFjayBJbnN0YWxsZWQ=</PHRASE>
<PHRASE Label="la_col_LastChanged" Module="Core" Type="1">TGFzdCBDaGFuZ2Vk</PHRASE>
<PHRASE Label="la_col_LastCompiled" Module="Core" Type="1">TGFzdCBDb21waWxlZA==</PHRASE>
<PHRASE Label="la_col_LastSendRetry" Module="Core" Type="1">TGFzdCBBdHRlbXB0</PHRASE>
<PHRASE Label="la_col_LinkUrl" Module="Core" Type="1">TGluayBVUkw=</PHRASE>
<PHRASE Label="la_col_MailingList" Module="Core" Type="1">TWFpbGluZyBMaXN0</PHRASE>
<PHRASE Label="la_col_MembershipExpires" Module="Core" Type="1">TWVtYmVyc2hpcCBFeHBpcmVz</PHRASE>
<PHRASE Label="la_col_MessageHeaders" Module="Core" Type="1">TWVzc2FnZSBIZWFkZXJz</PHRASE>
<PHRASE Label="la_col_MessageHtml" Module="Core" Type="1">SFRNTA==</PHRASE>
<PHRASE Label="la_col_OriginalValue" Module="Core" Type="1">T3JpZ2luYWwgVmFsdWU=</PHRASE>
<PHRASE Label="la_col_Path" Module="Core" Type="1">UGF0aA==</PHRASE>
<PHRASE Label="la_col_PermAdd" Module="Core" Type="1">QWRk</PHRASE>
<PHRASE Label="la_col_PermDelete" Module="Core" Type="1">RGVsZXRl</PHRASE>
<PHRASE Label="la_col_PermEdit" Module="Core" Type="1">RWRpdA==</PHRASE>
<PHRASE Label="la_col_PermissionName" Module="Core" Type="1">UGVybWlzc2lvbiBOYW1l</PHRASE>
<PHRASE Label="la_col_PermissionValue" Module="Core" Type="1">QWNjZXNz</PHRASE>
<PHRASE Label="la_col_PermView" Module="Core" Type="1">Vmlldw==</PHRASE>
<PHRASE Label="la_col_Phrases" Module="Core" Type="1">UGhyYXNlcw==</PHRASE>
<PHRASE Label="la_col_PortalUserId" Module="Core" Type="1">VXNlciBJRA==</PHRASE>
<PHRASE Label="la_col_Preview" Module="Core" Type="1">UHJldmlldw==</PHRASE>
<PHRASE Label="la_col_PrimaryGroup" Module="Core" Type="1">UHJpbWFyeSBHcm91cA==</PHRASE>
<PHRASE Label="la_col_PrimaryValue" Module="Core" Type="1">UHJpbWFyeSBWYWx1ZQ==</PHRASE>
<PHRASE Label="la_col_Prompt" Module="Core" Type="1">RmllbGQgUHJvbXB0</PHRASE>
<PHRASE Label="la_col_Queued" Module="Core" Type="1">UXVldWVk</PHRASE>
<PHRASE Label="la_col_Referer" Module="Core" Type="1">UmVmZXJlcg==</PHRASE>
<PHRASE Label="la_col_ResetToDefaultSorting" Module="Core" Type="1">UmVzZXQgdG8gZGVmYXVsdA==</PHRASE>
<PHRASE Label="la_col_ReviewCount" Module="Core" Type="1">Q29tbWVudHM=</PHRASE>
<PHRASE Label="la_col_ReviewedBy" Module="Core" Type="1">Q3JlYXRlZCBieQ==</PHRASE>
<PHRASE Label="la_col_ScheduleFromDate" Module="Core" Type="1">U2NoZWR1bGUgRnJvbSBEYXRl</PHRASE>
<PHRASE Label="la_col_ScheduleToDate" Module="Core" Type="1">U2NoZWR1bGUgVG8gRGF0ZQ==</PHRASE>
<PHRASE Label="la_col_SendRetries" Module="Core" Type="1">QXR0ZW1wdHMg</PHRASE>
<PHRASE Label="la_col_SessionEnd" Module="Core" Type="1">U2Vzc2lvbiBFbmQ=</PHRASE>
<PHRASE Label="la_col_SessionStart" Module="Core" Type="1">U2Vzc2lvbiBTdGFydA==</PHRASE>
<PHRASE Label="la_col_SortBy" Module="Core" Type="1">U29ydCBieQ==</PHRASE>
<PHRASE Label="la_col_System" Module="Core" Type="1">VHlwZQ==</PHRASE>
<PHRASE Label="la_col_SystemPath" Module="Core" Type="1">U3lzdGVtIFBhdGg=</PHRASE>
<PHRASE Label="la_col_TargetType" Module="Core" Type="1">SXRlbSBUeXBl</PHRASE>
<PHRASE Label="la_col_UserCount" Module="Core" Type="1">VXNlcnM=</PHRASE>
<PHRASE Label="la_col_UserFirstLastName" Module="Core" Type="1">TGFzdG5hbWUgRmlyc3RuYW1l</PHRASE>
<PHRASE Label="la_col_Value" Module="Core" Type="1">RmllbGQgVmFsdWU=</PHRASE>
<PHRASE Label="la_col_Visible" Module="Core" Type="1">VmlzaWJsZQ==</PHRASE>
<PHRASE Label="la_col_VisitDate" Module="Core" Type="1">VmlzaXQgRGF0ZQ==</PHRASE>
<PHRASE Label="la_common_ascending" Module="Core" Type="1">QXNjZW5kaW5n</PHRASE>
<PHRASE Label="la_common_descending" Module="Core" Type="1">RGVzY2VuZGluZw==</PHRASE>
<PHRASE Label="la_config_AdminConsoleInterface" Module="Core" Type="1">QWRtaW4gQ29uc29sZSBJbnRlcmZhY2U=</PHRASE>
<PHRASE Label="la_config_AdminSSL_URL" Module="Core" Type="1">U1NMIEZ1bGwgVVJMIGZvciBBZG1pbmlzdHJhdGl2ZSBDb25zb2xlIChodHRwczovL3d3dy5kb21haW4uY29tL3BhdGgpIA==</PHRASE>
<PHRASE Label="la_config_AllowSelectGroupOnFront" Module="Core" Type="1">QWxsb3cgdG8gc2VsZWN0IG1lbWJlcnNoaXAgZ3JvdXAgb24gRnJvbnQtZW5k</PHRASE>
<PHRASE Label="la_config_AutoRefreshIntervals" Module="Core" Type="1">TGlzdCBhdXRvbWF0aWMgcmVmcmVzaCBpbnRlcnZhbHMgKGluIG1pbnV0ZXMp</PHRASE>
<PHRASE Label="la_config_backup_path" Module="Core" Type="1">QmFja3VwIFBhdGg=</PHRASE>
<PHRASE Label="la_config_CatalogPreselectModuleTab" Module="Core" Type="1">U3dpdGNoIENhdGFsb2cgdGFicyBiYXNlZCBvbiBNb2R1bGU=</PHRASE>
<PHRASE Label="la_config_CategoryPermissionRebuildMode" Module="Core" Type="1" Hint="TWFudWFsIC0gbmV2ZXIgcmVidWlsZCBhdXRvbWF0aWNhbGx5DQpTaWxlbnQgLSBhbHdheXMgcmVidWlsZCB3aXRob3V0IHByb2dyZXNzIGJhcg0KQXV0b21hdGljIC0gYWx3YXlzIHJlYnVpbGQsIGJ1dCB1c2UgcHJvZ3Jlc3MgYmFyIG9uIGxhcmdlIHNlY3Rpb24gY291bnQ=">U2VjdGlvbiBQZXJtaXNzaW9uIFJlYnVpbGQgTW9kZQ==</PHRASE>
<PHRASE Label="la_config_CheckStopWords" Module="Core" Type="1">Q2hlY2sgU3RvcCBXb3Jkcw==</PHRASE>
<PHRASE Label="la_config_CheckViewPermissionsInCatalog" Module="Core" Type="1" Hint="RW5hYmxpbmcgdGhpcyBzZXR0aW5ncyBhdXRvbWF0aWNhbGx5IHR1cm5zIG9uIGFkdmFuY2VkIFZpZXcgUGVybWlzc2lvbiBjaGVjayBvbiBhbGwgQ2F0YWxvZyBTZWN0aW9ucyBhbmQgSXRlbXMgYmFzZWQgb24gY3VycmVudCBVc2VyIEdyb3VwLiBBZGRpdGlvbmFsbHksIGl0IHdvdWxkIHJlcXVpcmUgQWRtaW4gdG8gcnVuIFNlY3Rpb24gQ2FjaGUgcmVidWlsZGluZyBpbiBDYXRhbG9nIGluIHZhcmlvdXMgb2NjYXNpb25zIGluIG9yZGVyIHRvIHNlZSB1cGRhdGUgdG8gZGF0ZSBDYXRhbG9nIFNlY3Rpb25zLiBJdCdzIHJlY29tbWVuZGVkIHRvIGVuYWJsZSB0aGlzIHNldHRpbmcgT05MWSBpZiB5b3VyIHByb2plY3QgcmVxdWlyZXMgaXQu">RW5hYmxlICJWaWV3IFBlcm1pc3Npb25zIiBDaGVjayBpbiBDYXRhbG9n</PHRASE>
<PHRASE Label="la_config_CKFinderLicenseKey" Module="Core" Type="1">Q0tGaW5kZXIgTGljZW5zZSBLZXk=</PHRASE>
<PHRASE Label="la_config_CKFinderLicenseName" Module="Core" Type="1">Q0tGaW5kZXIgTGljZW5zZSBOYW1l</PHRASE>
<PHRASE Label="la_config_CSVExportDelimiter" Module="Core" Type="1">RGVmYXVsdCBDU1YgRXhwb3J0IERlbGltaXRlcg==</PHRASE>
<PHRASE Label="la_config_CSVExportEnclosure" Module="Core" Type="1">RGVmYXVsdCBDU1YgRXhwb3J0IEVuY2xvc3VyZSBDaGFyYWN0ZXI=</PHRASE>
<PHRASE Label="la_config_CSVExportEncoding" Module="Core" Type="1">RGVmYXVsdCBDU1YgRXhwb3J0IEVuY29kaW5n</PHRASE>
<PHRASE Label="la_config_CSVExportSeparator" Module="Core" Type="1">RGVmYXVsdCBDU1YgRXhwb3J0IE5ldyBMaW5lIFNlcGFyYXRvcg==</PHRASE>
<PHRASE Label="la_config_DebugOnlyFormConfigurator" Module="Core" Type="1">U2hvdyAiRm9ybXMgRWRpdG9yIiBpbiBERUJVRyBtb2RlIG9ubHk=</PHRASE>
<PHRASE Label="la_config_DebugOnlyPromoBlockGroupConfigurator" Module="Core" Type="1">U2hvdyAiUHJvbW8gQmxvY2sgR3JvdXBzIEVkaXRvciIgaW4gREVCVUcgbW9kZSBvbmx5</PHRASE>
<PHRASE Label="la_config_DefaultDesignTemplate" Module="Core" Type="1">RGVmYXVsdCBEZXNpZ24gVGVtcGxhdGU=</PHRASE>
<PHRASE Label="la_config_DefaultEmailRecipients" Module="Core" Type="1">RGVmYXVsdCBFLW1haWwgUmVjaXBpZW50cw==</PHRASE>
<PHRASE Label="la_config_DefaultGridPerPage" Module="Core" Type="1">RGVmYXVsdCAiUGVyIFBhZ2UiIHNldHRpbmcgaW4gR3JpZHM=</PHRASE>
<PHRASE Label="la_config_DefaultRegistrationCountry" Module="Core" Type="1">RGVmYXVsdCBSZWdpc3RyYXRpb24gQ291bnRyeQ==</PHRASE>
<PHRASE Label="la_config_DefaultTrackingCode" Module="Core" Type="1">RGVmYXVsdCBBbmFseXRpY3MgVHJhY2tpbmcgQ29kZQ==</PHRASE>
<PHRASE Label="la_config_EmailDelivery" Module="Core" Type="1">RW1haWwgRGVsaXZlcnk=</PHRASE>
<PHRASE Label="la_config_EmailLogRotationInterval" Module="Core" Type="1" Hint="VGhpcyBzZXR0aW5nIGFsbG93cyB5b3UgdG8gY29udHJvbCBmb3IgaG93IGxvbmcgIkUtbWFpbCBMb2ciIG1lc3NhZ2VzIHdpbGwgYmUgc3RvcmVkIGluIHRoZSBsb2cgYW5kIHRoZW4gYXV0b21hdGljYWxseSBkZWxldGVkLiBVc2Ugb3B0aW9uICJGb3JldmVyIiB3aXRoIGNhdXRpb24gc2luY2UgaXQgd2lsbCBjb21wbGV0ZWx5IGRpc2FibGUgYXV0b21hdGljIGxvZyBjbGVhbnVwIGFuZCBjYW4gbGVhZCB0byBsYXJnZSBzaXplIG9mIGRhdGFiYXNlIHRhYmxlIHRoYXQgc3RvcmVzIGUtbWFpbCBtZXNzYWdlcy4=">S2VlcCAiRS1tYWlsIExvZyIgZm9y</PHRASE>
<PHRASE Label="la_config_EnableEmailLog" Module="Core" Type="1" Hint="IkUtbWFpbCBMb2ciIHN0b3JlcyB0aGUgZXhhY3QgY29weSBvZiBhbGwgZW1haWxzIHRoYXQgYmVlbiBzZW50IG91dCBieSB5b3VyIHdlYnNpdGUuIFRoZSBmb2xsb3dpbmcgaW5mb3JtYXRpb24gaXMgc3RvcmVkOiBUaW1lLCBTZW5kZXIsIFJlY2lwaWVudHMsIFN1YmplY3QsIEUtbWFpbCBFdmVudCBuYW1lLCBhbmQgRW1haWwgQm9keS4=">RW5hYmxlICJFLW1haWwgTG9nIg==</PHRASE>
<PHRASE Label="la_config_EnablePageContentRevisionControl" Module="Core" Type="1">RW5hYmxlIFJldmlzaW9uIENvbnRyb2wgZm9yIFNlY3Rpb24gQ29udGVudA==</PHRASE>
<PHRASE Label="la_config_error_template" Module="Core" Type="1">VGVtcGxhdGUgZm9yICJGaWxlIG5vdCBmb3VuZCAoNDA0KSIgRXJyb3I=</PHRASE>
<PHRASE Label="la_config_ExcludeTemplateSectionsFromSearch" Module="Core" Type="1">RXhjbHVkZSB0ZW1wbGF0ZSBiYXNlZCBTZWN0aW9ucyBmcm9tIFNlYXJjaCBSZXN1bHRzIChpZS4gVXNlciBSZWdpc3RyYXRpb24p</PHRASE>
<PHRASE Label="la_config_FilenameSpecialCharReplacement" Module="Core" Type="1">RmlsZW5hbWUgU3BlY2lhbCBDaGFyIFJlcGxhY2VtZW50</PHRASE>
<PHRASE Label="la_config_first_day_of_week" Module="Core" Type="1">Rmlyc3QgRGF5IE9mIFdlZWs=</PHRASE>
<PHRASE Label="la_config_ForceCanonicalUrls" Module="Core" Type="1">Rm9yY2UgQ2Fub25pY2FsIFVSTHM=</PHRASE>
<PHRASE Label="la_config_ForceImageMagickResize" Module="Core" Type="1">QWx3YXlzIHVzZSBJbWFnZU1hZ2ljayB0byByZXNpemUgaW1hZ2Vz</PHRASE>
<PHRASE Label="la_config_ForceModRewriteUrlEnding" Module="Core" Type="1" Hint="VXNlciB3aWxsIGJlIGF1dG9tYXRpY2FsbHkgcmVkaXJlY3RlZCB0byB0aGUgc2VsZWN0ZWQgVXJsIEVuZGluZyBpbiBjYXNlIHdoZW4gY3VycmVudCBwYWdlIHVybCBoYXMgYSBkaWZmZXJlbnQgZW5kaW5n">Rm9yY2UgUmVkaXJlY3QgdG8gU2VsZWN0ZWQgVVJMIEVuZGluZw==</PHRASE>
<PHRASE Label="la_config_force_http" Module="Core" Type="1">UmVkaXJlY3QgdG8gSFRUUCB3aGVuIFNTTCBpcyBub3QgcmVxdWlyZWQ=</PHRASE>
<PHRASE Label="la_config_FullImageHeight" Module="Core" Type="1">RnVsbCBpbWFnZSBIZWlnaHQ=</PHRASE>
<PHRASE Label="la_config_FullImageWidth" Module="Core" Type="1">RnVsbCBpbWFnZSBXaWR0aA==</PHRASE>
<PHRASE Label="la_config_HardMaintenanceTemplate" Module="Core" Type="1" Hint="VGhpcyB0ZW1wbGF0ZSB3aWxsIGJlIHVzZWQgdG8gc3RhdGljIEhUTUwgZmlsZSB1bmRlciAvc3lzdGVtIGZvbGRlciB0byBiZSBzaG93biBvbiBGcm9udC1lbmQgb3IgQWRtaW4gd2hlbiBIYXJkIE1haW50ZW5hbmNlIG1vZGUgaXMgYWN0aXZlLiBTdGF0aWMgcGFnZSBzaG91bGQgYmUgZ2VuZXJhdGVkIGZyb20gc3BlY2lmaWVkIGhlcmUgdGVtcGxhdGUgYnkgY2xpY2tpbmcgIkdlbmVyYXRlIFBhZ2UiIGJ1dHRvbi4=">VGVtcGxhdGUgZm9yIEhhcmQgTWFpbnRlbmFuY2U=</PHRASE>
<PHRASE Label="la_config_HTTPAuthBypassIPs" Module="Core" Type="1">QnlwYXNzIEhUVFAgQXV0aGVudGljYXRpb24gZnJvbSBJUHMgKHNlcGFyYXRlZCBieSBzZW1pY29sb25zKQ==</PHRASE>
<PHRASE Label="la_config_HTTPAuthPassword" Module="Core" Type="1">UGFzc3dvcmQgZm9yIEhUVFAgQXV0aGVudGljYXRpb24=</PHRASE>
<PHRASE Label="la_config_HTTPAuthUsername" Module="Core" Type="1">VXNlcm5hbWUgZm9yIEhUVFAgQXV0aGVudGljYXRpb24=</PHRASE>
<PHRASE Label="la_config_KeepSessionOnBrowserClose" Module="Core" Type="1">S2VlcCBTZXNzaW9uIGFsaXZlIG9uIEJyb3dzZXIgY2xvc2U=</PHRASE>
<PHRASE Label="la_config_MailFunctionHeaderSeparator" Module="Core" Type="1">TWFpbCBGdW5jdGlvbiBIZWFkZXIgU2VwYXJhdG9y</PHRASE>
<PHRASE Label="la_config_MailingListQueuePerStep" Module="Core" Type="1">TWFpbGluZyBMaXN0IFF1ZXVlIFBlciBTdGVw</PHRASE>
<PHRASE Label="la_config_MailingListSendPerStep" Module="Core" Type="1">TWFpbGluZyBMaXN0IFNlbmQgUGVyIFN0ZXA=</PHRASE>
<PHRASE Label="la_config_MaintenanceMessageAdmin" Module="Core" Type="1" Hint="VGhpcyBtZXNzYWdlIHdpbGwgYmUgc2hvd24gb24gQWRtaW4gaW5zdGVhZCBvZiBMb2dpbiBmb3JtIGVpdGhlciB3aGVuIFNvZnQgb3IgSGFyZCBNYWludGVuYW5jZSBtb2RlcyBhcmUgZW5hYmxlZCB2aWEgZGVidWcucGhwIGZpbGUgb3IgdGhlcmUgbm8gRGF0YWJhc2UgY29ubmVjdGlvbi4=">TWFpbnRlbmFuY2UgTWVzc2FnZSBmb3IgQWRtaW4=</PHRASE>
<PHRASE Label="la_config_MaintenanceMessageFront" Module="Core" Type="1" Hint="VGhpcyBtZXNzYWdlIHdpbGwgYmUgc2hvd24gb24gRnJvbnQgRW5kIHdoZW4gZWl0aGVyIFNvZnQgb3IgSGFyZCBNYWludGVuYW5jZSBtb2RlcyBhcmUgZW5hYmxlZCB2aWEgZGVidWcucGhwIGZpbGUgb3IgdGhlcmUgbm8gRGF0YWJhc2UgY29ubmVjdGlvbi4=">TWFpbnRlbmFuY2UgTWVzc2FnZSBmb3IgRnJvbnQgRW5k</PHRASE>
<PHRASE Label="la_config_MaxImageCount" Module="Core" Type="1">TWF4aW11bSBudW1iZXIgb2YgaW1hZ2Vz</PHRASE>
<PHRASE Label="la_config_ModRewriteUrlEnding" Module="Core" Type="1">RGVmYXVsdCBVUkwgRW5kaW5nIGluIFNFTy1mcmllbmRseSBtb2Rl</PHRASE>
<PHRASE Label="la_config_nopermission_template" Module="Core" Type="1">VGVtcGxhdGUgZm9yICJJbnN1ZmZpY2llbnQgUGVybWlzc2lvbnMiIEVycm9y</PHRASE>
<PHRASE Label="la_config_OutputCompressionLevel" Module="Core" Type="1">R1pJUCBjb21wcmVzc2lvbiBsZXZlbCAwLTk=</PHRASE>
<PHRASE Label="la_config_PathToWebsite" Module="Core" Type="1">UGF0aCB0byBXZWJzaXRl</PHRASE>
<PHRASE Label="la_config_PerformExactSearch" Module="Core" Type="1" Hint="U2VhcmNoIGZvciBhbGwgZW50ZXJlZCBrZXl3b3JkcywgaW5zdGVhZCBvZiBhbnkgb25lIG9mIHRoZW0=">UGVyZm9ybSBFeGFjdCBTZWFyY2g=</PHRASE>
<PHRASE Label="la_config_PerpageReviews" Module="Core" Type="1">Q29tbWVudHMgcGVyIHBhZ2U=</PHRASE>
<PHRASE Label="la_config_PlainTextCookies" Module="Core" Type="1">UGxhaW4gVGV4dCBDb29raWVz</PHRASE>
<PHRASE Label="la_config_RandomString" Module="Core" Type="1">UmFuZG9tIFN0cmluZw==</PHRASE>
<PHRASE Label="la_config_RecycleBinFolder" Module="Core" Type="1">IlJlY3ljbGUgQmluIiBTZWN0aW9uSWQ=</PHRASE>
<PHRASE Label="la_config_RegistrationUsernameRequired" Module="Core" Type="1">VXNlcm5hbWUgUmVxdWlyZWQgRHVyaW5nIFJlZ2lzdHJhdGlvbg==</PHRASE>
<PHRASE Label="la_config_RememberLastAdminTemplate" Module="Core" Type="1">UmVzdG9yZSBsYXN0IHZpc2l0ZWQgQWRtaW4gU2VjdGlvbiBhZnRlciBMb2dpbg==</PHRASE>
<PHRASE Label="la_config_RequireSSLAdmin" Module="Core" Type="1">UmVxdWlyZSBTU0wgZm9yIEFkbWluaXN0cmF0aXZlIENvbnNvbGU=</PHRASE>
<PHRASE Label="la_config_require_ssl" Module="Core" Type="1">UmVxdWlyZSBTU0wgZm9yIGxvZ2luICYgY2hlY2tvdXQ=</PHRASE>
<PHRASE Label="la_config_ResizableFrames" Module="Core" Type="1">RnJhbWVzIGluIGFkbWluaXN0cmF0aXZlIGNvbnNvbGUgYXJlIHJlc2l6YWJsZQ==</PHRASE>
<PHRASE Label="la_config_Search_MinKeyword_Length" Module="Core" Type="1">TWluaW1hbCBTZWFyY2ggS2V5d29yZCBMZW5ndGg=</PHRASE>
<PHRASE Label="la_config_SessionBrowserSignatureCheck" Module="Core" Type="1">U2Vzc2lvbiBTZWN1cml0eSBDaGVjayBiYXNlZCBvbiBCcm93c2VyIFNpZ25hdHVyZQ==</PHRASE>
<PHRASE Label="la_config_SessionCookieDomains" Module="Core" Type="1">U2Vzc2lvbiBDb29raWUgRG9tYWlucyAoc2luZ2xlIGRvbWFpbiBwZXIgbGluZSk=</PHRASE>
<PHRASE Label="la_config_SessionIPAddressCheck" Module="Core" Type="1">U2Vzc2lvbiBTZWN1cml0eSBDaGVjayBiYXNlZCBvbiBJUA==</PHRASE>
<PHRASE Label="la_config_SiteNameSubTitle" Module="Core" Type="1">V2Vic2l0ZSBTdWJ0aXRsZQ==</PHRASE>
<PHRASE Label="la_config_site_zone" Module="Core" Type="1">VGltZSB6b25lIG9mIHRoZSBzaXRl</PHRASE>
<PHRASE Label="la_config_SoftMaintenanceTemplate" Module="Core" Type="1" Hint="VGhpcyB0ZW1wbGF0ZSB3aWxsIGJlIHNob3duIHRvIHRoZSBGcm9udCBFbmQgdXNlcnMgd2hlbiBTb2Z0IE1haW50ZW5hbmNlIG1vZGUgaXMgYWN0aXZlLg==">VGVtcGxhdGUgZm9yIFNvZnQgTWFpbnRlbmFuY2U=</PHRASE>
<PHRASE Label="la_config_ssl_url" Module="Core" Type="1">U1NMIEZ1bGwgVVJMIChodHRwczovL3d3dy5kb21haW4uY29tL3BhdGgp</PHRASE>
<PHRASE Label="la_config_StickyGridSelection" Module="Core" Type="1">VXNlIFN0aWNreSBHcmlkIFNlbGVjdGlvbg==</PHRASE>
<PHRASE Label="la_config_SystemLogNotificationEmail" Module="Core" Type="1" Hint="RW1haWwgYWRkcmVzcyB3aGVyZSBVc2VyLWRlZmluZWQgbWVzc2FnZXMgKG1hbnVhbGx5IHNldHVwIGluIHRoZSBjb2RlKSB3aWxsIGJlIGVtYWlsZWQgdG8uIE5vdGUgdGhhdCBhbGwgZGVmYXVsdCAiU3lzdGVtIExvZyIgbWVzc2FnZXMgKG5vbmUgdXNlci1kZWZpbmVkKSBhcmUgTk9UIGVtYWlsZWQgYnkgZGVmYXVsdC4=">U2VuZCBVc2VyLWRlZmluZWQgIlN5c3RlbSBMb2ciIG1lc3NhZ2VzIHRv</PHRASE>
<PHRASE Label="la_config_SystemLogRotationInterval" Module="Core" Type="1" Hint="VGhpcyBzZXR0aW5nIGFsbG93cyB5b3UgdG8gY29udHJvbCBmb3IgaG93IGxvbmcgIlN5c3RlbSBMb2ciIG1lc3NhZ2VzIHdpbGwgYmUgc3RvcmVkIGluIHRoZSBsb2cgYW5kIHRoZW4gYXV0b21hdGljYWxseSBkZWxldGVkLiBVc2Ugb3B0aW9uICJGb3JldmVyIiB3aXRoIGNhdXRpb24gc2luY2UgaXQgd2lsbCBjb21wbGV0ZWx5IGRpc2FibGUgYXV0b21hdGljIGxvZyBjbGVhbnVwIGFuZCBjYW4gbGVhZCB0byBsYXJnZSBzaXplIG9mIGRhdGFiYXNlIHRhYmxlIHRoYXQgc3RvcmVzIGxvZyBtZXNzYWdlcy4=">S2VlcCAiU3lzdGVtIExvZyIgZm9y</PHRASE>
<PHRASE Label="la_config_ThumbnailImageHeight" Module="Core" Type="1">VGh1bWJuYWlsIEhlaWdodA==</PHRASE>
<PHRASE Label="la_config_ThumbnailImageWidth" Module="Core" Type="1">VGh1bWJuYWlsIFdpZHRo</PHRASE>
<PHRASE Label="la_config_TrimRequiredFields" Module="Core" Type="1">VHJpbSBSZXF1aXJlZCBGaWVsZHM=</PHRASE>
<PHRASE Label="la_config_TypeKitId" Module="Core" Type="1">VHlwZUtpdCBJRA==</PHRASE>
<PHRASE Label="la_config_UpdateCountersOnFilterChange" Module="Core" Type="1">VXBkYXRlIGNvdW50ZXJzIChpbiBvdGhlciBmaWx0ZXJzKSBvbiBmaWx0ZXIgY2hhbmdl</PHRASE>
<PHRASE Label="la_config_UseChangeLog" Module="Core" Type="1">VHJhY2sgZGF0YWJhc2UgY2hhbmdlcyB0byBjaGFuZ2UgbG9n</PHRASE>
<PHRASE Label="la_config_UseColumnFreezer" Module="Core" Type="1">VXNlIENvbHVtbiBGcmVlemVy</PHRASE>
<PHRASE Label="la_config_UseContentLanguageNegotiation" Module="Core" Type="1">QXV0by1kZXRlY3QgVXNlcidzIGxhbmd1YWdlIGJhc2VkIG9uIGl0J3MgQnJvd3NlciBzZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_config_UseDoubleSorting" Module="Core" Type="1">VXNlIERvdWJsZSBTb3J0aW5n</PHRASE>
<PHRASE Label="la_config_UseHTTPAuth" Module="Core" Type="1">RW5hYmxlIEhUVFAgQXV0aGVudGljYXRpb24=</PHRASE>
<PHRASE Label="la_config_UseOutputCompression" Module="Core" Type="1">RW5hYmxlIEhUTUwgR1pJUCBjb21wcmVzc2lvbg==</PHRASE>
<PHRASE Label="la_config_UsePageHitCounter" Module="Core" Type="1">VXNlIFBhZ2VIaXQgY291bnRlcg==</PHRASE>
<PHRASE Label="la_config_UsePopups" Module="Core" Type="1">RWRpdGluZyBXaW5kb3cgU3R5bGU=</PHRASE>
<PHRASE Label="la_config_UserEmailActivationTimeout" Module="Core" Type="1">RW1haWwgYWN0aXZhdGlvbiBleHBpcmF0aW9uIHRpbWVvdXQgKGluIG1pbnV0ZXMp</PHRASE>
<PHRASE Label="la_config_UseSmallHeader" Module="Core" Type="1">VXNlIFNtYWxsIFNlY3Rpb24gSGVhZGVycw==</PHRASE>
<PHRASE Label="la_config_UseToolbarLabels" Module="Core" Type="1">VXNlIFRvb2xiYXIgTGFiZWxz</PHRASE>
<PHRASE Label="la_config_UseVisitorTracking" Module="Core" Type="1">VXNlIFZpc2l0b3IgVHJhY2tpbmc=</PHRASE>
<PHRASE Label="la_config_use_js_redirect" Module="Core" Type="1">VXNlIEphdmFTY3JpcHQgcmVkaXJlY3Rpb24gYWZ0ZXIgbG9naW4vbG9nb3V0IChmb3IgSUlTKQ==</PHRASE>
<PHRASE Label="la_config_use_modrewrite" Module="Core" Type="1">RW5hYmxlIFNFTy1mcmllbmRseSBVUkxzIG1vZGUgKE1PRC1SRVdSSVRFKQ==</PHRASE>
<PHRASE Label="la_config_use_modrewrite_with_ssl" Module="Core" Type="1">RW5hYmxlIE1PRF9SRVdSSVRFIGZvciBTU0w=</PHRASE>
<PHRASE Label="la_config_website_name" Module="Core" Type="1">V2Vic2l0ZSBuYW1l</PHRASE>
<PHRASE Label="la_config_YahooApplicationId" Module="Core" Type="1">WWFob28gQXBwbGljYXRpb25JZA==</PHRASE>
<PHRASE Label="la_ConfirmDeleteExportPreset" Module="Core" Type="1">QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGRlbGV0ZSBzZWxlY3RlZCBFeHBvcnQgUHJlc2V0Pw==</PHRASE>
<PHRASE Label="la_confirm_maintenance" Module="Core" Type="1">VGhlIHNlY3Rpb24gdHJlZSBtdXN0IGJlIHVwZGF0ZWQgdG8gcmVmbGVjdCB0aGUgbGF0ZXN0IGNoYW5nZXM=</PHRASE>
<PHRASE Label="la_CurrentTheme" Module="Core" Type="1">Q3VycmVudCBUaGVtZQ==</PHRASE>
<PHRASE Label="la_DataGrid1" Module="Core" Type="1">RGF0YSBHcmlkcw==</PHRASE>
<PHRASE Label="la_DataGrid2" Module="Core" Type="1">RGF0YSBHcmlkcyAy</PHRASE>
<PHRASE Label="la_days" Module="Core" Type="1">ZGF5cw==</PHRASE>
<PHRASE Label="la_Delete_Confirm" Module="Core" Type="1">QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGRlbGV0ZSB0aGUgaXRlbShzKT8gVGhpcyBhY3Rpb24gY2Fubm90IGJlIHVuZG9uZS4=</PHRASE>
<PHRASE Label="la_Description_in-portal:advanced_view" Module="Core" Type="1">VGhpcyBzZWN0aW9uIGFsbG93cyB5b3UgdG8gbWFuYWdlIHNlY3Rpb25zIGFuZCBpdGVtcyBhY3Jvc3MgYWxsIHNlY3Rpb25z</PHRASE>
<PHRASE Label="la_Description_in-portal:browse" Module="Core" Type="1">VGhpcyBzZWN0aW9uIGFsbG93cyB5b3UgdG8gYnJvd3NlIHRoZSBjYXRhbG9nIGFuZCBtYW5hZ2Ugc2VjdGlvbnMgYW5kIGl0ZW1z</PHRASE>
<PHRASE Label="la_Description_in-portal:site" Module="Core" Type="1">TWFuYWdlIHRoZSBzdHJ1Y3R1cmUgb2YgeW91ciBzaXRlLCBpbmNsdWRpbmcgc2VjdGlvbnMsIGl0ZW1zIGFuZCBzZWN0aW9uIHNldHRpbmdzLg==</PHRASE>
<PHRASE Label="la_Disabled" Module="Core" Type="1">RGlzYWJsZWQ=</PHRASE>
<PHRASE Label="la_Doublequotes" Module="Core" Type="1">RG91YmxlLVF1b3Rlcw==</PHRASE>
<PHRASE Label="la_DownloadCSV" Module="Core" Type="1">RG93bmxvYWQgQ1NW</PHRASE>
<PHRASE Label="la_DownloadExportFile" Module="Core" Type="1">RG93bmxvYWQgRXhwb3J0IEZpbGU=</PHRASE>
<PHRASE Label="la_DownloadLanguageExport" Module="Core" Type="1">RG93bmxvYWQgTGFuZ3VhZ2UgRXhwb3J0</PHRASE>
<PHRASE Label="la_Draft" Module="Core" Type="1">RHJhZnQ=</PHRASE>
<PHRASE Label="la_DraftAvailableFrom" Module="Core" Type="1">RHJhZnQgQXZhaWxhYmxl</PHRASE>
<PHRASE Label="la_DraftSavedAt" Module="Core" Type="1">ZHJhZnQgc2F2ZWQgYXQgJXM=</PHRASE>
<PHRASE Label="la_EditingContent" Module="Core" Type="1">Q29udGVudCBFZGl0b3I=</PHRASE>
<PHRASE Label="la_EditingInProgress" Module="Core" Type="1">WW91IGhhdmUgbm90IHNhdmVkIGNoYW5nZXMgdG8gdGhlIGl0ZW0geW91IGFyZSBlZGl0aW5nITxiciAvPkNsaWNrIE9LIHRvIGxvb3NlIGNoYW5nZXMgYW5kIGdvIHRvIHRoZSBzZWxlY3RlZCBzZWN0aW9uPGJyIC8+b3IgQ2FuY2VsIHRvIHN0YXkgaW4gdGhlIGN1cnJlbnQgc2VjdGlvbi4=</PHRASE>
<PHRASE Label="la_editor_default_style" Module="Core" Type="1">RGVmYXVsdCB0ZXh0</PHRASE>
<PHRASE Label="la_EmptyFile" Module="Core" Type="1">RmlsZSBpcyBlbXB0eQ==</PHRASE>
<PHRASE Label="la_empty_file" Module="Core" Type="1">RmlsZSBpcyBlbXB0eQ==</PHRASE>
<PHRASE Label="la_Enabled" Module="Core" Type="1">RW5hYmxlZA==</PHRASE>
<PHRASE Label="la_error_CantDeleteSystemPermission" Module="Core" Type="1">Q2FuJ3QgZGVsZXRlIHN5c3RlbSBwZXJtaXNzaW9u</PHRASE>
<PHRASE Label="la_error_CantOpenFile" Module="Core" Type="1">Q2FuJ3Qgb3BlbiB0aGUgZmlsZQ==</PHRASE>
<PHRASE Label="la_error_cant_save_file" Module="Core" Type="1">Q2FuJ3Qgc2F2ZSBhIGZpbGU=</PHRASE>
<PHRASE Label="la_error_ConnectionFailed" Module="Core" Type="1">Q29ubmVjdGlvbiBGYWlsZWQ=</PHRASE>
<PHRASE Label="la_error_copy_subcategory" Module="Core" Type="1">RXJyb3IgY29weWluZyBzdWJzZWN0aW9ucw==</PHRASE>
<PHRASE Label="la_error_CustomExists" Module="Core" Type="1">Q3VzdG9tIGZpZWxkIHdpdGggaWRlbnRpY2FsIG5hbWUgYWxyZWFkeSBleGlzdHM=</PHRASE>
<PHRASE Label="la_error_EmailTemplateBodyMissing" Module="Core" Type="1">RW1haWwgRGVzaWduIFRlbXBsYXRlIHNob3VsZCBjb250YWluIGF0IGxlYXN0ICIkYm9keSIgdGFnIGluIGl0Lg==</PHRASE>
<PHRASE Label="la_error_FileTooLarge" Module="Core" Type="1">RmlsZSBpcyB0b28gbGFyZ2U=</PHRASE>
<PHRASE Label="la_error_GroupNotFound" Module="Core" Type="1">Z3JvdXAgbm90IGZvdW5k</PHRASE>
<PHRASE Label="la_error_InvalidFieldName" Module="Core" Type="1">RmllbGQgZG9lc24ndCBleGlzdCBpbiAiJXMiIHVuaXQgY29uZmln</PHRASE>
<PHRASE Label="la_error_InvalidFileFormat" Module="Core" Type="1">SW52YWxpZCBGaWxlIEZvcm1hdA==</PHRASE>
<PHRASE Label="la_error_InvalidItemPrefix" Module="Core" Type="1">VW5pdCBjb25maWcgcHJlZml4IG5vdCBmb3VuZA==</PHRASE>
<PHRASE Label="la_error_invalidoption" Module="Core" Type="1">aW52YWxpZCBvcHRpb24=</PHRASE>
<PHRASE Label="la_error_LoginFailed" Module="Core" Type="1">TG9naW4gRmFpbGVk</PHRASE>
<PHRASE Label="la_error_MessagesListReceivingFailed" Module="Core" Type="1">UmVjZWl2aW5nIGxpc3Qgb2YgbWVzc2FnZXMgZnJvbSB0aGUgU2VydmVyIGhhcyBmYWlsZWQ=</PHRASE>
<PHRASE Label="la_error_move_subcategory" Module="Core" Type="1">RXJyb3IgbW92aW5nIHN1YnNlY3Rpb24=</PHRASE>
<PHRASE Label="la_error_NoInheritancePossible" Module="Core" Type="1">Q2FuJ3QgaW5oZXJpdCB0ZW1wbGF0ZSBmcm9tIHRvcCBjYXRlZ29yeQ==</PHRASE>
<PHRASE Label="la_error_NoMatchingColumns" Module="Core" Type="1">Tm8gbWF0Y2hpbmcgY29sdW1ucyBhcmUgZm91bmQ=</PHRASE>
<PHRASE Label="la_error_OperationNotAllowed" Module="Core" Type="1">VGhpcyBvcGVyYXRpb24gaXMgbm90IGFsbG93ZWQh</PHRASE>
<PHRASE Label="la_error_ParsingError" Module="Core" Type="1">VmFsaWRhdGlvbiBlcnJvciwgcGxlYXNlIGRvdWJsZS1jaGVjayBJbi1Qb3J0YWwgdGFncw==</PHRASE>
<PHRASE Label="la_error_PasswordMatch" Module="Core" Type="1">UGFzc3dvcmRzIGRvIG5vdCBtYXRjaCE=</PHRASE>
<PHRASE Label="la_error_PromoGroupNotEmpty" Module="Core" Type="1">Q2FuJ3QgRGVsZXRlIE5vbi1FbXB0eSBQcm9tbyBCbG9jayBHcm91cA==</PHRASE>
<PHRASE Label="la_error_required" Module="Core" Type="1">UmVxdWlyZWQgZmllbGQoLXMpIG5vdCBmaWxsZWQ=</PHRASE>
<PHRASE Label="la_error_RequiredColumnsMissing" Module="Core" Type="1">cmVxdWlyZWQgY29sdW1ucyBtaXNzaW5n</PHRASE>
<PHRASE Label="la_error_RootCategoriesDelete" Module="Core" Type="1">Um9vdCBzZWN0aW9uIG9mIHRoZSBtb2R1bGUocykgY2FuIG5vdCBiZSBkZWxldGVkIQ==</PHRASE>
<PHRASE Label="la_error_SelectItemToMove" Module="Core" Type="1">U2VsZWN0IGF0IGxlYXN0IG9uZSBpdGVtIHRvIG1vdmU=</PHRASE>
<PHRASE Label="la_error_TemplateFileMissing" Module="Core" Type="1">VGVtcGxhdGUgZmlsZSBpcyBtaXNzaW5n</PHRASE>
<PHRASE Label="la_error_TemporaryTableCopyingFailed" Module="Core" Type="1">Q29weWluZyBvcGVyYXRpb24gaW4gVGVtcG9yYXJ5IHRhYmxlcyBoYXMgZmFpbGVkLiBQbGVhc2UgY29udGFjdCB3ZWJzaXRlIGFkbWluaXN0cmF0b3Iu</PHRASE>
<PHRASE Label="la_error_unique" Module="Core" Type="1">UmVjb3JkIGlzIG5vdCB1bmlxdWU=</PHRASE>
<PHRASE Label="la_error_unique_category_field" Module="Core" Type="1">U2VjdGlvbiBmaWVsZCBub3QgdW5pcXVl</PHRASE>
<PHRASE Label="la_error_UnknownSection" Module="Core" Type="1">VW5rbm93biBzZWN0aW9u</PHRASE>
<PHRASE Label="la_error_unknown_category" Module="Core" Type="1">VW5rbm93biBzZWN0aW9u</PHRASE>
<PHRASE Label="la_error_UserBanned" Module="Core" Type="1">VXNlciBCYW5uZWQ=</PHRASE>
<PHRASE Label="LA_ERROR_USERNOTFOUND" Module="Core" Type="1">dXNlciBub3QgZm91bmQ=</PHRASE>
<PHRASE Label="la_error_YouMustSelectOnlyOneUser" Module="Core" Type="1">WW91IG11c3Qgc2VsZWN0IG9ubHkgb25lIHVzZXI=</PHRASE>
<PHRASE Label="la_err_bad_date_format" Module="Core" Type="1">SW5jb3JyZWN0IGRhdGUgZm9ybWF0LCBwbGVhc2UgdXNlICglcykgZXguICglcyk=</PHRASE>
<PHRASE Label="la_err_bad_type" Module="Core" Type="1">SW5jb3JyZWN0IGRhdGEgZm9ybWF0LCBwbGVhc2UgdXNlICVz</PHRASE>
<PHRASE Label="la_err_invalid_format" Module="Core" Type="1">SW52YWxpZCBGb3JtYXQ=</PHRASE>
<PHRASE Label="la_err_length_out_of_range" Module="Core" Type="1">RmllbGQgdmFsdWUgbGVuZ3RoIGlzIG91dCBvZiByYW5nZSwgcG9zc2libGUgdmFsdWUgbGVuZ3RoIGZyb20gJXMgdG8gJXM=</PHRASE>
<PHRASE Label="la_err_Primary_Lang_Required" Module="Core" Type="1">UHJpbWFyeSBMYW5nLiB2YWx1ZSBSZXF1aXJlZA==</PHRASE>
<PHRASE Label="la_err_required" Module="Core" Type="1">RmllbGQgaXMgcmVxdWlyZWQ=</PHRASE>
<PHRASE Label="la_err_unique" Module="Core" Type="1">RmllbGQgdmFsdWUgbXVzdCBiZSB1bmlxdWU=</PHRASE>
<PHRASE Label="la_err_value_out_of_range" Module="Core" Type="1">RmllbGQgdmFsdWUgaXMgb3V0IG9mIHJhbmdlLCBwb3NzaWJsZSB2YWx1ZXMgZnJvbSAlcyB0byAlcw==</PHRASE>
<PHRASE Label="la_exportfoldernotwritable" Module="Core" Type="1">RXhwb3J0IGZvbGRlciBpcyBub3Qgd3JpdGFibGU=</PHRASE>
<PHRASE Label="la_fck_ErrorCreatingFolder" Module="Core" Type="1">RXJyb3IgY3JlYXRpbmcgZm9sZGVyLiBFcnJvciBudW1iZXI6</PHRASE>
<PHRASE Label="la_fck_ErrorFileName" Module="Core" Type="1">UGxlYXNlIG5hbWUgeW91ciBmaWxlcyB0byBiZSB3ZWItZnJpZW5kbHkuIFdlIHJlY29tbWVuZCB1c2luZyBvbmx5IHRoZXNlIGNoYXJhY3RlcnMgaW4gZmlsZSBuYW1lczogDQpMZXR0ZXJzIGEteiwgQS1aLCBOdW1iZXJzIDAtOSwgIl8iICh1bmRlcnNjb3JlKSwgIi0iIChkYXNoKSwgIiAiIChzcGFjZSksICIuIiAocGVyaW9kKQ0KUGxlYXNlIGF2b2lkIHVzaW5nIGFueSBvdGhlciBjaGFyYWN0ZXJzIGxpa2UgcXVvdGVzLCBicmFja2V0cywgcXVvdGF0aW9uIG1hcmtzLCAiPyIsICIhIiwgIj0iLCBmb3JlaWduIHN5bWJvbHMsIGV0Yy4=</PHRASE>
<PHRASE Label="la_fck_ErrorFileUpload" Module="Core" Type="1">RXJyb3Igb24gZmlsZSB1cGxvYWQuIEVycm9yIG51bWJlcjo=</PHRASE>
<PHRASE Label="la_fck_FileAvailable" Module="Core" Type="1">QSBmaWxlIHdpdGggdGhlIHNhbWUgbmFtZSBpcyBhbHJlYWR5IGF2YWlsYWJsZQ==</PHRASE>
<PHRASE Label="la_fck_FileDate" Module="Core" Type="1">RGF0ZQ==</PHRASE>
<PHRASE Label="la_fck_FileName" Module="Core" Type="1">RmlsZSBOYW1l</PHRASE>
<PHRASE Label="la_fck_FileSize" Module="Core" Type="1">U2l6ZQ==</PHRASE>
<PHRASE Label="la_fck_FolderAlreadyExists" Module="Core" Type="1">Rm9sZGVyIGFscmVhZHkgZXhpc3Rz</PHRASE>
<PHRASE Label="la_fck_InvalidFileType" Module="Core" Type="1">SW52YWxpZCBmaWxlIHR5cGUgZm9yIHRoaXMgZm9kZXI=</PHRASE>
<PHRASE Label="la_fck_InvalidFolderName" Module="Core" Type="1">SW52YWxpZCBmb2xkZXIgbmFtZQ==</PHRASE>
<PHRASE Label="la_fck_NoPermissionsCreateFolder" Module="Core" Type="1">WW91IGhhdmUgbm8gcGVybWlzc2lvbnMgdG8gY3JlYXRlIHRoZSBmb2xkZXI=</PHRASE>
<PHRASE Label="la_fck_PleaseTypeTheFolderName" Module="Core" Type="1">UGxlYXNlIHR5cGUgdGhlIGZvbGRlciBuYW1l</PHRASE>
<PHRASE Label="la_fck_TypeTheFolderName" Module="Core" Type="1">VHlwZSB0aGUgbmFtZSBvZiB0aGUgbmV3IGZvbGRlcjo=</PHRASE>
<PHRASE Label="la_fck_UnknownErrorCreatingFolder" Module="Core" Type="1">VW5rbm93biBlcnJvciBjcmVhdGluZyBmb2xkZXI=</PHRASE>
<PHRASE Label="la_Field" Module="Core" Type="1">RmllbGQ=</PHRASE>
<PHRASE Label="la_field_displayorder" Module="Core" Type="1">RGlzcGxheSBPcmRlcg==</PHRASE>
<PHRASE Label="la_field_Priority" Module="Core" Type="1">T3JkZXI=</PHRASE>
<PHRASE Label="la_fld_Action" Module="Core" Type="1" Column="QWN0aW9u">QWN0aW9u</PHRASE>
<PHRASE Label="la_fld_AddressLine1" Module="Core" Type="1" Column="QWRkcmVzcyBMaW5lIDE=">QWRkcmVzcyBMaW5lIDE=</PHRASE>
<PHRASE Label="la_fld_AddressLine2" Module="Core" Type="1" Column="QWRkcmVzcyBMaW5lIDI=">QWRkcmVzcyBMaW5lIDI=</PHRASE>
<PHRASE Label="la_fld_AdminEmail" Module="Core" Type="1">TWVzc2FnZXMgZnJvbSBTaXRlIEFkbWluIGFyZSBmcm9t</PHRASE>
<PHRASE Label="la_fld_AdminInterfaceLang" Module="Core" Type="1" Column="QWRtaW4gUHJpbWFyeQ==">QWRtaW4gUHJpbWFyeQ==</PHRASE>
<PHRASE Label="la_fld_AdminLanguage" Module="Core" Type="1" Column="TGFuZ3VhZ2U=">TGFuZ3VhZ2U=</PHRASE>
<PHRASE Label="la_fld_AdvancedCSS" Module="Core" Type="1">QWR2YW5jZWQgQ1NT</PHRASE>
<PHRASE Label="la_fld_AdvancedSearch" Module="Core" Type="1">QWR2YW5jZWQgU2VhcmNo</PHRASE>
<PHRASE Label="la_fld_AllowChangingRecipient" Module="Core" Type="1">QWxsb3cgQ2hhbmdpbmcgIlRvIiBSZWNpcGllbnQ=</PHRASE>
<PHRASE Label="la_fld_AllowChangingSender" Module="Core" Type="1">QWxsb3cgQ2hhbmdpbmcgU2VuZGVy</PHRASE>
<PHRASE Label="la_fld_AltValue" Module="Core" Type="1">QWx0IFZhbHVl</PHRASE>
<PHRASE Label="la_fld_Answer" Module="Core" Type="1">QW5zd2Vy</PHRASE>
<PHRASE Label="la_fld_AssignedToSections" Module="Core" Type="1">QXNzaWduZWQgdG8gU2VjdGlvbnM=</PHRASE>
<PHRASE Label="LA_FLD_ATTACHMENT" Module="Core" Type="1">QXR0YWNobWVudA==</PHRASE>
<PHRASE Label="la_fld_AutoCreateFileName" Module="Core" Type="1">QXV0byBDcmVhdGUgRmlsZSBOYW1l</PHRASE>
<PHRASE Label="la_fld_AutomaticFilename" Module="Core" Type="1">QXV0b21hdGljIEZpbGVuYW1l</PHRASE>
<PHRASE Label="la_fld_AvailableColumns" Module="Core" Type="1">QXZhaWxhYmxlIENvbHVtbnM=</PHRASE>
<PHRASE Label="la_fld_Background" Module="Core" Type="1">QmFja2dyb3VuZA==</PHRASE>
<PHRASE Label="la_fld_BackgroundAttachment" Module="Core" Type="1">QmFja2dyb3VuZCBBdHRhY2htZW50</PHRASE>
<PHRASE Label="la_fld_BackgroundColor" Module="Core" Type="1">QmFja2dyb3VuZCBDb2xvcg==</PHRASE>
<PHRASE Label="la_fld_BackgroundImage" Module="Core" Type="1">QmFja2dyb3VuZCBJbWFnZQ==</PHRASE>
<PHRASE Label="la_fld_BackgroundPosition" Module="Core" Type="1">QmFja2dyb3VuZCBQb3NpdGlvbg==</PHRASE>
<PHRASE Label="la_fld_BackgroundRepeat" Module="Core" Type="1">QmFja2dyb3VuZCBSZXBlYXQ=</PHRASE>
<PHRASE Label="la_fld_Bcc" Module="Core" Type="1" Column="QmNj">QmNj</PHRASE>
<PHRASE Label="la_fld_BindToSystemEvent" Module="Core" Type="1" Hint="U3lzdGVtIEV2ZW50IGluICJwcmVmaXhbLnNwZWNpYWxdOk9uRXZlbnROYW1lIiBmb3JtYXQ=" Column="QmluZCB0byBTeXN0ZW0gRXZlbnQ=">QmluZCB0byBTeXN0ZW0gRXZlbnQ=</PHRASE>
<PHRASE Label="la_fld_BlockPosition" Module="Core" Type="1">RWxlbWVudCBQb3NpdGlvbg==</PHRASE>
<PHRASE Label="la_fld_BorderBottom" Module="Core" Type="1">Qm9yZGVyIEJvdHRvbQ==</PHRASE>
<PHRASE Label="la_fld_BorderLeft" Module="Core" Type="1">Qm9yZGVyIExlZnQ=</PHRASE>
<PHRASE Label="la_fld_BorderRight" Module="Core" Type="1">Qm9yZGVyIFJpZ2h0</PHRASE>
<PHRASE Label="la_fld_Borders" Module="Core" Type="1">Qm9yZGVycw==</PHRASE>
<PHRASE Label="la_fld_BorderTop" Module="Core" Type="1">Qm9yZGVyIFRvcA==</PHRASE>
<PHRASE Label="la_fld_BounceDate" Module="Core" Type="1" Column="Qm91bmNlZCBPbg==">Qm91bmNlIERhdGU=</PHRASE>
<PHRASE Label="la_fld_BounceEmail" Module="Core" Type="1">Qm91bmNlIEVtYWls</PHRASE>
<PHRASE Label="la_fld_BounceInfo" Module="Core" Type="1" Column="Qm91bmNlIEluZm8=">Qm91bmNlIEluZm8=</PHRASE>
<PHRASE Label="la_fld_ButtonText" Module="Core" Type="1" Column="QnV0dG9uIFRleHQ=">QnV0dG9uIFRleHQ=</PHRASE>
<PHRASE Label="la_fld_Category" Module="Core" Type="1" Column="U2VjdGlvbg==">U2VjdGlvbg==</PHRASE>
<PHRASE Label="la_fld_CategoryFormat" Module="Core" Type="1">U2VjdGlvbiBGb3JtYXQ=</PHRASE>
<PHRASE Label="la_fld_CategoryId" Module="Core" Type="1" Column="U2VjdGlvbiBJRA==">U2VjdGlvbiBJRA==</PHRASE>
<PHRASE Label="la_fld_CategorySeparator" Module="Core" Type="1">U2VjdGlvbiBzZXBhcmF0b3I=</PHRASE>
<PHRASE Label="la_fld_CategoryTemplate" Module="Core" Type="1">U2VjdGlvbiBUZW1wbGF0ZQ==</PHRASE>
<PHRASE Label="la_fld_Cc" Module="Core" Type="1" Column="Q2M=">Q2M=</PHRASE>
<PHRASE Label="la_fld_Changes" Module="Core" Type="1" Column="Q2hhbmdlcw==">Q2hhbmdlcw==</PHRASE>
<PHRASE Label="la_fld_Charset" Module="Core" Type="1" Column="Q2hhcnNldA==">Q2hhcnNldA==</PHRASE>
<PHRASE Label="la_fld_CheckDuplicatesMethod" Module="Core" Type="1">Q2hlY2sgRHVwbGljYXRlcyBieQ==</PHRASE>
<PHRASE Label="la_fld_City" Module="Core" Type="1" Column="Q2l0eQ==">Q2l0eQ==</PHRASE>
<PHRASE Label="la_fld_ColumnTranslation" Module="Core" Type="1" Hint="QXNzb2NpYXRlZCBjb2x1bW4gaGVhZGluZyB0cmFuc2xhdGlvbg==">Q29sdW1uIFBocmFzZQ==</PHRASE>
<PHRASE Label="la_fld_Comments" Module="Core" Type="1">Q29tbWVudHM=</PHRASE>
<PHRASE Label="la_fld_Company" Module="Core" Type="1" Column="Q29tcGFueQ==">Q29tcGFueQ==</PHRASE>
<PHRASE Label="la_fld_ConfigHeader" Module="Core" Type="1">Q29uZmlndXJhdGlvbiBIZWFkZXIgTGFiZWw=</PHRASE>
<PHRASE Label="la_fld_ContentBlock" Module="Core" Type="1">Q29udGVudCBCbG9jaw==</PHRASE>
<PHRASE Label="la_fld_ConversionPercent" Module="Core" Type="1" Column="Q1RSLCAl">Q1RSLCAl</PHRASE>
<PHRASE Label="la_fld_CopyLabels" Module="Core" Type="1">Q29weSBMYWJlbHMgZnJvbSB0aGlzIExhbmd1YWdl</PHRASE>
<PHRASE Label="la_fld_Country" Module="Core" Type="1" Column="Q291bnRyeQ==">Q291bnRyeQ==</PHRASE>
<PHRASE Label="la_fld_CreatedById" Module="Core" Type="1">Q3JlYXRlZCBCeQ==</PHRASE>
<PHRASE Label="la_fld_CreatedOn" Module="Core" Type="1" Column="Q3JlYXRlZCBPbg==">Q3JlYXRlZCBPbg==</PHRASE>
<PHRASE Label="la_fld_CronCommonHints" Module="Core" Type="1">Q29tbW9uIFNldHRpbmdz</PHRASE>
<PHRASE Label="la_fld_CronDay" Module="Core" Type="1" Column="RGF5">RGF5</PHRASE>
<PHRASE Label="la_fld_CronHour" Module="Core" Type="1" Column="SG91cg==">SG91cg==</PHRASE>
<PHRASE Label="la_fld_CronMinute" Module="Core" Type="1" Column="TWludXRl">TWludXRl</PHRASE>
<PHRASE Label="la_fld_CronMonth" Module="Core" Type="1" Column="TW9udGg=">TW9udGg=</PHRASE>
<PHRASE Label="la_fld_CronWeekday" Module="Core" Type="1" Column="V2Vla2RheQ==">V2Vla2RheQ==</PHRASE>
<PHRASE Label="la_fld_CSS" Module="Core" Type="1">Q1NTIFRlbXBsYXRl</PHRASE>
<PHRASE Label="la_fld_CSSClassName" Module="Core" Type="1" Column="Q1NTIENsYXNzIE5hbWU=">Q1NTIENsYXNzIE5hbWU=</PHRASE>
<PHRASE Label="la_fld_Cursor" Module="Core" Type="1">Q3Vyc29y</PHRASE>
<PHRASE Label="la_fld_CustomDetailTemplate" Module="Core" Type="1">Q3VzdG9tIERldGFpbHMgVGVtcGxhdGU=</PHRASE>
<PHRASE Label="la_fld_CustomRecipient" Module="Core" Type="1">U2VuZCBFbWFpbCBUbw==</PHRASE>
<PHRASE Label="la_fld_CustomSender" Module="Core" Type="1">U2VuZCBFbWFpbCBGcm9t</PHRASE>
<PHRASE Label="la_fld_CustomTemplate" Module="Core" Type="1">DQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KRGV0YWlscyBUZW1wbGF0ZQ==</PHRASE>
<PHRASE Label="la_fld_DateFormat" Module="Core" Type="1">RGF0ZSBGb3JtYXQ=</PHRASE>
<PHRASE Label="la_fld_DecimalPoint" Module="Core" Type="1">RGVjaW1hbCBQb2ludA==</PHRASE>
<PHRASE Label="la_fld_Description" Module="Core" Type="1" Column="RGVzY3JpcHRpb24=">RGVzY3JpcHRpb24=</PHRASE>
<PHRASE Label="la_fld_DirectLinkEnabled" Module="Core" Type="1">QWNjZXNzIHdpdGggTGluaw==</PHRASE>
<PHRASE Label="la_fld_Display" Module="Core" Type="1">RGlzcGxheQ==</PHRASE>
<PHRASE Label="la_fld_DisplayInGrid" Module="Core" Type="1">RGlzcGxheSBpbiBHcmlk</PHRASE>
<PHRASE Label="la_fld_DisplayName" Module="Core" Type="1">RmllbGQgTGFiZWw=</PHRASE>
<PHRASE Label="la_fld_DisplaySiteNameInHeader" Module="Core" Type="1">RGlzcGxheSBzaXRlIG5hbWUgaW4gSGVhZGVy</PHRASE>
<PHRASE Label="la_fld_DisplayToPublic" Module="Core" Type="1">RGlzcGxheSBUbyBQdWJsaWM=</PHRASE>
<PHRASE Label="la_fld_DomainIPRange" Module="Core" Type="1" Hint="U2luZ2xlIElQLCBJUCByYW5nZSwgU3VibmV0IG9yIGhvc3RuYW1lIHJlY29yZCBwZXIgbGluZSAoZm9ybWF0czogMS4yLjMuNCBvciAxLjIuMy4zMi0xLjIuMy41NCBvciAxLjIuMy4zMi8yNyBvciAxLjIuMy4zMi8yNTUuMjU1LjI1NS4yMjQgb3Igd3d3LmluLXBvcnRhbC5jb20p">UmFuZ2Ugb2YgSVBz</PHRASE>
<PHRASE Label="la_fld_DomainName" Module="Core" Type="1" Column="RG9tYWluIE5hbWU=">RG9tYWluIE5hbWU=</PHRASE>
<PHRASE Label="la_fld_DoNotEncode" Module="Core" Type="1">QXMgUGxhaW4gVGV4dA==</PHRASE>
<PHRASE Label="la_fld_Duration" Module="Core" Type="1" Column="RHVyYXRpb24=">RHVyYXRpb24=</PHRASE>
<PHRASE Label="la_fld_EditorsPick" Module="Core" Type="1">RWRpdG9ycyBQaWNr</PHRASE>
<PHRASE Label="la_fld_ElapsedTime" Module="Core" Type="1">RWxhcHNlZCBUaW1l</PHRASE>
<PHRASE Label="la_fld_Email" Module="Core" Type="1" Column="RW1haWw=">RS1tYWls</PHRASE>
<PHRASE Label="la_fld_EmailCommunicationRole" Module="Core" Type="1" Column="RS1tYWlsIENvbW11bmljYXRpb24gUm9sZQ==">RS1tYWlsIENvbW11bmljYXRpb24gUm9sZQ==</PHRASE>
<PHRASE Label="la_fld_EmailOrUsername" Module="Core" Type="1">RS1tYWlsIG9yIFVzZXJuYW1l</PHRASE>
<PHRASE Label="la_fld_EmailPassword" Module="Core" Type="1">RS1tYWlsICI8c3Ryb25nPntwYXNzd29yZH08L3N0cm9uZz4iIHBhc3N3b3JkIHRvIHVzZXI=</PHRASE>
<PHRASE Label="la_fld_EmailsQueued" Module="Core" Type="1" Column="UXVldWU=">RW1haWxzIGluIFF1ZXVl</PHRASE>
<PHRASE Label="la_fld_EmailsSent" Module="Core" Type="1" Column="U2VudA==">RW1haWxzIFNlbnQ=</PHRASE>
<PHRASE Label="la_fld_EmailsTotal" Module="Core" Type="1" Column="VG90YWw=">RW1haWxzIFRvdGFs</PHRASE>
<PHRASE Label="la_fld_EmailTemplateName" Module="Core" Type="1" Column="RS1tYWlsIFRlbXBsYXRlIE5hbWU=">RS1tYWlsIFRlbXBsYXRlIE5hbWU=</PHRASE>
<PHRASE Label="la_fld_EmailVerified" Module="Core" Type="1" Column="RW1haWwgVmVyaWZpZWQ=">RW1haWwgVmVyaWZpZWQ=</PHRASE>
<PHRASE Label="la_fld_Enable" Module="Core" Type="1">RW5hYmxl</PHRASE>
<PHRASE Label="la_fld_Enabled" Module="Core" Type="1" Column="RW5hYmxlZA==">RW5hYmxlZA==</PHRASE>
<PHRASE Label="la_fld_EnablePageCache" Module="Core" Type="1">RW5hYmxlIENhY2hpbmcgZm9yIHRoaXMgU2VjdGlvbg==</PHRASE>
<PHRASE Label="la_fld_ErrorTag" Module="Core" Type="1">RXJyb3IgVGFn</PHRASE>
<PHRASE Label="la_fld_EstimatedTime" Module="Core" Type="1">RXN0aW1hdGVkIFRpbWU=</PHRASE>
<PHRASE Label="la_fld_Event" Module="Core" Type="1" Column="RXZlbnQ=">RXZlbnQ=</PHRASE>
<PHRASE Label="la_fld_Expire" Module="Core" Type="1">RXhwaXJl</PHRASE>
<PHRASE Label="la_fld_ExportColumns" Module="Core" Type="1">RXhwb3J0IGNvbHVtbnM=</PHRASE>
<PHRASE Label="la_fld_ExportCountries" Module="Core" Type="1" Hint="U2luZ2xlIENvdW50cnkgSVNPIGNvZGUgcGVyIGxpbmUgKGZvcm1hdHM6IEFUQSwgQkVMKQ==">RXhwb3J0IFNwZWNpZmllZCBDb3VudHJpZXM=</PHRASE>
<PHRASE Label="la_fld_ExportDataTypes" Module="Core" Type="1">RGF0YSBUeXBlcyB0byBFeHBvcnQ=</PHRASE>
<PHRASE Label="la_fld_ExportEmailTemplates" Module="Core" Type="1" Hint="U2luZ2xlIEUtbWFpbCBUZW1wbGF0ZSBwZXIgbGluZSAoZm9ybWF0czogVVNFUi5BREQsIE9SREVSLlNVQk1JVCk=">RXhwb3J0IFNwZWNpZmllZCBFLW1haWwgVGVtcGxhdGVz</PHRASE>
<PHRASE Label="la_fld_ExportFileName" Module="Core" Type="1">RXhwb3J0IEZpbGVuYW1l</PHRASE>
<PHRASE Label="la_fld_ExportFormat" Module="Core" Type="1">RXhwb3J0IGZvcm1hdA==</PHRASE>
<PHRASE Label="la_fld_ExportModules" Module="Core" Type="1">RXhwb3J0IE1vZHVsZXM=</PHRASE>
<PHRASE Label="la_fld_ExportPhrases" Module="Core" Type="1" Hint="U2luZ2xlIFBocmFzZSBMYWJlbCBwZXIgbGluZSAoZm9ybWF0czogbGFfU2FtcGxlTGFiZWwsIGx1X0Zyb250RW5kTGFiZWwp">RXhwb3J0IFNwZWNpZmllZCBQaHJhc2Vz</PHRASE>
<PHRASE Label="la_fld_ExportPhraseTypes" Module="Core" Type="1">RXhwb3J0IFBocmFzZSBUeXBlcw==</PHRASE>
<PHRASE Label="la_fld_ExportPresetName" Module="Core" Type="1">RXhwb3J0IFByZXNldCBUaXRsZQ==</PHRASE>
<PHRASE Label="la_fld_ExportPresets" Module="Core" Type="1">RXhwb3J0IFByZXNldA==</PHRASE>
<PHRASE Label="la_fld_ExportSavePreset" Module="Core" Type="1">U2F2ZS9VcGRhdGUgRXhwb3J0IFByZXNldA==</PHRASE>
<PHRASE Label="la_fld_ExternalLink" Module="Core" Type="1" Column="RXh0ZXJuYWwgTGluaw==">RXh0ZXJuYWwgTGluaw==</PHRASE>
<PHRASE Label="la_fld_ExternalUrl" Module="Core" Type="1">RXh0ZXJuYWwgVVJM</PHRASE>
<PHRASE Label="la_fld_ExtraHeaders" Module="Core" Type="1">RXh0cmEgSGVhZGVycw==</PHRASE>
<PHRASE Label="la_fld_Fax" Module="Core" Type="1" Column="RmF4">RmF4</PHRASE>
<PHRASE Label="la_fld_FieldComparision" Module="Core" Type="1" Column="TWF0Y2ggVHlwZQ==">TWF0Y2ggVHlwZQ==</PHRASE>
<PHRASE Label="la_fld_FieldName" Module="Core" Type="1" Column="RmllbGQgTmFtZQ==">RmllbGQgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_FieldsEnclosedBy" Module="Core" Type="1">RmllbGRzIGVuY2xvc2VkIGJ5</PHRASE>
<PHRASE Label="la_fld_FieldsSeparatedBy" Module="Core" Type="1">RmllbGRzIHNlcGFyYXRlZCBieQ==</PHRASE>
<PHRASE Label="la_fld_FieldTitles" Module="Core" Type="1">RmllbGQgVGl0bGVz</PHRASE>
<PHRASE Label="la_fld_FieldType" Module="Core" Type="1">RmllbGQgVHlwZQ==</PHRASE>
<PHRASE Label="la_fld_FieldValue" Module="Core" Type="1" Column="TWF0Y2ggVmFsdWU=">TWF0Y2ggVmFsdWU=</PHRASE>
<PHRASE Label="la_fld_FileContents" Module="Core" Type="1">RmlsZSBDb250ZW50cw==</PHRASE>
<PHRASE Label="la_fld_Filename" Module="Core" Type="1" Column="RmlsZW5hbWU=">RmlsZW5hbWU=</PHRASE>
<PHRASE Label="la_fld_FilenameReplacements" Module="Core" Type="1">RmlsZW5hbWUgUmVwbGFjZW1lbnRz</PHRASE>
<PHRASE Label="la_fld_FilePath" Module="Core" Type="1" Column="UGF0aA==">UGF0aA==</PHRASE>
<PHRASE Label="la_fld_FilterField" Module="Core" Type="1" Hint="RmllbGQgbmFtZSwgdG8gYmUgdXNlZCBpbiBmaWx0ZXI=" Column="RmlsdGVyIEZpZWxk">RmlsdGVyIEZpZWxk</PHRASE>
<PHRASE Label="la_fld_FilterType" Module="Core" Type="1" Hint="VGhlIHdheSwgaG93IHRoaXMgZmlsdGVyIHdpbGwgYmUgZGlzcGxheWVkIG9uIEZyb250LUVuZA==" Column="RmlsdGVyIFR5cGU=">RmlsdGVyIFR5cGU=</PHRASE>
<PHRASE Label="la_fld_FirstName" Module="Core" Type="1" Column="Rmlyc3QgTmFtZQ==">Rmlyc3QgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_Font" Module="Core" Type="1">Rm9udA==</PHRASE>
<PHRASE Label="la_fld_FontColor" Module="Core" Type="1">Rm9udCBDb2xvcg==</PHRASE>
<PHRASE Label="la_fld_FontFamily" Module="Core" Type="1">Rm9udCBGYW1pbHk=</PHRASE>
<PHRASE Label="la_fld_FontSize" Module="Core" Type="1">Rm9udCBTaXpl</PHRASE>
<PHRASE Label="la_fld_FontStyle" Module="Core" Type="1">Rm9udCBTdHlsZQ==</PHRASE>
<PHRASE Label="la_fld_FontWeight" Module="Core" Type="1">Rm9udCBXZWlnaHQ=</PHRASE>
<PHRASE Label="la_fld_Form" Module="Core" Type="1">T25saW5lIEZvcm0=</PHRASE>
<PHRASE Label="la_fld_FormSubmittedTemplate" Module="Core" Type="1">T25saW5lIEZvcm0gU3VibWl0dGVkIFRlbXBsYXRl</PHRASE>
<PHRASE Label="la_fld_FriendlyURL" Module="Core" Type="1">U2hvcnQgVVJM</PHRASE>
<PHRASE Label="la_fld_FromEmail" Module="Core" Type="1" Column="RnJvbSBFLW1haWw=">RnJvbSBFbWFpbA==</PHRASE>
<PHRASE Label="la_fld_FrontEndOnly" Module="Core" Type="1" Column="RnJvbnQtRW5kIE9ubHk=">RnJvbnQtRW5kIE9ubHk=</PHRASE>
<PHRASE Label="la_fld_FrontLanguage" Module="Core" Type="1" Column="TGFuZ3VhZ2U=">TGFuZ3VhZ2U=</PHRASE>
<PHRASE Label="la_fld_FrontRegistration" Module="Core" Type="1" Column="QWxsb3cgUmVnaXN0cmF0aW9u">QWxsb3cgUmVnaXN0cmF0aW9uIG9uIEZyb250LWVuZA==</PHRASE>
<PHRASE Label="la_fld_FullName" Module="Core" Type="1" Column="RnVsbCBOYW1l">RnVsbCBOYW1l</PHRASE>
<PHRASE Label="la_fld_Group" Module="Core" Type="1" Column="R3JvdXA=">VXNlciBHcm91cA==</PHRASE>
<PHRASE Label="la_fld_GroupDisplayOrder" Module="Core" Type="1" Hint="T3JkZXIgdG8gdXNlLCB3aGVuIHNvcnRpbmcgMiByZWNvcmRzIHdpdGggc2FtZSAiRGlzcGxheSBPcmRlciIu">R3JvdXAgRGlzcGxheSBPcmRlcg==</PHRASE>
<PHRASE Label="la_fld_GroupId" Module="Core" Type="1">SUQ=</PHRASE>
<PHRASE Label="la_fld_GroupName" Module="Core" Type="1" Column="R3JvdXAgTmFtZQ==">R3JvdXAgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_Height" Module="Core" Type="1">SGVpZ2h0</PHRASE>
<PHRASE Label="la_fld_HelpfulCount" Module="Core" Type="1" Column="SGVscGZ1bA==">UmV2aWV3IFdhcyBIZWxwZnVs</PHRASE>
<PHRASE Label="la_fld_HintTranslation" Module="Core" Type="1" Hint="QXNzb2NpYXRlZCBmaWVsZCB1c2FnZSB0cmFuc2xhdGlvbg==">SGludCBQaHJhc2U=</PHRASE>
<PHRASE Label="la_fld_Hits" Module="Core" Type="1" Column="SGl0cw==">SGl0cw==</PHRASE>
<PHRASE Label="la_fld_Hot" Module="Core" Type="1">SG90</PHRASE>
<PHRASE Label="la_fld_HtmlEmailTemplate" Module="Core" Type="1" Hint="VGhpcyBmaWVsZCBoYXMgYW4gSFRNTCB2ZXJzaW9uIG9mIEVtYWlsIERlc2lnbiBUZW1wbGF0ZSBhbmQgbXVzdCBjb250YWlucyBhdCBsZWFzdCBhICIkYm9keSIgdGFnIHVubGVzcyBUZXh0IFZlcnNpb24gZmllbGQgaXMgcG9wdWxhdGVkIGFscmVhZHkuIEl0IHdpbGwgYmUgdXNlZCBhcyBhIGRlc2lnbiBmb3IgYWxsIGVtYWlscyBzZW5kIG91dCBieSB0aGUgd2Vic2l0ZS4=">SFRNTCBWZXJzaW9u</PHRASE>
<PHRASE Label="LA_FLD_HTMLVERSION" Module="Core" Type="1">SFRNTCBWZXJzaW9u</PHRASE>
<PHRASE Label="la_fld_IconDisabledURL" Module="Core" Type="1">SWNvbiBVUkwgKGRpc2FibGVkKQ==</PHRASE>
<PHRASE Label="la_fld_IconURL" Module="Core" Type="1">SWNvbiBVUkw=</PHRASE>
<PHRASE Label="la_fld_Id" Module="Core" Type="1" Column="SUQ=">SUQ=</PHRASE>
<PHRASE Label="la_fld_Image" Module="Core" Type="1" Column="SW1hZ2U=">SW1hZ2U=</PHRASE>
<PHRASE Label="la_fld_ImportCategory" Module="Core" Type="1">SW1wb3J0IFNlY3Rpb24=</PHRASE>
<PHRASE Label="la_fld_ImportColumns" Module="Core" Type="1">SW1wb3J0IENvbHVtbnM=</PHRASE>
<PHRASE Label="la_fld_ImportFile" Module="Core" Type="1">SW1wb3J0IEZpbGU=</PHRASE>
<PHRASE Label="la_fld_ImportFilename" Module="Core" Type="1">SW1wb3J0IEZpbGVuYW1l</PHRASE>
<PHRASE Label="la_fld_ImportOverwrite" Module="Core" Type="1" Hint="RW5hYmxpbmcgdGhpcyBvcHRpb24gd2lsbCB1bmRvIGFueSBjaGFuZ2VzIHlvdSBoYXZlIG1hZGUgdG8gZXhpc3RpbmcgcGhyYXNlcw==">T3ZlcndyaXRlIEV4aXN0aW5nIFBocmFzZXM=</PHRASE>
<PHRASE Label="la_fld_ImportSynced" Module="Core" Type="1" Hint="RW5hYmxpbmcgdGhpcyBvcHRpb24gd2lsbCBtYXJrIGFsbCBuZXcgbGFiZWxzIGZyb20gdGhpcyBsYW5ndWFnZSBwYWNrIHN5bmNlZCB3aXRoIGFsbCBvdGhlciBsYW5ndWFnZXMu">SW1wb3J0IE5ldyBQaHJhc2VzIGFzIFN5bmNlZA==</PHRASE>
<PHRASE Label="la_fld_IncludeFieldTitles" Module="Core" Type="1">SW5jbHVkZSBmaWVsZCB0aXRsZXM=</PHRASE>
<PHRASE Label="la_fld_IncludeSublevels" Module="Core" Type="1" Column="SW5jbHVkZSBTdWJsZXZlbHM=">SW5jbHVkZSBTdWJsZXZlbHM=</PHRASE>
<PHRASE Label="la_fld_InputDateFormat" Module="Core" Type="1">SW5wdXQgRGF0ZSBGb3JtYXQ=</PHRASE>
<PHRASE Label="la_fld_InputTimeFormat" Module="Core" Type="1">SW5wdXQgVGltZSBGb3JtYXQ=</PHRASE>
<PHRASE Label="la_fld_InstallModules" Module="Core" Type="1">SW5zdGFsbCBNb2R1bGVz</PHRASE>
<PHRASE Label="la_fld_InstallPhraseTypes" Module="Core" Type="1">SW5zdGFsbCBQaHJhc2UgVHlwZXM=</PHRASE>
<PHRASE Label="la_fld_IPAddress" Module="Core" Type="1" Column="SVAgQWRkcmVzcw==">SVAgQWRkcmVzcw==</PHRASE>
<PHRASE Label="la_fld_IPRestrictions" Module="Core" Type="1">SVAgUmVzdHJpY3Rpb25z</PHRASE>
<PHRASE Label="la_fld_IsBaseCategory" Module="Core" Type="1">VXNlIGN1cnJlbnQgc2VjdGlvbiBhcyByb290IGZvciB0aGUgZXhwb3J0</PHRASE>
<PHRASE Label="la_fld_ISOCode" Module="Core" Type="1" Column="SVNPIENvZGU=">SVNPIENvZGU=</PHRASE>
<PHRASE Label="la_fld_IsPrimary" Module="Core" Type="1" Column="UHJpbWFyeQ==">UHJpbWFyeQ==</PHRASE>
<PHRASE Label="la_fld_IsRequired" Module="Core" Type="1">UmVxdWlyZWQ=</PHRASE>
<PHRASE Label="la_fld_IsSystem" Module="Core" Type="1" Column="U3lzdGVt">SXMgU3lzdGVt</PHRASE>
<PHRASE Label="la_fld_IsSystemTemplate" Module="Core" Type="1">U3lzdGVtIFRlbXBsYXRl</PHRASE>
<PHRASE Label="la_fld_ItemField" Module="Core" Type="1" Column="VXNlciBGaWVsZA==">VXNlciBGaWVsZA==</PHRASE>
<PHRASE Label="la_fld_ItemId" Module="Core" Type="1" Column="SXRlbSBJRA==">SXRlbSBJRA==</PHRASE>
<PHRASE Label="la_fld_ItemName" Module="Core" Type="1" Column="SXRlbSBOYW1l">SXRlbSBOYW1l</PHRASE>
<PHRASE Label="la_fld_ItemPrefix" Module="Core" Type="1" Hint="VW5pdCBjb25maWcgcHJlZml4LCB3aGVyZSBmaWx0ZXIgZmllbGQgYmVsb25ncw==" Column="SXRlbSBQcmVmaXg=">SXRlbSBQcmVmaXg=</PHRASE>
<PHRASE Label="la_fld_ItemTemplate" Module="Core" Type="1">SXRlbSBUZW1wbGF0ZQ==</PHRASE>
<PHRASE Label="la_fld_Language" Module="Core" Type="1" Column="TGFuZ3VhZ2U=">TGFuZ3VhZ2U=</PHRASE>
<PHRASE Label="la_fld_LanguageFile" Module="Core" Type="1">TGFuZ3VhZ2UgRmlsZQ==</PHRASE>
<PHRASE Label="la_fld_LanguageId" Module="Core" Type="1">TGFuZ3VhZ2UgSUQ=</PHRASE>
<PHRASE Label="la_fld_Languages" Module="Core" Type="1">TGFuZ3VhZ2Vz</PHRASE>
<PHRASE Label="la_fld_LastName" Module="Core" Type="1" Column="TGFzdCBOYW1l">TGFzdCBOYW1l</PHRASE>
<PHRASE Label="la_fld_LastRunOn" Module="Core" Type="1" Column="TGFzdCBSdW4gT24=">TGFzdCBSdW4gT24=</PHRASE>
<PHRASE Label="la_fld_LastRunStatus" Module="Core" Type="1" Column="TGFzdCBSdW4gU3RhdHVz">TGFzdCBSdW4gU3RhdHVz</PHRASE>
<PHRASE Label="la_fld_LastTimeoutOn" Module="Core" Type="1" Hint="RGF0YS90aW1lIHdoZW4gdGhlIGV2ZW50IGhhcyB0aW1lZCBvdXQgbGFzdCB0aW1lLg==" Column="TGFzdCBUaW1lb3V0IE9u">TGFzdCBUaW1lb3V0IE9u</PHRASE>
<PHRASE Label="la_fld_LastUpdatedOn" Module="Core" Type="1" Column="TGFzdCBVcGRhdGVkIE9u">TGFzdCBVcGRhdGVkIE9u</PHRASE>
<PHRASE Label="la_fld_Left" Module="Core" Type="1">TGVmdA==</PHRASE>
<PHRASE Label="la_fld_LineEndings" Module="Core" Type="1">TGluZSBlbmRpbmdz</PHRASE>
<PHRASE Label="la_fld_LineEndingsInside" Module="Core" Type="1">TGluZSBFbmRpbmdzIEluc2lkZSBGaWVsZHM=</PHRASE>
<PHRASE Label="la_fld_LinkType" Module="Core" Type="1" Column="TGluayBUeXBl">TGluayBUeXBl</PHRASE>
<PHRASE Label="la_fld_ListingId" Module="Core" Type="1" Column="TGlzdGluZyBJZA==">SUQ=</PHRASE>
<PHRASE Label="la_fld_ListingType" Module="Core" Type="1" Column="TGlzdGluZyBUeXBl">TGlzdGluZyBUeXBl</PHRASE>
<PHRASE Label="la_fld_Locale" Module="Core" Type="1">TG9jYWxl</PHRASE>
<PHRASE Label="la_fld_LocalName" Module="Core" Type="1" Column="TmFtZQ==">TG9jYWwgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_Location" Module="Core" Type="1" Column="TG9jYXRpb24=">TG9jYXRpb24=</PHRASE>
<PHRASE Label="la_fld_LogBacktrace" Module="Core" Type="1" Column="QmFja3RyYWNl">QmFja3RyYWNl</PHRASE>
<PHRASE Label="la_fld_LogCode" Module="Core" Type="1" Column="Q29kZQ==">Q29kZQ==</PHRASE>
<PHRASE Label="la_fld_LogEventName" Module="Core" Type="1" Column="RXZlbnQgTmFtZQ==">RXZlbnQgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_LogHostname" Module="Core" Type="1" Column="SG9zdG5hbWU=">SG9zdG5hbWU=</PHRASE>
<PHRASE Label="la_fld_Login" Module="Core" Type="1" Column="TG9naW4=">TG9naW4=</PHRASE>
<PHRASE Label="la_fld_LogInterface" Module="Core" Type="1" Column="SW50ZXJmYWNl">SW50ZXJmYWNl</PHRASE>
<PHRASE Label="la_fld_LogLevel" Module="Core" Type="1" Column="TG9nIExldmVs">TG9nIExldmVs</PHRASE>
<PHRASE Label="la_fld_LogMemoryUsed" Module="Core" Type="1" Column="TWVtb3J5IFVzZWQ=">TWVtb3J5IFVzZWQ=</PHRASE>
<PHRASE Label="la_fld_LogMessage" Module="Core" Type="1" Column="TWVzc2FnZQ==">TWVzc2FnZQ==</PHRASE>
<PHRASE Label="la_fld_LogNotificationStatus" Module="Core" Type="1" Column="Tm90aWZpY2F0aW9uIFN0YXR1cw==">Tm90aWZpY2F0aW9uIFN0YXR1cw==</PHRASE>
<PHRASE Label="la_fld_Logo" Module="Core" Type="1">TG9nbyBpbWFnZQ==</PHRASE>
<PHRASE Label="la_fld_LogoBottom" Module="Core" Type="1">Qm90dG9tIExvZ28gSW1hZ2U=</PHRASE>
<PHRASE Label="la_fld_LogoLogin" Module="Core" Type="1">TG9nbyBMb2dpbg==</PHRASE>
<PHRASE Label="la_fld_LogProcessId" Module="Core" Type="1" Column="UHJvY2VzcyBJRA==">UHJvY2VzcyBJRA==</PHRASE>
<PHRASE Label="la_fld_LogRequestData" Module="Core" Type="1" Column="UmVxdWVzdCBEYXRh">UmVxdWVzdCBEYXRh</PHRASE>
<PHRASE Label="la_fld_LogRequestSource" Module="Core" Type="1" Column="UmVxdWVzdCBTb3VyY2U=">UmVxdWVzdCBTb3VyY2U=</PHRASE>
<PHRASE Label="la_fld_LogRequestURI" Module="Core" Type="1" Column="UmVxdWVzdCBVUkk=">UmVxdWVzdCBVUkk=</PHRASE>
<PHRASE Label="la_fld_LogSessionData" Module="Core" Type="1" Column="U2Vzc2lvbiBEYXRh">U2Vzc2lvbiBEYXRh</PHRASE>
<PHRASE Label="la_fld_LogSessionKey" Module="Core" Type="1" Column="U2Vzc2lvbiBLZXk=">U2Vzc2lvbiBLZXk=</PHRASE>
<PHRASE Label="la_fld_LogSourceFileLine" Module="Core" Type="1" Column="U291cmNlIEZpbGUgTGluZQ==">U291cmNlIEZpbGUgTGluZQ==</PHRASE>
<PHRASE Label="la_fld_LogSourceFilename" Module="Core" Type="1" Column="U291cmNlIEZpbGVuYW1l">U291cmNlIEZpbGVuYW1l</PHRASE>
<PHRASE Label="la_fld_LogTimestamp" Module="Core" Type="1" Column="VGltZXN0YW1w">VGltZXN0YW1w</PHRASE>
<PHRASE Label="la_fld_LogType" Module="Core" Type="1" Column="VHlwZQ==">VHlwZQ==</PHRASE>
<PHRASE Label="la_fld_LogUserData" Module="Core" Type="1" Column="VXNlciBEYXRh">VXNlciBEYXRh</PHRASE>
<PHRASE Label="la_fld_MarginBottom" Module="Core" Type="1">TWFyZ2luIEJvdHRvbQ==</PHRASE>
<PHRASE Label="la_fld_MarginLeft" Module="Core" Type="1">TWFyZ2luIExlZnQ=</PHRASE>
<PHRASE Label="la_fld_MarginRight" Module="Core" Type="1">TWFyZ2luIFJpZ2h0</PHRASE>
<PHRASE Label="la_fld_Margins" Module="Core" Type="1">TWFyZ2lucw==</PHRASE>
<PHRASE Label="la_fld_MarginTop" Module="Core" Type="1">TWFyZ2luIFRvcA==</PHRASE>
<PHRASE Label="la_fld_MasterId" Module="Core" Type="1" Column="TWFzdGVyIElE">TWFzdGVyIElE</PHRASE>
<PHRASE Label="la_fld_MasterPrefix" Module="Core" Type="1" Column="TWFzdGVyIFByZWZpeA==">TWFzdGVyIFByZWZpeA==</PHRASE>
<PHRASE Label="la_fld_MaxCategories" Module="Core" Type="1">TWF4aW11bSBudW1iZXIgb2YgU2VjdGlvbnMgb24gSXRlbSBjYW4gYmUgYWRkZWQgdG8=</PHRASE>
<PHRASE Label="la_fld_MenuIcon" Module="Core" Type="1">Q3VzdG9tIE1lbnUgSWNvbiAoaWUuIGltZy9tZW51X3Byb2R1Y3RzLmdpZik=</PHRASE>
<PHRASE Label="la_fld_MenuStatus" Module="Core" Type="1">TWVudSBTdGF0dXM=</PHRASE>
<PHRASE Label="la_fld_MergeToSubmission" Module="Core" Type="1">TWVyZ2UgdG8gU3VibWlzc2lvbg==</PHRASE>
<PHRASE Label="la_fld_Message" Module="Core" Type="1" Column="TWVzc2FnZQ==">TWVzc2FnZQ==</PHRASE>
<PHRASE Label="la_fld_MessageBody" Module="Core" Type="1">TWVzc2FnZSBCb2R5</PHRASE>
<PHRASE Label="la_fld_MessageText" Module="Core" Type="1" Column="UGxhaW4gVGV4dA==">UGxhaW4gVGV4dCBWZXJzaW9u</PHRASE>
<PHRASE Label="la_fld_MessageType" Module="Core" Type="1">TWVzc2FnZSBUeXBl</PHRASE>
<PHRASE Label="la_fld_MetaDescription" Module="Core" Type="1">TWV0YSBEZXNjcmlwdGlvbg==</PHRASE>
<PHRASE Label="la_fld_MetaKeywords" Module="Core" Type="1">TWV0YSBLZXl3b3Jkcw==</PHRASE>
<PHRASE Label="la_fld_MisspelledWord" Module="Core" Type="1" Column="TWlzc3BlbGxlZCBXb3Jk">TWlzc3BlbGxlZCBXb3Jk</PHRASE>
<PHRASE Label="la_fld_Modified" Module="Core" Type="1" Column="TW9kaWZpZWQgT24=">TW9kaWZpZWQ=</PHRASE>
<PHRASE Label="la_fld_Module" Module="Core" Type="1" Column="TW9kdWxl">TW9kdWxl</PHRASE>
<PHRASE Label="la_fld_ModuleName" Module="Core" Type="1">TW9kdWxl</PHRASE>
<PHRASE Label="la_fld_MultiLingual" Module="Core" Type="1">TXVsdGlsaW5ndWFs</PHRASE>
<PHRASE Label="la_fld_Name" Module="Core" Type="1" Column="TmFtZQ==">TmFtZQ==</PHRASE>
<PHRASE Label="la_fld_New" Module="Core" Type="1">TmV3</PHRASE>
<PHRASE Label="la_fld_NextRunOn" Module="Core" Type="1" Column="TmV4dCBSdW4gT24=">TmV4dCBSdW4gT24=</PHRASE>
<PHRASE Label="la_fld_Notes" Module="Core" Type="1">Tm90ZXM=</PHRASE>
<PHRASE Label="la_fld_NotHelpfulCount" Module="Core" Type="1" Column="Tm90IEhlbHBmdWw=">UmV2aWV3IFdhc24ndCBIZWxwZnVs</PHRASE>
<PHRASE Label="la_fld_NumberOfClicks" Module="Core" Type="1" Column="TnVtYmVyIE9mIENsaWNrcw==">TnVtYmVyIE9mIENsaWNrcw==</PHRASE>
<PHRASE Label="la_fld_NumberOfViews" Module="Core" Type="1" Column="TnVtYmVyIE9mIFZpZXdz">TnVtYmVyIE9mIFZpZXdz</PHRASE>
<PHRASE Label="la_fld_OccuredOn" Module="Core" Type="1" Column="T2NjdXJlZCBPbg==">T2NjdXJlZCBPbg==</PHRASE>
<PHRASE Label="la_fld_OpenInNewWindow" Module="Core" Type="1">T3BlbiBJbiBOZXcgV2luZG93</PHRASE>
<PHRASE Label="la_fld_Options" Module="Core" Type="1">T3B0aW9ucw==</PHRASE>
<PHRASE Label="la_fld_OptionTitle" Module="Core" Type="1">T3B0aW9uIFRpdGxl</PHRASE>
<PHRASE Label="la_fld_Order" Module="Core" Type="1" Column="T3JkZXI=">T3JkZXI=</PHRASE>
<PHRASE Label="la_fld_OtherRecipients" Module="Core" Type="1" Column="T3RoZXIgUmVjaXBpZW50cw==">T3RoZXIgUmVjaXBpZW50cw==</PHRASE>
<PHRASE Label="la_fld_OverridePageCacheKey" Module="Core" Type="1">T3ZlcndyaXRlIERlZmF1bHQgQ2FjaGluZyBLZXk=</PHRASE>
<PHRASE Label="la_fld_PackName" Module="Core" Type="1" Column="UGFjayBOYW1l">UGFjayBOYW1l</PHRASE>
<PHRASE Label="la_fld_PaddingBottom" Module="Core" Type="1">UGFkZGluZyBCb3R0b20=</PHRASE>
<PHRASE Label="la_fld_PaddingLeft" Module="Core" Type="1">UGFkZGluZyBMZWZ0</PHRASE>
<PHRASE Label="la_fld_PaddingRight" Module="Core" Type="1">UGFkZGluZyBSaWdodA==</PHRASE>
<PHRASE Label="la_fld_Paddings" Module="Core" Type="1">UGFkZGluZ3M=</PHRASE>
<PHRASE Label="la_fld_PaddingTop" Module="Core" Type="1">UGFkZGluZyBUb3A=</PHRASE>
<PHRASE Label="la_fld_PageCacheKey" Module="Core" Type="1">Q3VzdG9tIENhY2hpbmcgS2V5</PHRASE>
<PHRASE Label="la_fld_PageContentTitle" Module="Core" Type="1">Jmx0O1RJVExFJmd0OyBUYWc=</PHRASE>
<PHRASE Label="la_fld_PageExpiration" Module="Core" Type="1" Hint="SG93IHNvb24gKGluIHNlY29uZHMpIHRoZSBzZWN0aW9uIGNhY2hlIHNob3VsZCBhdXRvLWV4cGlyZSBhZnRlciBpdCdzIGNyZWF0aW9uLiBCeSBkZWZhdWx0IHN5c3RlbSB0ZW5kcyB0byByZWJ1aWxkIHRoZSBjYWNoZSBvbmx5IHdoZW4gaXQncyBwcm9wZXJ0aWVzIG9yIGVsZW1lbnRzIGhhdmUgY2hhbmdlZC4=">Q2FjaGUgRXhwaXJhdGlvbiBpbiBzZWNvbmRz</PHRASE>
<PHRASE Label="la_fld_PageMentTitle" Module="Core" Type="1">VGl0bGUgKE1lbnUgSXRlbSk=</PHRASE>
<PHRASE Label="la_fld_PageTitle" Module="Core" Type="1" Column="U2VjdGlvbiBUaXRsZQ==">U2VjdGlvbiBUaXRsZQ==</PHRASE>
<PHRASE Label="la_fld_ParentItemId" Module="Core" Type="1" Column="UGFyZW50IEl0ZW0gSUQ=">UGFyZW50IEl0ZW0gSUQ=</PHRASE>
<PHRASE Label="la_fld_ParentItemName" Module="Core" Type="1" Column="UGFyZW50IEl0ZW0gTmFtZQ==">UGFyZW50IEl0ZW0gTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_ParentSection" Module="Core" Type="1">UGFyZW50IFNlY3Rpb24=</PHRASE>
<PHRASE Label="la_fld_Password" Module="Core" Type="1">UGFzc3dvcmQ=</PHRASE>
<PHRASE Label="la_fld_PercentsCompleted" Module="Core" Type="1">UGVyY2VudHMgQ29tcGxldGVk</PHRASE>
<PHRASE Label="la_fld_Phone" Module="Core" Type="1" Column="UGhvbmU=">UGhvbmU=</PHRASE>
<PHRASE Label="la_fld_Phrase" Module="Core" Type="1" Column="UGhyYXNl">TGFiZWw=</PHRASE>
<PHRASE Label="la_fld_PhraseType" Module="Core" Type="1" Column="VHlwZQ==">UGhyYXNlIFR5cGU=</PHRASE>
<PHRASE Label="la_fld_Pop" Module="Core" Type="1">UG9w</PHRASE>
<PHRASE Label="la_fld_Popular" Module="Core" Type="1">UG9wdWxhcg==</PHRASE>
<PHRASE Label="la_fld_Port" Module="Core" Type="1">UG9ydA==</PHRASE>
<PHRASE Label="la_fld_Position" Module="Core" Type="1">UG9zaXRpb24=</PHRASE>
<PHRASE Label="la_fld_Prefix" Module="Core" Type="1" Column="UHJlZml4">UHJlZml4</PHRASE>
<PHRASE Label="la_fld_Primary" Module="Core" Type="1" Column="UHJpbWFyeQ==">UHJpbWFyeQ==</PHRASE>
<PHRASE Label="la_fld_PrimaryCategory" Module="Core" Type="1">UHJpbWFyeSBTZWN0aW9u</PHRASE>
<PHRASE Label="la_fld_PrimaryLang" Module="Core" Type="1">UHJpbWFyeQ==</PHRASE>
<PHRASE Label="la_fld_PrimaryTranslation" Module="Core" Type="1">UHJpbWFyeSBMYW5ndWFnZSBQaHJhc2U=</PHRASE>
<PHRASE Label="la_fld_Priority" Module="Core" Type="1" Column="T3JkZXI=">T3JkZXI=</PHRASE>
<PHRASE Label="la_fld_ProcessUnmatchedEmails" Module="Core" Type="1">Q29udmVydCB1bm1hdGNoZWQgZS1tYWlscyBpbnRvIG5ldyBzdWJtaXNzaW9ucw==</PHRASE>
<PHRASE Label="la_fld_PromoBlockGroup" Module="Core" Type="1">UHJvbW8gQmxvY2sgR3JvdXA=</PHRASE>
<PHRASE Label="la_fld_Protected" Module="Core" Type="1" Column="UHJvdGVjdGVk">UHJvdGVjdGVk</PHRASE>
<PHRASE Label="la_fld_Qty" Module="Core" Type="1" Column="UXR5">UXVhbnRpdHk=</PHRASE>
<PHRASE Label="la_fld_RangeCount" Module="Core" Type="1" Column="UmFuZ2UgQ291bnQ=">UmFuZ2UgQ291bnQ=</PHRASE>
<PHRASE Label="la_fld_Rating" Module="Core" Type="1" Column="UmF0aW5n">UmF0aW5n</PHRASE>
<PHRASE Label="la_fld_Recipient" Module="Core" Type="1" Column="UmVjaXBpZW50">UmVjaXBpZW50</PHRASE>
<PHRASE Label="la_fld_RecipientAddress" Module="Core" Type="1">UmVjaXBpZW50J3MgQWRkcmVzcw==</PHRASE>
<PHRASE Label="la_fld_RecipientAddressType" Module="Core" Type="1">UmVjaXBpZW50J3MgQWRkcmVzcyBUeXBl</PHRASE>
<PHRASE Label="la_fld_RecipientName" Module="Core" Type="1">UmVjaXBpZW50J3MgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_Recipients" Module="Core" Type="1">UmVjaXBpZW50cw==</PHRASE>
<PHRASE Label="la_fld_RecipientType" Module="Core" Type="1" Column="UmVjaXBpZW50IFR5cGU=">UmVjaXBpZW50IFR5cGU=</PHRASE>
+ <PHRASE Label="la_fld_RecipientUser" Module="Core" Type="1" Column="UmVjaXBpZW50IFVzZXI=">UmVjaXBpZW50IFVzZXI=</PHRASE>
<PHRASE Label="la_fld_RedirectOnIPMatch" Module="Core" Type="1">Rm9yY2UgUmVkaXJlY3QgKHdoZW4gdXNlcidzIElQIG1hdGNoZXMp</PHRASE>
<PHRASE Label="la_fld_ReferrerURL" Module="Core" Type="1" Column="UmVmZXJyZXIgVVJM">UmVmZXJyZXIgVVJM</PHRASE>
<PHRASE Label="la_fld_RelatedSearchKeyword" Module="Core" Type="1">S2V5d29yZA==</PHRASE>
<PHRASE Label="la_fld_RelationshipType" Module="Core" Type="1" Column="UmVsYXRpb24gVHlwZQ==">VHlwZQ==</PHRASE>
<PHRASE Label="la_fld_RemoteUrl" Module="Core" Type="1">UmVtb3RlIFVSTA==</PHRASE>
<PHRASE Label="la_fld_ReplaceDuplicates" Module="Core" Type="1">UmVwbGFjZSBEdXBsaWNhdGVz</PHRASE>
<PHRASE Label="la_fld_Replacement" Module="Core" Type="1" Column="UmVwbGFjZW1lbnQ=">UmVwbGFjZW1lbnQ=</PHRASE>
<PHRASE Label="la_fld_ReplacementTags" Module="Core" Type="1">UmVwbGFjZW1lbnQgVGFncw==</PHRASE>
<PHRASE Label="la_fld_RepliedOn" Module="Core" Type="1" Column="UmVwbGllZCBPbg==">UmVwbGllZCBPbg==</PHRASE>
<PHRASE Label="la_fld_ReplyBcc" Module="Core" Type="1">UmVwbHkgQmNj</PHRASE>
<PHRASE Label="la_fld_ReplyCc" Module="Core" Type="1">UmVwbHkgQ2M=</PHRASE>
<PHRASE Label="la_fld_ReplyFromEmail" Module="Core" Type="1">UmVwbHkgRnJvbSBFLW1haWw=</PHRASE>
<PHRASE Label="la_fld_ReplyFromName" Module="Core" Type="1">UmVwbHkgRnJvbSBOYW1l</PHRASE>
<PHRASE Label="la_fld_ReplyMessageSignature" Module="Core" Type="1">UmVwbHkgTWVzc2FnZSBTaWduYXR1cmU=</PHRASE>
<PHRASE Label="la_fld_ReplyStatus" Module="Core" Type="1" Column="UmVwbGllZA==">UmVwbGllZA==</PHRASE>
<PHRASE Label="la_fld_ReportedBy" Module="Core" Type="1" Column="UmVwb3J0ZWQgQnk=">UmVwb3J0ZWQgQnk=</PHRASE>
<PHRASE Label="la_fld_ReportedOn" Module="Core" Type="1" Column="UmVwb3J0ZWQgT24=">UmVwb3J0ZWQgT24=</PHRASE>
<PHRASE Label="la_fld_Required" Module="Core" Type="1" Column="UmVxdWlyZWQ=">UmVxdWlyZWQ=</PHRASE>
<PHRASE Label="la_fld_RequireLogin" Module="Core" Type="1" Column="UmVxdWlyZSBMb2dpbg==">UmVxdWlyZSBMb2dpbg==</PHRASE>
<PHRASE Label="la_fld_RequireSSL" Module="Core" Type="1" Column="UmVxdWlyZSBTU0w=">UmVxdWlyZSBTU0w=</PHRASE>
<PHRASE Label="la_fld_ReviewText" Module="Core" Type="1" Column="Q29tbWVudA==">Q29tbWVudA==</PHRASE>
<PHRASE Label="la_fld_RotationDelay" Module="Core" Type="1" Column="UHJvbW8gUm90YXRpb24gRGVsYXkgKHNlY29uZHMp">UHJvbW8gUm90YXRpb24gRGVsYXkgKHNlY29uZHMp</PHRASE>
<PHRASE Label="la_fld_RuleType" Module="Core" Type="1" Column="UnVsZSBUeXBl">UnVsZSBUeXBl</PHRASE>
<PHRASE Label="la_fld_RunSchedule" Module="Core" Type="1" Column="UnVuIFNjaGVkdWxl">UnVuIFNjaGVkdWxl</PHRASE>
<PHRASE Label="la_fld_RunTime" Module="Core" Type="1" Column="UnVuIFRpbWU=">UnVuIFRpbWU=</PHRASE>
<PHRASE Label="la_fld_SameAsThumb" Module="Core" Type="1">U2FtZSBBcyBUaHVtYg==</PHRASE>
<PHRASE Label="la_fld_ScheduleDate" Module="Core" Type="1">U2NoZWR1bGUgRGF0ZQ==</PHRASE>
<PHRASE Label="la_fld_SearchTerm" Module="Core" Type="1" Column="U2VhcmNoIFRlcm0=">U2VhcmNoIFRlcm0=</PHRASE>
<PHRASE Label="la_fld_Sender" Module="Core" Type="1" Column="U2VuZGVy">U2VuZGVy</PHRASE>
<PHRASE Label="la_fld_SenderAddress" Module="Core" Type="1">U2VuZGVyJ3MgQWRkcmVzcw==</PHRASE>
<PHRASE Label="la_fld_SenderName" Module="Core" Type="1">U2VuZGVyJ3MgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_SentOn" Module="Core" Type="1" Column="U2VudCBPbg==">U2VudCBPbg==</PHRASE>
<PHRASE Label="la_fld_SentStatus" Module="Core" Type="1" Column="U2VudA==">U2VudA==</PHRASE>
<PHRASE Label="la_fld_Server" Module="Core" Type="1">U2VydmVy</PHRASE>
<PHRASE Label="la_fld_SessionLogId" Module="Core" Type="1" Column="U2Vzc2lvbiBMb2cgSUQ=">U2Vzc2lvbiBMb2cgSUQ=</PHRASE>
<PHRASE Label="la_fld_Settings" Module="Core" Type="1" Column="U2V0dGluZ3M=">U2V0dGluZ3M=</PHRASE>
<PHRASE Label="la_fld_ShortDateFormat" Module="Core" Type="1" Column="U2hvcnQgRGF0ZSBGb3JtYXQ=">U2hvcnQgRGF0ZSBGb3JtYXQ=</PHRASE>
<PHRASE Label="la_fld_ShortIsoCode" Module="Core" Type="1" Column="U2hvcnQgSVNPIENvZGU=">U2hvcnQgSVNPIENvZGU=</PHRASE>
<PHRASE Label="la_fld_ShortTimeFormat" Module="Core" Type="1" Column="U2hvcnQgVGltZSBGb3JtYXQ=">U2hvcnQgVGltZSBGb3JtYXQ=</PHRASE>
<PHRASE Label="la_fld_SimpleSearch" Module="Core" Type="1">U2ltcGxlIFNlYXJjaA==</PHRASE>
<PHRASE Label="la_fld_SiteDomainLimitation" Module="Core" Type="1" Column="U2l0ZSBEb21haW4gTGltaXRhdGlvbg==">U2l0ZSBEb21haW4gTGltaXRhdGlvbg==</PHRASE>
<PHRASE Label="la_fld_SkinName" Module="Core" Type="1" Column="TmFtZQ==">TmFtZQ==</PHRASE>
<PHRASE Label="la_fld_SkipFirstRow" Module="Core" Type="1">U2tpcCBGaXJzdCBSb3c=</PHRASE>
<PHRASE Label="la_fld_SortValues" Module="Core" Type="1">U29ydCBWYWx1ZXM=</PHRASE>
<PHRASE Label="la_fld_SourceColumnTranslation" Module="Core" Type="1" Column="U291cmNlIENvbHVtbiBQaHJhc2U=">U291cmNlIENvbHVtbiBQaHJhc2UgKGZyb20gJXMp</PHRASE>
<PHRASE Label="la_fld_SourceHintTranslation" Module="Core" Type="1" Column="U291cmNlIEhpbnQgUGhyYXNl">U291cmNlIEhpbnQgUGhyYXNlIChmcm9tICVzKQ==</PHRASE>
<PHRASE Label="la_fld_SourceHtmlBody" Module="Core" Type="1" Column="U291cmNlIEhUTUwgVmVyc2lvbg==">U291cmNlIEhUTUwgVmVyc2lvbiAoZnJvbSAlcyk=</PHRASE>
<PHRASE Label="la_fld_SourcePlainTextBody" Module="Core" Type="1" Column="U291cmNlIFRleHQgVmVyc2lvbg==">U291cmNlIFRleHQgVmVyc2lvbiAoZnJvbSAlcyk=</PHRASE>
<PHRASE Label="la_fld_SourceSubject" Module="Core" Type="1" Column="U291cmNlIFN1YmplY3Q=">U291cmNlIFN1YmplY3QgKGZyb20gJXMp</PHRASE>
<PHRASE Label="la_fld_SourceTranslation" Module="Core" Type="1" Column="U291cmNl">U291cmNlIFBocmFzZSAoZnJvbSAlcyk=</PHRASE>
<PHRASE Label="la_fld_SSLUrl" Module="Core" Type="1" Hint="aHR0cHM6Ly93d3cuZG9tYWluLmNvbS9wYXRo" Column="U1NMIFVybA==">U1NMIEZ1bGwgVVJM</PHRASE>
<PHRASE Label="la_fld_StartDate" Module="Core" Type="1" Column="U3RhcnQgRGF0ZQ==">U3RhcnQgRGF0ZQ==</PHRASE>
<PHRASE Label="la_fld_State" Module="Core" Type="1" Column="U3RhdGU=">U3RhdGU=</PHRASE>
<PHRASE Label="la_fld_StateCountry" Module="Core" Type="1" Column="U3RhdGUgQ291bnRyeQ==">U3RhdGUgQ291bnRyeQ==</PHRASE>
<PHRASE Label="la_fld_Status" Module="Core" Type="1" Column="U3RhdHVz">U3RhdHVz</PHRASE>
<PHRASE Label="la_fld_Sticky" Module="Core" Type="1" Column="U3RpY2t5">U3RpY2t5</PHRASE>
<PHRASE Label="la_fld_StopWord" Module="Core" Type="1" Column="U3RvcCBXb3Jk">U3RvcCBXb3Jk</PHRASE>
<PHRASE Label="la_fld_Subject" Module="Core" Type="1" Column="U3ViamVjdA==">U3ViamVjdA==</PHRASE>
<PHRASE Label="la_fld_SubmissionTime" Module="Core" Type="1">U3VibWl0dGVkIE9u</PHRASE>
<PHRASE Label="la_fld_SubmitNotifyEmail" Module="Core" Type="1" Hint="RW1haWwgYWRkcmVzcyB3aGVyZSBub3RpZmljYXRpb24gYWJvdXQgbmV3IHN1Ym1pc3Npb25zIHdpbGwgYmUgc2VuZCB0by4gRGVmYXVsdCBlbWFpbCBhZGRyZXNzIHdpbGwgYmUgdXNlZCBpZiB0aGlzIGZpZWxkIGlzIGxlZnQgYmxhbmsu" Column="U3VibWlzc2lvbiBOb3RpZmljYXRpb24gRW1haWw=">U3VibWlzc2lvbiBOb3RpZmljYXRpb24gRW1haWw=</PHRASE>
<PHRASE Label="la_fld_SubscribedOn" Module="Core" Type="1" Column="U3Vic2NyaWJlZCBPbg==">U3Vic2NyaWJlZCBPbg==</PHRASE>
<PHRASE Label="la_fld_SuggestedCorrection" Module="Core" Type="1" Column="U3VnZ2VzdGVkIENvcnJlY3Rpb24=">U3VnZ2VzdGVkIENvcnJlY3Rpb24=</PHRASE>
<PHRASE Label="la_fld_SymLinkCategoryId" Module="Core" Type="1">UG9pbnRzIHRvIFNlY3Rpb24=</PHRASE>
<PHRASE Label="la_fld_SynchronizationModes" Module="Core" Type="1" Hint="IlRvIG90aGVycyIgLSBhbGxvdyB0cmFuc2xhdGVkIHBocmFzZXMgZnJvbSB0aGlzIGxhbmd1YWdlIHRvIGJlIHVzZWQgaW5zdGVhZCBvZiBtaXNzaW5nIHBocmFzZXMgb24gb3RoZXIgbGFuZ3VhZ2VzLiAiRnJvbSBvdGhlcnMiIC0gdXNlIHRyYW5zbGF0ZWQgcGhyYXNlcyBmcm9tIG90aGVyIGxhbmd1YWdlcyBpbnN0ZWFkIG9mIG1pc3NpbmcgcGhyYXNlcyBvbiB0aGlzIGxhbmd1YWdlLg==" Column="U3luY2hyb25pemUgTGFuZ3VhZ2U=">U3luY2hyb25pemUgTGFuZ3VhZ2U=</PHRASE>
<PHRASE Label="la_fld_SystemEvent" Module="Core" Type="1" Column="U3lzdGVtIEV2ZW50">U3lzdGVtIEV2ZW50</PHRASE>
<PHRASE Label="la_fld_SystemSettingHint" Module="Core" Type="1" Hint="UGxhY2luZyAiaGludDpsYV9jb25maWdfVmFyaWFibGVOYW1lIiB2YWx1ZSB3b3VsZCB1c3VhbGx5IGRvIHRoZSB0cmljay4=">U2V0dGluZyBIaW50IExhYmVs</PHRASE>
<PHRASE Label="la_fld_SystemSettingName" Module="Core" Type="1">U2V0dGluZyBOYW1l</PHRASE>
<PHRASE Label="la_fld_SystemSettingSection" Module="Core" Type="1" Hint="U2VjdGlvbiwgd2hlcmUgdGhpcyBzeXN0ZW0gc2V0dGluZyB3aWxsIGJlIGRpc3BsYXllZC4=">U2VjdGlvbg==</PHRASE>
<PHRASE Label="la_fld_SystemSettingValidation" Module="Core" Type="1" Hint="U2VyaWFsaXplZCBhcnJheSBvZiB2YWxpZGF0aW9uIG9wdGlvbnMgc3VjaCBhcyAicmVxdWlyZWQiLCAiZm9ybWF0dGVyIiwgZXRjLg==">VmFsaWRhdGlvbiBMb2dpYw==</PHRASE>
<PHRASE Label="la_fld_SystemSettingValue" Module="Core" Type="1">U2V0dGluZyBWYWx1ZQ==</PHRASE>
<PHRASE Label="la_fld_TableName" Module="Core" Type="1">VGFibGUgTmFtZSBpbiBEYXRhYmFzZSA=</PHRASE>
<PHRASE Label="la_fld_Tag" Module="Core" Type="1">VGFn</PHRASE>
<PHRASE Label="la_fld_TargetId" Module="Core" Type="1" Column="SXRlbQ==">SXRlbQ==</PHRASE>
<PHRASE Label="la_fld_TemplateFile" Module="Core" Type="1">VGVtcGxhdGUgRmlsZQ==</PHRASE>
<PHRASE Label="la_fld_TemplateName" Module="Core" Type="1" Column="VGVtcGxhdGUgTmFtZQ==">VGVtcGxhdGUgTmFtZQ==</PHRASE>
<PHRASE Label="la_fld_TemplateType" Module="Core" Type="1" Column="VGVtcGxhdGU=">VGVtcGxhdGU=</PHRASE>
<PHRASE Label="la_fld_Text" Module="Core" Type="1">VGV4dA==</PHRASE>
<PHRASE Label="la_fld_TextAlign" Module="Core" Type="1">VGV4dCBBbGlnbg==</PHRASE>
<PHRASE Label="la_fld_TextDecoration" Module="Core" Type="1">VGV4dCBEZWNvcmF0aW9u</PHRASE>
<PHRASE Label="la_fld_TextEmailTemplate" Module="Core" Type="1" Hint="VGhpcyBmaWVsZCBoYXMgYSBQbGFpbiBUZXh0IHZlcnNpb24gb2YgRW1haWwgRGVzaWduIFRlbXBsYXRlIGFuZCBtdXN0IGNvbnRhaW5zIGF0IGxlYXN0IGEgIiRib2R5IiB0YWcgdW5sZXNzIEhUTUwgVmVyc2lvbiBmaWVsZCBpcyBwb3B1bGF0ZWQgYWxyZWFkeS4gSXQgd2lsbCBiZSB1c2VkIGFzIGEgZGVzaWduIGZvciBhbGwgZW1haWxzIHNlbmQgb3V0IGJ5IHRoZSB3ZWJzaXRlLg==">VGV4dCBWZXJzaW9u</PHRASE>
<PHRASE Label="LA_FLD_TEXTVERSION" Module="Core" Type="1">VGV4dCBWZXJzaW9u</PHRASE>
<PHRASE Label="la_fld_Theme" Module="Core" Type="1" Column="VGhlbWU=">VGhlbWU=</PHRASE>
<PHRASE Label="la_fld_Themes" Module="Core" Type="1">VGhlbWVz</PHRASE>
<PHRASE Label="la_fld_ThesaurusTerm" Module="Core" Type="1" Column="VGhlc2F1cnVzIFRlcm0=">VGhlc2F1cnVzIFRlcm0=</PHRASE>
<PHRASE Label="la_fld_ThesaurusType" Module="Core" Type="1" Column="VGhlc2F1cnVzIFR5cGU=">VGhlc2F1cnVzIFR5cGU=</PHRASE>
<PHRASE Label="la_fld_ThousandSep" Module="Core" Type="1">VGhvdXNhbmRzIFNlcGFyYXRvcg==</PHRASE>
<PHRASE Label="la_fld_TimeFormat" Module="Core" Type="1">VGltZSBGb3JtYXQ=</PHRASE>
<PHRASE Label="la_fld_Timeout" Module="Core" Type="1" Hint="VGltZW91dCBvZiBldmVudCBzY2hlZHVsZSAoaW4gc2Vjb25kcykuIFNwZWNpZmllZCB2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAwIGluIG9yZGVyIGZvciBzeXN0ZW0gdG8gdGltZW91dCBhbHJlYWR5IHJ1bm5pbmcgZXZlbnQgaWYgaXQncyBydW5uaW5nIHRpbWUgZXhjZWVkcyB0aGUgc3BlY2lmaWVkIGhlcmUgdGltZW91dCB2YWx1ZS4=" Column="VGltZW91dA==">VGltZW91dA==</PHRASE>
<PHRASE Label="la_fld_TimeZone" Module="Core" Type="1" Hint="TmV3IFRpbWUgWm9uZSB3aWxsIGJlIGluIGVmZmVjdCBuZXh0IHRpbWUgdXNlciBsb2dpbnM=">VGltZSBab25l</PHRASE>
<PHRASE Label="la_fld_Title" Module="Core" Type="1" Column="VGl0bGU=">VGl0bGU=</PHRASE>
<PHRASE Label="la_fld_To" Module="Core" Type="1">VG8=</PHRASE>
<PHRASE Label="la_fld_ToEmail" Module="Core" Type="1" Column="VG8gRS1tYWls">VG8gRS1tYWls</PHRASE>
<PHRASE Label="la_fld_Top" Module="Core" Type="1">VG9w</PHRASE>
<PHRASE Label="la_fld_TrackingCode" Module="Core" Type="1">QW5hbHl0aWNzIFRyYWNraW5nIENvZGU=</PHRASE>
<PHRASE Label="la_fld_TransitionControls" Module="Core" Type="1" Column="UHJvbW8gVHJhbnNpdGlvbiBDb250cm9scw==">UHJvbW8gVHJhbnNpdGlvbiBDb250cm9scw==</PHRASE>
<PHRASE Label="la_fld_TransitionEffect" Module="Core" Type="1" Column="UHJvbW8gVHJhbnNpdGlvbiBFZmZlY3Q=">UHJvbW8gVHJhbnNpdGlvbiBFZmZlY3Q=</PHRASE>
<PHRASE Label="la_fld_TransitionEffectCustom" Module="Core" Type="1" Column="UHJvbW8gVHJhbnNpdGlvbiBFZmZlY3QgKGN1c3RvbSk=">UHJvbW8gVHJhbnNpdGlvbiBFZmZlY3QgKGN1c3RvbSk=</PHRASE>
<PHRASE Label="la_fld_TransitionTime" Module="Core" Type="1" Column="VHJhbnNpdGlvbiBEZWxheSAoc2Vjb25kcyk=">VHJhbnNpdGlvbiBEZWxheSAoc2Vjb25kcyk=</PHRASE>
<PHRASE Label="la_fld_TranslateFromLanguage" Module="Core" Type="1" Column="VHJhbnNsYXRlIEZyb20gTGFuZ2F1Z2U=">VHJhbnNsYXRlIEZyb20gTGFuZ2F1Z2U=</PHRASE>
<PHRASE Label="la_fld_Translation" Module="Core" Type="1" Column="VmFsdWU=">UGhyYXNl</PHRASE>
<PHRASE Label="la_fld_TranslationInSync" Module="Core" Type="1" Column="VHJhbnNsYXRpb24gaW4gU3luYw==">VHJhbnNsYXRpb24gaW4gU3luYw==</PHRASE>
<PHRASE Label="la_fld_Type" Module="Core" Type="1" Column="VHlwZQ==">VHlwZQ==</PHRASE>
<PHRASE Label="la_fld_UnitSystem" Module="Core" Type="1">TWVhc3VyZXMgU3lzdGVt</PHRASE>
<PHRASE Label="la_fld_Upload" Module="Core" Type="1">VXBsb2FkIEZpbGUgRnJvbSBMb2NhbCBQQw==</PHRASE>
<PHRASE Label="la_fld_UploadExtensions" Module="Core" Type="1" Hint="TGlzdCBvZiBGaWxlIEV4dGVuc2lvbnMgYWxsb3dlZCBmb3IgdXBsb2FkIHNlcGFyYXRlZCBieSBjb21tYS4gRXhhbXBsZToganBnLHBuZyxnaWcscGRm">QWxsb3dlZCBGaWxlIEV4dGVuc2lvbnM=</PHRASE>
<PHRASE Label="la_fld_UploadMaxSize" Module="Core" Type="1" Hint="TWF4aW11bSBmaWxlIHNpemUgKGluIEtieXRlcykgYWxsb3dlZCBmb3IgdGhlIHVwbG9hZC4gRXhhbXBsZTogMSBNQnl0ZSA9IDEwMjQgS0J5dGVzLCAxMCBNQnl0ZXMgPSAxMDI0MCBLQnl0ZXMu">TWF4aW11bSBGaWxlIFNpemU=</PHRASE>
<PHRASE Label="la_fld_URL" Module="Core" Type="1" Column="VVJM">VVJM</PHRASE>
<PHRASE Label="la_fld_UseExternalUrl" Module="Core" Type="1">TGluayB0byBFeHRlcm5hbCBVUkw=</PHRASE>
<PHRASE Label="la_fld_UseMenuIcon" Module="Core" Type="1">VXNlIEN1c3RvbSBNZW51IEljb24=</PHRASE>
<PHRASE Label="la_fld_UserDocsUrl" Module="Core" Type="1">VXNlciBEb2N1bWVudGF0aW9uIFVSTA==</PHRASE>
<PHRASE Label="la_fld_UserGroups" Module="Core" Type="1">VXNlciBHcm91cHM=</PHRASE>
<PHRASE Label="la_fld_Username" Module="Core" Type="1" Column="VXNlcm5hbWU=">VXNlcm5hbWU=</PHRASE>
<PHRASE Label="la_fld_UseSecurityImage" Module="Core" Type="1" Column="VXNlIFNlY3VyaXR5IEltYWdl">VXNlIFNlY3VyaXR5IEltYWdl</PHRASE>
<PHRASE Label="la_fld_VerifyPassword" Module="Core" Type="1">UmUtZW50ZXIgUGFzc3dvcmQ=</PHRASE>
<PHRASE Label="la_fld_Version" Module="Core" Type="1" Column="VmVyc2lvbg==">VmVyc2lvbg==</PHRASE>
<PHRASE Label="la_fld_Visibility" Module="Core" Type="1" Column="VmlzaWJpbGl0eQ==">VmlzaWJpbGl0eQ==</PHRASE>
<PHRASE Label="la_fld_Votes" Module="Core" Type="1">Vm90ZXM=</PHRASE>
<PHRASE Label="la_fld_Width" Module="Core" Type="1">V2lkdGg=</PHRASE>
<PHRASE Label="la_fld_Z-Index" Module="Core" Type="1">Wi1JbmRleA==</PHRASE>
<PHRASE Label="la_fld_ZIP" Module="Core" Type="1" Column="WklQ">WklQ</PHRASE>
<PHRASE Label="la_Font" Module="Core" Type="1">Rm9udCBQcm9wZXJ0aWVz</PHRASE>
<PHRASE Label="la_FormCancelConfirmation" Module="Core" Type="1">RG8geW91IHdhbnQgdG8gc2F2ZSB0aGUgY2hhbmdlcz8=</PHRASE>
<PHRASE Label="la_FormResetConfirmation" Module="Core" Type="1">QXJlIHlvdSBzdXJlIHlvdSB3b3VsZCBsaWtlIHRvIGRpc2NhcmQgdGhlIGNoYW5nZXM/</PHRASE>
<PHRASE Label="la_From" Module="Core" Type="1">RnJvbQ==</PHRASE>
<PHRASE Label="la_from_date" Module="Core" Type="1">RnJvbSBEYXRl</PHRASE>
<PHRASE Label="la_GeneralSections" Module="Core" Type="1">R2VuZXJhbCBTZWN0aW9ucw==</PHRASE>
<PHRASE Label="la_HeadFrame" Module="Core" Type="1">SGVhZCBGcmFtZQ==</PHRASE>
<PHRASE Label="la_Hide" Module="Core" Type="1">SGlkZQ==</PHRASE>
<PHRASE Label="la_hint_AllFiles" Module="Core" Type="1">QWxsIEZpbGVz</PHRASE>
<PHRASE Label="la_hint_CSVFiles" Module="Core" Type="1">Q1NWIEZpbGVz</PHRASE>
<PHRASE Label="la_hint_ImageFiles" Module="Core" Type="1">SW1hZ2UgRmlsZXM=</PHRASE>
<PHRASE Label="la_hint_PopPort" Module="Core" Type="1">UE9QMyBTZXJ2ZXIgUG9ydC4gRm9yIGV4LiAiMTEwIiBmb3IgcmVndWxhciBjb25uZWN0aW9uLCAiOTk1IiBmb3Igc2VjdXJlIGNvbm5lY3Rpb24u</PHRASE>
<PHRASE Label="la_hint_PopServer" Module="Core" Type="1">UE9QMyBTZXJ2ZXIgQWRkcmVzcy4gRm9yIGV4LiB1c2UgInNzbDovL3BvcC5nbWFpbC5jb20iIGZvciBHbWFpbCwgInBvcC5tYWlsLnlhaG9vLmNvbSIgZm9yIFlhaG9vLg==</PHRASE>
<PHRASE Label="la_hint_SystemToolsCacheKeys" Module="Core" Type="1">Q2FjaGUgS2V5KHMp</PHRASE>
<PHRASE Label="la_hint_SystemToolsDatabaseCache" Module="Core" Type="1">ZGF0YWJhc2UgY2FjaGU=</PHRASE>
<PHRASE Label="la_hint_SystemToolsMemoryCache" Module="Core" Type="1">bWVtb3J5IGNhY2hl</PHRASE>
<PHRASE Label="la_hint_UsingRegularExpression" Module="Core" Type="1">VXNpbmcgUmVndWxhciBFeHByZXNzaW9u</PHRASE>
<PHRASE Label="la_Hot" Module="Core" Type="1">SG90</PHRASE>
<PHRASE Label="la_Html" Module="Core" Type="1">SFRNTA==</PHRASE>
<PHRASE Label="la_IDField" Module="Core" Type="1">SUQgRmllbGQ=</PHRASE>
<PHRASE Label="la_invalid_email" Module="Core" Type="1">SW52YWxpZCBFLU1haWw=</PHRASE>
<PHRASE Label="la_invalid_integer" Module="Core" Type="1">SW5jb3JyZWN0IGRhdGEgZm9ybWF0LCBwbGVhc2UgdXNlIGludGVnZXI=</PHRASE>
<PHRASE Label="la_invalid_license" Module="Core" Type="1">TWlzc2luZyBvciBpbnZhbGlkIEluLVBvcnRhbCBMaWNlbnNl</PHRASE>
<PHRASE Label="la_Invalid_Password" Module="Core" Type="1">SW5jb3JyZWN0IFVzZXJuYW1lIG9yIFBhc3N3b3Jk</PHRASE>
<PHRASE Label="la_invalid_state" Module="Core" Type="1">SW52YWxpZCBzdGF0ZQ==</PHRASE>
<PHRASE Label="la_ItemTab_Categories" Module="Core" Type="1">U2VjdGlvbnM=</PHRASE>
<PHRASE Label="la_LessThen1Second" Module="Core" Type="1">PCAxIHNlYy4=</PHRASE>
<PHRASE Label="la_link_editorspick_prompt" Module="Core" Type="1">RGlzcGxheSBlZGl0b3IgUElDS3MgYWJvdmUgcmVndWxhciBsaW5rcw==</PHRASE>
<PHRASE Label="la_link_newdays_prompt" Module="Core" Type="1">TnVtYmVyIG9mIGRheXMgZm9yIGEgbGluayB0byBiZSBORVc=</PHRASE>
<PHRASE Label="la_link_perpage_prompt" Module="Core" Type="1">TnVtYmVyIG9mIGxpbmtzIHBlciBwYWdl</PHRASE>
<PHRASE Label="la_link_perpage_short_prompt" Module="Core" Type="1">TnVtYmVyIG9mIGxpbmtzIHBlciBwYWdlIG9uIGEgc2hvcnQgbGlzdGluZw==</PHRASE>
<PHRASE Label="la_link_sortfield2_prompt" Module="Core" Type="1">QW5kIHRoZW4gYnk=</PHRASE>
<PHRASE Label="la_link_sortfield_prompt" Module="Core" Type="1">T3JkZXIgbGlua3MgYnk=</PHRASE>
<PHRASE Label="la_Linux" Module="Core" Type="1">TGludXg=</PHRASE>
<PHRASE Label="la_Local" Module="Core" Type="1">TG9jYWw=</PHRASE>
<PHRASE Label="la_LocalImage" Module="Core" Type="1">TG9jYWwgSW1hZ2U=</PHRASE>
<PHRASE Label="la_LogBacktraceFunction" Module="Core" Type="1" Hint="U2hvdy9IaWRlIEZ1bmN0aW9uIEFyZ3VtZW50cw==">RnVuY3Rpb24=</PHRASE>
<PHRASE Label="la_Logged_in_as" Module="Core" Type="1">TG9nZ2VkIGluIGFz</PHRASE>
<PHRASE Label="la_login" Module="Core" Type="1">TG9naW4=</PHRASE>
<PHRASE Label="la_Logout" Module="Core" Type="1">TG9nb3V0</PHRASE>
<PHRASE Label="la_m0" Module="Core" Type="1">KEdNVCk=</PHRASE>
<PHRASE Label="la_m1" Module="Core" Type="1">KEdNVCAtMDE6MDAp</PHRASE>
<PHRASE Label="la_m10" Module="Core" Type="1">KEdNVCAtMTA6MDAp</PHRASE>
<PHRASE Label="la_m11" Module="Core" Type="1">KEdNVCAtMTE6MDAp</PHRASE>
<PHRASE Label="la_m12" Module="Core" Type="1">KEdNVCAtMTI6MDAp</PHRASE>
<PHRASE Label="la_m2" Module="Core" Type="1">KEdNVCAtMDI6MDAp</PHRASE>
<PHRASE Label="la_m3" Module="Core" Type="1">KEdNVCAtMDM6MDAp</PHRASE>
<PHRASE Label="la_m4" Module="Core" Type="1">KEdNVCAtMDQ6MDAp</PHRASE>
<PHRASE Label="la_m5" Module="Core" Type="1">KEdNVCAtMDU6MDAp</PHRASE>
<PHRASE Label="la_m6" Module="Core" Type="1">KEdNVCAtMDY6MDAp</PHRASE>
<PHRASE Label="la_m7" Module="Core" Type="1">KEdNVCAtMDc6MDAp</PHRASE>
<PHRASE Label="la_m8" Module="Core" Type="1">KEdNVCAtMDg6MDAp</PHRASE>
<PHRASE Label="la_m9" Module="Core" Type="1">KEdNVCAtMDk6MDAp</PHRASE>
<PHRASE Label="la_Margins" Module="Core" Type="1">TWFyZ2lucw==</PHRASE>
<PHRASE Label="la_MembershipExpirationReminder" Module="Core" Type="1">R3JvdXAgTWVtYmVyc2hpcCBFeHBpcmF0aW9uIFJlbWluZGVyIChkYXlzKQ==</PHRASE>
<PHRASE Label="la_Metric" Module="Core" Type="1">TWV0cmlj</PHRASE>
<PHRASE Label="la_MixedCategoryPath" Module="Core" Type="1">U2VjdGlvbiBwYXRoIGluIG9uZSBmaWVsZA==</PHRASE>
<PHRASE Label="la_module_not_licensed" Module="Core" Type="1">TW9kdWxlIG5vdCBsaWNlbnNlZA==</PHRASE>
<PHRASE Label="la_monday" Module="Core" Type="1">TW9uZGF5</PHRASE>
<PHRASE Label="la_msg_ChangeLogIsCurrentlyDisabledTurnOnSettingToEnableIt" Module="Core" Type="1">Q2hhbmdlIGxvZyBpcyBjdXJyZW50bHkgZGlzYWJsZWQuIFR1cm4gb24gIiVzIiBzZXR0aW5nIHRvIGVuYWJsZSBpdC4=</PHRASE>
<PHRASE Label="la_msg_EnableTrackingDatabaseChangesToChangeLog" Module="Core" Type="1">RW5hYmxlIHRyYWNraW5nIGRhdGFiYXNlIGNoYW5nZXMgdG8gY2hhbmdlIGxvZz8=</PHRASE>
<PHRASE Label="la_msg_LastOperationHasBeenSuccessfullyCompleted" Module="Core" Type="1">TGFzdCBvcGVyYXRpb24gaGFzIGJlZW4gc3VjY2Vzc2Z1bGx5IGNvbXBsZXRlZCE=</PHRASE>
<PHRASE Label="la_Msg_PropagateCategoryStatus" Module="Core" Type="1">QXBwbHkgdG8gYWxsIFN1Yi1zZWN0aW9ucz8=</PHRASE>
<PHRASE Label="la_msg_RootPasswordWasReset" Module="Core" Type="1">WW91ciAicm9vdCIgcGFzc3dvcmQgaGFzIGJlZW4gcmVzZXQuIFBsZWFzZSByZW1vdmUgREJHX1JFU0VUX1JPT1QgY29uc3RhbnQgYW5kIGNoZWNrIHlvdXIgZS1tYWlsIGFkZHJlc3Mu</PHRASE>
<PHRASE Label="la_msg_YourChangesWereSuccessfullySaved" Module="Core" Type="1">WW91ciBjaGFuZ2VzIHdlcmUgc3VjY2Vzc2Z1bGx5IHNhdmVkIQ==</PHRASE>
<PHRASE Label="la_Never" Module="Core" Type="1">TmV2ZXI=</PHRASE>
<PHRASE Label="la_NeverExpires" Module="Core" Type="1">TmV2ZXIgRXhwaXJlcw==</PHRASE>
<PHRASE Label="la_New" Module="Core" Type="1">TmV3</PHRASE>
<PHRASE Label="la_nextcategory" Module="Core" Type="1">TmV4dCBzZWN0aW9u</PHRASE>
<PHRASE Label="la_No" Module="Core" Type="1">Tm8=</PHRASE>
<PHRASE Label="la_none" Module="Core" Type="1">Tm9uZQ==</PHRASE>
<PHRASE Label="la_no_permissions" Module="Core" Type="1">Tm8gUGVybWlzc2lvbnM=</PHRASE>
<PHRASE Label="la_NumberSuffixNd" Module="Core" Type="1">bmQ=</PHRASE>
<PHRASE Label="la_NumberSuffixRd" Module="Core" Type="1">cmQ=</PHRASE>
<PHRASE Label="la_NumberSuffixSt" Module="Core" Type="1">c3Q=</PHRASE>
<PHRASE Label="la_NumberSuffixTh" Module="Core" Type="1">dGg=</PHRASE>
<PHRASE Label="la_Off" Module="Core" Type="1">T2Zm</PHRASE>
<PHRASE Label="la_On" Module="Core" Type="1">T24=</PHRASE>
<PHRASE Label="la_OneWay" Module="Core" Type="1">T25lIFdheQ==</PHRASE>
<PHRASE Label="la_OnLine" Module="Core" Type="1">b24gbGluZQ==</PHRASE>
<PHRASE Label="la_opt_ActionCreate" Module="Core" Type="1">Y3JlYXRlZA==</PHRASE>
<PHRASE Label="la_opt_ActionDelete" Module="Core" Type="1">ZGVsZXRlZA==</PHRASE>
<PHRASE Label="la_opt_ActionUpdate" Module="Core" Type="1">dXBkYXRlZA==</PHRASE>
<PHRASE Label="la_opt_Active" Module="Core" Type="1">QWN0aXZl</PHRASE>
<PHRASE Label="la_opt_Address" Module="Core" Type="1">QWRkcmVzcw==</PHRASE>
<PHRASE Label="la_opt_After" Module="Core" Type="1">QWZ0ZXI=</PHRASE>
<PHRASE Label="la_opt_Allow" Module="Core" Type="1">QWxsb3c=</PHRASE>
<PHRASE Label="la_opt_AnimationCustom" Module="Core" Type="1">Q3VzdG9t</PHRASE>
<PHRASE Label="la_opt_AnimationFade" Module="Core" Type="1">RmFkZQ==</PHRASE>
<PHRASE Label="la_opt_AnimationSlide" Module="Core" Type="1">U2xpZGU=</PHRASE>
<PHRASE Label="la_opt_April" Module="Core" Type="1">QXByaWw=</PHRASE>
<PHRASE Label="la_opt_August" Module="Core" Type="1">QXVndXN0</PHRASE>
<PHRASE Label="la_opt_AutoDetect" Module="Core" Type="1">QXV0by1EZXRlY3Q=</PHRASE>
<PHRASE Label="la_opt_Automatic" Module="Core" Type="1">QXV0b21hdGlj</PHRASE>
<PHRASE Label="la_opt_Before" Module="Core" Type="1">QmVmb3Jl</PHRASE>
<PHRASE Label="la_opt_Bounce" Module="Core" Type="1">Qm91bmNlZA==</PHRASE>
<PHRASE Label="la_opt_Cancelled" Module="Core" Type="1">Q2FuY2VsZWQ=</PHRASE>
<PHRASE Label="la_opt_City" Module="Core" Type="1">Q2l0eQ==</PHRASE>
<PHRASE Label="la_opt_Colon" Module="Core" Type="1">Q29sb24=</PHRASE>
<PHRASE Label="la_opt_Comma" Module="Core" Type="1">Q29tbWE=</PHRASE>
<PHRASE Label="la_opt_CommentText" Module="Core" Type="1">Q29tbWVudCBUZXh0</PHRASE>
<PHRASE Label="la_opt_Cookies" Module="Core" Type="1">Q29va2llcw==</PHRASE>
<PHRASE Label="la_opt_Countries" Module="Core" Type="1">Q291bnRyaWVz</PHRASE>
<PHRASE Label="la_opt_Country" Module="Core" Type="1">Q291bnRyeQ==</PHRASE>
<PHRASE Label="la_opt_CreatedOn" Module="Core" Type="1">Q3JlYXRlZCBPbg==</PHRASE>
<PHRASE Label="la_opt_CronCommonSettings" Module="Core" Type="1">LS0gQ29tbW9uIFNldHRpbmdzIC0t</PHRASE>
<PHRASE Label="la_opt_CronDays" Module="Core" Type="1">LS0gRGF5cyAtLQ==</PHRASE>
<PHRASE Label="la_opt_CronEveryDay" Module="Core" Type="1">RXZlcnkgZGF5</PHRASE>
<PHRASE Label="la_opt_CronEveryFifteenMinutes" Module="Core" Type="1">RXZlcnkgMTUgbWludXRlcw==</PHRASE>
<PHRASE Label="la_opt_CronEveryFiveMinutes" Module="Core" Type="1">RXZlcnkgNSBtaW51dGVz</PHRASE>
<PHRASE Label="la_opt_CronEveryFourHours" Module="Core" Type="1">RXZlcnkgNCBob3Vycw==</PHRASE>
<PHRASE Label="la_opt_CronEveryHour" Module="Core" Type="1">RXZlcnkgaG91cg==</PHRASE>
<PHRASE Label="la_opt_CronEveryMinute" Module="Core" Type="1">RXZlcnkgbWludXRl</PHRASE>
<PHRASE Label="la_opt_CronEveryMonth" Module="Core" Type="1">RXZlcnkgbW9udGg=</PHRASE>
<PHRASE Label="la_opt_CronEveryOtherDay" Module="Core" Type="1">RXZlcnkgb3RoZXIgZGF5</PHRASE>
<PHRASE Label="la_opt_CronEveryOtherHour" Module="Core" Type="1">RXZlcnkgb3RoZXIgaG91cg==</PHRASE>
<PHRASE Label="la_opt_CronEveryOtherMinute" Module="Core" Type="1">RXZlcnkgb3RoZXIgbWludXRl</PHRASE>
<PHRASE Label="la_opt_CronEveryOtherMonth" Module="Core" Type="1">RXZlcnkgb3RoZXIgbW9udGg=</PHRASE>
<PHRASE Label="la_opt_CronEverySixHours" Module="Core" Type="1">RXZlcnkgNiBob3Vycw==</PHRASE>
<PHRASE Label="la_opt_CronEverySixMonths" Module="Core" Type="1">RXZlcnkgNiBtb250aHM=</PHRASE>
<PHRASE Label="la_opt_CronEveryTenMinutes" Module="Core" Type="1">RXZlcnkgMTAgbWludXRlcw==</PHRASE>
<PHRASE Label="la_opt_CronEveryThirtyMinutes" Module="Core" Type="1">RXZlcnkgMzAgbWludXRlcw==</PHRASE>
<PHRASE Label="la_opt_CronEveryThreeHours" Module="Core" Type="1">RXZlcnkgMyBob3Vycw==</PHRASE>
<PHRASE Label="la_opt_CronEveryThreeMonths" Module="Core" Type="1">RXZlcnkgMyBtb250aHM=</PHRASE>
<PHRASE Label="la_opt_CronEveryTwelveHours" Module="Core" Type="1">RXZlcnkgMTIgaG91cnM=</PHRASE>
<PHRASE Label="la_opt_CronEveryWeekday" Module="Core" Type="1">RXZlcnkgd2Vla2RheQ==</PHRASE>
<PHRASE Label="la_opt_CronHours" Module="Core" Type="1">LS0gSG91cnMgLS0=</PHRASE>
<PHRASE Label="la_opt_CronMinutes" Module="Core" Type="1">LS0gTWludXRlcyAtLQ==</PHRASE>
<PHRASE Label="la_opt_CronMondayThroughFriday" Module="Core" Type="1">TW9uIHRocnUgRnJp</PHRASE>
<PHRASE Label="la_opt_CronMondayWednesdayAndFriday" Module="Core" Type="1">TW9uLCBXZWQsIEZyaQ==</PHRASE>
<PHRASE Label="la_opt_CronMonths" Module="Core" Type="1">LS0gTW9udGhzIC0t</PHRASE>
<PHRASE Label="la_opt_CronOnceADay" Module="Core" Type="1">T25jZSBhIGRheQ==</PHRASE>
<PHRASE Label="la_opt_CronOnceAMonth" Module="Core" Type="1">T25jZSBhIG1vbnRo</PHRASE>
<PHRASE Label="la_opt_CronOnceAnHour" Module="Core" Type="1">T25jZSBhbiBob3Vy</PHRASE>
<PHRASE Label="la_opt_CronOnceAWeek" Module="Core" Type="1">T25jZSBhIHdlZWs=</PHRASE>
<PHRASE Label="la_opt_CronOnceAYear" Module="Core" Type="1">T25jZSBhIHllYXI=</PHRASE>
<PHRASE Label="la_opt_CronSaturdayAndSunday" Module="Core" Type="1">U2F0IGFuZCBTdW4=</PHRASE>
<PHRASE Label="la_opt_CronTuesdayAndThursday" Module="Core" Type="1">VHVlcywgVGh1cnM=</PHRASE>
<PHRASE Label="la_opt_CronTwiceADay" Module="Core" Type="1">VHdpY2UgYSBkYXk=</PHRASE>
<PHRASE Label="la_opt_CronTwiceAMonth" Module="Core" Type="1">MXN0IGFuZCAxNXRo</PHRASE>
<PHRASE Label="la_opt_CronTwiceAnHour" Module="Core" Type="1">VHdpY2UgYW4gaG91cg==</PHRASE>
<PHRASE Label="la_opt_CronWeekdays" Module="Core" Type="1">LS0gV2Vla2RheXMgLS0=</PHRASE>
<PHRASE Label="la_opt_CurrentDomain" Module="Core" Type="1">Q3VycmVudCBEb21haW4=</PHRASE>
<PHRASE Label="la_opt_CustomRecipients" Module="Core" Type="1">Q3VzdG9tICJUbyIgUmVjaXBpZW50KC1zKQ==</PHRASE>
<PHRASE Label="la_opt_CustomSender" Module="Core" Type="1">Q3VzdG9tIFNlbmRlcg==</PHRASE>
<PHRASE Label="la_opt_day" Module="Core" Type="1">ZGF5KHMp</PHRASE>
<PHRASE Label="la_opt_December" Module="Core" Type="1">RGVjZW1iZXI=</PHRASE>
<PHRASE Label="la_opt_Declined" Module="Core" Type="1">RGVjbGluZWQ=</PHRASE>
<PHRASE Label="la_opt_DefaultAddress" Module="Core" Type="1">RGVmYXVsdCBXZWJzaXRlIGFkZHJlc3M=</PHRASE>
<PHRASE Label="la_opt_Deny" Module="Core" Type="1">RGVueQ==</PHRASE>
<PHRASE Label="la_opt_Description" Module="Core" Type="1">RGVzY3JpcHRpb24=</PHRASE>
<PHRASE Label="la_opt_Disabled" Module="Core" Type="1">RGlzYWJsZWQ=</PHRASE>
<PHRASE Label="la_opt_DoesntMatch" Module="Core" Type="1">RG9lc24ndCBtYXRjaA==</PHRASE>
<PHRASE Label="la_opt_EditorsPick" Module="Core" Type="1">RWRpdG9yJ3MgUGljaw==</PHRASE>
<PHRASE Label="la_opt_Email" Module="Core" Type="1">RS1tYWls</PHRASE>
<PHRASE Label="la_opt_EmailBody" Module="Core" Type="1">RS1tYWlsIEJvZHk=</PHRASE>
<PHRASE Label="la_opt_EmailDeliveryImmediate" Module="Core" Type="1">SW1tZWRpYXRl</PHRASE>
<PHRASE Label="la_opt_EmailDeliveryQueue" Module="Core" Type="1">RW1haWwgUXVldWU=</PHRASE>
<PHRASE Label="la_opt_EmailLogKeepForever" Module="Core" Type="1">Rm9yZXZlciAobmV2ZXIgZGVsZXRlZCBhdXRvbWF0aWNhbGx5KQ==</PHRASE>
<PHRASE Label="la_opt_EmailSubject" Module="Core" Type="1">RS1tYWlsIFN1YmplY3Q=</PHRASE>
<PHRASE Label="la_opt_EmailTemplates" Module="Core" Type="1">RS1tYWlsIFRlbXBsYXRlcw==</PHRASE>
<PHRASE Label="la_opt_Everyone" Module="Core" Type="1">RXZlcnlvbmU=</PHRASE>
<PHRASE Label="la_opt_Exact" Module="Core" Type="1">RXhhY3Q=</PHRASE>
<PHRASE Label="la_opt_Expired" Module="Core" Type="1">RXhwaXJlZA==</PHRASE>
<PHRASE Label="la_opt_External" Module="Core" Type="1">RXh0ZXJuYWw=</PHRASE>
<PHRASE Label="la_opt_ExternalUrl" Module="Core" Type="1">RXh0ZXJuYWwgVXJs</PHRASE>
<PHRASE Label="la_opt_Failed" Module="Core" Type="1">RmFpbGVk</PHRASE>
<PHRASE Label="la_opt_February" Module="Core" Type="1">RmVicnVhcnk=</PHRASE>
<PHRASE Label="la_opt_FirstName" Module="Core" Type="1">Rmlyc3QgTmFtZQ==</PHRASE>
<PHRASE Label="la_opt_Friday" Module="Core" Type="1">RnJpZGF5</PHRASE>
<PHRASE Label="la_opt_Group" Module="Core" Type="1">R3JvdXA=</PHRASE>
<PHRASE Label="la_opt_GuestsOnly" Module="Core" Type="1">R3Vlc3RzIE9ubHk=</PHRASE>
<PHRASE Label="la_opt_hour" Module="Core" Type="1">aG91cihzKQ==</PHRASE>
<PHRASE Label="la_opt_InheritFromParent" Module="Core" Type="1">SW5oZXJpdCBmcm9tIFBhcmVudA==</PHRASE>
<PHRASE Label="la_opt_Internal" Module="Core" Type="1">SW50ZXJuYWw=</PHRASE>
<PHRASE Label="la_opt_Invalid" Module="Core" Type="1">SW52YWxpZA==</PHRASE>
<PHRASE Label="la_opt_IP_Address" Module="Core" Type="1">SVAgQWRkcmVzcw==</PHRASE>
<PHRASE Label="la_opt_IsUnique" Module="Core" Type="1">SXMgdW5pcXVl</PHRASE>
<PHRASE Label="la_opt_January" Module="Core" Type="1">SmFudWFyeQ==</PHRASE>
<PHRASE Label="la_opt_July" Module="Core" Type="1">SnVseQ==</PHRASE>
<PHRASE Label="la_opt_June" Module="Core" Type="1">SnVuZQ==</PHRASE>
<PHRASE Label="la_opt_LastName" Module="Core" Type="1">TGFzdCBOYW1l</PHRASE>
<PHRASE Label="la_opt_LoggedOut" Module="Core" Type="1">TG9nZ2VkIE91dA==</PHRASE>
<PHRASE Label="la_opt_LogNotificationDisabled" Module="Core" Type="1">RGlzYWJsZWQ=</PHRASE>
<PHRASE Label="la_opt_LogNotificationPending" Module="Core" Type="1">UGVuZGluZw==</PHRASE>
<PHRASE Label="la_opt_LogNotificationSent" Module="Core" Type="1">U2VudA==</PHRASE>
<PHRASE Label="la_opt_LogTypeDatabase" Module="Core" Type="1">RGF0YWJhc2U=</PHRASE>
<PHRASE Label="la_opt_LogTypeOther" Module="Core" Type="1">T3RoZXI=</PHRASE>
<PHRASE Label="la_opt_LogTypePhp" Module="Core" Type="1">UEhQ</PHRASE>
<PHRASE Label="la_opt_Manual" Module="Core" Type="1">TWFudWFs</PHRASE>
<PHRASE Label="la_opt_March" Module="Core" Type="1">TWFyY2g=</PHRASE>
<PHRASE Label="la_opt_May" Module="Core" Type="1">TWF5</PHRASE>
<PHRASE Label="la_opt_min" Module="Core" Type="1">bWludXRlKHMp</PHRASE>
<PHRASE Label="la_opt_ModalWindow" Module="Core" Type="1">TW9kYWwgV2luZG93</PHRASE>
<PHRASE Label="la_opt_Monday" Module="Core" Type="1">TW9uZGF5</PHRASE>
<PHRASE Label="la_opt_month" Module="Core" Type="1">bW9udGgocyk=</PHRASE>
<PHRASE Label="la_opt_NewEmail" Module="Core" Type="1">TmV3IEUtbWFpbA==</PHRASE>
<PHRASE Label="la_opt_NotEmpty" Module="Core" Type="1">Tm90IGVtcHR5</PHRASE>
<PHRASE Label="la_opt_NotLike" Module="Core" Type="1">Tm90IGxpa2U=</PHRASE>
<PHRASE Label="la_opt_NotProcessed" Module="Core" Type="1">Tm90IFByb2Nlc3NlZA==</PHRASE>
<PHRASE Label="la_opt_NotReplied" Module="Core" Type="1">Tm90IFJlcGxpZWQ=</PHRASE>
<PHRASE Label="la_opt_November" Module="Core" Type="1">Tm92ZW1iZXI=</PHRASE>
<PHRASE Label="la_opt_October" Module="Core" Type="1">T2N0b2Jlcg==</PHRASE>
<PHRASE Label="la_opt_OneDay" Module="Core" Type="1">MSBkYXk=</PHRASE>
<PHRASE Label="la_opt_OneMonth" Module="Core" Type="1">MSBtb250aA==</PHRASE>
<PHRASE Label="la_opt_OneWeek" Module="Core" Type="1">MSB3ZWVr</PHRASE>
<PHRASE Label="la_opt_OneYear" Module="Core" Type="1">MSB5ZWFy</PHRASE>
<PHRASE Label="la_opt_PartiallyProcessed" Module="Core" Type="1">UGFydGlhbGx5IFByb2Nlc3NlZA==</PHRASE>
<PHRASE Label="la_opt_Pending" Module="Core" Type="1">UGVuZGluZw==</PHRASE>
<PHRASE Label="la_opt_Phone" Module="Core" Type="1">UGhvbmU=</PHRASE>
<PHRASE Label="la_opt_Phrases" Module="Core" Type="1">TGFiZWxz</PHRASE>
<PHRASE Label="la_opt_PopupWindow" Module="Core" Type="1">UG9wdXAgV2luZG93</PHRASE>
<PHRASE Label="la_opt_Processed" Module="Core" Type="1">UHJvY2Vzc2Vk</PHRASE>
<PHRASE Label="la_opt_Published" Module="Core" Type="1">UHVibGlzaGVk</PHRASE>
<PHRASE Label="la_opt_QueryString" Module="Core" Type="1">UXVlcnkgU3RyaW5nIChTSUQp</PHRASE>
<PHRASE Label="la_opt_Rating" Module="Core" Type="1">UmF0aW5n</PHRASE>
<PHRASE Label="la_opt_RecipientEmail" Module="Core" Type="1">UmVjaXBpZW50IEUtbWFpbA==</PHRASE>
<PHRASE Label="la_opt_RecipientName" Module="Core" Type="1">UmVjaXBpZW50IE5hbWU=</PHRASE>
<PHRASE Label="la_opt_Replied" Module="Core" Type="1">UmVwbGllZA==</PHRASE>
<PHRASE Label="la_opt_Running" Module="Core" Type="1">UnVubmluZw==</PHRASE>
<PHRASE Label="la_opt_SameWindow" Module="Core" Type="1">U2FtZSBXaW5kb3c=</PHRASE>
<PHRASE Label="la_opt_Saturday" Module="Core" Type="1">U2F0dXJkYXk=</PHRASE>
<PHRASE Label="la_opt_sec" Module="Core" Type="1">c2Vjb25kKHMp</PHRASE>
<PHRASE Label="la_opt_Semicolon" Module="Core" Type="1">U2VtaS1jb2xvbg==</PHRASE>
<PHRASE Label="la_opt_September" Module="Core" Type="1">U2VwdGVtYmVy</PHRASE>
<PHRASE Label="la_opt_Silent" Module="Core" Type="1">U2lsZW50</PHRASE>
<PHRASE Label="la_opt_Space" Module="Core" Type="1">U3BhY2U=</PHRASE>
<PHRASE Label="la_opt_State" Module="Core" Type="1">U3RhdGU=</PHRASE>
<PHRASE Label="la_opt_Sub-match" Module="Core" Type="1">U3ViLW1hdGNo</PHRASE>
<PHRASE Label="la_opt_Success" Module="Core" Type="1">U3VjY2Vzcw==</PHRASE>
<PHRASE Label="la_opt_Sunday" Module="Core" Type="1">U3VuZGF5</PHRASE>
<PHRASE Label="la_opt_SynchronizeFromOthers" Module="Core" Type="1">RnJvbSBvdGhlcnM=</PHRASE>
<PHRASE Label="la_opt_SynchronizeToOthers" Module="Core" Type="1">VG8gb3RoZXJz</PHRASE>
<PHRASE Label="la_opt_System" Module="Core" Type="1">U3lzdGVt</PHRASE>
<PHRASE Label="la_opt_SystemLogKeepForever" Module="Core" Type="1">Rm9yZXZlciAobmV2ZXIgZGVsZXRlZCBhdXRvbWF0aWNhbGx5KQ==</PHRASE>
<PHRASE Label="la_opt_Tab" Module="Core" Type="1">VGFi</PHRASE>
<PHRASE Label="la_opt_Template" Module="Core" Type="1">VGVtcGxhdGU=</PHRASE>
<PHRASE Label="la_opt_ThreeMonths" Module="Core" Type="1">MyBtb250aHM=</PHRASE>
<PHRASE Label="la_opt_Thursday" Module="Core" Type="1">VGh1cnNkYXk=</PHRASE>
<PHRASE Label="la_opt_Title" Module="Core" Type="1">VGl0bGU=</PHRASE>
<PHRASE Label="la_opt_Tuesday" Module="Core" Type="1">VHVlc2RheQ==</PHRASE>
<PHRASE Label="la_opt_TwoWeeks" Module="Core" Type="1">MiB3ZWVrcw==</PHRASE>
<PHRASE Label="la_opt_User" Module="Core" Type="1">VXNlcg==</PHRASE>
<PHRASE Label="la_opt_UserEmailActivation" Module="Core" Type="1">RW1haWwgQWN0aXZhdGlvbg==</PHRASE>
<PHRASE Label="la_opt_UserInstantRegistration" Module="Core" Type="1">SW1tZWRpYXRlIA==</PHRASE>
<PHRASE Label="la_opt_Username" Module="Core" Type="1">VXNlcm5hbWU=</PHRASE>
<PHRASE Label="la_opt_UserNotAllowedRegistration" Module="Core" Type="1">Tm90IEFsbG93ZWQ=</PHRASE>
<PHRASE Label="la_opt_UserUponApprovalRegistration" Module="Core" Type="1">VXBvbiBBcHByb3ZhbA==</PHRASE>
<PHRASE Label="la_opt_Virtual" Module="Core" Type="1">VmlydHVhbA==</PHRASE>
<PHRASE Label="la_opt_Wednesday" Module="Core" Type="1">V2VkbmVzZGF5</PHRASE>
<PHRASE Label="la_opt_week" Module="Core" Type="1">d2VlayhzKQ==</PHRASE>
<PHRASE Label="la_opt_year" Module="Core" Type="1">eWVhcihzKQ==</PHRASE>
<PHRASE Label="la_opt_Zip" Module="Core" Type="1">Wmlw</PHRASE>
<PHRASE Label="la_OtherFields" Module="Core" Type="1">T3RoZXIgRmllbGRz</PHRASE>
<PHRASE Label="la_OutOf" Module="Core" Type="1">b3V0IG9m</PHRASE>
<PHRASE Label="la_p1" Module="Core" Type="1">KEdNVCArMDE6MDAp</PHRASE>
<PHRASE Label="la_p10" Module="Core" Type="1">KEdNVCArMTA6MDAp</PHRASE>
<PHRASE Label="la_p11" Module="Core" Type="1">KEdNVCArMTE6MDAp</PHRASE>
<PHRASE Label="la_p12" Module="Core" Type="1">KEdNVCArMTI6MDAp</PHRASE>
<PHRASE Label="la_p13" Module="Core" Type="1">KEdNVCArMTM6MDAp</PHRASE>
<PHRASE Label="la_p2" Module="Core" Type="1">KEdNVCArMDI6MDAp</PHRASE>
<PHRASE Label="la_p3" Module="Core" Type="1">KEdNVCArMDM6MDAp</PHRASE>
<PHRASE Label="la_p4" Module="Core" Type="1">KEdNVCArMDQ6MDAp</PHRASE>
<PHRASE Label="la_p5" Module="Core" Type="1">KEdNVCArMDU6MDAp</PHRASE>
<PHRASE Label="la_p6" Module="Core" Type="1">KEdNVCArMDY6MDAp</PHRASE>
<PHRASE Label="la_p7" Module="Core" Type="1">KEdNVCArMDc6MDAp</PHRASE>
<PHRASE Label="la_p8" Module="Core" Type="1">KEdNVCArMDg6MDAp</PHRASE>
<PHRASE Label="la_p9" Module="Core" Type="1">KEdNVCArMDk6MDAp</PHRASE>
<PHRASE Label="la_Paddings" Module="Core" Type="1">UGFkZGluZ3M=</PHRASE>
<PHRASE Label="la_Page" Module="Core" Type="1">UGFnZQ==</PHRASE>
<PHRASE Label="la_PageCurrentlyEditing1" Module="Core" Type="1">QXR0ZW50aW9uOiAlcyBpcyBjdXJyZW50bHkgZWRpdGluZyB0aGlzIHNlY3Rpb24h</PHRASE>
<PHRASE Label="la_PageCurrentlyEditing2" Module="Core" Type="1">QXR0ZW50aW9uOiAlcyBhcmUgY3VycmVudGx5IGVkaXRpbmcgdGhpcyBzZWN0aW9uISA=</PHRASE>
<PHRASE Label="la_PageCurrentlyEditing5" Module="Core" Type="1">QXR0ZW50aW9uOiAlcyBhcmUgY3VycmVudGx5IGVkaXRpbmcgdGhpcyBzZWN0aW9uIQ==</PHRASE>
<PHRASE Label="la_passwords_do_not_match" Module="Core" Type="1">UGFzc3dvcmRzIGRvIG5vdCBtYXRjaA==</PHRASE>
<PHRASE Label="la_passwords_too_short" Module="Core" Type="1">UGFzc3dvcmQgaXMgdG9vIHNob3J0LCBwbGVhc2UgZW50ZXIgYXQgbGVhc3QgJXMgY2hhcmFjdGVycw==</PHRASE>
<PHRASE Label="la_Pending" Module="Core" Type="1">UGVuZGluZw==</PHRASE>
<PHRASE Label="la_performing_backup" Module="Core" Type="1">UGVyZm9ybWluZyBCYWNrdXA=</PHRASE>
<PHRASE Label="la_performing_import" Module="Core" Type="1">UGVyZm9ybWluZyBJbXBvcnQ=</PHRASE>
<PHRASE Label="la_performing_restore" Module="Core" Type="1">UGVyZm9ybWluZyBSZXN0b3Jl</PHRASE>
<PHRASE Label="la_permission_in-portal:configure_lang.advanced:export" Module="Core" Type="1">RXhwb3J0IExhbmd1YWdlIHBhY2s=</PHRASE>
<PHRASE Label="la_permission_in-portal:configure_lang.advanced:import" Module="Core" Type="1">SW1wb3J0IExhbmd1YWdlIHBhY2s=</PHRASE>
<PHRASE Label="la_permission_in-portal:configure_lang.advanced:set_primary" Module="Core" Type="1">U2V0IFByaW1hcnkgTGFuZ3VhZ2U=</PHRASE>
<PHRASE Label="la_permission_in-portal:mod_status.advanced:approve" Module="Core" Type="1">RW5hYmxlIE1vZHVsZXM=</PHRASE>
<PHRASE Label="la_permission_in-portal:mod_status.advanced:decline" Module="Core" Type="1">RGlzYWJsZSBNb2R1bGVz</PHRASE>
<PHRASE Label="la_permission_in-portal:user_groups.advanced:manage_permissions" Module="Core" Type="1">TWFuYWdlIFBlcm1pc3Npb25z</PHRASE>
<PHRASE Label="la_permission_in-portal:user_groups.advanced:send_email" Module="Core" Type="1">U2VuZCBFLW1haWwgdG8gR3JvdXBzIGluIEFkbWlu</PHRASE>
<PHRASE Label="la_permission_in-portal:user_list.advanced:ban" Module="Core" Type="1">QmFuIFVzZXJz</PHRASE>
<PHRASE Label="la_permission_in-portal:user_list.advanced:send_email" Module="Core" Type="1">U2VuZCBFLW1haWwgdG8gVXNlcnMgaW4gQWRtaW4=</PHRASE>
<PHRASE Label="la_PermName_Admin_desc" Module="Core" Type="1">QWRtaW4gTG9naW4=</PHRASE>
<PHRASE Label="la_PermName_Category.AddPending_desc" Module="Core" Type="1">QWRkIFBlbmRpbmcgQ2F0ZWdvcnk=</PHRASE>
<PHRASE Label="la_PermName_Category.Add_desc" Module="Core" Type="1">QWRkIENhdGVnb3J5</PHRASE>
<PHRASE Label="la_PermName_Category.Delete_desc" Module="Core" Type="1">RGVsZXRlIENhdGVnb3J5</PHRASE>
<PHRASE Label="la_PermName_Category.Modify_desc" Module="Core" Type="1">TW9kaWZ5IENhdGVnb3J5</PHRASE>
<PHRASE Label="la_PermName_Category.Revision.Add.Pending_desc" Module="Core" Type="1">QWxsb3cgQWRkaW5nIFBlbmRpbmcgQ29udGVudCBSZXZpc2lvbnM=</PHRASE>
<PHRASE Label="la_PermName_Category.Revision.Add_desc" Module="Core" Type="1">QWxsb3cgQWRkaW5nIENvbnRlbnQgUmV2aXNpb25z</PHRASE>
<PHRASE Label="la_PermName_Category.Revision.History.Restore_desc" Module="Core" Type="1">QWxsb3cgUmVzdG9yaW5nIENvbnRlbnQgUmV2aXNpb25zIGZyb20gSGlzdG9yeQ==</PHRASE>
<PHRASE Label="la_PermName_Category.Revision.History.View_desc" Module="Core" Type="1">QWxsb3cgVmlld2luZyBIaXN0b3J5IG9mIENvbnRlbnQgUmV2aXNpb25z</PHRASE>
<PHRASE Label="la_PermName_Category.Revision.Moderate_desc" Module="Core" Type="1">QWxsb3cgTW9kZXJhdGluZyAoQXBwcm92ZS9EZWNsaW5lKSBDb250ZW50IFJldmlzaW9ucw==</PHRASE>
<PHRASE Label="la_PermName_Category.View_desc" Module="Core" Type="1">VmlldyBDYXRlZ29yeQ==</PHRASE>
<PHRASE Label="la_PermName_Debug.Info_desc" Module="Core" Type="1">QXBwZW5kIHBocGluZm8gdG8gYWxsIHBhZ2VzIChEZWJ1Zyk=</PHRASE>
<PHRASE Label="la_PermName_Debug.Item_desc" Module="Core" Type="1">RGlzcGxheSBJdGVtIFF1ZXJpZXMgKERlYnVnKQ==</PHRASE>
<PHRASE Label="la_PermName_Debug.List_desc" Module="Core" Type="1">RGlzcGxheSBJdGVtIExpc3QgUXVlcmllcyAoRGVidWcp</PHRASE>
<PHRASE Label="la_PermName_favorites_desc" Module="Core" Type="1">QWxsb3cgZmF2b3JpdGVz</PHRASE>
<PHRASE Label="la_PermName_Login_desc" Module="Core" Type="1">QWxsb3cgTG9naW4=</PHRASE>
<PHRASE Label="la_PermName_Profile.Modify_desc" Module="Core" Type="1">Q2hhbmdlIFVzZXIgUHJvZmlsZXM=</PHRASE>
<PHRASE Label="la_PermName_ShowLang_desc" Module="Core" Type="1">U2hvdyBMYW5ndWFnZSBUYWdz</PHRASE>
<PHRASE Label="la_PermName_SystemAccess.ReadOnly_desc" Module="Core" Type="1">UmVhZC1Pbmx5IEFjY2VzcyBUbyBEYXRhYmFzZQ==</PHRASE>
<PHRASE Label="la_PhraseNotTranslated" Module="Core" Type="1">Tm90IFRyYW5zbGF0ZWQ=</PHRASE>
<PHRASE Label="la_PhraseTranslated" Module="Core" Type="1">VHJhbnNsYXRlZA==</PHRASE>
<PHRASE Label="la_PhraseType_Admin" Module="Core" Type="1">QWRtaW4=</PHRASE>
<PHRASE Label="la_PhraseType_Both" Module="Core" Type="1">Qm90aA==</PHRASE>
<PHRASE Label="la_PhraseType_Front" Module="Core" Type="1">RnJvbnQ=</PHRASE>
<PHRASE Label="la_Pick" Module="Core" Type="1">UGljaw==</PHRASE>
<PHRASE Label="la_PickedColumns" Module="Core" Type="1">U2VsZWN0ZWQgQ29sdW1ucw==</PHRASE>
<PHRASE Label="la_Pop" Module="Core" Type="1">UG9wdWxhcg==</PHRASE>
<PHRASE Label="la_PositionAndVisibility" Module="Core" Type="1">UG9zaXRpb24gQW5kIFZpc2liaWxpdHk=</PHRASE>
<PHRASE Label="la_prevcategory" Module="Core" Type="1">UHJldmlvdXMgc2VjdGlvbg==</PHRASE>
<PHRASE Label="la_PrimaryCategory" Module="Core" Type="1">UHJpbWFyeQ==</PHRASE>
<PHRASE Label="la_prompt_ActiveCategories" Module="Core" Type="1">QWN0aXZlIFNlY3Rpb25z</PHRASE>
<PHRASE Label="la_prompt_ActiveUsers" Module="Core" Type="1">QWN0aXZlIFVzZXJz</PHRASE>
<PHRASE Label="la_prompt_AddressTo" Module="Core" Type="1">U2VudCBUbw==</PHRASE>
<PHRASE Label="la_prompt_AdminMailFrom" Module="Core" Type="1">TWVzc2FnZXMgZnJvbSBTaXRlIEFkbWluIGFyZSBmcm9t</PHRASE>
<PHRASE Label="la_prompt_AdvancedSearch" Module="Core" Type="1">QWR2YW5jZWQgU2VhcmNo</PHRASE>
<PHRASE Label="la_prompt_AdvancedUserManagement" Module="Core" Type="1">QWR2YW5jZWQgVXNlciBNYW5hZ2VtZW50</PHRASE>
<PHRASE Label="la_prompt_allow_reset" Module="Core" Type="1">QWxsb3cgcGFzc3dvcmQgcmVzZXQgYWZ0ZXI=</PHRASE>
<PHRASE Label="la_prompt_AutoGen_Excerpt" Module="Core" Type="1">R2VuZXJhdGUgZnJvbSB0aGUgYXJ0aWNsZSBib2R5</PHRASE>
<PHRASE Label="la_Prompt_Backup_Date" Module="Core" Type="1">RGF0ZSBvZiBCYWNrdXA6</PHRASE>
<PHRASE Label="la_prompt_Backup_Path" Module="Core" Type="1">QmFja3VwIFBhdGg=</PHRASE>
<PHRASE Label="la_Prompt_Backup_Status" Module="Core" Type="1">QmFja3VwIHN0YXR1cw==</PHRASE>
<PHRASE Label="la_prompt_BannedUsers" Module="Core" Type="1">QmFubmVkIFVzZXJz</PHRASE>
<PHRASE Label="la_prompt_birthday" Module="Core" Type="1">RGF0ZSBvZiBCaXJ0aA==</PHRASE>
<PHRASE Label="la_prompt_CategoryEditorsPick" Module="Core" Type="1">RWRpdG9yJ3MgUGljayBTZWN0aW9ucw==</PHRASE>
<PHRASE Label="la_prompt_CurrentSessions" Module="Core" Type="1">Q3VycmVudCBTZXNzaW9ucw==</PHRASE>
<PHRASE Label="la_prompt_DataSize" Module="Core" Type="1">VG90YWwgU2l6ZSBvZiB0aGUgRGF0YWJhc2U=</PHRASE>
<PHRASE Label="la_prompt_Default" Module="Core" Type="1">RGVmYXVsdA==</PHRASE>
<PHRASE Label="la_prompt_DefaultUserId" Module="Core" Type="1">VXNlciBJRCBmb3IgRGVmYXVsdCBQZXJzaXN0ZW50IFNldHRpbmdz</PHRASE>
<PHRASE Label="la_prompt_DefaultValue" Module="Core" Type="1">RGVmYXVsdCBWYWx1ZQ==</PHRASE>
<PHRASE Label="la_prompt_DisabledCategories" Module="Core" Type="1">RGlzYWJsZWQgU2VjdGlvbnM=</PHRASE>
<PHRASE Label="la_prompt_DisplayInGrid" Module="Core" Type="1">RGlzcGxheSBpbiBHcmlk</PHRASE>
<PHRASE Label="la_prompt_DisplayOrder" Module="Core" Type="1">RGlzcGxheSBPcmRlcg==</PHRASE>
<PHRASE Label="la_prompt_DupRating" Module="Core" Type="1">QWxsb3cgRHVwbGljYXRlIFJhdGluZyBWb3Rlcw==</PHRASE>
<PHRASE Label="la_prompt_DupReviews" Module="Core" Type="1">QWxsb3cgRHVwbGljYXRlIFJldmlld3M=</PHRASE>
<PHRASE Label="la_prompt_EditorsPick" Module="Core" Type="1">RWRpdG9yJ3MgUGljaw==</PHRASE>
<PHRASE Label="la_prompt_ElementType" Module="Core" Type="1">VHlwZQ==</PHRASE>
<PHRASE Label="la_prompt_EmailCompleteMessage" Module="Core" Type="1">VGhlIEVtYWlsIE1lc3NhZ2UgaGFzIGJlZW4gc2VudA==</PHRASE>
<PHRASE Label="la_prompt_ExportCompleteMessage" Module="Core" Type="1">RXhwb3J0IENvbXBsZXRlIQ==</PHRASE>
<PHRASE Label="la_prompt_FieldId" Module="Core" Type="1">RmllbGQgSWQ=</PHRASE>
<PHRASE Label="la_prompt_FieldLabel" Module="Core" Type="1">RmllbGQgTGFiZWw=</PHRASE>
<PHRASE Label="la_prompt_FieldName" Module="Core" Type="1">RmllbGQgTmFtZQ==</PHRASE>
<PHRASE Label="la_prompt_FieldPrompt" Module="Core" Type="1">RmllbGQgUHJvbXB0</PHRASE>
<PHRASE Label="la_prompt_Frequency" Module="Core" Type="1">RnJlcXVlbmN5</PHRASE>
<PHRASE Label="la_prompt_heading" Module="Core" Type="1">SGVhZGluZw==</PHRASE>
<PHRASE Label="la_prompt_HitLimits" Module="Core" Type="1">KE1pbmltdW0gNCk=</PHRASE>
<PHRASE Label="la_prompt_Import_Source" Module="Core" Type="1">SW1wb3J0IFNvdXJjZQ==</PHRASE>
<PHRASE Label="la_prompt_InputType" Module="Core" Type="1">SW5wdXQgVHlwZQ==</PHRASE>
<PHRASE Label="la_prompt_KeepSessionOnBrowserClose" Module="Core" Type="1">S2VlcCBTZXNzaW9uIFdoZW4gQnJvc3dlciBJcyBDbG9zZWQ=</PHRASE>
<PHRASE Label="la_prompt_lang_cache_timeout" Module="Core" Type="1">TGFuZ3VhZ2UgQ2FjaGUgVGltZW91dA==</PHRASE>
<PHRASE Label="la_prompt_LastCategoryUpdate" Module="Core" Type="1">TGFzdCBTZWN0aW9uIFVwZGF0ZQ==</PHRASE>
<PHRASE Label="la_prompt_LastLinkUpdate" Module="Core" Type="1">TGFzdCBVcGRhdGVkIExpbms=</PHRASE>
<PHRASE Label="la_prompt_mailauthenticate" Module="Core" Type="1">U2VydmVyIFJlcXVpcmVzIEF1dGhlbnRpY2F0aW9u</PHRASE>
<PHRASE Label="la_prompt_mailport" Module="Core" Type="1">UG9ydCAoZS5nLiBwb3J0IDI1KQ==</PHRASE>
<PHRASE Label="la_prompt_mailserver" Module="Core" Type="1">TWFpbCBTZXJ2ZXIgQWRkcmVzcw==</PHRASE>
<PHRASE Label="la_prompt_max_import_category_levels" Module="Core" Type="1">TWF4aW1hbCBpbXBvcnRlZCBzZWN0aW9uIGxldmVs</PHRASE>
<PHRASE Label="la_prompt_MembershipExpires" Module="Core" Type="1">TWVtYmVyc2hpcCBFeHBpcmVz</PHRASE>
<PHRASE Label="la_prompt_MenuFrameWidth" Module="Core" Type="1">TGVmdCBNZW51IChUcmVlKSBXaWR0aA==</PHRASE>
<PHRASE Label="la_prompt_movedown" Module="Core" Type="1">TW92ZSBkb3du</PHRASE>
<PHRASE Label="la_prompt_moveup" Module="Core" Type="1">TW92ZSB1cA==</PHRASE>
<PHRASE Label="la_prompt_multipleshow" Module="Core" Type="1">U2hvdyBtdWx0aXBsZQ==</PHRASE>
<PHRASE Label="la_prompt_NewCategories" Module="Core" Type="1">TmV3IFNlY3Rpb25z</PHRASE>
<PHRASE Label="la_prompt_NewestCategoryDate" Module="Core" Type="1">TmV3ZXN0IFNlY3Rpb24gRGF0ZQ==</PHRASE>
<PHRASE Label="la_prompt_NewestLinkDate" Module="Core" Type="1">TmV3ZXN0IExpbmsgRGF0ZQ==</PHRASE>
<PHRASE Label="la_prompt_NewestUserDate" Module="Core" Type="1">TmV3ZXN0IFVzZXIgRGF0ZQ==</PHRASE>
<PHRASE Label="la_prompt_NonExpiredSessions" Module="Core" Type="1">Q3VycmVudGx5IEFjdGl2ZSBVc2VyIFNlc3Npb25z</PHRASE>
<PHRASE Label="la_prompt_PendingCategories" Module="Core" Type="1">UGVuZGluZyBTZWN0aW9ucw==</PHRASE>
<PHRASE Label="la_prompt_PendingItems" Module="Core" Type="1">UGVuZGluZyBJdGVtcw==</PHRASE>
<PHRASE Label="la_prompt_perform_now" Module="Core" Type="1">UGVyZm9ybSB0aGlzIG9wZXJhdGlvbiBub3c/</PHRASE>
<PHRASE Label="la_prompt_PerPage" Module="Core" Type="1">UGVyIFBhZ2U=</PHRASE>
<PHRASE Label="la_prompt_PersonalInfo" Module="Core" Type="1">UGVyc29uYWwgSW5mb3JtYXRpb24=</PHRASE>
<PHRASE Label="la_prompt_PrimaryGroup" Module="Core" Type="1">UHJpbWFyeSBHcm91cA==</PHRASE>
<PHRASE Label="la_prompt_Priority" Module="Core" Type="1">UHJpb3JpdHk=</PHRASE>
<PHRASE Label="la_prompt_Rating" Module="Core" Type="1">UmF0aW5n</PHRASE>
<PHRASE Label="la_prompt_RatingLimits" Module="Core" Type="1">KE1pbmltdW0gMCwgTWF4aW11bSA1KQ==</PHRASE>
<PHRASE Label="la_prompt_RecordsCount" Module="Core" Type="1">TnVtYmVyIG9mIERhdGFiYXNlIFJlY29yZHM=</PHRASE>
<PHRASE Label="la_prompt_RegionsCount" Module="Core" Type="1">TnVtYmVyIG9mIFJlZ2lvbiBQYWNrcw==</PHRASE>
<PHRASE Label="la_prompt_relevence_percent" Module="Core" Type="1">U2VhcmNoIFJlbGV2YW5jZSBkZXBlbmRzIG9u</PHRASE>
<PHRASE Label="la_prompt_relevence_settings" Module="Core" Type="1">U2VhcmNoIFJlbGV2ZW5jZSBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_prompt_Required" Module="Core" Type="1">UmVxdWlyZWQ=</PHRASE>
<PHRASE Label="la_prompt_required_field_increase" Module="Core" Type="1">SW5jcmVhc2UgaW1wb3J0YW5jZSBpZiBmaWVsZCBjb250YWlucyBhIHJlcXVpcmVkIGtleXdvcmQgYnk=</PHRASE>
<PHRASE Label="la_Prompt_Restore_Failed" Module="Core" Type="1">UmVzdG9yZSBoYXMgZmFpbGVkIGFuIGVycm9yIG9jY3VyZWQ6</PHRASE>
<PHRASE Label="la_Prompt_Restore_Filechoose" Module="Core" Type="1">Q2hvb3NlIG9uZSBvZiB0aGUgZm9sbG93aW5nIGJhY2t1cCBkYXRlcyB0byByZXN0b3JlIG9yIGRlbGV0ZQ==</PHRASE>
<PHRASE Label="la_Prompt_Restore_Status" Module="Core" Type="1">UmVzdG9yZSBTdGF0dXM=</PHRASE>
<PHRASE Label="la_Prompt_Restore_Success" Module="Core" Type="1">UmVzdG9yZSBoYXMgYmVlbiBjb21wbGV0ZWQgc3VjY2Vzc2Z1bGx5</PHRASE>
<PHRASE Label="la_prompt_RootCategory" Module="Core" Type="1">U2VsZWN0IE1vZHVsZSBSb290IFNlY3Rpb246</PHRASE>
<PHRASE Label="la_prompt_root_pass" Module="Core" Type="1">Um9vdCBQYXNzd29yZA==</PHRASE>
<PHRASE Label="la_prompt_SearchType" Module="Core" Type="1">U2VhcmNoIFR5cGU=</PHRASE>
<PHRASE Label="la_prompt_Select_Source" Module="Core" Type="1">U2VsZWN0IFNvdXJjZSBMYW5ndWFnZQ==</PHRASE>
<PHRASE Label="la_prompt_SentOn" Module="Core" Type="1">U2VudCBPbg==</PHRASE>
<PHRASE Label="la_prompt_session_cookie_name" Module="Core" Type="1">U2Vzc2lvbiBDb29raWUgTmFtZQ==</PHRASE>
<PHRASE Label="la_prompt_session_management" Module="Core" Type="1">U2Vzc2lvbiBNYW5hZ2VtZW50IE1ldGhvZA==</PHRASE>
<PHRASE Label="la_prompt_session_timeout" Module="Core" Type="1">U2Vzc2lvbiBJbmFjdGl2aXR5IFRpbWVvdXQgKHNlY29uZHMp</PHRASE>
<PHRASE Label="la_prompt_showgeneraltab" Module="Core" Type="1">U2hvdyBvbiB0aGUgZ2VuZXJhbCB0YWI=</PHRASE>
<PHRASE Label="la_prompt_SimpleSearch" Module="Core" Type="1">U2ltcGxlIFNlYXJjaA==</PHRASE>
<PHRASE Label="la_prompt_smtpheaders" Module="Core" Type="1">QWRkaXRpb25hbCBNZXNzYWdlIEhlYWRlcnM=</PHRASE>
<PHRASE Label="la_prompt_smtp_pass" Module="Core" Type="1">TWFpbCBTZXJ2ZXIgUGFzc3dvcmQ=</PHRASE>
<PHRASE Label="la_prompt_smtp_user" Module="Core" Type="1">TWFpbCBTZXJ2ZXIgVXNlcm5hbWU=</PHRASE>
<PHRASE Label="la_prompt_socket_blocking_mode" Module="Core" Type="1">VXNlIG5vbi1ibG9ja2luZyBzb2NrZXQgbW9kZQ==</PHRASE>
<PHRASE Label="la_prompt_sqlquery" Module="Core" Type="1">U1FMIFF1ZXJ5Og==</PHRASE>
<PHRASE Label="la_prompt_sqlquery_header" Module="Core" Type="1">UGVyZm9ybSBTUUwgUXVlcnk=</PHRASE>
<PHRASE Label="la_Prompt_Step_One" Module="Core" Type="1">U3RlcCBPbmU=</PHRASE>
<PHRASE Label="la_prompt_SumbissionTime" Module="Core" Type="1">U3VibWl0dGVkIE9u</PHRASE>
<PHRASE Label="la_prompt_syscache_enable" Module="Core" Type="1">RW5hYmxlIFRhZyBDYWNoaW5n</PHRASE>
<PHRASE Label="la_prompt_SystemFileSize" Module="Core" Type="1">VG90YWwgU2l6ZSBvZiBTeXN0ZW0gRmlsZXM=</PHRASE>
<PHRASE Label="la_prompt_TablesCount" Module="Core" Type="1">TnVtYmVyIG9mIERhdGFiYXNlIFRhYmxlcw==</PHRASE>
<PHRASE Label="la_prompt_ThemeCount" Module="Core" Type="1">TnVtYmVyIG9mIFRoZW1lcw==</PHRASE>
<PHRASE Label="la_prompt_TotalCategories" Module="Core" Type="1">VG90YWwgU2VjdGlvbnM=</PHRASE>
<PHRASE Label="la_prompt_TotalUserGroups" Module="Core" Type="1">VG90YWwgVXNlciBHcm91cHM=</PHRASE>
<PHRASE Label="la_prompt_UsersActive" Module="Core" Type="1">QWN0aXZlIFVzZXJz</PHRASE>
<PHRASE Label="la_prompt_UsersDisabled" Module="Core" Type="1">RGlzYWJsZWQgVXNlcnM=</PHRASE>
<PHRASE Label="la_prompt_UsersPending" Module="Core" Type="1">UGVuZGluZyBVc2Vycw==</PHRASE>
<PHRASE Label="la_prompt_UsersUniqueCountries" Module="Core" Type="1">TnVtYmVyIG9mIFVuaXF1ZSBDb3VudHJpZXMgb2YgVXNlcnM=</PHRASE>
<PHRASE Label="la_prompt_UsersUniqueStates" Module="Core" Type="1">TnVtYmVyIG9mIFVuaXF1ZSBTdGF0ZXMgb2YgVXNlcnM=</PHRASE>
<PHRASE Label="la_prompt_validation" Module="Core" Type="1">VmFsaWRhdGlvbg==</PHRASE>
<PHRASE Label="la_prompt_valuelist" Module="Core" Type="1">TGlzdCBvZiBWYWx1ZXM=</PHRASE>
<PHRASE Label="la_prompt_VoteLimits" Module="Core" Type="1">KE1pbmltdW0gMSk=</PHRASE>
<PHRASE Label="la_Prompt_Warning" Module="Core" Type="1">V2FybmluZyE=</PHRASE>
<PHRASE Label="la_prompt_weight" Module="Core" Type="1">V2VpZ2h0</PHRASE>
<PHRASE Label="la_Quotes" Module="Core" Type="1">U2luZ2xlLVF1b3RlcyAoaWUuICcp</PHRASE>
<PHRASE Label="la_Reciprocal" Module="Core" Type="1">UmVjaXByb2NhbA==</PHRASE>
<PHRASE Label="la_Records" Module="Core" Type="1">UmVjb3Jkcw==</PHRASE>
<PHRASE Label="la_record_being_edited_by" Module="Core" Type="1">VGhpcyByZWNvcmQgaXMgYmVpbmcgZWRpdGVkIGJ5IHRoZSBmb2xsb3dpbmcgdXNlcnM6DQolcw==</PHRASE>
<PHRASE Label="la_registration_captcha" Module="Core" Type="1">VXNlIENhcHRjaGEgY29kZSBvbiBSZWdpc3RyYXRpb24=</PHRASE>
<PHRASE Label="la_Regular" Module="Core" Type="1">UmVndWxhcg==</PHRASE>
<PHRASE Label="la_RemoveFrom" Module="Core" Type="1">UmVtb3ZlIEZyb20=</PHRASE>
<PHRASE Label="la_RequiredWarning" Module="Core" Type="1">Tm90IGFsbCByZXF1aXJlZCBmaWVsZHMgYXJlIGZpbGxlZC4gUGxlYXNlIGZpbGwgdGhlbSBmaXJzdC4=</PHRASE>
<PHRASE Label="la_review_perpage_prompt" Module="Core" Type="1">Q29tbWVudHMgcGVyIFBhZ2U=</PHRASE>
<PHRASE Label="la_review_perpage_short_prompt" Module="Core" Type="1">Q29tbWVudHMgcGVyIFBhZ2UgKHNob3J0LWxpc3Qp</PHRASE>
<PHRASE Label="la_RevisionNumber" Module="Core" Type="1">UmV2aXNpb24gIyVz</PHRASE>
<PHRASE Label="la_rootcategory_name" Module="Core" Type="1">SG9tZQ==</PHRASE>
<PHRASE Label="la_SampleText" Module="Core" Type="1">U2FtcGxlIFRleHQ=</PHRASE>
<PHRASE Label="la_SavedAt" Module="Core" Type="1">c2F2ZWQgYXQgJXM=</PHRASE>
<PHRASE Label="la_SaveLogin" Module="Core" Type="1">U2F2ZSBVc2VybmFtZSBvbiBUaGlzIENvbXB1dGVy</PHRASE>
<PHRASE Label="la_Search" Module="Core" Type="1">U2VhcmNo</PHRASE>
<PHRASE Label="la_section_BasicPermissions" Module="Core" Type="1">QmFzaWMgUGVybWlzc2lvbnM=</PHRASE>
<PHRASE Label="la_section_Category" Module="Core" Type="1">U2VjdGlvbg==</PHRASE>
<PHRASE Label="la_section_Configs" Module="Core" Type="1">Q29uZmlnIEZpbGVz</PHRASE>
<PHRASE Label="la_section_Counters" Module="Core" Type="1">Q291bnRlcnM=</PHRASE>
<PHRASE Label="la_section_CustomFields" Module="Core" Type="1">Q3VzdG9tIEZpZWxkcw==</PHRASE>
<PHRASE Label="la_section_Data" Module="Core" Type="1">U3VibWlzc2lvbiBEYXRh</PHRASE>
<PHRASE Label="la_section_EmailDesignTemplates" Module="Core" Type="1">RS1tYWlsIERlc2lnbiBUZW1wbGF0ZXM=</PHRASE>
<PHRASE Label="la_section_File" Module="Core" Type="1">RmlsZQ==</PHRASE>
<PHRASE Label="la_section_FrontEnd" Module="Core" Type="1">RnJvbnQtZW5k</PHRASE>
<PHRASE Label="la_section_FullSizeImage" Module="Core" Type="1">RnVsbCBTaXplIEltYWdl</PHRASE>
<PHRASE Label="la_section_General" Module="Core" Type="1">R2VuZXJhbA==</PHRASE>
<PHRASE Label="la_section_Image" Module="Core" Type="1">SW1hZ2U=</PHRASE>
<PHRASE Label="la_section_ImageSettings" Module="Core" Type="1">SW1hZ2UgU2V0dGluZ3M=</PHRASE>
<PHRASE Label="la_section_ImportCompleted" Module="Core" Type="1">SW1wb3J0IENvbXBsZXRlZA==</PHRASE>
<PHRASE Label="la_section_Items" Module="Core" Type="1">VXNlciBJdGVtcw==</PHRASE>
<PHRASE Label="la_section_MemoryCache" Module="Core" Type="1">TWVtb3J5IENhY2hl</PHRASE>
<PHRASE Label="la_section_Message" Module="Core" Type="1">TWVzc2FnZQ==</PHRASE>
<PHRASE Label="la_section_overview" Module="Core" Type="1">U2VjdGlvbiBPdmVydmlldw==</PHRASE>
<PHRASE Label="la_section_Page" Module="Core" Type="1">U2VjdGlvbiBQcm9wZXJ0aWVz</PHRASE>
<PHRASE Label="la_section_PageCaching" Module="Core" Type="1">U2VjdGlvbiBDYWNoaW5n</PHRASE>
<PHRASE Label="la_section_ProjectDeployment" Module="Core" Type="1">UHJvamVjdCBEZXBsb3ltZW50</PHRASE>
<PHRASE Label="la_section_Properties" Module="Core" Type="1">UHJvcGVydGllcw==</PHRASE>
<PHRASE Label="la_section_QuickLinks" Module="Core" Type="1">UXVpY2sgTGlua3M=</PHRASE>
<PHRASE Label="la_section_RecipientsInfo" Module="Core" Type="1">UmVjaXBpZW50cyBJbmZvcm1hdGlvbg==</PHRASE>
<PHRASE Label="la_section_Relation" Module="Core" Type="1">UmVsYXRpb24=</PHRASE>
<PHRASE Label="la_section_ReplacementTags" Module="Core" Type="1">UmVwbGFjZW1lbnQgVGFncw==</PHRASE>
<PHRASE Label="la_section_SenderInfo" Module="Core" Type="1">U2VuZGVyIEluZm9ybWF0aW9u</PHRASE>
<PHRASE Label="la_section_Settings" Module="Core" Type="1">U2V0dGluZ3M=</PHRASE>
<PHRASE Label="la_section_Settings3rdPartyAPI" Module="Core" Type="1">M3JkIFBhcnR5IEFQSSBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_section_SettingsAdmin" Module="Core" Type="1">QWRtaW4gQ29uc29sZSBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_section_SettingsCSVExport" Module="Core" Type="1">Q1NWIEV4cG9ydCBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_section_SettingsLogs" Module="Core" Type="1">TG9ncyBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_section_SettingsMailling" Module="Core" Type="1">TWFpbGluZyBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_section_SettingsMaintenance" Module="Core" Type="1">TWFpbnRlbmFuY2UgU2V0dGluZ3M=</PHRASE>
<PHRASE Label="la_section_SettingsSession" Module="Core" Type="1">U2Vzc2lvbiBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_section_SettingsSSL" Module="Core" Type="1">U1NMIFNldHRpbmdz</PHRASE>
<PHRASE Label="la_section_SettingsSystem" Module="Core" Type="1">U3lzdGVtIFNldHRpbmdz</PHRASE>
<PHRASE Label="la_section_SettingsWebsite" Module="Core" Type="1">V2Vic2l0ZSBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_section_SubmissionNotes" Module="Core" Type="1">U3VibWlzc2lvbiBOb3Rlcw==</PHRASE>
<PHRASE Label="la_section_Templates" Module="Core" Type="1">VGVtcGxhdGVz</PHRASE>
<PHRASE Label="la_section_ThumbnailImage" Module="Core" Type="1">VGh1bWJuYWlsIEltYWdl</PHRASE>
<PHRASE Label="la_section_Translation" Module="Core" Type="1">VHJhbnNsYXRpb24=</PHRASE>
<PHRASE Label="la_section_UsersSearch" Module="Core" Type="1">U2VhcmNoIFVzZXJz</PHRASE>
<PHRASE Label="la_section_Values" Module="Core" Type="1">VmFsdWVz</PHRASE>
<PHRASE Label="la_SelectColumns" Module="Core" Type="1">U2VsZWN0IENvbHVtbnM=</PHRASE>
<PHRASE Label="la_SelectedItems" Module="Core" Type="1">U2VsZWN0ZWQgSXRlbXM=</PHRASE>
<PHRASE Label="la_selecting_categories" Module="Core" Type="1">U2VsZWN0aW5nIFNlY3Rpb25z</PHRASE>
<PHRASE Label="la_SeparatedCategoryPath" Module="Core" Type="1">T25lIGZpZWxkIGZvciBlYWNoIHNlY3Rpb24gbGV2ZWw=</PHRASE>
<PHRASE Label="la_ShortToolTip_Clone" Module="Core" Type="1">Q2xvbmU=</PHRASE>
<PHRASE Label="la_ShortToolTip_CloneUser" Module="Core" Type="1">Q2xvbmU=</PHRASE>
<PHRASE Label="la_ShortToolTip_Continue" Module="Core" Type="1">Q29udGludWU=</PHRASE>
<PHRASE Label="la_ShortToolTip_Edit" Module="Core" Type="1">RWRpdA==</PHRASE>
<PHRASE Label="la_ShortToolTip_Export" Module="Core" Type="1">RXhwb3J0</PHRASE>
<PHRASE Label="la_ShortToolTip_GoUp" Module="Core" Type="1">R28gVXA=</PHRASE>
<PHRASE Label="la_ShortToolTip_Import" Module="Core" Type="1">SW1wb3J0</PHRASE>
<PHRASE Label="la_ShortToolTip_MoveDown" Module="Core" Type="1">RG93bg==</PHRASE>
<PHRASE Label="la_ShortToolTip_MoveUp" Module="Core" Type="1">VXA=</PHRASE>
<PHRASE Label="la_ShortToolTip_New" Module="Core" Type="1">TmV3</PHRASE>
<PHRASE Label="la_ShortToolTip_Rebuild" Module="Core" Type="1">UmVidWlsZA==</PHRASE>
<PHRASE Label="la_ShortToolTip_RescanThemes" Module="Core" Type="1">UmVzY2FuIFRoZW1lcw==</PHRASE>
<PHRASE Label="la_ShortToolTip_ResetSettings" Module="Core" Type="1">UmVzZXQ=</PHRASE>
<PHRASE Label="la_ShortToolTip_SetPrimary" Module="Core" Type="1">UHJpbWFyeQ==</PHRASE>
<PHRASE Label="la_ShortToolTip_SynchronizeLanguages" Module="Core" Type="1">U3luY2hyb25pemU=</PHRASE>
<PHRASE Label="la_ShortToolTip_View" Module="Core" Type="1">Vmlldw==</PHRASE>
<PHRASE Label="la_Show" Module="Core" Type="1">U2hvdw==</PHRASE>
<PHRASE Label="la_SQLAffectedRows" Module="Core" Type="1">QWZmZWN0ZWQgcm93cw==</PHRASE>
<PHRASE Label="la_SQLRuntime" Module="Core" Type="1">RXhlY3V0ZWQgaW46</PHRASE>
<PHRASE Label="la_step" Module="Core" Type="1">U3RlcA==</PHRASE>
<PHRASE Label="la_StyleDefinition" Module="Core" Type="1">RGVmaW5pdGlvbg==</PHRASE>
<PHRASE Label="la_StylePreview" Module="Core" Type="1">UHJldmlldw==</PHRASE>
<PHRASE Label="la_sunday" Module="Core" Type="1">U3VuZGF5</PHRASE>
<PHRASE Label="la_System" Module="Core" Type="1">U3lzdGVt</PHRASE>
<PHRASE Label="la_tab_AdminUI" Module="Core" Type="1">QWRtaW5pc3RyYXRpb24gUGFuZWwgVUk=</PHRASE>
<PHRASE Label="la_tab_AdvancedView" Module="Core" Type="1">QWR2YW5jZWQgVmlldw==</PHRASE>
<PHRASE Label="la_tab_Backup" Module="Core" Type="1">QmFja3Vw</PHRASE>
<PHRASE Label="la_tab_BanList" Module="Core" Type="1">QmFuIFJ1bGVz</PHRASE>
<PHRASE Label="la_tab_BaseStyles" Module="Core" Type="1">QmFzZSBTdHlsZXM=</PHRASE>
<PHRASE Label="la_tab_BlockStyles" Module="Core" Type="1">QmxvY2sgU3R5bGVz</PHRASE>
<PHRASE Label="la_tab_Browse" Module="Core" Type="1">Q2F0YWxvZw==</PHRASE>
<PHRASE Label="la_tab_BrowsePages" Module="Core" Type="1">QnJvd3NlIFdlYnNpdGU=</PHRASE>
<PHRASE Label="la_tab_Categories" Module="Core" Type="1">U2VjdGlvbnM=</PHRASE>
<PHRASE Label="la_tab_ChangeLog" Module="Core" Type="1">Q2hhbmdlcyBMb2c=</PHRASE>
<PHRASE Label="la_tab_CMSForms" Module="Core" Type="1">Rm9ybXM=</PHRASE>
<PHRASE Label="la_tab_Community" Module="Core" Type="1">VXNlciBNYW5hZ2VtZW50</PHRASE>
<PHRASE Label="la_tab_ConfigCustom" Module="Core" Type="1">Q3VzdG9tIEZpZWxkcw==</PHRASE>
<PHRASE Label="la_tab_ConfigE-mail" Module="Core" Type="1">RS1tYWlsIEV2ZW50cw==</PHRASE>
<PHRASE Label="la_tab_ConfigGeneral" Module="Core" Type="1">R2VuZXJhbCBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_tab_ConfigOutput" Module="Core" Type="1">T3V0cHV0</PHRASE>
<PHRASE Label="la_tab_ConfigSearch" Module="Core" Type="1">U2VhcmNo</PHRASE>
<PHRASE Label="la_tab_ConfigSettings" Module="Core" Type="1">R2VuZXJhbA==</PHRASE>
<PHRASE Label="la_tab_Custom" Module="Core" Type="1">Q3VzdG9t</PHRASE>
<PHRASE Label="la_tab_EmailCommunication" Module="Core" Type="1">RS1tYWlsIENvbW11bmljYXRpb24=</PHRASE>
<PHRASE Label="la_tab_EmailLog" Module="Core" Type="1">RS1tYWlsIExvZw==</PHRASE>
<PHRASE Label="la_tab_EmailQueue" Module="Core" Type="1">RW1haWwgUXVldWU=</PHRASE>
<PHRASE Label="la_tab_EmailTemplates" Module="Core" Type="1">RS1tYWlsIFRlbXBsYXRlcw==</PHRASE>
<PHRASE Label="la_tab_Fields" Module="Core" Type="1">RmllbGRz</PHRASE>
<PHRASE Label="la_tab_Files" Module="Core" Type="1">RmlsZXM=</PHRASE>
<PHRASE Label="la_tab_FormsConfig" Module="Core" Type="1">Rm9ybXMgQ29uZmlndXJhdGlvbg==</PHRASE>
<PHRASE Label="la_tab_General" Module="Core" Type="1">R2VuZXJhbA==</PHRASE>
<PHRASE Label="la_tab_GeneralSettings" Module="Core" Type="1">R2VuZXJhbA==</PHRASE>
<PHRASE Label="la_tab_Groups" Module="Core" Type="1">R3JvdXBz</PHRASE>
<PHRASE Label="la_tab_Help" Module="Core" Type="1">SGVscA==</PHRASE>
<PHRASE Label="la_tab_Images" Module="Core" Type="1">SW1hZ2Vz</PHRASE>
<PHRASE Label="la_tab_ImportData" Module="Core" Type="1">SW1wb3J0IERhdGE=</PHRASE>
<PHRASE Label="la_tab_Items" Module="Core" Type="1">SXRlbXM=</PHRASE>
<PHRASE Label="la_tab_Labels" Module="Core" Type="1">TGFiZWxz</PHRASE>
<PHRASE Label="la_tab_LogsAndReports" Module="Core" Type="1">TG9ncyAmIFJlcG9ydHM=</PHRASE>
<PHRASE Label="la_tab_Messages" Module="Core" Type="1">TWVzc2FnZXM=</PHRASE>
<PHRASE Label="la_tab_PackageContent" Module="Core" Type="1">UGFja2FnZSBDb250ZW50</PHRASE>
<PHRASE Label="la_tab_Permissions" Module="Core" Type="1">UGVybWlzc2lvbnM=</PHRASE>
<PHRASE Label="la_tab_PermissionTypes" Module="Core" Type="1">UGVybWlzc2lvbiBUeXBlcw==</PHRASE>
<PHRASE Label="la_tab_PromoBlocks" Module="Core" Type="1">UHJvbW8gQmxvY2tz</PHRASE>
<PHRASE Label="la_tab_Properties" Module="Core" Type="1">UHJvcGVydGllcw==</PHRASE>
<PHRASE Label="la_tab_QueryDB" Module="Core" Type="1">UXVlcnkgRGF0YWJhc2U=</PHRASE>
<PHRASE Label="la_tab_Regional" Module="Core" Type="1">UmVnaW9uYWw=</PHRASE>
<PHRASE Label="la_tab_Related_Searches" Module="Core" Type="1">UmVsYXRlZCBTZWFyY2hlcw==</PHRASE>
<PHRASE Label="la_tab_Relations" Module="Core" Type="1">UmVsYXRpb25z</PHRASE>
<PHRASE Label="la_tab_Restore" Module="Core" Type="1">UmVzdG9yZQ==</PHRASE>
<PHRASE Label="la_tab_Reviews" Module="Core" Type="1">Q29tbWVudHM=</PHRASE>
<PHRASE Label="la_Tab_Search" Module="Core" Type="1">U2VhcmNo</PHRASE>
<PHRASE Label="la_tab_SearchLog" Module="Core" Type="1">U2VhcmNoIExvZw==</PHRASE>
<PHRASE Label="la_tab_ServerInfo" Module="Core" Type="1">UEhQIEluZm9ybWF0aW9u</PHRASE>
<PHRASE Label="la_Tab_Service" Module="Core" Type="1">U3lzdGVtIFRvb2xz</PHRASE>
<PHRASE Label="la_tab_SessionLog" Module="Core" Type="1">U2Vzc2lvbiBMb2c=</PHRASE>
<PHRASE Label="la_tab_SessionLogs" Module="Core" Type="1">U2Vzc2lvbiBMb2c=</PHRASE>
<PHRASE Label="la_tab_Settings" Module="Core" Type="1">U2V0dGluZ3M=</PHRASE>
<PHRASE Label="la_tab_ShowAll" Module="Core" Type="1">U2hvdyBBbGw=</PHRASE>
<PHRASE Label="la_tab_ShowStructure" Module="Core" Type="1">U2hvdyBTdHJ1Y3R1cmU=</PHRASE>
<PHRASE Label="la_tab_Site_Structure" Module="Core" Type="1">V2Vic2l0ZSAmIENvbnRlbnQ=</PHRASE>
<PHRASE Label="la_tab_Skins" Module="Core" Type="1">QWRtaW4gU2tpbnM=</PHRASE>
<PHRASE Label="la_tab_Summary" Module="Core" Type="1">U3VtbWFyeQ==</PHRASE>
<PHRASE Label="la_tab_SystemLog" Module="Core" Type="1">U3lzdGVtIExvZw==</PHRASE>
<PHRASE Label="la_tab_Sys_Config" Module="Core" Type="1">Q29uZmlndXJhdGlvbg==</PHRASE>
<PHRASE Label="la_tab_taglibrary" Module="Core" Type="1">VGFnIGxpYnJhcnk=</PHRASE>
<PHRASE Label="la_tab_Themes" Module="Core" Type="1">VGhlbWVz</PHRASE>
<PHRASE Label="la_tab_Tools" Module="Core" Type="1">VG9vbHM=</PHRASE>
<PHRASE Label="la_tab_Users" Module="Core" Type="1">VXNlcnM=</PHRASE>
<PHRASE Label="la_tab_User_Groups" Module="Core" Type="1">R3JvdXBz</PHRASE>
<PHRASE Label="la_tab_User_List" Module="Core" Type="1">VXNlcnM=</PHRASE>
<PHRASE Label="la_tab_VisitorLog" Module="Core" Type="1">VmlzaXRvciBMb2c=</PHRASE>
<PHRASE Label="la_tab_Visits" Module="Core" Type="1">VmlzaXRz</PHRASE>
<PHRASE Label="la_Text" Module="Core" Type="1">dGV4dA==</PHRASE>
<PHRASE Label="la_Text_Admin" Module="Core" Type="1">QWRtaW4=</PHRASE>
<PHRASE Label="la_text_advanced" Module="Core" Type="1">QWR2YW5jZWQ=</PHRASE>
<PHRASE Label="la_Text_All" Module="Core" Type="1">QWxs</PHRASE>
<PHRASE Label="la_text_AutoRefresh" Module="Core" Type="1">QXV0by1SZWZyZXNo</PHRASE>
<PHRASE Label="la_Text_BackupComplete" Module="Core" Type="1">QmFjayB1cCBoYXMgYmVlbiBjb21wbGV0ZWQuIFRoZSBiYWNrdXAgZmlsZSBpczo=</PHRASE>
<PHRASE Label="la_Text_backup_access" Module="Core" Type="1">SW4tUG9ydGFsIGRvZXMgbm90IGhhdmUgYWNjZXNzIHRvIHdyaXRlIHRvIHRoaXMgZGlyZWN0b3J5</PHRASE>
<PHRASE Label="la_Text_Backup_Info" Module="Core" Type="1">VGhpcyB1dGlsaXR5IGFsbG93cyB5b3UgdG8gYmFja3VwIHlvdXIgSW4tUG9ydGFsIGRhdGFiYXNlIHNvIGl0IGNhbiBiZSByZXN0b3JlZCBhdCBsYXRlciBpbiBuZWVkZWQu</PHRASE>
<PHRASE Label="la_text_Bytes" Module="Core" Type="1">Ynl0ZXM=</PHRASE>
<PHRASE Label="la_Text_Catalog" Module="Core" Type="1">Q2F0YWxvZw==</PHRASE>
<PHRASE Label="la_Text_Categories" Module="Core" Type="1">U2VjdGlvbnM=</PHRASE>
<PHRASE Label="la_Text_Category" Module="Core" Type="1">U2VjdGlvbg==</PHRASE>
<PHRASE Label="la_text_ClearClipboardWarning" Module="Core" Type="1">WW91IGFyZSBhYm91dCB0byBjbGVhciBjbGlwYm9hcmQgY29udGVudCENClByZXNzIE9LIHRvIGNvbnRpbnVlIG9yIENhbmNlbCB0byByZXR1cm4gdG8gcHJldmlvdXMgc2NyZWVuLg==</PHRASE>
<PHRASE Label="la_Text_CustomFields" Module="Core" Type="1">Q3VzdG9tIEZpZWxkcw==</PHRASE>
<PHRASE Label="la_Text_DataType_1" Module="Core" Type="1">c2VjdGlvbnM=</PHRASE>
<PHRASE Label="la_Text_Date_Time_Settings" Module="Core" Type="1">RGF0ZS9UaW1lIFNldHRpbmdz</PHRASE>
<PHRASE Label="la_text_db_warning" Module="Core" Type="1">UnVubmluZyB0aGlzIHV0aWxpdHkgd2lsbCBhZmZlY3QgeW91ciBkYXRhYmFzZS4gUGxlYXNlIGJlIGFkdmlzZWQgdGhhdCB5b3UgY2FuIHVzZSB0aGlzIHV0aWxpdHkgYXQgeW91ciBvd24gcmlzay4gSW4tUG9ydGFsIG9yIGl0J3MgZGV2ZWxvcGVycyBjYW4gbm90IGJlIGhlbGQgbGlhYmxlIGZvciBhbnkgY29ycnVwdCBkYXRhIG9yIGRhdGEgbG9zcy4=</PHRASE>
<PHRASE Label="la_Text_Default" Module="Core" Type="1">RGVmYXVsdA==</PHRASE>
<PHRASE Label="la_Text_Delete" Module="Core" Type="1">RGVsZXRl</PHRASE>
<PHRASE Label="la_Text_Disable" Module="Core" Type="1">RGlzYWJsZQ==</PHRASE>
<PHRASE Label="la_text_disclaimer_part1" Module="Core" Type="1">UnVubmluZyB0aGlzIHV0aWxpdHkgd2lsbCBhZmZlY3QgeW91ciBkYXRhYmFzZS4gUGxlYXNlIGJlIGFkdmlzZWQgdGhhdCB5b3UgY2FuIHVzZSB0aGlzIHV0aWxpdHkgYXQgeW91ciBvd24gcmlzay4gSW4tUG9ydGFsIG9yIGl0J3MgZGV2ZWxvcGVycyBjYW4gbm90IGJlIGhlbGQgbGlhYmxlIGZvciBhbnkgY29ycnVwdCBkYXRhIG9yIGRhdGEgbG9zcy4=</PHRASE>
<PHRASE Label="la_text_disclaimer_part2" Module="Core" Type="1">UGxlYXNlIG1ha2Ugc3VyZSB0byBCQUNLVVAgeW91ciBkYXRhYmFzZShzKSBiZWZvcmUgcnVubmluZyB0aGlzIHV0aWxpdHkh</PHRASE>
<PHRASE Label="la_Text_Edit" Module="Core" Type="1">RWRpdA==</PHRASE>
<PHRASE Label="la_Text_Email" Module="Core" Type="1">RW1haWw=</PHRASE>
<PHRASE Label="la_text_FollowingLinesWereNotImported" Module="Core" Type="1">Rm9sbG93aW5nIGxpbmVzIHdlcmUgTk9UIGltcG9ydGVk</PHRASE>
<PHRASE Label="la_Text_FrontOnly" Module="Core" Type="1">RnJvbnQtRW5kIE9ubHk=</PHRASE>
<PHRASE Label="la_Text_General" Module="Core" Type="1">R2VuZXJhbA==</PHRASE>
<PHRASE Label="la_Text_Hot" Module="Core" Type="1">SG90</PHRASE>
<PHRASE Label="la_Text_IAgree" Module="Core" Type="1">SSBhZ3JlZSB0byB0aGUgdGVybXMgYW5kIGNvbmRpdGlvbnM=</PHRASE>
<PHRASE Label="la_text_ImportResults" Module="Core" Type="1">SW1wb3J0IFJlc3VsdHM=</PHRASE>
<PHRASE Label="la_Text_InDevelopment" Module="Core" Type="1">SW4gRGV2ZWxvcG1lbnQ=</PHRASE>
<PHRASE Label="la_Text_Invert" Module="Core" Type="1">SW52ZXJ0</PHRASE>
<PHRASE Label="la_text_keyword" Module="Core" Type="1">S2V5d29yZA==</PHRASE>
<PHRASE Label="la_Text_Link" Module="Core" Type="1">TGluaw==</PHRASE>
<PHRASE Label="la_Text_MetaInfo" Module="Core" Type="1">RGVmYXVsdCBNRVRBIGtleXdvcmRz</PHRASE>
<PHRASE Label="la_text_min_password" Module="Core" Type="1">TWluaW11bSBwYXNzd29yZCBsZW5ndGg=</PHRASE>
<PHRASE Label="la_text_min_username" Module="Core" Type="1">VXNlciBuYW1lIGxlbmd0aCAobWluIC0gbWF4KQ==</PHRASE>
<PHRASE Label="la_text_multipleshow" Module="Core" Type="1">U2hvdyBtdWx0aXBsZQ==</PHRASE>
<PHRASE Label="la_Text_New" Module="Core" Type="1">TmV3</PHRASE>
<PHRASE Label="la_Text_None" Module="Core" Type="1">Tm9uZQ==</PHRASE>
<PHRASE Label="la_text_NoPermission" Module="Core" Type="1">Tm8gUGVybWlzc2lvbg==</PHRASE>
<PHRASE Label="la_text_Or" Module="Core" Type="1">b3I=</PHRASE>
<PHRASE Label="la_Text_Phone" Module="Core" Type="1">UGhvbmU=</PHRASE>
<PHRASE Label="la_Text_Pop" Module="Core" Type="1">UG9wdWxhcg==</PHRASE>
<PHRASE Label="la_text_popularity" Module="Core" Type="1">UG9wdWxhcml0eQ==</PHRASE>
<PHRASE Label="la_text_ready_to_install" Module="Core" Type="1">UmVhZHkgdG8gSW5zdGFsbA==</PHRASE>
<PHRASE Label="la_text_RecordsAdded" Module="Core" Type="1">cmVjb3JkcyBhZGRlZA==</PHRASE>
<PHRASE Label="la_text_RecordsUpdated" Module="Core" Type="1">cmVjb3JkcyB1cGRhdGVk</PHRASE>
<PHRASE Label="la_text_RequiredFields" Module="Core" Type="1">UmVxdWlyZWQgZmllbGRz</PHRASE>
<PHRASE Label="la_Text_Restore_Heading" Module="Core" Type="1">SGVyZSB5b3UgY2FuIHJlc3RvcmUgeW91ciBkYXRhYmFzZSBmcm9tIGEgcHJldmlvdXNseSBiYWNrZWQgdXAgc25hcHNob3QuIFJlc3RvcmluZyB5b3VyIGRhdGFiYXNlIHdpbGwgZGVsZXRlIGFsbCBvZiB5b3VyIGN1cnJlbnQgZGF0YSBhbmQgbG9nIHlvdSBvdXQgb2YgdGhlIHN5c3RlbS4=</PHRASE>
<PHRASE Label="la_text_Review" Module="Core" Type="1">Q29tbWVudA==</PHRASE>
<PHRASE Label="la_Text_Reviews" Module="Core" Type="1">Q29tbWVudHM=</PHRASE>
<PHRASE Label="la_Text_RootCategory" Module="Core" Type="1">TW9kdWxlIFJvb3QgU2VjdGlvbg==</PHRASE>
<PHRASE Label="la_text_Save" Module="Core" Type="1">U2F2ZQ==</PHRASE>
<PHRASE Label="la_Text_Select" Module="Core" Type="1">U2VsZWN0</PHRASE>
<PHRASE Label="la_text_sess_expired" Module="Core" Type="1">U2Vzc2lvbiBFeHBpcmVk</PHRASE>
<PHRASE Label="la_Text_Simple" Module="Core" Type="1">U2ltcGxl</PHRASE>
<PHRASE Label="la_Text_Sort" Module="Core" Type="1">U29ydA==</PHRASE>
<PHRASE Label="la_Text_Unselect" Module="Core" Type="1">VW5zZWxlY3Q=</PHRASE>
<PHRASE Label="la_Text_User" Module="Core" Type="1">VXNlcg==</PHRASE>
<PHRASE Label="la_Text_Users" Module="Core" Type="1">VXNlcnM=</PHRASE>
<PHRASE Label="la_Text_Version" Module="Core" Type="1">VmVyc2lvbg==</PHRASE>
<PHRASE Label="la_Text_View" Module="Core" Type="1">Vmlldw==</PHRASE>
<PHRASE Label="la_title_AddingAdministrator" Module="Core" Type="1">QWRkaW5nIEFkbWluaXN0cmF0b3I=</PHRASE>
<PHRASE Label="la_title_AddingBanRule" Module="Core" Type="1">QWRkaW5nIEJhbiBSdWxl</PHRASE>
<PHRASE Label="la_title_AddingCountryState" Module="Core" Type="1">QWRkaW5nIENvdW50cnkvU3RhdGU=</PHRASE>
<PHRASE Label="la_title_addingCustom" Module="Core" Type="1">QWRkaW5nIEN1c3RvbSBGaWVsZA==</PHRASE>
<PHRASE Label="la_title_AddingEmailTemplate" Module="Core" Type="1">QWRkaW5nIEUtbWFpbCBUZW1wbGF0ZQ==</PHRASE>
<PHRASE Label="la_title_AddingFile" Module="Core" Type="1">QWRkaW5nIEZpbGU=</PHRASE>
<PHRASE Label="la_title_AddingItemFilter" Module="Core" Type="1">QWRkaW5nIEl0ZW0gRmlsdGVy</PHRASE>
<PHRASE Label="la_title_AddingMailingList" Module="Core" Type="1">QWRkaW5nIE1haWxpbmcgTGlzdA==</PHRASE>
<PHRASE Label="la_title_AddingPermissionType" Module="Core" Type="1">QWRkaW5nIFBlcm1pc3Npb24gVHlwZQ==</PHRASE>
<PHRASE Label="la_title_AddingPromoBlock" Module="Core" Type="1">QWRkaW5nIFByb21vIEJsb2Nr</PHRASE>
<PHRASE Label="la_title_AddingPromoBlockGroup" Module="Core" Type="1">QWRkaW5nIFByb21vIEJsb2NrIEdyb3Vw</PHRASE>
<PHRASE Label="la_title_AddingScheduledTask" Module="Core" Type="1">QWRkaW5nIFNjaGVkdWxlZCBUYXNr</PHRASE>
<PHRASE Label="la_title_AddingSiteDomain" Module="Core" Type="1">QWRkaW5nIFNpdGUgRG9tYWlu</PHRASE>
<PHRASE Label="la_title_AddingSkin" Module="Core" Type="1">QWRkaW5nIFNraW4=</PHRASE>
<PHRASE Label="la_title_AddingSpellingDictionary" Module="Core" Type="1">QWRkaW5nIFNwZWxsaW5nIERpY3Rpb25hcnk=</PHRASE>
<PHRASE Label="la_title_AddingStopWord" Module="Core" Type="1">QWRkaW5nIFN0b3AgV29yZA==</PHRASE>
<PHRASE Label="la_title_AddingSystemEventSubscription" Module="Core" Type="1">QWRkaW5nIFN5c3RlbSBFdmVudCBTdWJzY3JpcHRpb24=</PHRASE>
<PHRASE Label="la_title_AddingSystemSetting" Module="Core" Type="1">QWRkaW5nIFN5c3RlbSBTZXR0aW5n</PHRASE>
<PHRASE Label="la_title_AddingThemeFile" Module="Core" Type="1">QWRkaW5nIFRoZW1lIFRlbXBsYXRl</PHRASE>
<PHRASE Label="la_title_AddingThesaurus" Module="Core" Type="1">QWRkaW5nIFRoZXNhdXJ1cw==</PHRASE>
<PHRASE Label="la_title_Adding_BaseStyle" Module="Core" Type="1">QWRkaW5nIEJhc2UgU3R5bGU=</PHRASE>
<PHRASE Label="la_title_Adding_BlockStyle" Module="Core" Type="1">QWRkaW5nIEJsb2NrIFN0eWxl</PHRASE>
<PHRASE Label="la_title_Adding_Category" Module="Core" Type="1">QWRkaW5nIFNlY3Rpb24=</PHRASE>
<PHRASE Label="la_title_Adding_ConfigSearch" Module="Core" Type="1">QWRkaW5nIFNlYXJjaCBGaWVsZA==</PHRASE>
<PHRASE Label="la_title_Adding_Content" Module="Core" Type="1">QWRkaW5nIENNUyBCbG9jaw==</PHRASE>
<PHRASE Label="la_title_Adding_Form" Module="Core" Type="1">QWRkaW5nIEZvcm0=</PHRASE>
<PHRASE Label="la_title_Adding_FormField" Module="Core" Type="1">QWRkaW5nIEZvcm0gRmllbGQ=</PHRASE>
<PHRASE Label="la_title_Adding_Group" Module="Core" Type="1">QWRkaW5nIEdyb3Vw</PHRASE>
<PHRASE Label="la_title_Adding_Image" Module="Core" Type="1">QWRkaW5nIEltYWdl</PHRASE>
<PHRASE Label="la_title_Adding_Language" Module="Core" Type="1">QWRkaW5nIExhbmd1YWdl</PHRASE>
<PHRASE Label="la_title_Adding_Phrase" Module="Core" Type="1">QWRkaW5nIFBocmFzZQ==</PHRASE>
<PHRASE Label="la_title_Adding_RelatedSearch_Keyword" Module="Core" Type="1">QWRkaW5nIEtleXdvcmQ=</PHRASE>
<PHRASE Label="la_title_Adding_Relationship" Module="Core" Type="1">QWRkaW5nIFJlbGF0aW9uc2hpcA==</PHRASE>
<PHRASE Label="la_title_Adding_Review" Module="Core" Type="1">QWRkaW5nIENvbW1lbnQ=</PHRASE>
<PHRASE Label="la_title_Adding_Theme" Module="Core" Type="1">QWRkaW5nIFRoZW1l</PHRASE>
<PHRASE Label="la_title_Adding_User" Module="Core" Type="1">QWRkaW5nIFVzZXI=</PHRASE>
<PHRASE Label="la_title_AdditionalPermissions" Module="Core" Type="1">QWRkaXRpb25hbCBQZXJtaXNzaW9ucw==</PHRASE>
<PHRASE Label="la_title_Administrators" Module="Core" Type="1">QWRtaW5pc3RyYXRvcnM=</PHRASE>
<PHRASE Label="la_title_Advanced" Module="Core" Type="1">QWR2YW5jZWQ=</PHRASE>
<PHRASE Label="la_title_AdvancedView" Module="Core" Type="1">U2hvd2luZyBhbGwgcmVnYXJkbGVzcyBvZiBTdHJ1Y3R1cmU=</PHRASE>
<PHRASE Label="la_title_BaseStyles" Module="Core" Type="1">QmFzZSBTdHlsZXM=</PHRASE>
<PHRASE Label="la_title_BlockStyles" Module="Core" Type="1">QmxvY2sgU3R5bGVz</PHRASE>
<PHRASE Label="la_title_BounceSettings" Module="Core" Type="1">Qm91bmNlIFBPUDMgU2VydmVyIFNldHRpbmdz</PHRASE>
<PHRASE Label="la_title_Categories" Module="Core" Type="1">U2VjdGlvbnM=</PHRASE>
<PHRASE Label="la_title_category_select" Module="Core" Type="1">U2VsZWN0IHNlY3Rpb24=</PHRASE>
<PHRASE Label="la_title_ColumnPicker" Module="Core" Type="1">Q29sdW1uIFBpY2tlcg==</PHRASE>
<PHRASE Label="la_title_Configuration" Module="Core" Type="1">Q29uZmlndXJhdGlvbg==</PHRASE>
<PHRASE Label="la_Title_ContactInformation" Module="Core" Type="1">Q29udGFjdCBJbmZvcm1hdGlvbg==</PHRASE>
<PHRASE Label="la_title_CountryStates" Module="Core" Type="1">Q291bnRyaWVzICYgU3RhdGVz</PHRASE>
<PHRASE Label="la_title_CSVExport" Module="Core" Type="1">Q1NWIEV4cG9ydA==</PHRASE>
<PHRASE Label="la_title_CSVImport" Module="Core" Type="1">Q1NWIEltcG9ydA==</PHRASE>
<PHRASE Label="la_title_Custom" Module="Core" Type="1">Q3VzdG9t</PHRASE>
<PHRASE Label="la_title_CustomFields" Module="Core" Type="1">Q3VzdG9tIEZpZWxkcw==</PHRASE>
<PHRASE Label="la_title_EditingAdministrator" Module="Core" Type="1">RWRpdGluZyBBZG1pbmlzdHJhdG9y</PHRASE>
<PHRASE Label="la_title_EditingBanRule" Module="Core" Type="1">RWRpdGluZyBCYW4gUnVsZQ==</PHRASE>
<PHRASE Label="la_title_EditingChangeLog" Module="Core" Type="1">RWRpdGluZyBDaGFuZ2VzIExvZw==</PHRASE>
<PHRASE Label="la_title_EditingContentAutosaved" Module="Core" Type="1">Q29udGVudCBFZGl0b3IgLSBBdXRvLXNhdmVkIGF0ICVz</PHRASE>
<PHRASE Label="la_title_EditingCountryState" Module="Core" Type="1">RWRpdGluZyBDb3VudHJ5L1N0YXRl</PHRASE>
<PHRASE Label="la_title_EditingDraft" Module="Core" Type="1">RWRpdGluZyBEcmFmdCAoJTIkcyk=</PHRASE>
<PHRASE Label="la_title_EditingEmailTemplate" Module="Core" Type="1">RWRpdGluZyBFLW1haWwgVGVtcGxhdGU=</PHRASE>
<PHRASE Label="la_title_EditingFile" Module="Core" Type="1">RWRpdGluZyBGaWxl</PHRASE>
<PHRASE Label="la_title_EditingItemFilter" Module="Core" Type="1">RWRpdGluZyBJdGVtIEZpbHRlcg==</PHRASE>
<PHRASE Label="la_title_EditingMembership" Module="Core" Type="1">RWRpdGluZyBNZW1iZXJzaGlw</PHRASE>
<PHRASE Label="la_title_EditingPermissionType" Module="Core" Type="1">RWRpdGluZyBQZXJtaXNzaW9uIFR5cGU=</PHRASE>
<PHRASE Label="la_title_EditingPromoBlock" Module="Core" Type="1">RWRpdGluZyBQcm9tbyBCbG9jaw==</PHRASE>
<PHRASE Label="la_title_EditingPromoBlockGroup" Module="Core" Type="1">RWRpdGluZyBQcm9tbyBCbG9jayBHcm91cA==</PHRASE>
<PHRASE Label="la_title_EditingScheduledTask" Module="Core" Type="1">RWRpdGluZyBTY2hlZHVsZWQgVGFzaw==</PHRASE>
<PHRASE Label="la_title_EditingSiteDomain" Module="Core" Type="1">RWRpdGluZyBTaXRlIERvbWFpbg==</PHRASE>
<PHRASE Label="la_title_EditingSkin" Module="Core" Type="1">RWRpdGluZyBTa2lu</PHRASE>
<PHRASE Label="la_title_EditingSpamReport" Module="Core" Type="1">RWRpdGluZyBTUEFNIFJlcG9ydA==</PHRASE>
<PHRASE Label="la_title_EditingSpellingDictionary" Module="Core" Type="1">RWRpdGluZyBTcGVsbGluZyBEaWN0aW9uYXJ5</PHRASE>
<PHRASE Label="la_title_EditingStopWord" Module="Core" Type="1">RWRpdGluZyBTdG9wIFdvcmQ=</PHRASE>
<PHRASE Label="la_title_EditingStyle" Module="Core" Type="1">RWRpdGluZyBTdHlsZQ==</PHRASE>
<PHRASE Label="la_title_EditingSystemEventSubscription" Module="Core" Type="1">RWRpdGluZyBTeXN0ZW0gRXZlbnQgU3Vic2NyaXB0aW9u</PHRASE>
<PHRASE Label="la_title_EditingSystemSetting" Module="Core" Type="1">RWRpdGluZyBTeXN0ZW0gU2V0dGluZw==</PHRASE>
<PHRASE Label="la_title_EditingThemeFile" Module="Core" Type="1">RWRpdGluZyBUaGVtZSBGaWxl</PHRASE>
<PHRASE Label="la_title_EditingThesaurus" Module="Core" Type="1">RWRpdGluZyBUaGVzYXVydXM=</PHRASE>
<PHRASE Label="la_title_EditingTranslation" Module="Core" Type="1">RWRpdGluZyBUcmFuc2xhdGlvbg==</PHRASE>
<PHRASE Label="la_title_Editing_BaseStyle" Module="Core" Type="1">RWRpdGluZyBCYXNlIFN0eWxl</PHRASE>
<PHRASE Label="la_title_Editing_BlockStyle" Module="Core" Type="1">RWRpdGluZyBCbG9jayBTdHlsZQ==</PHRASE>
<PHRASE Label="la_title_Editing_Category" Module="Core" Type="1">RWRpdGluZyBTZWN0aW9u</PHRASE>
<PHRASE Label="la_title_Editing_Content" Module="Core" Type="1">RWRpdGluZyBDTVMgQmxvY2s=</PHRASE>
<PHRASE Label="la_title_Editing_CustomField" Module="Core" Type="1">RWRpdGluZyBDdXN0b20gRmllbGQ=</PHRASE>
<PHRASE Label="la_title_Editing_Form" Module="Core" Type="1">RWRpdGluZyBGb3Jt</PHRASE>
<PHRASE Label="la_title_Editing_FormField" Module="Core" Type="1">RWRpdGluZyBGb3JtIEZpZWxk</PHRASE>
<PHRASE Label="la_title_Editing_Group" Module="Core" Type="1">RWRpdGluZyBHcm91cA==</PHRASE>
<PHRASE Label="la_title_Editing_Image" Module="Core" Type="1">RWRpdGluZyBJbWFnZQ==</PHRASE>
<PHRASE Label="la_title_Editing_Language" Module="Core" Type="1">RWRpdGluZyBMYW5ndWFnZQ==</PHRASE>
<PHRASE Label="la_title_Editing_Phrase" Module="Core" Type="1">RWRpdGluZyBQaHJhc2U=</PHRASE>
<PHRASE Label="la_title_Editing_RelatedSearch_Keyword" Module="Core" Type="1">RWRpdGluZyBLZXl3b3Jk</PHRASE>
<PHRASE Label="la_title_Editing_Relationship" Module="Core" Type="1">RWRpdGluZyBSZWxhdGlvbnNoaXA=</PHRASE>
<PHRASE Label="la_title_Editing_Review" Module="Core" Type="1">RWRpdGluZyBDb21tZW50</PHRASE>
<PHRASE Label="la_title_Editing_Theme" Module="Core" Type="1">RWRpdGluZyBUaGVtZQ==</PHRASE>
<PHRASE Label="la_title_Editing_User" Module="Core" Type="1">RWRpdGluZyBVc2Vy</PHRASE>
<PHRASE Label="la_title_EmailCommunication" Module="Core" Type="1">RS1tYWlsIENvbW11bmljYXRpb24=</PHRASE>
<PHRASE Label="la_title_EmailSettings" Module="Core" Type="1">RS1tYWlsIFNldHRpbmdz</PHRASE>
<PHRASE Label="la_title_EmailTemplates" Module="Core" Type="1">RS1tYWlsIFRlbXBsYXRlcw==</PHRASE>
<PHRASE Label="la_title_ExportLanguagePackResults" Module="Core" Type="1">RXhwb3J0IExhbmd1YWdlIFBhY2sgLSBSZXN1bHRz</PHRASE>
<PHRASE Label="la_title_ExportLanguagePackStep1" Module="Core" Type="1">RXhwb3J0IExhbmd1YWdlIFBhY2sgLSBTdGVwMQ==</PHRASE>
<PHRASE Label="la_title_Fields" Module="Core" Type="1">RmllbGRz</PHRASE>
<PHRASE Label="la_title_Files" Module="Core" Type="1">RmlsZXM=</PHRASE>
<PHRASE Label="la_title_Forms" Module="Core" Type="1">Rm9ybXM=</PHRASE>
<PHRASE Label="la_title_FormSubmissions" Module="Core" Type="1">Rm9ybSBTdWJtaXNzaW9ucw==</PHRASE>
<PHRASE Label="la_title_General" Module="Core" Type="1">R2VuZXJhbA==</PHRASE>
<PHRASE Label="la_title_Groups" Module="Core" Type="1">R3JvdXBz</PHRASE>
<PHRASE Label="la_title_Images" Module="Core" Type="1">SW1hZ2Vz</PHRASE>
<PHRASE Label="la_title_InstallLanguagePackStep1" Module="Core" Type="1">SW5zdGFsbCBMYW5ndWFnZSBQYWNrIC0gU3RlcCAx</PHRASE>
<PHRASE Label="la_title_InstallLanguagePackStep2" Module="Core" Type="1">SW5zdGFsbCBMYW5ndWFnZSBQYWNrIC0gU3RlcCAy</PHRASE>
<PHRASE Label="la_title_ItemFilters" Module="Core" Type="1">SXRlbSBGaWx0ZXJz</PHRASE>
<PHRASE Label="la_title_Items" Module="Core" Type="1">SXRlbXM=</PHRASE>
<PHRASE Label="la_title_Labels" Module="Core" Type="1">TGFiZWxz</PHRASE>
<PHRASE Label="la_title_LangManagement" Module="Core" Type="1">TGFuZy4gTWFuYWdlbWVudA==</PHRASE>
<PHRASE Label="la_title_LanguagePacks" Module="Core" Type="1">TGFuZ3VhZ2UgUGFja3M=</PHRASE>
<PHRASE Label="la_title_LanguagesManagement" Module="Core" Type="1">TGFuZ3VhZ2VzIE1hbmFnZW1lbnQ=</PHRASE>
<PHRASE Label="la_title_Loading" Module="Core" Type="1">TG9hZGluZyAuLi4=</PHRASE>
<PHRASE Label="la_title_LogOther" Module="Core" Type="1">T3RoZXI=</PHRASE>
<PHRASE Label="la_title_LogRequest" Module="Core" Type="1">UmVxdWVzdA==</PHRASE>
<PHRASE Label="la_title_LogSession" Module="Core" Type="1">U2Vzc2lvbg==</PHRASE>
<PHRASE Label="la_title_LogSource" Module="Core" Type="1">U291cmNl</PHRASE>
<PHRASE Label="la_title_MailingLists" Module="Core" Type="1">TWFpbGluZ3M=</PHRASE>
<PHRASE Label="la_title_Messages" Module="Core" Type="1">TWVzc2FnZXM=</PHRASE>
<PHRASE Label="la_title_Module_Status" Module="Core" Type="1">TW9kdWxlcw==</PHRASE>
<PHRASE Label="la_title_NewEmailTemplate" Module="Core" Type="1">TmV3IEUtbWFpbCBUZW1wbGF0ZQ==</PHRASE>
<PHRASE Label="la_title_NewFile" Module="Core" Type="1">TmV3IEZpbGU=</PHRASE>
<PHRASE Label="la_title_NewReply" Module="Core" Type="1">TmV3IFJlcGx5</PHRASE>
<PHRASE Label="la_title_NewScheduledTask" Module="Core" Type="1">TmV3IFNjaGVkdWxlZCBUYXNr</PHRASE>
<PHRASE Label="la_title_NewTheme" Module="Core" Type="1">TmV3IFRoZW1l</PHRASE>
<PHRASE Label="la_title_NewThemeFile" Module="Core" Type="1">TmV3IFRoZW1lIFRlbXBsYXRl</PHRASE>
<PHRASE Label="la_title_New_BaseStyle" Module="Core" Type="1">TmV3IEJhc2UgU3R5bGU=</PHRASE>
<PHRASE Label="la_title_New_BlockStyle" Module="Core" Type="1">TmV3IEJsb2NrIFN0eWxl</PHRASE>
<PHRASE Label="la_title_New_Category" Module="Core" Type="1">TmV3IFNlY3Rpb24=</PHRASE>
<PHRASE Label="la_title_New_ConfigSearch" Module="Core" Type="1">TmV3IEZpZWxk</PHRASE>
<PHRASE Label="la_title_New_Image" Module="Core" Type="1">TmV3IEltYWdl</PHRASE>
<PHRASE Label="la_title_New_Relationship" Module="Core" Type="1">TmV3IFJlbGF0aW9uc2hpcA==</PHRASE>
<PHRASE Label="la_title_New_Review" Module="Core" Type="1">TmV3IENvbW1lbnQ=</PHRASE>
<PHRASE Label="la_title_NoPermissions" Module="Core" Type="1">Tm8gUGVybWlzc2lvbnM=</PHRASE>
<PHRASE Label="la_title_Permissions" Module="Core" Type="1">UGVybWlzc2lvbnM=</PHRASE>
<PHRASE Label="la_title_Phrases" Module="Core" Type="1">TGFiZWxzICYgUGhyYXNlcw==</PHRASE>
<PHRASE Label="la_Title_PleaseWait" Module="Core" Type="1">UGxlYXNlIFdhaXQ=</PHRASE>
<PHRASE Label="la_title_PromoBlockGroups" Module="Core" Type="1">UHJvbW8gQmxvY2sgR3JvdXBz</PHRASE>
<PHRASE Label="la_title_PromoBlocks" Module="Core" Type="1">UHJvbW8gQmxvY2tz</PHRASE>
<PHRASE Label="la_title_Properties" Module="Core" Type="1">UHJvcGVydGllcw==</PHRASE>
<PHRASE Label="la_title_RelatedSearches" Module="Core" Type="1">UmVsYXRlZCBTZWFyY2hlcw==</PHRASE>
<PHRASE Label="la_title_Relations" Module="Core" Type="1">UmVsYXRpb25z</PHRASE>
<PHRASE Label="la_title_ReplySettings" Module="Core" Type="1">UmVwbHkgUE9QMyBTZXJ2ZXIgU2V0dGluZ3M=</PHRASE>
<PHRASE Label="la_title_Reviews" Module="Core" Type="1">Q29tbWVudHM=</PHRASE>
<PHRASE Label="la_title_RunSchedule" Module="Core" Type="1">UnVuIFNjaGVkdWxl</PHRASE>
<PHRASE Label="la_title_RunSettings" Module="Core" Type="1">UnVuIFNldHRpbmdz</PHRASE>
<PHRASE Label="la_title_ScheduledTasks" Module="Core" Type="1">U2NoZWR1bGVkIFRhc2tz</PHRASE>
<PHRASE Label="la_title_SelectGroup" Module="Core" Type="1">U2VsZWN0IEdyb3VwKHMp</PHRASE>
<PHRASE Label="la_title_SelectUser" Module="Core" Type="1">U2VsZWN0IFVzZXI=</PHRASE>
<PHRASE Label="LA_TITLE_SENDEMAIL" Module="Core" Type="1">U2VuZCBFLW1haWw=</PHRASE>
<PHRASE Label="LA_TITLE_SENDINGPREPAREDEMAILS" Module="Core" Type="1">U2VuZGluZyBQcmVwYXJlZCBFLW1haWxz</PHRASE>
<PHRASE Label="la_Title_SendMailComplete" Module="Core" Type="1">TWFpbCBoYXMgYmVlbiBzZW50IFN1Y2Nlc3NmdWxseQ==</PHRASE>
<PHRASE Label="la_title_SiteDomains" Module="Core" Type="1">U2l0ZSBEb21haW5z</PHRASE>
<PHRASE Label="la_title_SpamReports" Module="Core" Type="1">U1BBTSBSZXBvcnRz</PHRASE>
<PHRASE Label="la_title_SpellingDictionary" Module="Core" Type="1">U3BlbGxpbmcgRGljdGlvbmFyeQ==</PHRASE>
<PHRASE Label="la_title_StopWords" Module="Core" Type="1">U3RvcCBXb3Jkcw==</PHRASE>
<PHRASE Label="la_title_Structure" Module="Core" Type="1">U3RydWN0dXJlICYgRGF0YQ==</PHRASE>
<PHRASE Label="la_title_SystemCF" Module="Core" Type="1">U3lzdGVtIEN1c3RvbSBGaWVsZHM=</PHRASE>
<PHRASE Label="la_title_SystemEventSubscriptions" Module="Core" Type="1">VXNlciBTdWJzY3JpcHRpb25z</PHRASE>
<PHRASE Label="la_title_SystemTools" Module="Core" Type="1">U3lzdGVtIFRvb2xz</PHRASE>
<PHRASE Label="la_title_SystemToolsClearTemplatesCache" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+RGVsZXRlcyBhbGwgY29tcGlsZWQgdGVtcGxhdGVzIGZyb20gQWRtaW4gQ29uc29sZSBhbmQgRnJvbnQtZW5kIHRoZW1lcy48L2xpPg0KICA8bGk+UmVjb21tZW5kZWQgZm9yIHRoZSBtYWludGVuYW5jZSBwdXJwb3Nlcywgc2luY2UgZG9lcyBub3QgcHJvdmlkZSBhbnkgYWR2YW50YWdlcyBleGNlcHQgZm9yIHRlbXBvcmFyeSBsb3dlcmluZyB1c2FnZSBvZiB0aGUgZGlzayBzcGFjZS4gQWxsIHRlbXBsYXRlcyB3aWxsIGJlIGF1dG9tYXRpY2FsbHkgcmVjb21waWxlZCBhdCB0aGUgdGltZSBvZiB2aXNpdC48L2xpPg0KPC91bD4=">Q2xlYXIgVGVtcGxhdGVzIENhY2hl</PHRASE>
<PHRASE Label="la_title_SystemToolsCommonlyUsedKeys" Module="Core" Type="1">Q29tbW9ubHkgVXNlZCBLZXlz</PHRASE>
<PHRASE Label="la_title_SystemToolsDeploy" Module="Core" Type="1" Hint="PHVsPg0KPGxpPlRoaXMgZGVwbG95IHNjcmlwdCB3aWxsIGFwcGx5IGFsbCBEYXRhYmFzZSBDaGFuZ2VzIHN0b3JlZCBpbiA8Yj48dT5bbW9kdWxlXS9wcm9qZWN0X3VwZ3JhZGVzLnNxbDwvdT48L2I+IHRvIHRoZSBjdXJyZW50IHdlYnNpdGUgYW5kIHNhdmUgYXBwbGllZCBSZXZpc2lvbnMgaW4gQXBwbGllZERCUmV2aXNpb25zLjwvbGk+DQo8bGk+VGhpcyBkZXBsb3kgc2NyaXB0IHdpbGwgY3JlYXRlIGFsbCBuZXcgbGFuZ3VhZ2UgcGhyYXNlcyBieSByZS1pbXBvcnRpbmcgPGI+PHU+W21vZHVsZV0vaW5zdGFsbC9lbmdsaXNoLmxhbmc8L3U+PC9iPiBmaWxlLjwvbGk+DQo8bGk+VGhpcyBkZXBsb3kgc2NyaXB0IHdpbGwgcmVzZXQgYWxsIGNhY2hlcyBhdCBvbmNlLjwvbGk+DQo8L3VsPg==">RGVwbG95IENoYW5nZXM=</PHRASE>
<PHRASE Label="la_title_SystemToolsKeyName" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+TmFtZSBvZiB0aGUgS2V5IHVzZWQgdG8gZ2V0IG9yIHNldCB0aGUgZGF0YSAodmFsdWUpIGluIHRoZSBtZW1vcnkgY2FjaGUgKDxzdHJvbmc+PGk+a0FwcGxpY2F0aW9uOjpzZXRDYWNoZTwvaT48L3N0cm9uZz4gYW5kIDxzdHJvbmc+PGk+a0FwcGxpY2F0aW9uOjpnZXRDYWNoZTwvaT48L3N0cm9uZz4gbWV0aG9kcykuPC9saT4NCjwvdWw+">S2V5IE5hbWU=</PHRASE>
<PHRASE Label="la_title_SystemToolsKeyValue" Module="Core" Type="1" Hint="Q3VycmVudCB2YWx1ZSBvciBhIG5ldyB2YWx1ZSAoZm9yIHNldHRpbmcpIG9mIHRoZSBrZXkgbmFtZSBzcGVjaWZpZWQgYWJvdmUu">S2V5IFZhbHVl</PHRASE>
<PHRASE Label="la_title_SystemToolsLocateUnitConfigFile" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+U2hvd3MgdGhlIGxvY2F0aW9uIG9mIDxzdHJvbmc+PGk+VW5pdCBDb25maWc8L2k+PC9zdHJvbmc+IGZpbGUsIGFzc29jaWF0ZWQgd2l0aCB0aGUgZ2l2ZW4gPHN0cm9uZz48aT5Vbml0IENvbmZpZyBQcmVmaXg8L2k+PC9zdHJvbmc+IChpZS4gImFkbSIsICJ1IiwgImxhbmciIGFuZCBvdGhlcnMpLjwvbGk+DQo8L3VsPg==">TG9jYXRlIFVuaXQgQ29uZmlnIEZpbGU=</PHRASE>
<PHRASE Label="la_title_SystemToolsRebuildMultilingualFields" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+U2NhbnMgYW5kIGFkZHMgbWlzc2luZyBkYXRhYmFzZSB0YWJsZSBjb2x1bW5zIChmb3JtYXQgPHN0cm9uZz48aT4ibCZsdDtOJmd0O19GaWVsZE5hbWUiPC9pPjwvc3Ryb25nPiwgd2hlcmUgTiBpcyBhIExhbmd1YWdlSWQpIHRvIHN0b3JlIHRoZSBkYXRhIGZvciB0cmFuc2xhdGFibGUgZmllbGRzLiBUaGlzIGFjdGlvbiBpcyBwZXJmb3JtZWQgYXV0b21hdGljYWxseSB3aGVuZXZlciBhIG5ldyBMYW5ndWFnZSBpcyBjcmVhdGVkIHZpYSBBZG1pbiBDb25zb2xlLjwvbGk+DQogIDxsaT5Vc2UgdGhpcyAiUmVidWlsZCIgb3B0aW9uIG9ubHkgZm9yIHN5bmNocm9uaXphdGlvbiBvZiBkYXRhYmFzZSB0YWJsZSBjb2x1bW5zIHdpdGggbmV3bHkgYWRkZWQgbXVsdGlsaW5ndWFsIGZpZWxkcyAoa011bHRpTGFuZ3VhZ2UgZm9ybWF0dGVyKSBkZWZpbmVkIHRocm91Z2ggPHN0cm9uZz48aT5Vbml0IENvbmZpZzwvaT48L3N0cm9uZz4gZmlsZXMuPC9saT4NCjwvdWw+">UmVidWlsZCBNdWx0aWxpbmd1YWwgRmllbGRz</PHRASE>
<PHRASE Label="la_title_SystemToolsRecompileTemplates" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+Q29tcGxldGVseSByZWNvbXBpbGVzIHRoZSB0ZW1wbGF0ZXMgZm9yIGFsbCBlbmFibGVkIEZyb250LWVuZCB0aGVtZXMgYXMgd2VsbCBhcyBBZG1pbiBDb25zb2xlIHRlbXBsYXRlcyBmb3IgYWxsIGxvYWRlZCBtb2R1bGVzLjwvbGk+DQogIDxsaT5BZGRpdGlvbmFsbHksIGNoZWNrcyBmb3IgdGhlIHN5bnRheCBvZiBhbGwgPHN0cm9uZz48aT4mbHQ7aW5wMjouLi4vJmd0OzwvaT48L3N0cm9uZz4gdGFncyBhY3Jvc3MgdGhlIEluLVBvcnRhbCBpbnN0YWxsYXRpb24uPC9saT4NCiAgPGxpPlRoaXMgYWN0aW9uIGlzIG5ldmVyIHBlcmZvcm1lZCBhdXRvbWF0aWNhbGx5LiBIb3dldmVyLCBhbGwgbmV3bHkgbW9kaWZpZWQgdGVtcGxhdGVzIHdpbGwgYmUgYXV0b21hdGljYWxseSByZWNvbXBpbGVkIGJ5IHRoZSBzeXN0ZW0gYXQgdGhlIHRpbWUgb2YgdmlzaXQuPC9saT4NCjwvdWw+">UmVjb21waWxlIFRlbXBsYXRlcw==</PHRASE>
<PHRASE Label="la_title_SystemToolsRefreshThemeFiles" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+U2NhbnMgZm9yIG5ld2x5IGFkZGVkIEZyb250LWVuZCBUaGVtZSB0ZW1wbGF0ZXMgYWNyb3NzIGFsbCA8c3Ryb25nPjxpPmVuYWJsZWQ8L2k+PC9zdHJvbmc+IHRoZW1lcy4gVGhpcyBhY3Rpb24gaXMgcGVyZm9ybWVkIGF1dG9tYXRpY2FsbHkgd2hlbiBhIG5ldyB0aGVtZSBpcyBhZGRlZCBvciBleGlzdGluZyB0aGVtZSBpcyBlbmFibGVkLjwvbGk+DQogIDxsaT5BZGRpdGlvbmFsbHksIGRlbGV0ZXMgYWxsIGNvbXByZXNzZWQgYW5kIGNhY2hlZCBKYXZhc2NyaXB0L0NTUyBmaWxlcyAoLmpzIC5jc3MpIGxvYWRlZCB1c2luZyA8c3Ryb25nPjxpPiZsdDtpbnAyOm1fQ29tcHJlc3MgLi4uLyZndDs8L2k+PC9zdHJvbmc+IHRhZy48L2xpPg0KICA8bGk+VGhpcyBmdW5jdGlvbiBpcyBhbHNvIGF2YWlsYWJsZSBhcyBhICJSZWZyZXNoIiBidXR0b24gaW4gdGhlIFRoZW1lcyBzZWN0aW9uIHRvb2xiYXIgaW4gQWRtaW4gQ29uc29sZS48L2xpPg0KICA8bGk+VGhpcyBvcHRpb24gc2hvdWxkIGJlIHVzZWQgaW4gY2FzZSB3aGVuICI0MDQgTm90IEZvdW5kIiBwYWdlIGlzIHNob3duIGluc3RlYWQgb2YgZXhwZWN0ZWQgbmV3bHkgYWRkZWQgcGFnZSBvciB0ZW1wbGF0ZS48L2xpPg0KPC91bD4=">UmVmcmVzaCBUaGVtZSBGaWxlcw==</PHRASE>
<PHRASE Label="la_title_SystemToolsResetAdminConsoleSections" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+UmVzZXRzIHRoZSBjYWNoZSBvZiBBZG1pbiBDb25zb2xlIHNlY3Rpb25zIChsZWZ0IG1lbnUpLiBUaGUgZGVmaW5pdGlvbnMgb2Ygc2VjdGlvbnMgYXJlIHJlYWQgYW5kIGNvbGxlY3RlZCBmcm9tIDxzdHJvbmc+PGk+VW5pdCBDb25maWc8L2k+PC9zdHJvbmc+IGZpbGVzIHRoYXQgYWxyZWFkeSBiZWVuIHNjYW5uZWQgYW5kIGNhY2hlZCBieSB0aGUgc3lzdGVtLjwvbGk+DQogIDxsaT5Vc2UgdGhpcyByZXNldCBvcHRpb24gaWYgYSBuZXdseSBhZGRlZCBzZWN0aW9uIGRvZXNuJ3QgYXBwZWFyIGluIHRoZSBsZWZ0IEFkbWluIENvbnNvbGUgbWVudS48L2xpPg0KPC91bD4=">UmVzZXQgQWRtaW4gQ29uc29sZSBTZWN0aW9ucw==</PHRASE>
<PHRASE Label="la_title_SystemToolsResetAllKeys" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+UmVzZXRzIDxzdHJvbmc+PGk+QWxsIERhdGE8L2k+PC9zdHJvbmc+IHN0b3JlZCBpbiB0aGUgTWVtb3J5IENhY2hlLCBpbmNsdWRpbmcgYnV0IG5vdCBsaW1pdGVkIHRvIFN5c3RlbSBEYXRhIGFuZCBEYXRhYmFzZSBJdGVtcy48L2xpPg0KICA8bGk+VXNlIHdpdGggY2F1dGlvbiBkdWUgdG8gcG9zc2liaWxpdHkgb2YgbG9uZyBleGVjdXRpb24gdGltZS48L2xpPg0KPC91bD4=">UmVzZXQgQWxsIEtleXM=</PHRASE>
<PHRASE Label="la_title_SystemToolsResetConfigsAndParsedData" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+U2NhbnMgPHN0cm9uZz48aT4iY29yZSI8L2k+PC9zdHJvbmc+IGFuZCA8c3Ryb25nPjxpPiJtb2R1bGVzIjwvaT48L3N0cm9uZz4gZm9sZGVycyB0byBjYWNoZSB0aGUgbG9jYXRpb24gb2YgYWxsIDxzdHJvbmc+PGk+VW5pdCBDb25maWc8L2k+PC9zdHJvbmc+IGZpbGVzLiBUaGUgZXhlY3V0aW9uIHRpbWUgZGVwZW5kcyBvbiB0aGUgbnVtYmVyIG9mIDxzdHJvbmc+PGk+VW5pdCBDb25maWc8L2k+PC9zdHJvbmc+IGZpbGVzIGZvdW5kLjwvbGk+DQogIDxsaT5SZXNldHMgdmFyaW91cyBjYWNoZWQgc3lzdGVtIGRhdGEgc3VjaCBhcyBkZWZpbmVkIFBIUCBDbGFzc2VzIChtYXBwaW5nIGJldHdlZW4gdGhlIGNsYXNzIG5hbWUgYW5kIHBoeXNpY2FsIGZpbGVuYW1lIGFuZCBsb2NhdGlvbiBvZiB0aGUgY2xhc3MpLCBIb29rcywgU2NoZWR1bGVkIFRhc2tzLCBDYWNoZWQgQ29uZmlndXJhdGlvbiBWYXJpYWJsZXMsIFJlcGxhY2VtZW50IFRlbXBsYXRlcywgUmV3cml0ZSBMaXN0ZW5lcnMgYW5kIExvYWRlZCBNb2R1bGVzLiBEYXRhIGlzIHJlYWQgYW5kIGNvbGxlY3RlZCBmcm9tIDxzdHJvbmc+PGk+VW5pdCBDb25maWc8L2k+PC9zdHJvbmc+IGZpbGVzIHRoYXQgYWxyZWFkeSBiZWVuIHNjYW5uZWQgYW5kIGNhY2hlZCBieSB0aGUgc3lzdGVtLjwvbGk+DQogIDxsaT5EZWxldGVzIGNvbXBpbGVkIHNraW5zIGZvciBBZG1pbiBDb25zb2xlIChjc3MgZmlsZXMpLjwvbGk+DQo8L3VsPg==">UmVzZXQgQ29uZmlncyBGaWxlcyBDYWNoZSBhbmQgUGFyc2VkIFN5c3RlbSBEYXRh</PHRASE>
<PHRASE Label="la_title_SystemToolsResetModRewriteCache" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+RGVsZXRlcyB0aGUgbWFwcGluZyBiZXR3ZWVuIHRoZSBGcm9udC1lbmQgVVJMcyBhbmQgYWN0dWFsIFRoZW1lIFRlbXBsYXRlcy4gVGhpcyBtYXBwaW5nIGlzIHVwZGF0ZWQgYXV0b21hdGljYWxseSwgd2hlbiB0aGUgd2Vic2l0ZSBTdHJ1Y3R1cmUgb3IgU2VjdGlvbnMgYXJlIGNoYW5nZWQuPC9saT4NCiAgPGxpPlVzZSB0aGlzIG9wdGlvbiBvbmx5IGluIGNhc2UgaWYgTW9kUmV3cml0ZSBtb2RlIGlzIGVuYWJsZWQgYW5kIGRpc3BsYXllZCBwYWdlIGRpZmZlcnMgZnJvbSB0aGUgcGFnZSB0aGF0IGl0IHNob3VsZCBiZSwgd2hlbiBnaXZlbiBVUkwgaXMgdmlzaXRlZC48L2xpPg0KPC91bD4=">UmVzZXQgTW9kUmV3cml0ZSBDYWNoZQ==</PHRASE>
<PHRASE Label="la_title_SystemToolsResetParsedCachedData" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+UmVzZXRzIHZhcmlvdXMgY2FjaGVkIHN5c3RlbSBkYXRhIHN1Y2ggYXMgZGVmaW5lZCBQSFAgQ2xhc3NlcyAobWFwcGluZyBiZXR3ZWVuIHRoZSBjbGFzcyBuYW1lIGFuZCBwaHlzaWNhbCBmaWxlbmFtZSBhbmQgbG9jYXRpb24gb2YgdGhlIGNsYXNzKSwgSG9va3MsIFNjaGVkdWxlZCBUYXNrcywgQ2FjaGVkIENvbmZpZ3VyYXRpb24gVmFyaWFibGVzLCBSZXBsYWNlbWVudCBUZW1wbGF0ZXMsIFJld3JpdGUgTGlzdGVuZXJzIGFuZCBMb2FkZWQgTW9kdWxlcy4gRGF0YSBpcyByZWFkIGFuZCBjb2xsZWN0ZWQgZnJvbSA8c3Ryb25nPjxpPlVuaXQgQ29uZmlnPC9pPjwvc3Ryb25nPiBmaWxlcyB0aGF0IGFscmVhZHkgYmVlbiBzY2FubmVkIGFuZCBjYWNoZWQgYnkgdGhlIHN5c3RlbS48L2xpPg0KPC91bD4=">UmVzZXQgUGFyc2VkIGFuZCBDYWNoZWQgU3lzdGVtIERhdGE=</PHRASE>
<PHRASE Label="la_title_SystemToolsResetSMSMenuCache" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+RGVsZXRlcyB0aGUgY2FjaGVkIHZlcnNpb24gb2YgRnJvbnQtZW5kIG1lbnUgKGRpc3BsYXllZCB2aWEgPHN0cm9uZz48aT4mbHQ7aW5wMjpzdF9DYWNoZWRNZW51IC4uLi8mZ3Q7PC9pPjwvc3Ryb25nPiB0YWcpLiBUaGlzIGNhY2hlIGlzIHVwZGF0ZWQgYXV0b21hdGljYWxseSwgd2hlbiB0aGUgd2Vic2l0ZSBzdHJ1Y3R1cmUgb3Igc2VjdGlvbnMgYXJlIGNoYW5nZWQuPC9saT4NCiAgPGxpPlVzZSB0aGlzIG9wdGlvbiBvbmx5IGluIGNhc2UgaWYgZGlzcGxheWVkIG1lbnUgb24gdGhlIEZyb250LWVuZCBkb2Vzbid0IG1hdGNoIHRoZSBtZW51IGRlZmluZWQgaW4gQWRtaW4gQ29uc29sZS48L2xpPg0KPC91bD4=">UmVzZXQgU01TIE1lbnUgQ2FjaGU=</PHRASE>
<PHRASE Label="la_title_SystemToolsShowDatabaseTableStructure" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+U2hvd3MgdGhlIHN0cnVjdHVyZSBvZiB0aGUgZGF0YWJhc2UgdGFibGUgbG9hZGluZyBpdCBieSB0aGUgVGFibGUgTmFtZSAodGFibGUgcHJlZml4IGlzIG9wdGlvbmFsKSBvciA8c3Ryb25nPjxpPlVuaXQgQ29uZmlnIFByZWZpeDwvaT48L3N0cm9uZz4gYXNzb2NpYXRlZCB3aXRoIHRoaXMgdGFibGUuPC9saT4NCjwvdWw+">U2hvdyBEYXRhYmFzZSBUYWJsZSBTdHJ1Y3R1cmU=</PHRASE>
<PHRASE Label="la_title_SystemToolsSynchronizeDBRevisions" Module="Core" Type="1" Hint="PHVsPg0KPGxpPkFzIGEgcmVzdWx0LCBzY3JpcHQgd2lsbCBWYWxpZGF0ZSBjdXJyZW50IDxiPjx1PnByb2plY3RfdXBncmFkZXMuc3FsPC91PjwvYj4gZmlsZSBhbmQgb3V0bGluZSBhbnkgZXJyb3JzIG9yIGluY29uc2lzdGVuY2llcywgYW5kIGF1dG8tcG9wdWxhdGUgYWxsIG1pc3NpbmcgREIgUmV2aXNpb25zIGZyb20gdGhlIGZpbGUgaW50byBBcHBsaWVkREJSZXZpc2lvbnMuPC9saT4NCjxsaT48YiBzdHlsZT0iY29sb3I6cmVkIj5OT1RFOjwvYj4gRGV2ZWxvcGVycyBzaG91bGQgT05MWSBydW4gdGhpcyBiZWZvcmUgdGhleSBwZXJmb3JtIFJlcG9zaXRvcnkgVXBkYXRlcyBvbiB0aGVpIHdvcmtpbmcgY29weSE8L2xpPg0KPC91bD4=">U3luY2hyb25pemUgRGF0YWJhc2UgUmV2aXNpb25z</PHRASE>
<PHRASE Label="la_title_ThemeFiles" Module="Core" Type="1">VGhlbWUgRmlsZXM=</PHRASE>
<PHRASE Label="la_title_Thesaurus" Module="Core" Type="1">VGhlc2F1cnVz</PHRASE>
<PHRASE Label="la_title_UpdatingCategories" Module="Core" Type="1">VXBkYXRpbmcgU2VjdGlvbnM=</PHRASE>
<PHRASE Label="la_title_Users" Module="Core" Type="1">VXNlcnM=</PHRASE>
<PHRASE Label="la_title_ViewingEmailLog" Module="Core" Type="1">Vmlld2luZyBFbWFpbCBMb2c=</PHRASE>
<PHRASE Label="la_title_ViewingFormSubmission" Module="Core" Type="1">Vmlld2luZyBmb3JtIHN1Ym1pc3Npb24=</PHRASE>
<PHRASE Label="la_title_ViewingMailingList" Module="Core" Type="1">Vmlld2luZyBNYWlsaW5nIExpc3Q=</PHRASE>
<PHRASE Label="la_title_ViewingReply" Module="Core" Type="1">Vmlld2luZyBSZXBseQ==</PHRASE>
<PHRASE Label="la_title_ViewingRevision" Module="Core" Type="1">Vmlld2luZyBSZXZpc2lvbiAjJXMgKCVzKQ==</PHRASE>
<PHRASE Label="la_title_ViewingSystemLog" Module="Core" Type="1">Vmlld2luZyBTeXN0ZW0gTG9n</PHRASE>
<PHRASE Label="la_title_Visits" Module="Core" Type="1">VmlzaXRz</PHRASE>
<PHRASE Label="la_title_Website" Module="Core" Type="1">V2Vic2l0ZQ==</PHRASE>
<PHRASE Label="la_To" Module="Core" Type="1">dG8=</PHRASE>
<PHRASE Label="la_ToolTipShort_Edit_Current_Category" Module="Core" Type="1">Q3Vyci4gU2VjdGlvbg==</PHRASE>
<PHRASE Label="la_ToolTipShort_Move_Down" Module="Core" Type="1">RG93bg==</PHRASE>
<PHRASE Label="la_ToolTipShort_Move_Up" Module="Core" Type="1">VXA=</PHRASE>
<PHRASE Label="la_ToolTip_Add" Module="Core" Type="1">QWRk</PHRASE>
<PHRASE Label="la_ToolTip_AddToGroup" Module="Core" Type="1">QWRkIFVzZXIgdG8gR3JvdXA=</PHRASE>
<PHRASE Label="la_ToolTip_AddUserToGroup" Module="Core" Type="1">QWRkIFVzZXIgVG8gR3JvdXA=</PHRASE>
<PHRASE Label="la_ToolTip_Approve" Module="Core" Type="1">QXBwcm92ZQ==</PHRASE>
<PHRASE Label="la_ToolTip_Back" Module="Core" Type="1">QmFjaw==</PHRASE>
<PHRASE Label="la_ToolTip_cancel" Module="Core" Type="1">Q2FuY2Vs</PHRASE>
<PHRASE Label="la_ToolTip_ClearClipboard" Module="Core" Type="1">Q2xlYXIgQ2xpcGJvYXJk</PHRASE>
<PHRASE Label="la_ToolTip_Clone" Module="Core" Type="1">Q2xvbmU=</PHRASE>
<PHRASE Label="la_ToolTip_CloneUser" Module="Core" Type="1">Q2xvbmUgVXNlcnM=</PHRASE>
<PHRASE Label="la_ToolTip_close" Module="Core" Type="1">Q2xvc2U=</PHRASE>
<PHRASE Label="la_ToolTip_Copy" Module="Core" Type="1">Q29weQ==</PHRASE>
<PHRASE Label="la_ToolTip_Cut" Module="Core" Type="1">Q3V0</PHRASE>
<PHRASE Label="la_ToolTip_Decline" Module="Core" Type="1">RGVjbGluZQ==</PHRASE>
<PHRASE Label="la_ToolTip_Delete" Module="Core" Type="1">RGVsZXRl</PHRASE>
<PHRASE Label="la_ToolTip_DeleteAll" Module="Core" Type="1">RGVsZXRlIEFsbA==</PHRASE>
<PHRASE Label="la_ToolTip_DeleteReview" Module="Core" Type="1">RGVsZXRlIFJldmlldw==</PHRASE>
<PHRASE Label="la_ToolTip_DeleteSpamReportOnly" Module="Core" Type="1">RGVsZXRlIFJlcG9ydCBPbmx5</PHRASE>
<PHRASE Label="la_ToolTip_Deny" Module="Core" Type="1">RGVueQ==</PHRASE>
<PHRASE Label="la_ToolTip_Details" Module="Core" Type="1">RGV0YWlscw==</PHRASE>
<PHRASE Label="la_ToolTip_Disable" Module="Core" Type="1">RGlzYWJsZQ==</PHRASE>
<PHRASE Label="la_ToolTip_Discard" Module="Core" Type="1">RGlzY2FyZA==</PHRASE>
<PHRASE Label="la_ToolTip_Edit" Module="Core" Type="1">RWRpdA==</PHRASE>
<PHRASE Label="la_ToolTip_Edit_Current_Category" Module="Core" Type="1">RWRpdCBDdXJyZW50IFNlY3Rpb24=</PHRASE>
<PHRASE Label="la_ToolTip_Email_FrontOnly" Module="Core" Type="1">RnJvbnQtRW5kIE9ubHk=</PHRASE>
<PHRASE Label="la_ToolTip_Enable" Module="Core" Type="1">RW5hYmxl</PHRASE>
<PHRASE Label="la_ToolTip_Export" Module="Core" Type="1">RXhwb3J0</PHRASE>
<PHRASE Label="la_ToolTip_ExportLanguage" Module="Core" Type="1">RXhwb3J0IExhbmd1YWdl</PHRASE>
<PHRASE Label="la_ToolTip_HideMenu" Module="Core" Type="1">SGlkZSBNZW51</PHRASE>
<PHRASE Label="la_ToolTip_History" Module="Core" Type="1">SGlzdG9yeQ==</PHRASE>
<PHRASE Label="la_ToolTip_Home" Module="Core" Type="1">SG9tZQ==</PHRASE>
<PHRASE Label="la_ToolTip_Import" Module="Core" Type="1">SW1wb3J0</PHRASE>
<PHRASE Label="la_ToolTip_ImportLanguage" Module="Core" Type="1">SW1wb3J0IExhbmd1YWdl</PHRASE>
<PHRASE Label="la_ToolTip_LoginAs" Module="Core" Type="1">TG9naW4gQXM=</PHRASE>
<PHRASE Label="la_ToolTip_MoveDown" Module="Core" Type="1">TW92ZSBEb3du</PHRASE>
<PHRASE Label="la_ToolTip_MoveUp" Module="Core" Type="1">TW92ZSBVcA==</PHRASE>
<PHRASE Label="la_ToolTip_NewBaseStyle" Module="Core" Type="1">TmV3IEJhc2UgU3R5bGU=</PHRASE>
<PHRASE Label="la_ToolTip_NewBlockStyle" Module="Core" Type="1">TmV3IEJsb2NrIFN0eWxl</PHRASE>
<PHRASE Label="la_ToolTip_NewCountryState" Module="Core" Type="1">TmV3IENvdW50cnkvU3RhdGU=</PHRASE>
<PHRASE Label="la_ToolTip_NewGroup" Module="Core" Type="1">TmV3IEdyb3Vw</PHRASE>
<PHRASE Label="la_ToolTip_newlabel" Module="Core" Type="1">TmV3IGxhYmVs</PHRASE>
<PHRASE Label="la_ToolTip_NewLanguage" Module="Core" Type="1">TmV3IExhbmd1YWdl</PHRASE>
<PHRASE Label="la_ToolTip_NewPermission" Module="Core" Type="1">TmV3IFBlcm1pc3Npb24=</PHRASE>
<PHRASE Label="la_ToolTip_NewPhrase" Module="Core" Type="1">TmV3IFBocmFzZQ==</PHRASE>
<PHRASE Label="la_ToolTip_NewReview" Module="Core" Type="1">TmV3IENvbW1lbnQ=</PHRASE>
<PHRASE Label="la_ToolTip_NewScheduledTask" Module="Core" Type="1">TmV3IFNjaGVkdWxlZCBUYXNr</PHRASE>
<PHRASE Label="la_ToolTip_NewSearchConfig" Module="Core" Type="1">TmV3IFNlYXJjaCBGaWVsZA==</PHRASE>
<PHRASE Label="la_ToolTip_NewSiteDomain" Module="Core" Type="1">TmV3IFNpdGUgRG9tYWlu</PHRASE>
<PHRASE Label="la_ToolTip_NewStopWord" Module="Core" Type="1">TmV3IFN0b3AgV29yZA==</PHRASE>
<PHRASE Label="la_ToolTip_NewSystemSetting" Module="Core" Type="1">TmV3IFN5c3RlbSBTZXR0aW5n</PHRASE>
<PHRASE Label="la_ToolTip_NewTerm" Module="Core" Type="1">TmV3IFRlcm0=</PHRASE>
<PHRASE Label="la_ToolTip_newtheme" Module="Core" Type="1">TmV3IFRoZW1l</PHRASE>
<PHRASE Label="la_ToolTip_NewUser" Module="Core" Type="1">TmV3IFVzZXI=</PHRASE>
<PHRASE Label="la_ToolTip_New_Category" Module="Core" Type="1">TmV3IFNlY3Rpb24=</PHRASE>
<PHRASE Label="la_ToolTip_New_CustomField" Module="Core" Type="1">TmV3IEN1c3RvbSBGaWVsZA==</PHRASE>
<PHRASE Label="la_ToolTip_New_Form" Module="Core" Type="1">TmV3IEZvcm0=</PHRASE>
<PHRASE Label="la_ToolTip_New_FormField" Module="Core" Type="1">TmV3IEZvcm0gRmllbGQ=</PHRASE>
<PHRASE Label="la_ToolTip_new_images" Module="Core" Type="1">TmV3IEltYWdlcw==</PHRASE>
<PHRASE Label="la_ToolTip_New_Keyword" Module="Core" Type="1">QWRkIEtleXdvcmQ=</PHRASE>
<PHRASE Label="la_ToolTip_New_Relation" Module="Core" Type="1">TmV3IFJlbGF0aW9u</PHRASE>
<PHRASE Label="la_ToolTip_New_Template" Module="Core" Type="1">TmV3IFRlbXBsYXRl</PHRASE>
<PHRASE Label="la_ToolTip_Next" Module="Core" Type="1">TmV4dA==</PHRASE>
<PHRASE Label="la_ToolTip_Paste" Module="Core" Type="1">UGFzdGU=</PHRASE>
<PHRASE Label="la_ToolTip_Prev" Module="Core" Type="1">UHJldmlvdXM=</PHRASE>
<PHRASE Label="la_ToolTip_Preview" Module="Core" Type="1">UHJldmlldw==</PHRASE>
<PHRASE Label="la_ToolTip_PrimaryGroup" Module="Core" Type="1">U2V0IFByaW1hcnkgR3JvdXA=</PHRASE>
<PHRASE Label="la_ToolTip_Print" Module="Core" Type="1">UHJpbnQ=</PHRASE>
<PHRASE Label="la_ToolTip_ProcessQueue" Module="Core" Type="1">UHJvY2VzcyBRdWV1ZQ==</PHRASE>
<PHRASE Label="la_ToolTip_Publish" Module="Core" Type="1">UHVibGlzaA==</PHRASE>
<PHRASE Label="la_ToolTip_RebuildCategoryCache" Module="Core" Type="1">UmVidWlsZCBTZWN0aW9uIENhY2hl</PHRASE>
<PHRASE Label="la_ToolTip_RecalculatePriorities" Module="Core" Type="1">UmVjYWxjdWxhdGUgUHJpb3JpdGllcw==</PHRASE>
<PHRASE Label="la_ToolTip_Refresh" Module="Core" Type="1">UmVmcmVzaA==</PHRASE>
<PHRASE Label="la_ToolTip_Reply" Module="Core" Type="1">UmVwbHk=</PHRASE>
<PHRASE Label="la_ToolTip_RescanThemes" Module="Core" Type="1">UmVzY2FuIFRoZW1lcw==</PHRASE>
<PHRASE Label="la_ToolTip_Resend" Module="Core" Type="1">UmVzZW5k</PHRASE>
<PHRASE Label="la_ToolTip_Reset" Module="Core" Type="1">UmVzZXQ=</PHRASE>
<PHRASE Label="la_ToolTip_ResetCounters" Module="Core" Type="1">UmVzZXQgQ291bnRlcnM=</PHRASE>
<PHRASE Label="la_ToolTip_ResetSettings" Module="Core" Type="1">UmVzZXQgUGVyc2lzdGVudCBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_ToolTip_ResetToBase" Module="Core" Type="1">UmVzZXQgVG8gQmFzZQ==</PHRASE>
<PHRASE Label="la_ToolTip_Run" Module="Core" Type="1">UnVu</PHRASE>
<PHRASE Label="la_ToolTip_RunSQL" Module="Core" Type="1">UnVuIFNRTA==</PHRASE>
<PHRASE Label="la_ToolTip_save" Module="Core" Type="1">U2F2ZQ==</PHRASE>
<PHRASE Label="la_ToolTip_SaveAsDraft" Module="Core" Type="1">U2F2ZSBhcyBEcmFmdA==</PHRASE>
<PHRASE Label="la_ToolTip_Search" Module="Core" Type="1">U2VhcmNo</PHRASE>
<PHRASE Label="la_ToolTip_SearchReset" Module="Core" Type="1">UmVzZXQ=</PHRASE>
<PHRASE Label="la_ToolTip_SelectUser" Module="Core" Type="1">U2VsZWN0IFVzZXI=</PHRASE>
<PHRASE Label="la_ToolTip_Send" Module="Core" Type="1">U2VuZA==</PHRASE>
<PHRASE Label="la_ToolTip_SendEmail" Module="Core" Type="1">U2VuZCBFLW1haWw=</PHRASE>
<PHRASE Label="la_ToolTip_SendMail" Module="Core" Type="1">U2VuZCBFLW1haWw=</PHRASE>
<PHRASE Label="la_ToolTip_setPrimary" Module="Core" Type="1">U2V0IFByaW1hcnk=</PHRASE>
<PHRASE Label="la_ToolTip_setprimarycategory" Module="Core" Type="1">U2V0IFByaW1hcnkgU2VjdGlvbg==</PHRASE>
<PHRASE Label="la_ToolTip_SetPrimaryLanguage" Module="Core" Type="1">U2V0IFByaW1hcnkgTGFuZ3VhZ2U=</PHRASE>
<PHRASE Label="la_ToolTip_SetPrimaryTranslation" Module="Core" Type="1" Hint="VXNlIHRoaXMgdHJhbnNsYXRpb24gYXMgcHJpbWFyeSBmb3Igb3RoZXIgbGFuZ3VhZ2Vz">VXNlIGFzIFByaW1hcnk=</PHRASE>
<PHRASE Label="la_ToolTip_SetSticky" Module="Core" Type="1">U2V0IFN0aWNreQ==</PHRASE>
<PHRASE Label="la_ToolTip_Settings" Module="Core" Type="1">U2V0dGluZ3M=</PHRASE>
<PHRASE Label="la_ToolTip_ShowMenu" Module="Core" Type="1">U2hvdyBNZW51</PHRASE>
<PHRASE Label="la_ToolTip_SynchronizeLanguages" Module="Core" Type="1">U3luY2hyb25pemUgTGFuZ3VhZ2Vz</PHRASE>
<PHRASE Label="la_ToolTip_Tools" Module="Core" Type="1">VG9vbHM=</PHRASE>
<PHRASE Label="la_ToolTip_Up" Module="Core" Type="1">VXAgYSBTZWN0aW9u</PHRASE>
<PHRASE Label="la_ToolTip_ValidateSelected" Module="Core" Type="1">VmFsaWRhdGU=</PHRASE>
<PHRASE Label="la_ToolTip_View" Module="Core" Type="1">Vmlldw==</PHRASE>
<PHRASE Label="la_ToolTip_ViewDetails" Module="Core" Type="1">VmlldyBEZXRhaWxz</PHRASE>
<PHRASE Label="la_ToolTip_ViewItem" Module="Core" Type="1">Vmlldw==</PHRASE>
<PHRASE Label="la_to_date" Module="Core" Type="1">VG8gRGF0ZQ==</PHRASE>
<PHRASE Label="la_translate" Module="Core" Type="1">VHJhbnNsYXRl</PHRASE>
<PHRASE Label="la_Translated" Module="Core" Type="1">VHJhbnNsYXRlZA==</PHRASE>
<PHRASE Label="la_Trees" Module="Core" Type="1">VHJlZQ==</PHRASE>
<PHRASE Label="la_type_checkbox" Module="Core" Type="1">Q2hlY2tib3hlcw==</PHRASE>
<PHRASE Label="la_type_date" Module="Core" Type="1">RGF0ZQ==</PHRASE>
<PHRASE Label="la_type_datetime" Module="Core" Type="1">RGF0ZSAmIFRpbWU=</PHRASE>
<PHRASE Label="la_type_label" Module="Core" Type="1">TGFiZWw=</PHRASE>
<PHRASE Label="la_type_multiselect" Module="Core" Type="1">TXVsdGlwbGUgU2VsZWN0</PHRASE>
<PHRASE Label="la_type_password" Module="Core" Type="1">UGFzc3dvcmQgZmllbGQ=</PHRASE>
<PHRASE Label="la_type_radio" Module="Core" Type="1">UmFkaW8gYnV0dG9ucw==</PHRASE>
<PHRASE Label="la_type_RangeSlider" Module="Core" Type="1">UmFuZ2UgU2xpZGVy</PHRASE>
<PHRASE Label="la_type_select" Module="Core" Type="1">RHJvcCBkb3duIGZpZWxk</PHRASE>
<PHRASE Label="la_type_SingleCheckbox" Module="Core" Type="1">Q2hlY2tib3g=</PHRASE>
<PHRASE Label="la_type_text" Module="Core" Type="1">VGV4dCBmaWVsZA==</PHRASE>
<PHRASE Label="la_type_textarea" Module="Core" Type="1">VGV4dCBhcmVh</PHRASE>
<PHRASE Label="la_type_Upload" Module="Core" Type="1">RmlsZSBVcGxvYWQ=</PHRASE>
<PHRASE Label="la_Unchanged" Module="Core" Type="1">VW5jaGFuZ2Vk</PHRASE>
<PHRASE Label="la_Unicode" Module="Core" Type="1">VW5pY29kZQ==</PHRASE>
<PHRASE Label="la_updating_config" Module="Core" Type="1">VXBkYXRpbmcgQ29uZmlndXJhdGlvbg==</PHRASE>
<PHRASE Label="la_Upload" Module="Core" Type="1">VXBsb2Fk</PHRASE>
<PHRASE Label="la_UseCronForRegularEvent" Module="Core" Type="1">VXNlIENyb24gdG8gcnVuIFNjaGVkdWxlZCBUYXNrcw==</PHRASE>
<PHRASE Label="la_users_admin_group" Module="Core" Type="1">QXNzaWduIGFkbWluaXN0cmF0b3JzIHRvIGdyb3Vw</PHRASE>
<PHRASE Label="la_users_allow_new" Module="Core" Type="1">QWxsb3cgbmV3IHVzZXIgcmVnaXN0cmF0aW9u</PHRASE>
<PHRASE Label="la_users_assign_all_to" Module="Core" Type="1">QXNzaWduIEFsbCBVc2VycyBUbyBHcm91cA==</PHRASE>
<PHRASE Label="la_users_guest_group" Module="Core" Type="1">QXNzaWduIHVzZXJzIG5vdCBsb2dnZWQgaW4gdG8gZ3JvdXA=</PHRASE>
<PHRASE Label="la_users_new_group" Module="Core" Type="1">QXNzaWduIHJlZ2lzdGVyZWQgdXNlcnMgdG8gZ3JvdXA=</PHRASE>
<PHRASE Label="la_users_password_auto" Module="Core" Type="1">QXNzaWduIHBhc3N3b3JkIGF1dG9tYXRpY2FsbHk=</PHRASE>
<PHRASE Label="la_users_subscriber_group" Module="Core" Type="1">QXNzaWduIG1haWxpbmcgbGlzdCBzdWJzY3JpYmVycyB0byBncm91cA==</PHRASE>
<PHRASE Label="la_US_UK" Module="Core" Type="1">VVMvVUs=</PHRASE>
<PHRASE Label="la_ValidationEmail" Module="Core" Type="1">RS1tYWlsIGFkZHJlc3M=</PHRASE>
<PHRASE Label="la_Value" Module="Core" Type="1">VmFsdWU=</PHRASE>
<PHRASE Label="la_visit_DirectReferer" Module="Core" Type="1">RGlyZWN0IGFjY2VzcyBvciBib29rbWFyaw==</PHRASE>
<PHRASE Label="la_Warning_Enable_HTML" Module="Core" Type="1">V2FybmluZzogRW5hYmxpbmcgSFRNTCBpcyBhIHNlY3VyaXR5IHJpc2sgYW5kIGNvdWxkIGRhbWFnZSB0aGUgc3lzdGVtIGlmIHVzZWQgaW1wcm9wZXJseSE=</PHRASE>
<PHRASE Label="la_Warning_Filter" Module="Core" Type="1">QSBzZWFyY2ggb3IgYSBmaWx0ZXIgaXMgaW4gZWZmZWN0LiBZb3UgbWF5IG5vdCBiZSBzZWVpbmcgYWxsIG9mIHRoZSBkYXRhLg==</PHRASE>
<PHRASE Label="la_Warning_NewFormError" Module="Core" Type="1">T25lIG9yIG1vcmUgZmllbGRzIG9uIHRoaXMgZm9ybSBoYXMgYW4gZXJyb3IuPGJyLz4NCjxzbWFsbD5QbGVhc2UgbW92ZSB5b3VyIG1vdXNlIG92ZXIgdGhlIGZpZWxkcyBtYXJrZWQgd2l0aCByZWQgdG8gc2VlIHRoZSBlcnJvciBkZXRhaWxzLjwvc21hbGw+</PHRASE>
<PHRASE Label="la_Warning_Save_Item" Module="Core" Type="1">TW9kaWZpY2F0aW9ucyB3aWxsIG5vdCB0YWtlIGVmZmVjdCB1bnRpbCB5b3UgY2xpY2sgdGhlIFNhdmUgYnV0dG9uIQ==</PHRASE>
<PHRASE Label="la_week" Module="Core" Type="1">d2Vlaw==</PHRASE>
<PHRASE Label="la_Windows" Module="Core" Type="1">V2luZG93cw==</PHRASE>
<PHRASE Label="la_year" Module="Core" Type="1">eWVhcg==</PHRASE>
<PHRASE Label="la_Yes" Module="Core" Type="1">WWVz</PHRASE>
<PHRASE Label="lc_field_CachedDescendantCatsQty" Module="Core" Type="2">U3ViLXNlY3Rpb25zIFF1YW50aXR5</PHRASE>
<PHRASE Label="lc_field_CachedNavBar" Module="Core" Type="2">TmF2aWdhdGlvbiBCYXI=</PHRASE>
<PHRASE Label="lc_field_cachedrating" Module="Core" Type="2">UmF0aW5n</PHRASE>
<PHRASE Label="lc_field_cachedreviewsqty" Module="Core" Type="2">TnVtYmVyIG9mIFJldmlld3M=</PHRASE>
<PHRASE Label="lc_field_cachedvotesqty" Module="Core" Type="2">TnVtYmVyIG9mIFJhdGluZyBWb3Rlcw==</PHRASE>
<PHRASE Label="lc_field_CategoryId" Module="Core" Type="2">U2VjdGlvbiBJRA==</PHRASE>
<PHRASE Label="lc_field_createdbyid" Module="Core" Type="2">Q3JlYXRlZCBCeSBVc2VyIElE</PHRASE>
<PHRASE Label="lc_field_createdon" Module="Core" Type="2">RGF0ZSBDcmVhdGVk</PHRASE>
<PHRASE Label="lc_field_description" Module="Core" Type="2">RGVzY3JpcHRpb24=</PHRASE>
<PHRASE Label="lc_field_EditorsPick" Module="Core" Type="2">RWRpdG9ycyBQaWNr</PHRASE>
<PHRASE Label="lc_field_hits" Module="Core" Type="2">SGl0cw==</PHRASE>
<PHRASE Label="lc_field_hotitem" Module="Core" Type="2">SXRlbSBJcyBIb3Q=</PHRASE>
<PHRASE Label="lc_field_linkid" Module="Core" Type="2">TGluayBJRA==</PHRASE>
<PHRASE Label="lc_field_MetaDescription" Module="Core" Type="2">TWV0YSBEZXNjcmlwdGlvbg==</PHRASE>
<PHRASE Label="lc_field_MetaKeywords" Module="Core" Type="2">TWV0YSBLZXl3b3Jkcw==</PHRASE>
<PHRASE Label="lc_field_modified" Module="Core" Type="2">TGFzdCBNb2RpZmllZCBEYXRl</PHRASE>
<PHRASE Label="lc_field_modifiedbyid" Module="Core" Type="2">TW9kaWZpZWQgQnkgVXNlciBJRA==</PHRASE>
<PHRASE Label="lc_field_name" Module="Core" Type="2">TmFtZQ==</PHRASE>
<PHRASE Label="lc_field_newitem" Module="Core" Type="2">SXRlbSBJcyBOZXc=</PHRASE>
<PHRASE Label="lc_field_notifyowneronchanges" Module="Core" Type="2">Tm90aWZ5IE93bmVyIG9mIENoYW5nZXM=</PHRASE>
<PHRASE Label="lc_field_orgid" Module="Core" Type="2">T3JpZ2luYWwgSXRlbSBJRA==</PHRASE>
<PHRASE Label="lc_field_ownerid" Module="Core" Type="2">T3duZXIgVXNlciBJRA==</PHRASE>
<PHRASE Label="lc_field_ParentId" Module="Core" Type="2">UGFyZW50IElE</PHRASE>
<PHRASE Label="lc_field_ParentPath" Module="Core" Type="2">UGFyZW50IFBhdGg=</PHRASE>
<PHRASE Label="lc_field_popitem" Module="Core" Type="2">SXRlbSBJcyBQb3B1bGFy</PHRASE>
<PHRASE Label="lc_field_priority" Module="Core" Type="2">UHJpb3JpdHk=</PHRASE>
<PHRASE Label="lc_field_qtysold" Module="Core" Type="2">UXR5IFNvbGQ=</PHRASE>
<PHRASE Label="lc_field_resourceid" Module="Core" Type="2">UmVzb3VyY2UgSUQ=</PHRASE>
<PHRASE Label="lc_field_status" Module="Core" Type="2">U3RhdHVz</PHRASE>
<PHRASE Label="lc_field_topseller" Module="Core" Type="2">SXRlbSBJcyBhIFRvcCBTZWxsZXI=</PHRASE>
<PHRASE Label="lc_field_url" Module="Core" Type="2">VVJM</PHRASE>
<PHRASE Label="lc_of" Module="Core" Type="2">b2Y=</PHRASE>
<PHRASE Label="lc_Text_Invalid" Module="Core" Type="2">SW52YWxpZA==</PHRASE>
<PHRASE Label="lc_Text_Not_Validated" Module="Core" Type="2">Tm90IFZhbGlkYXRlZA==</PHRASE>
<PHRASE Label="lc_Text_Valid" Module="Core" Type="2">VmFsaWQ=</PHRASE>
</PHRASES>
<EVENTS>
<EVENT Event="CATEGORY.ADD" Type="0">
<SUBJECT>TmV3IENhdGVnb3J5ICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIC0gQWRkZWQ=</SUBJECT>
<HTMLBODY>WW91ciBzdWdnZXN0ZWQgY2F0ZWdvcnkgIjxpbnAyOmNfRmllbGQgbmFtZT0iTmFtZSIvPiIgaGFzIGJlZW4gYWRkZWQu</HTMLBODY>
</EVENT>
<EVENT Event="CATEGORY.ADD" Type="1">
<SUBJECT>TmV3IENhdGVnb3J5ICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIFN1Ym1pdHRlZCBieSBVc2Vycw==</SUBJECT>
<HTMLBODY>QSBjYXRlZ29yeSAiPGlucDI6Y19GaWVsZCBuYW1lPSJOYW1lIi8+IiBoYXMgYmVlbiBhZGRlZC4=</HTMLBODY>
</EVENT>
<EVENT Event="CATEGORY.ADD.PENDING" Type="0">
<SUBJECT>U3VnZ2VzdGVkIENhdGVnb3J5ICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIGlzIFBlbmRpbmc=</SUBJECT>
<HTMLBODY>VGhlIGNhdGVnb3J5IHlvdSBzdWdnZXN0ZWQgIjxpbnAyOmNfRmllbGQgbmFtZT0iTmFtZSIvPiIgaXMgcGVuZGluZyBmb3IgYWRtaW5pc3RyYXRpdmUgYXBwcm92YWwuDQoNClRoYW5rIHlvdSE=</HTMLBODY>
</EVENT>
<EVENT Event="CATEGORY.ADD.PENDING" Type="1">
<SUBJECT>U3VnZ2VzdGVkIENhdGVnb3J5ICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIGlzIFBlbmRpbmc=</SUBJECT>
<HTMLBODY>QSBjYXRlZ29yeSAiPGlucDI6Y19GaWVsZCBuYW1lPSJOYW1lIi8+IiBoYXMgYmVlbiBhZGRlZCwgcGVuZGluZyB5b3VyIGNvbmZpcm1hdGlvbi4gIFBsZWFzZSByZXZpZXcgdGhlIGNhdGVnb3J5IGFuZCBhcHByb3ZlIG9yIGRlbnkgaXQu</HTMLBODY>
</EVENT>
<EVENT Event="CATEGORY.APPROVE" Type="0">
<SUBJECT>QSBjYXRlZ29yeSBoYXMgYmVlbiBhcHByb3ZlZA==</SUBJECT>
<HTMLBODY>WW91ciBzdWdnZXN0ZWQgY2F0ZWdvcnkgIjxpbnAyOmNfRmllbGQgbmFtZT0iTmFtZSIvPiIgaGFzIGJlZW4gYXBwcm92ZWQu</HTMLBODY>
</EVENT>
<EVENT Event="CATEGORY.DENY" Type="0">
<SUBJECT>WW91ciBDYXRlZ29yeSAiPGlucDI6Y19GaWVsZCBuYW1lPSJOYW1lIi8+IiBoYXMgYmVlbiBEZW5pZWQ=</SUBJECT>
<HTMLBODY>WW91ciBjYXRlZ29yeSBzdWdnZXN0aW9uICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIGhhcyBiZWVuIGRlbmllZC4=</HTMLBODY>
</EVENT>
<EVENT Event="FORM.SUBMISSION.REPLY.FROM.USER" Type="1">
<SUBJECT>TmV3IEVtYWlsIFJFUExZIFJlY2VpdmVkIGluICJGZWVkYmFjayBNYW5hZ2VyIiAoPGlucDI6Zm9ybXN1YnMuLWl0ZW1fRmllbGQgbmFtZT0iRm9ybVN1Ym1pc3Npb25JZCIvPik=</SUBJECT>
<HTMLBODY>TmV3IEVtYWlsIFJFUExZIFJlY2VpdmVkIGluICZxdW90O0ZlZWRiYWNrIE1hbmFnZXImcXVvdDsuPGJyIC8+DQo8YnIgLz4NCk9yaWdpbmFsIEZlZWRiYWNrSWQ6IDxpbnAyOmZvcm1zdWJzLi1pdGVtX0ZpZWxkIG5hbWU9IkZvcm1TdWJtaXNzaW9uSWQiLz4gPGJyIC8+DQpPcmlnaW5hbCBTdWJqZWN0OiA8aW5wMjpmb3Jtc3Vicy4taXRlbV9Gb3JtRmllbGQgcm9sZT0ic3ViamVjdCIvPiA8YnIgLz4NCjxiciAvPg0KUGxlYXNlIHByb2NlZWQgdG8gdGhlIEFkbWluIENvbnNvbGUgaW4gb3JkZXIgdG8gcmV2aWV3IGFuZCByZXBseSB0byB0aGUgdXNlci4=</HTMLBODY>
</EVENT>
<EVENT Event="FORM.SUBMISSION.REPLY.FROM.USER.BOUNCED" Type="1">
<SUBJECT>TmV3IEVtYWlsIC0gRGVsaXZlcnkgRmFpbHVyZSBSZWNlaXZlZCBpbiAiRmVlZGJhY2sgTWFuYWdlciIgKDxpbnAyOmZvcm1zdWJzLi1pdGVtX0ZpZWxkIG5hbWU9IkZvcm1TdWJtaXNzaW9uSWQiLz4p</SUBJECT>
<HTMLBODY>TmV3IEVtYWlsIERlbGl2ZXJ5IEZhaWx1cmUgUmVjZWl2ZWQgaW4gJnF1b3Q7RmVlZGJhY2sgTWFuYWdlciZxdW90Oy48YnIgLz4NCjxiciAvPg0KT3JpZ2luYWwgRmVlZGJhY2tJZDogPGlucDI6Zm9ybXN1YnMuLWl0ZW1fRmllbGQgbmFtZT0iRm9ybVN1Ym1pc3Npb25JZCIvPiA8YnIgLz4NCk9yaWdpbmFsIFN1YmplY3Q6IDxpbnAyOmZvcm1zdWJzLi1pdGVtX0Zvcm1GaWVsZCByb2xlPSJzdWJqZWN0Ii8+IDxiciAvPg0KPGJyIC8+DQpQbGVhc2UgcHJvY2VlZCB0byB0aGUgQWRtaW4gQ29uc29sZSBpbiBvcmRlciB0byByZXZpZXcgYW5kIHJlcGx5IHRvIHRoZSB1c2VyLg==</HTMLBODY>
</EVENT>
<EVENT Event="FORM.SUBMISSION.REPLY.TO.USER" Type="1">
<SUBJECT>PGlucDI6bV9QYXJhbSBuYW1lPSJzdWJqZWN0Ii8+ICN2ZXJpZnk8aW5wMjpzdWJtaXNzaW9uLWxvZ19GaWVsZCBuYW1lPSJWZXJpZnlDb2RlIi8+</SUBJECT>
<PLAINTEXTBODY>PGlucDI6bV9QYXJhbSBuYW1lPSJtZXNzYWdlIi8+</PLAINTEXTBODY>
</EVENT>
<EVENT Event="FORM.SUBMITTED" Type="0">
<SUBJECT>VGhhbmsgWW91IGZvciBDb250YWN0aW5nIFVzIQ==</SUBJECT>
<HTMLBODY>PHA+VGhhbmsgeW91IGZvciBjb250YWN0aW5nIHVzLiBXZSdsbCBiZSBpbiB0b3VjaCB3aXRoIHlvdSBzaG9ydGx5ITwvcD4=</HTMLBODY>
</EVENT>
<EVENT Event="FORM.SUBMITTED" Type="1">
<SUBJECT>TmV3IGZvcm0gc3VibWlzc2lvbg==</SUBJECT>
<HTMLBODY>PHA+Rm9ybSBoYXMgYmVlbiBzdWJtaXR0ZWQuIFBsZWFzZSBwcm9jZWVkIHRvIHRoZSBBZG1pbiBDb25zb2xlIHRvIHJldmlldyB0aGUgc3VibWlzc2lvbiE8L3A+</HTMLBODY>
</EVENT>
<EVENT Event="ROOT.RESET.PASSWORD" Type="1">
<SUBJECT>Um9vdCBSZXNldCBQYXNzd29yZA==</SUBJECT>
<HTMLBODY>WW91ciBuZXcgcGFzc3dvcmQgaXM6IDxpbnAyOm1fUGFyYW0gbmFtZT0icGFzc3dvcmQiLz4=</HTMLBODY>
</EVENT>
<EVENT Event="SYSTEM.LOG.NOTIFY" Type="1">
<SUBJECT>U3lzdGVtIExvZyBOb3RpZmljYXRpb25zICg8aW5wMjpzeXN0ZW0tbG9nLmVtYWlsX1RvdGFsUmVjb3Jkcy8+KQ==</SUBJECT>
<HTMLBODY>PGlucDI6bV9EZWZpbmVFbGVtZW50IG5hbWU9ImJhY2t0cmFjZV9lbGVtZW50Ij4NCgk8bGk+PGlucDI6bV9QaHJhc2UgbmFtZT0ibGFfTG9nQmFja3RyYWNlRnVuY3Rpb24iLz46IDxpbnAyOm1fUGFyYW0gbmFtZT0iZmlsZV9pbmZvIi8+PC9saT4NCjwvaW5wMjptX0RlZmluZUVsZW1lbnQ+DQoNCjxpbnAyOm1fRGVmaW5lRWxlbWVudCBuYW1lPSJzeXN0ZW1fbG9nX2VsZW1lbnQiPg0KCTxoND48aW5wMjpGaWVsZCBuYW1lPSJMb2dUaW1lc3RhbXAiIGZvcm1hdD0iTSBkIEg6aTpzIi8+IDxpbnAyOkZpZWxkIG5hbWU9IkxvZ0hvc3RuYW1lIi8+IDxpbnAyOlJlcXVlc3RVUkkgaHRtbF9lc2NhcGU9IjEiLz5bUElEPTxpbnAyOkZpZWxkIG5hbWU9IkxvZ1Byb2Nlc3NJZCIvPixVSUQ9PGlucDI6RmllbGQgbmFtZT0iTG9nVW5pcXVlSWQiLz5dPC9oND4NCglbPGlucDI6RmllbGQgbmFtZT0iTG9nTGV2ZWwiLz5dICM8aW5wMjpGaWVsZCBuYW1lPSJMb2dDb2RlIi8+OiA8aW5wMjpGaWVsZCBuYW1lPSJMb2dNZXNzYWdlIiBub19zcGVjaWFsPSIxIi8+IGluIDxpbnAyOkZpbGVuYW1lLz4gb24gbGluZSA8aW5wMjpGaWVsZCBuYW1lPSJMb2dTb3VyY2VGaWxlTGluZSIvPjxici8+DQoNCgk8aW5wMjptX2lmIGNoZWNrPSJGaWVsZCIgbmFtZT0iTG9nQmFja3RyYWNlIiBkYj0iZGIiPg0KCQk8YnIvPkJhY2t0cmFjZToNCg0KCQk8b2wgc3R5bGU9Im1hcmdpbjogMDsgcGFkZGluZy1sZWZ0OiAyNXB4OyBmb250LXNpemU6IDEycHg7Ij4NCgkJCTxpbnAyOlByaW50QmFja3RyYWNlIHJlbmRlcl9hcz0iYmFja3RyYWNlX2VsZW1lbnQiLz4NCgkJPC9vbD4NCgk8L2lucDI6bV9pZj4NCg0KCTxpbnAyOm1faWZub3QgY2hlY2s9Im1fUGFyYW0iIG5hbWU9ImlzX2xhc3QiPjxoci8+PC9pbnAyOm1faWZub3Q+DQo8L2lucDI6bV9EZWZpbmVFbGVtZW50Pg0KDQo8aW5wMjpzeXN0ZW0tbG9nLmVtYWlsX1ByaW50TGlzdCByZW5kZXJfYXM9InN5c3RlbV9sb2dfZWxlbWVudCIvPg==</HTMLBODY>
<PLAINTEXTBODY>PGlucDI6bV9EZWZpbmVFbGVtZW50IG5hbWU9ImJhY2t0cmFjZV9wbGFpbl9lbGVtZW50Ij4NCjxpbnAyOkJhY2t0cmFjZUluZGV4Lz4uIDxpbnAyOm1fUGhyYXNlIG5hbWU9ImxhX0xvZ0JhY2t0cmFjZUZ1bmN0aW9uIi8+OiA8aW5wMjptX1BhcmFtIG5hbWU9ImZpbGVfaW5mbyIvPg0KPGlucDI6bV9pZm5vdCBjaGVjaz0ibV9QYXJhbSIgbmFtZT0iaXNfbGFzdCI+DQoNCjwvaW5wMjptX2lmbm90Pg0KPC9pbnAyOm1fRGVmaW5lRWxlbWVudD4NCjxpbnAyOm1fRGVmaW5lRWxlbWVudCBuYW1lPSJzeXN0ZW1fbG9nX3BsYWluX2VsZW1lbnQiPg0KPGlucDI6RmllbGQgbmFtZT0iTG9nVGltZXN0YW1wIiBmb3JtYXQ9Ik0gZCBIOmk6cyIvPiA8aW5wMjpGaWVsZCBuYW1lPSJMb2dIb3N0bmFtZSIvPiA8aW5wMjpSZXF1ZXN0VVJJLz5bUElEPTxpbnAyOkZpZWxkIG5hbWU9IkxvZ1Byb2Nlc3NJZCIvPixVSUQ9PGlucDI6RmllbGQgbmFtZT0iTG9nVW5pcXVlSWQiLz5dDQpbPGlucDI6RmllbGQgbmFtZT0iTG9nTGV2ZWwiLz5dICM8aW5wMjpGaWVsZCBuYW1lPSJMb2dDb2RlIi8+OiA8aW5wMjpGaWVsZCBuYW1lPSJMb2dNZXNzYWdlIiBub19zcGVjaWFsPSIxIi8+IGluIDxpbnAyOkZpbGVuYW1lLz4gb24gbGluZSA8aW5wMjpGaWVsZCBuYW1lPSJMb2dTb3VyY2VGaWxlTGluZSIvPg0KPGlucDI6bV9pZiBjaGVjaz0iRmllbGQiIG5hbWU9IkxvZ0JhY2t0cmFjZSIgZGI9ImRiIj4NCg0KQmFja3RyYWNlOg0KPGlucDI6UHJpbnRCYWNrdHJhY2UgcmVuZGVyX2FzPSJiYWNrdHJhY2VfcGxhaW5fZWxlbWVudCIgc3RyaXBfdGFncz0iMSIvPjwvaW5wMjptX2lmPg0KPGlucDI6bV9pZm5vdCBjaGVjaz0ibV9QYXJhbSIgbmFtZT0iaXNfbGFzdCI+DQotLS0tLS0tLS0tLS0tDQoNCjwvaW5wMjptX2lmbm90Pg0KPC9pbnAyOm1fRGVmaW5lRWxlbWVudD4NCjxpbnAyOnN5c3RlbS1sb2cuZW1haWxfUHJpbnRMaXN0IHJlbmRlcl9hcz0ic3lzdGVtX2xvZ19wbGFpbl9lbGVtZW50Ii8+</PLAINTEXTBODY>
</EVENT>
<EVENT Event="USER.ADD" Type="0">
<SUBJECT>SW4tcG9ydGFsIHJlZ2lzdHJhdGlvbg==</SUBJECT>
<HTMLBODY>RGVhciA8aW5wMjp1LnJlZ2lzdGVyX0ZpZWxkIG5hbWU9IkZpcnN0TmFtZSIgLz4gPGlucDI6dS5yZWdpc3Rlcl9GaWVsZCBuYW1lPSJMYXN0TmFtZSIgLz4sDQoNClRoYW5rIHlvdSBmb3IgcmVnaXN0ZXJpbmcgb24gPGlucDI6bV9MaW5rIHRlbXBsYXRlPSJpbmRleCIvPi4gWW91ciByZWdpc3RyYXRpb24gaXMgbm93IGFjdGl2ZS4NCjxpbnAyOm1faWYgY2hlY2s9InUucmVnaXN0ZXJfRmllbGQiIG5hbWU9IkVtYWlsIj4NCjxici8+PGJyLz4NClBsZWFzZSBjbGljayBoZXJlIHRvIHZlcmlmeSB5b3VyIEUtbWFpbCBhZGRyZXNzOg0KPGEgaHJlZj0iPGlucDI6dS5yZWdpc3Rlcl9Db25maXJtUGFzc3dvcmRMaW5rIHQ9InBsYXRmb3JtL215X2FjY291bnQvdmVyaWZ5X2VtYWlsIiBub19hbXA9IjEiLz4iPjxpbnAyOnUucmVnaXN0ZXJfQ29uZmlybVBhc3N3b3JkTGluayB0PSJwbGF0Zm9ybS9teV9hY2NvdW50L3ZlcmlmeV9lbWFpbCIgbm9fYW1wPSIxIi8+PC9hPjxici8+PGJyLz4NCjwvaW5wMjptX2lmPg==</HTMLBODY>
</EVENT>
<EVENT Event="USER.ADD" Type="1">
<SUBJECT>TmV3IFVzZXIgUmVnaXN0cmF0aW9uICg8aW5wMjp1LnJlZ2lzdGVyX0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+KQ==</SUBJECT>
<HTMLBODY>QSBuZXcgdXNlciAiPGlucDI6dS5yZWdpc3Rlcl9GaWVsZCBuYW1lPSdVc2VybmFtZScvPiIgaGFzIGJlZW4gYWRkZWQu</HTMLBODY>
</EVENT>
<EVENT Event="USER.ADD.BYADMIN" Type="0">
<SUBJECT>TmV3IHVzZXIgaGFzIGJlZW4gY3JlYXRlZA==</SUBJECT>
<PLAINTEXTBODY>RGVhciA8aW5wMjp1X0ZpZWxkIG5hbWU9IkZpcnN0TmFtZSIvPiwNCg0KQSBuZXcgdXNlciBoYXMgYmVlbiBjcmVhdGVkIGFuZCBhc3NpZ25lZCB0byB5b3UNCg0KTm93IHlvdSBjYW4gbG9naW4gdXNpbmcgdGhlIGZvbGxvd2luZyBjcmVkZW50aWFsczoNCg0KPGlucDI6bV9pZiBjaGVjaz0idV9GaWVsZCIgbmFtZT0iVXNlcm5hbWUiPlVzZXJuYW1lOiA8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+PGlucDI6bV9lbHNlLz5FLW1haWw6IDxpbnAyOnVfRmllbGQgbmFtZT0iRW1haWwiLz48L2lucDI6bV9pZj4gDQpQYXNzd29yZDogPGlucDI6dV9GaWVsZCBuYW1lPSJQYXNzd29yZF9wbGFpbiIvPiANCg==</PLAINTEXTBODY>
</EVENT>
<EVENT Event="USER.ADD.PENDING" Type="0">
<SUBJECT>TmV3IFVzZXIgUmVnaXN0cmF0aW9uICg8aW5wMjp1LnJlZ2lzdGVyX0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+PGlucDI6bV9pZiBjaGVjaz0ibV9HZXRDb25maWciIG5hbWU9IlVzZXJfQWxsb3dfTmV3IiBlcXVhbHNfdG89IjQiPiAtIEFjdGl2YXRpb24gRW1haWw8L2lucDI6bV9pZj4p</SUBJECT>
<HTMLBODY>RGVhciA8aW5wMjp1LnJlZ2lzdGVyX0ZpZWxkIG5hbWU9IkZpcnN0TmFtZSIgLz4gPGlucDI6dS5yZWdpc3Rlcl9GaWVsZCBuYW1lPSJMYXN0TmFtZSIgLz4sPGJyIC8+DQo8YnIgLz4NCjxpbnAyOm1faWYgY2hlY2s9Im1fR2V0Q29uZmlnIiBuYW1lPSJVc2VyX0FsbG93X05ldyIgZXF1YWxzX3RvPSI0Ij4NCglUaGFuayB5b3UgZm9yIHJlZ2lzdGVyaW5nIG9uIDxpbnAyOm1fTGluayB0ZW1wbGF0ZT0iaW5kZXgiLz4gd2Vic2l0ZS4gVG8gYWN0aXZhdGUgeW91ciByZWdpc3RyYXRpb24gcGxlYXNlIGZvbGxvdyBsaW5rIGJlbG93LiA8aW5wMjp1LnJlZ2lzdGVyX0FjdGl2YXRpb25MaW5rIHRlbXBsYXRlPSJwbGF0Zm9ybS9sb2dpbi9hY3RpdmF0ZV9jb25maXJtIi8+DQo8aW5wMjptX2Vsc2UvPg0KCVRoYW5rIHlvdSBmb3IgcmVnaXN0ZXJpbmcgb24gPGlucDI6bV9MaW5rIHRlbXBsYXRlPSJpbmRleCIvPiB3ZWJzaXRlLiBZb3VyIHJlZ2lzdHJhdGlvbiB3aWxsIGJlIGFjdGl2ZSBhZnRlciBhcHByb3ZhbC4gDQoJDQoJPGlucDI6bV9pZiBjaGVjaz0idS5yZWdpc3Rlcl9GaWVsZCIgbmFtZT0iRW1haWwiPg0KCQk8YnIvPjxici8+DQoJCVBsZWFzZSBjbGljayBoZXJlIHRvIHZlcmlmeSB5b3VyIEUtbWFpbCBhZGRyZXNzOg0KCQk8YSBocmVmPSI8aW5wMjp1LnJlZ2lzdGVyX0NvbmZpcm1QYXNzd29yZExpbmsgdD0icGxhdGZvcm0vbXlfYWNjb3VudC92ZXJpZnlfZW1haWwiIG5vX2FtcD0iMSIvPiI+PGlucDI6dS5yZWdpc3Rlcl9Db25maXJtUGFzc3dvcmRMaW5rIHQ9InBsYXRmb3JtL215X2FjY291bnQvdmVyaWZ5X2VtYWlsIiBub19hbXA9IjEiLz48L2E+PGJyLz48YnIvPg0KCTwvaW5wMjptX2lmPg0KPC9pbnAyOm1faWY+</HTMLBODY>
</EVENT>
<EVENT Event="USER.ADD.PENDING" Type="1">
<SUBJECT>TmV3IFVzZXIgUmVnaXN0ZXJlZA==</SUBJECT>
<HTMLBODY>QSBuZXcgdXNlciAiPGlucDI6dS5yZWdpc3Rlcl9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgaGFzIHJlZ2lzdGVyZWQgYW5kIGlzIHBlbmRpbmcgYWRtaW5pc3RyYXRpdmUgYXBwcm92YWwu</HTMLBODY>
</EVENT>
<EVENT Event="USER.APPROVE" Type="0">
<SUBJECT>WW91ciBBY2NvdW50IGlzIEFjdGl2ZQ==</SUBJECT>
<HTMLBODY>V2VsY29tZSB0byA8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+IQ0KDQpZb3VyIHVzZXIgcmVnaXN0cmF0aW9uIGhhcyBiZWVuIGFwcHJvdmVkLiBZb3VyIHVzZXIgbmFtZSBpczogIjxpbnAyOnVfRmllbGQgbmFtZT0iVXNlcm5hbWUiLz4iLg==</HTMLBODY>
</EVENT>
<EVENT Event="USER.APPROVE" Type="1">
<SUBJECT>TmV3IFVzZXIgQWNjb3VudCAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgd2FzIEFwcHJvdmVk</SUBJECT>
<HTMLBODY>VXNlciAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgaGFzIGJlZW4gYXBwcm92ZWQu</HTMLBODY>
</EVENT>
<EVENT Event="USER.DENY" Type="0">
<SUBJECT>WW91ciBSZWdpc3RyYXRpb24gaGFzIGJlZW4gRGVuaWVk</SUBJECT>
<HTMLBODY>WW91ciByZWdpc3RyYXRpb24gb24gPGEgaHJlZj0iPGlucDI6bV9MaW5rIHRlbXBsYXRlPSJpbmRleCIvPiI+PGlucDI6bV9MaW5rIHRlbXBsYXRlPSJpbmRleCIvPjwvYT4gd2Vic2l0ZSBoYXMgYmVlbiBkZW5pZWQu</HTMLBODY>
</EVENT>
<EVENT Event="USER.DENY" Type="1">
<SUBJECT>VXNlciBSZWdpc3RyYXRpb24gZm9yICAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgaGFzIGJlZW4gRGVuaWVk</SUBJECT>
<HTMLBODY>VXNlciAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgaGFzIGJlZW4gZGVuaWVkLg==</HTMLBODY>
</EVENT>
<EVENT Event="USER.EMAIL.CHANGE.UNDO" Type="0">
<SUBJECT>Q2hhbmdlZCBFLW1haWwgUm9sbGJhY2s=</SUBJECT>
<HTMLBODY>SGVsbG8sPGJyLz48YnIvPg0KDQpJdCBzZWVtcyB0aGF0IHlvdSBoYXZlIGNoYW5nZWQgZS1tYWlsIGluIHlvdXIgSW4tcG9ydGFsIGFjY291bnQuIFlvdSBtYXkgdW5kbyB0aGlzIGNoYW5nZSBieSBjbGlja2luZyBvbiB0aGUgbGluayBiZWxvdzo8YnIvPjxici8+DQoNCjxhIGhyZWY9IjxpbnAyOnVfVW5kb0VtYWlsQ2hhbmdlTGluayB0ZW1wbGF0ZT0icGxhdGZvcm0vbXlfYWNjb3VudC9yZXN0b3JlX2VtYWlsIi8+Ij48aW5wMjp1X1VuZG9FbWFpbENoYW5nZUxpbmsgdGVtcGxhdGU9InBsYXRmb3JtL215X2FjY291bnQvcmVzdG9yZV9lbWFpbCIvPjwvYT48YnIvPjxici8+DQoNCklmIHlvdSBiZWxpZXZlIHlvdSBoYXZlIHJlY2VpdmVkIHRoaXMgZW1haWwgaW4gZXJyb3IsIHBsZWFzZSBpZ25vcmUgdGhpcyBlbWFpbC4gWW91ciBhY2NvdW50IHdpbGwgYmUgbGlua2VkIHRvIGFub3RoZXIgZS1tYWlsIHVubGVzcyB5b3UgaGF2ZSBjbGlja2VkIG9uIHRoZSBhYm92ZSBsaW5rLg==</HTMLBODY>
</EVENT>
<EVENT Event="USER.EMAIL.CHANGE.VERIFY" Type="0">
<SUBJECT>Q2hhbmdlZCBFLW1haWwgVmVyaWZpY2F0aW9u</SUBJECT>
<HTMLBODY>SGVsbG8sPGJyLz48YnIvPg0KDQpJdCBzZWVtcyB0aGF0IHlvdSBoYXZlIGNoYW5nZWQgZS1tYWlsIGluIHlvdXIgSW4tcG9ydGFsIGFjY291bnQuIFBsZWFzZSB2ZXJpZnkgdGhpcyBuZXcgZS1tYWlsIGJ5IGNsaWNraW5nIG9uIHRoZSBsaW5rIGJlbG93Ojxici8+PGJyLz4NCg0KPGEgaHJlZj0iPGlucDI6dV9Db25maXJtUGFzc3dvcmRMaW5rIHQ9InBsYXRmb3JtL215X2FjY291bnQvdmVyaWZ5X2VtYWlsIiBub19hbXA9IjEiLz4iPjxpbnAyOnVfQ29uZmlybVBhc3N3b3JkTGluayB0PSJwbGF0Zm9ybS9teV9hY2NvdW50L3ZlcmlmeV9lbWFpbCIgbm9fYW1wPSIxIi8+PC9hPjxici8+PGJyLz4NCg0KSWYgeW91IGJlbGlldmUgeW91IGhhdmUgcmVjZWl2ZWQgdGhpcyBlbWFpbCBpbiBlcnJvciwgcGxlYXNlIGlnbm9yZSB0aGlzIGVtYWlsLiBZb3VyIGVtYWlsIHdpbGwgbm90IGdldCB2ZXJpZmllZCBzdGF0dXMgdW5sZXNzIHlvdSBoYXZlIGNsaWNrZWQgb24gdGhlIGFib3ZlIGxpbmsuDQo=</HTMLBODY>
</EVENT>
<EVENT Event="USER.MEMBERSHIP.EXPIRATION.NOTICE" Type="0">
<SUBJECT>TWVtYmVyc2hpcCBFeHBpcmF0aW9uIE5vdGljZQ==</SUBJECT>
<HTMLBODY>WW91ciBtZW1iZXJzaGlwIG9uIDxpbnAyOm1fTGluayB0ZW1wbGF0ZT0iaW5kZXgiLz4gd2Vic2l0ZSB3aWxsIHNvb24gZXhwaXJlLg==</HTMLBODY>
</EVENT>
<EVENT Event="USER.MEMBERSHIP.EXPIRATION.NOTICE" Type="1">
<SUBJECT>TWVtYmVyc2hpcCBFeHBpcmF0aW9uIE5vdGljZSBmb3IgIjxpbnAyOnVfRmllbGQgbmFtZT0iVXNlcm5hbWUiLz4iIFNlbnQ=</SUBJECT>
<HTMLBODY>VXNlciA8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+IG1lbWJlcnNoaXAgd2lsbCBleHBpcmUgc29vbi4=</HTMLBODY>
</EVENT>
<EVENT Event="USER.MEMBERSHIP.EXPIRED" Type="0">
<SUBJECT>WW91ciBNZW1iZXJzaGlwIEV4cGlyZWQ=</SUBJECT>
<HTMLBODY>WW91ciBtZW1iZXJzaGlwIG9uIDxpbnAyOm1fTGluayB0ZW1wbGF0ZT0iaW5kZXgiLz4gd2Vic2l0ZSBoYXMgZXhwaXJlZC4=</HTMLBODY>
</EVENT>
<EVENT Event="USER.MEMBERSHIP.EXPIRED" Type="1">
<SUBJECT>VXNlcidzIE1lbWJlcnNoaXAgRXhwaXJlZCAgKCA8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+KQ==</SUBJECT>
<HTMLBODY>VXNlcidzICg8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+KSBtZW1iZXJzaGlwIG9uIDxpbnAyOm1fTGluayB0ZW1wbGF0ZT0iaW5kZXgiLz4gd2Vic2l0ZSBoYXMgZXhwaXJlZC4=</HTMLBODY>
</EVENT>
<EVENT Event="USER.NEW.PASSWORD" Type="0">
<SUBJECT>TmV3IHBhc3N3b3JkIGdlbmVyYXRlZA==</SUBJECT>
<PLAINTEXTBODY>RGVhciA8aW5wMjp1X0ZpZWxkIG5hbWU9IkZpcnN0TmFtZSIvPiwNCg0KQSBuZXcgcGFzc3dvcmQgaGFzIGJlZW4gZ2VuZXJhdGVkIGZvciB5b3VyIHVzZXIuDQoNCk5vdyB5b3UgY2FuIGxvZ2luIHVzaW5nIHRoZSBmb2xsb3dpbmcgY3JlZGVudGlhbHM6DQoNCjxpbnAyOm1faWYgY2hlY2s9InVfRmllbGQiIG5hbWU9IlVzZXJuYW1lIj5Vc2VybmFtZTogPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPjxpbnAyOm1fZWxzZS8+RS1tYWlsOiA8aW5wMjp1X0ZpZWxkIG5hbWU9IkVtYWlsIi8+PC9pbnAyOm1faWY+IA0KUGFzc3dvcmQ6IDxpbnAyOnVfRmllbGQgbmFtZT0iUGFzc3dvcmRfcGxhaW4iLz4g</PLAINTEXTBODY>
</EVENT>
<EVENT Event="USER.PSWDC" Type="0">
<SUBJECT>UmVzZXQgUGFzc3dvcmQgQ29uZmlybWF0aW9u</SUBJECT>
<HTMLBODY>SGVsbG8sPGJyLz48YnIvPg0KDQpJdCBzZWVtcyB0aGF0IHlvdSBoYXZlIHJlcXVlc3RlZCBhIHBhc3N3b3JkIHJlc2V0IGZvciB5b3VyIEluLXBvcnRhbCBhY2NvdW50LiBJZiB5b3Ugd291bGQgbGlrZSB0byBwcm9jZWVkIGFuZCBjaGFuZ2UgdGhlIHBhc3N3b3JkLCBwbGVhc2UgY2xpY2sgb24gdGhlIGxpbmsgYmVsb3c6PGJyLz48YnIvPg0KDQo8YSBocmVmPSI8aW5wMjp1X0NvbmZpcm1QYXNzd29yZExpbmsgbm9fYW1wPSIxIi8+Ij48aW5wMjp1X0NvbmZpcm1QYXNzd29yZExpbmsgbm9fYW1wPSIxIi8+PC9hPjxici8+PGJyLz4NCg0KWW91IHdpbGwgcmVjZWl2ZSBhIHNlY29uZCBlbWFpbCB3aXRoIHlvdXIgbmV3IHBhc3N3b3JkIHNob3J0bHkuPGJyLz48YnIvPg0KDQpJZiB5b3UgYmVsaWV2ZSB5b3UgaGF2ZSByZWNlaXZlZCB0aGlzIGVtYWlsIGluIGVycm9yLCBwbGVhc2UgaWdub3JlIHRoaXMgZW1haWwuIFlvdXIgcGFzc3dvcmQgd2lsbCBub3QgYmUgY2hhbmdlZCB1bmxlc3MgeW91IGhhdmUgY2xpY2tlZCBvbiB0aGUgYWJvdmUgbGluay4NCg==</HTMLBODY>
</EVENT>
<EVENT Event="USER.SUBSCRIBE" Type="0">
<SUBJECT>U3Vic2NyaWJlZCB0byBhIE1haWxpbmcgTGlzdCBvbiA8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+</SUBJECT>
<HTMLBODY>WW91IGhhdmUgc3Vic2NyaWJlZCB0byBhIG1haWxpbmcgbGlzdCBvbiA8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+IHdlYnNpdGUu</HTMLBODY>
</EVENT>
<EVENT Event="USER.SUBSCRIBE" Type="1">
<SUBJECT>TmV3IFVzZXIgaGFzIFN1YnNjcmliZWQgdG8gYSBNYWxsaW5nIExpc3Q=</SUBJECT>
<HTMLBODY>TmV3IHVzZXIgPGlucDI6dV9GaWVsZCBuYW1lPSJFbWFpbCIvPiBoYXMgc3Vic2NyaWJlZCB0byBhIG1haWxpbmcgbGlzdCBvbiA8YSBocmVmPSI8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+Ij48aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+PC9hPiB3ZWJzaXRlLg==</HTMLBODY>
</EVENT>
<EVENT Event="USER.SUGGEST" Type="0">
<SUBJECT>Q2hlY2sgb3V0IHRoaXMgV2Vic2l0ZQ==</SUBJECT>
<HTMLBODY>SGVsbG8sPC9icj48L2JyPg0KDQpUaGlzIG1lc3NhZ2UgaGFzIGJlZW4gc2VudCB0byB5b3UgZnJvbSBvbmUgb2YgeW91ciBmcmllbmRzLjwvYnI+PC9icj4NCkNoZWNrIG91dCB0aGlzIHNpdGU6IDxhIGhyZWY9IjxpbnAyOm1fTGluayB0ZW1wbGF0ZT0iaW5kZXgiLz4iPjxpbnAyOm1fTGluayB0ZW1wbGF0ZT0iaW5kZXgiLz48L2E+IQ==</HTMLBODY>
</EVENT>
<EVENT Event="USER.SUGGEST" Type="1">
<SUBJECT>V2Vic2l0ZSBTdWdnZXN0ZWQgdG8gYSBGcmllbmQ=</SUBJECT>
<HTMLBODY>QSB2aXNpdG9yIHN1Z2dlc3RlZCA8YSBocmVmPSI8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+Ij48aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+PC9hPiB3ZWJzaXRlIHRvIGEgZnJpZW5kLg==</HTMLBODY>
</EVENT>
<EVENT Event="USER.UNSUBSCRIBE" Type="0">
<SUBJECT>WW91IGhhdmUgYmVlbiB1bnN1YnNjcmliZWQ=</SUBJECT>
<HTMLBODY>WW91IGhhdmUgc3VjY2Vzc2Z1bGx5IHVuc3Vic2NyaWJlZCBmcm9tIHRoZSBtYWlsaW5nIGxpc3Qgb24gPGEgaHJlZj0iPGlucDI6bV9CYXNlVXJsIC8+Ij48aW5wMjptX0Jhc2VVcmwgLz48L2E+IHdlYnNpdGUu</HTMLBODY>
</EVENT>
<EVENT Event="USER.UNSUBSCRIBE" Type="1">
<SUBJECT>VXNlciBVbnN1YnNyaWJlZCBmcm9tIE1haWxpbmcgTGlzdA==</SUBJECT>
<HTMLBODY>QSB1c2VyICI8aW5wMjp1X0ZpZWxkIG5hbWU9IkVtYWlsIi8+IiBoYXMgdW5zdWJzY3JpYmVkIGZyb20gdGhlIG1haWxpbmcgbGlzdCBvbiA8YSBocmVmPSI8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+Ij48aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+PC9hPi4=</HTMLBODY>
</EVENT>
<EVENT Event="USER.VALIDATE" Type="0">
<SUBJECT>VXNlciBSZWdpc3RyYXRpb24gaXMgVmFsaWRhdGVk</SUBJECT>
<HTMLBODY>V2VsY29tZSB0byBJbi1wb3J0YWwhPGJyLz48YnIvPg0KDQpZb3VyIHVzZXIgcmVnaXN0cmF0aW9uIGhhcyBiZWVuIGFwcHJvdmVkLiBZb3UgY2FuIGxvZ2luIG5vdyA8YSBocmVmPSI8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+Ij48aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+PC9hPiB1c2luZyB0aGUgZm9sbG93aW5nIGluZm9ybWF0aW9uOjxici8+PGJyLz4NCg0KPT09PT09PT09PT09PT09PT09PGJyLz4NClVzZXJuYW1lOiAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiI8YnIvPg0KUGFzc3dvcmQ6ICI8aW5wMjp1X0ZpZWxkIG5hbWU9IlBhc3N3b3JkX3BsYWluIi8+Ijxici8+DQo9PT09PT09PT09PT09PT09PT08YnIvPjxici8+DQo=</HTMLBODY>
</EVENT>
<EVENT Event="USER.VALIDATE" Type="1">
<SUBJECT>TmV3IFVzZXIgUmVnaXN0cmF0aW9uIGlzIFZhbGlkYXRlZA==</SUBJECT>
<HTMLBODY>VXNlciAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgaGFzIGJlZW4gdmFsaWRhdGVkLg==</HTMLBODY>
</EVENT>
</EVENTS>
<COUNTRIES>
<COUNTRY Iso="ABW" Translation="QXJ1YmE="/>
<COUNTRY Iso="AFG" Translation="QWZnaGFuaXN0YW4="/>
<COUNTRY Iso="AGO" Translation="QW5nb2xh"/>
<COUNTRY Iso="AIA" Translation="QW5ndWlsbGE="/>
<COUNTRY Iso="ALB" Translation="QWxiYW5pYQ=="/>
<COUNTRY Iso="AND" Translation="QW5kb3JyYQ=="/>
<COUNTRY Iso="ANT" Translation="TmV0aGVybGFuZHMgQW50aWxsZXM="/>
<COUNTRY Iso="ARE" Translation="VW5pdGVkIEFyYWIgRW1pcmF0ZXM="/>
<COUNTRY Iso="ARG" Translation="QXJnZW50aW5h"/>
<COUNTRY Iso="ARM" Translation="QXJtZW5pYQ=="/>
<COUNTRY Iso="ASM" Translation="QW1lcmljYW4gc2Ftb2E="/>
<COUNTRY Iso="ATA" Translation="QW50YXJjdGljYQ=="/>
<COUNTRY Iso="ATF" Translation="RnJlbmNoIFNvdXRoZXJuIFRlcnJpdG9yaWVz"/>
<COUNTRY Iso="ATG" Translation="QW50aWd1YSBhbmQgYmFyYnVkYQ=="/>
<COUNTRY Iso="AUS" Translation="QXVzdHJhbGlh"/>
<COUNTRY Iso="AUT" Translation="QXVzdHJpYQ=="/>
<COUNTRY Iso="AZE" Translation="QXplcmJhaWphbg=="/>
<COUNTRY Iso="BDI" Translation="QnVydW5kaQ=="/>
<COUNTRY Iso="BEL" Translation="QmVsZ2l1bQ=="/>
<COUNTRY Iso="BEN" Translation="QmVuaW4="/>
<COUNTRY Iso="BFA" Translation="QnVya2luYSBGYXNv"/>
<COUNTRY Iso="BGD" Translation="QmFuZ2xhZGVzaA=="/>
<COUNTRY Iso="BGR" Translation="QnVsZ2FyaWE="/>
<COUNTRY Iso="BHR" Translation="QmFocmFpbg=="/>
<COUNTRY Iso="BHS" Translation="QmFoYW1hcw=="/>
<COUNTRY Iso="BIH" Translation="Qm9zbmlhIGFuZCBIZXJ6ZWdvd2luYQ=="/>
<COUNTRY Iso="BLR" Translation="QmVsYXJ1cw=="/>
<COUNTRY Iso="BLZ" Translation="QmVsaXpl"/>
<COUNTRY Iso="BMU" Translation="QmVybXVkYQ=="/>
<COUNTRY Iso="BOL" Translation="Qm9saXZpYQ=="/>
<COUNTRY Iso="BRA" Translation="QnJhemls"/>
<COUNTRY Iso="BRB" Translation="QmFyYmFkb3M="/>
<COUNTRY Iso="BRN" Translation="QnJ1bmVpIERhcnVzc2FsYW0="/>
<COUNTRY Iso="BTN" Translation="Qmh1dGFu"/>
<COUNTRY Iso="BVT" Translation="Qm91dmV0IElzbGFuZA=="/>
<COUNTRY Iso="BWA" Translation="Qm90c3dhbmE="/>
<COUNTRY Iso="CAF" Translation="Q2VudHJhbCBBZnJpY2FuIFJlcHVibGlj"/>
<COUNTRY Iso="CAN" Translation="Q2FuYWRh">
<STATE Iso="AB" Translation="QWxiZXJ0YQ=="/>
<STATE Iso="BC" Translation="QnJpdGlzaCBDb2x1bWJpYQ=="/>
<STATE Iso="MB" Translation="TWFuaXRvYmE="/>
<STATE Iso="NB" Translation="TmV3IEJydW5zd2ljaw=="/>
<STATE Iso="NL" Translation="TmV3Zm91bmRsYW5kIGFuZCBMYWJyYWRvcg=="/>
<STATE Iso="NS" Translation="Tm92YSBTY290aWE="/>
<STATE Iso="NT" Translation="Tm9ydGh3ZXN0IFRlcnJpdG9yaWVz"/>
<STATE Iso="NU" Translation="TnVuYXZ1dA=="/>
<STATE Iso="ON" Translation="T250YXJpbw=="/>
<STATE Iso="PE" Translation="UHJpbmNlIEVkd2FyZCBJc2xhbmQ="/>
<STATE Iso="QC" Translation="UXVlYmVj"/>
<STATE Iso="SK" Translation="U2Fza2F0Y2hld2Fu"/>
<STATE Iso="YT" Translation="WXVrb24="/>
</COUNTRY>
<COUNTRY Iso="CCK" Translation="Q29jb3MgKEtlZWxpbmcpIElzbGFuZHM="/>
<COUNTRY Iso="CHE" Translation="U3dpdHplcmxhbmQ="/>
<COUNTRY Iso="CHL" Translation="Q2hpbGU="/>
<COUNTRY Iso="CHN" Translation="Q2hpbmE="/>
<COUNTRY Iso="CIV" Translation="Q290ZSBkJ0l2b2lyZQ=="/>
<COUNTRY Iso="CMR" Translation="Q2FtZXJvb24="/>
<COUNTRY Iso="COD" Translation="Q29uZ28sIERlbW9jcmF0aWMgUmVwdWJsaWMgb2YgKFdhcyBaYWlyZSk="/>
<COUNTRY Iso="COG" Translation="Q29uZ28sIFBlb3BsZSdzIFJlcHVibGljIG9m"/>
<COUNTRY Iso="COK" Translation="Q29vayBJc2xhbmRz"/>
<COUNTRY Iso="COL" Translation="Q29sb21iaWE="/>
<COUNTRY Iso="COM" Translation="Q29tb3Jvcw=="/>
<COUNTRY Iso="CPV" Translation="Q2FwZSBWZXJkZQ=="/>
<COUNTRY Iso="CRI" Translation="Q29zdGEgUmljYQ=="/>
<COUNTRY Iso="CUB" Translation="Q3ViYQ=="/>
<COUNTRY Iso="CXR" Translation="Q2hyaXN0bWFzIElzbGFuZA=="/>
<COUNTRY Iso="CYM" Translation="Q2F5bWFuIElzbGFuZHM="/>
<COUNTRY Iso="CYP" Translation="Q3lwcnVz"/>
<COUNTRY Iso="CZE" Translation="Q3plY2ggUmVwdWJsaWM="/>
<COUNTRY Iso="DEU" Translation="R2VybWFueQ=="/>
<COUNTRY Iso="DJI" Translation="RGppYm91dGk="/>
<COUNTRY Iso="DMA" Translation="RG9taW5pY2E="/>
<COUNTRY Iso="DNK" Translation="RGVubWFyaw=="/>
<COUNTRY Iso="DOM" Translation="RG9taW5pY2FuIFJlcHVibGlj"/>
<COUNTRY Iso="DZA" Translation="QWxnZXJpYQ=="/>
<COUNTRY Iso="ECU" Translation="RWN1YWRvcg=="/>
<COUNTRY Iso="EGY" Translation="RWd5cHQ="/>
<COUNTRY Iso="ERI" Translation="RXJpdHJlYQ=="/>
<COUNTRY Iso="ESH" Translation="V2VzdGVybiBTYWhhcmE="/>
<COUNTRY Iso="ESP" Translation="U3BhaW4="/>
<COUNTRY Iso="EST" Translation="RXN0b25pYQ=="/>
<COUNTRY Iso="ETH" Translation="RXRoaW9waWE="/>
<COUNTRY Iso="FIN" Translation="RmlubGFuZA=="/>
<COUNTRY Iso="FJI" Translation="RmlqaQ=="/>
<COUNTRY Iso="FLK" Translation="RmFsa2xhbmQgSXNsYW5kcyAoTWFsdmluYXMp"/>
<COUNTRY Iso="FRA" Translation="RnJhbmNl"/>
<COUNTRY Iso="FRO" Translation="RmFyb2UgSXNsYW5kcw=="/>
<COUNTRY Iso="FSM" Translation="TWljcm9uZXNpYSwgRmVkZXJhdGVkIFN0YXRlcyBvZg=="/>
<COUNTRY Iso="FXX" Translation="RnJhbmNlLCBNZXRyb3BvbGl0YW4="/>
<COUNTRY Iso="GAB" Translation="R2Fib24="/>
<COUNTRY Iso="GBR" Translation="VW5pdGVkIEtpbmdkb20="/>
<COUNTRY Iso="GEO" Translation="R2VvcmdpYQ=="/>
<COUNTRY Iso="GHA" Translation="R2hhbmE="/>
<COUNTRY Iso="GIB" Translation="R2licmFsdGFy"/>
<COUNTRY Iso="GIN" Translation="R3VpbmVh"/>
<COUNTRY Iso="GLP" Translation="R3VhZGVsb3VwZQ=="/>
<COUNTRY Iso="GMB" Translation="R2FtYmlh"/>
<COUNTRY Iso="GNB" Translation="R3VpbmVhLUJpc3NhdQ=="/>
<COUNTRY Iso="GNQ" Translation="RXF1YXRvcmlhbCBHdWluZWE="/>
<COUNTRY Iso="GRC" Translation="R3JlZWNl"/>
<COUNTRY Iso="GRD" Translation="R3JlbmFkYQ=="/>
<COUNTRY Iso="GRL" Translation="R3JlZW5sYW5k"/>
<COUNTRY Iso="GTM" Translation="R3VhdGVtYWxh"/>
<COUNTRY Iso="GUF" Translation="RnJlbmNoIEd1aWFuYQ=="/>
<COUNTRY Iso="GUM" Translation="R3VhbQ=="/>
<COUNTRY Iso="GUY" Translation="R3V5YW5h"/>
<COUNTRY Iso="HKG" Translation="SG9uZyBrb25n"/>
<COUNTRY Iso="HMD" Translation="SGVhcmQgYW5kIE1jIERvbmFsZCBJc2xhbmRz"/>
<COUNTRY Iso="HND" Translation="SG9uZHVyYXM="/>
<COUNTRY Iso="HRV" Translation="Q3JvYXRpYSAobG9jYWwgbmFtZTogSHJ2YXRza2Ep"/>
<COUNTRY Iso="HTI" Translation="SGFpdGk="/>
<COUNTRY Iso="HUN" Translation="SHVuZ2FyeQ=="/>
<COUNTRY Iso="IDN" Translation="SW5kb25lc2lh"/>
<COUNTRY Iso="IND" Translation="SW5kaWE="/>
<COUNTRY Iso="IOT" Translation="QnJpdGlzaCBJbmRpYW4gT2NlYW4gVGVycml0b3J5"/>
<COUNTRY Iso="IRL" Translation="SXJlbGFuZA=="/>
<COUNTRY Iso="IRN" Translation="SXJhbiAoSXNsYW1pYyBSZXB1YmxpYyBvZik="/>
<COUNTRY Iso="IRQ" Translation="SXJhcQ=="/>
<COUNTRY Iso="ISL" Translation="SWNlbGFuZA=="/>
<COUNTRY Iso="ISR" Translation="SXNyYWVs"/>
<COUNTRY Iso="ITA" Translation="SXRhbHk="/>
<COUNTRY Iso="JAM" Translation="SmFtYWljYQ=="/>
<COUNTRY Iso="JOR" Translation="Sm9yZGFu"/>
<COUNTRY Iso="JPN" Translation="SmFwYW4="/>
<COUNTRY Iso="KAZ" Translation="S2F6YWtoc3Rhbg=="/>
<COUNTRY Iso="KEN" Translation="S2VueWE="/>
<COUNTRY Iso="KGZ" Translation="S3lyZ3l6c3Rhbg=="/>
<COUNTRY Iso="KHM" Translation="Q2FtYm9kaWE="/>
<COUNTRY Iso="KIR" Translation="S2lyaWJhdGk="/>
<COUNTRY Iso="KNA" Translation="U2FpbnQgS2l0dHMgYW5kIE5ldmlz"/>
<COUNTRY Iso="KOR" Translation="S29yZWEsIFJlcHVibGljIG9m"/>
<COUNTRY Iso="KWT" Translation="S3V3YWl0"/>
<COUNTRY Iso="LAO" Translation="TGFvIFBlb3BsZSdzIERlbW9jcmF0aWMgUmVwdWJsaWM="/>
<COUNTRY Iso="LBN" Translation="TGViYW5vbg=="/>
<COUNTRY Iso="LBR" Translation="TGliZXJpYQ=="/>
<COUNTRY Iso="LBY" Translation="TGlieWFuIEFyYWIgSmFtYWhpcml5YQ=="/>
<COUNTRY Iso="LCA" Translation="U2FpbnQgTHVjaWE="/>
<COUNTRY Iso="LIE" Translation="TGllY2h0ZW5zdGVpbg=="/>
<COUNTRY Iso="LKA" Translation="U3JpIGxhbmth"/>
<COUNTRY Iso="LSO" Translation="TGVzb3Robw=="/>
<COUNTRY Iso="LTU" Translation="TGl0aHVhbmlh"/>
<COUNTRY Iso="LUX" Translation="THV4ZW1ib3VyZw=="/>
<COUNTRY Iso="LVA" Translation="TGF0dmlh"/>
<COUNTRY Iso="MAC" Translation="TWFjYXU="/>
<COUNTRY Iso="MAR" Translation="TW9yb2Njbw=="/>
<COUNTRY Iso="MCO" Translation="TW9uYWNv"/>
<COUNTRY Iso="MDA" Translation="TW9sZG92YSwgUmVwdWJsaWMgb2Y="/>
<COUNTRY Iso="MDG" Translation="TWFkYWdhc2Nhcg=="/>
<COUNTRY Iso="MDV" Translation="TWFsZGl2ZXM="/>
<COUNTRY Iso="MEX" Translation="TWV4aWNv"/>
<COUNTRY Iso="MHL" Translation="TWFyc2hhbGwgSXNsYW5kcw=="/>
<COUNTRY Iso="MKD" Translation="TWFjZWRvbmlh"/>
<COUNTRY Iso="MLI" Translation="TWFsaQ=="/>
<COUNTRY Iso="MLT" Translation="TWFsdGE="/>
<COUNTRY Iso="MMR" Translation="TXlhbm1hcg=="/>
<COUNTRY Iso="MNG" Translation="TW9uZ29saWE="/>
<COUNTRY Iso="MNP" Translation="Tm9ydGhlcm4gTWFyaWFuYSBJc2xhbmRz"/>
<COUNTRY Iso="MOZ" Translation="TW96YW1iaXF1ZQ=="/>
<COUNTRY Iso="MRT" Translation="TWF1cml0YW5pYQ=="/>
<COUNTRY Iso="MSR" Translation="TW9udHNlcnJhdA=="/>
<COUNTRY Iso="MTQ" Translation="TWFydGluaXF1ZQ=="/>
<COUNTRY Iso="MUS" Translation="TWF1cml0aXVz"/>
<COUNTRY Iso="MWI" Translation="TWFsYXdp"/>
<COUNTRY Iso="MYS" Translation="TWFsYXlzaWE="/>
<COUNTRY Iso="MYT" Translation="TWF5b3R0ZQ=="/>
<COUNTRY Iso="NAM" Translation="TmFtaWJpYQ=="/>
<COUNTRY Iso="NCL" Translation="TmV3IENhbGVkb25pYQ=="/>
<COUNTRY Iso="NER" Translation="TmlnZXI="/>
<COUNTRY Iso="NFK" Translation="Tm9yZm9sayBJc2xhbmQ="/>
<COUNTRY Iso="NGA" Translation="TmlnZXJpYQ=="/>
<COUNTRY Iso="NIC" Translation="TmljYXJhZ3Vh"/>
<COUNTRY Iso="NIU" Translation="Tml1ZQ=="/>
<COUNTRY Iso="NLD" Translation="TmV0aGVybGFuZHM="/>
<COUNTRY Iso="NOR" Translation="Tm9yd2F5"/>
<COUNTRY Iso="NPL" Translation="TmVwYWw="/>
<COUNTRY Iso="NRU" Translation="TmF1cnU="/>
<COUNTRY Iso="NZL" Translation="TmV3IFplYWxhbmQ="/>
<COUNTRY Iso="OMN" Translation="T21hbg=="/>
<COUNTRY Iso="PAK" Translation="UGFraXN0YW4="/>
<COUNTRY Iso="PAN" Translation="UGFuYW1h"/>
<COUNTRY Iso="PCN" Translation="UGl0Y2Fpcm4="/>
<COUNTRY Iso="PER" Translation="UGVydQ=="/>
<COUNTRY Iso="PHL" Translation="UGhpbGlwcGluZXM="/>
<COUNTRY Iso="PLW" Translation="UGFsYXU="/>
<COUNTRY Iso="PNG" Translation="UGFwdWEgTmV3IEd1aW5lYQ=="/>
<COUNTRY Iso="POL" Translation="UG9sYW5k"/>
<COUNTRY Iso="PRI" Translation="UHVlcnRvIFJpY28="/>
<COUNTRY Iso="PRK" Translation="S29yZWEsIERlbW9jcmF0aWMgUGVvcGxlJ3MgUmVwdWJsaWMgb2Y="/>
<COUNTRY Iso="PRT" Translation="UG9ydHVnYWw="/>
<COUNTRY Iso="PRY" Translation="UGFyYWd1YXk="/>
<COUNTRY Iso="PSE" Translation="UGFsZXN0aW5pYW4gVGVycml0b3J5LCBPY2N1cGllZA=="/>
<COUNTRY Iso="PYF" Translation="RnJlbmNoIFBvbHluZXNpYQ=="/>
<COUNTRY Iso="QAT" Translation="UWF0YXI="/>
<COUNTRY Iso="REU" Translation="UmV1bmlvbg=="/>
<COUNTRY Iso="ROU" Translation="Um9tYW5pYQ=="/>
<COUNTRY Iso="RUS" Translation="UnVzc2lhbiBGZWRlcmF0aW9u"/>
<COUNTRY Iso="RWA" Translation="UndhbmRh"/>
<COUNTRY Iso="SAU" Translation="U2F1ZGkgQXJhYmlh"/>
<COUNTRY Iso="SDN" Translation="U3VkYW4="/>
<COUNTRY Iso="SEN" Translation="U2VuZWdhbA=="/>
<COUNTRY Iso="SGP" Translation="U2luZ2Fwb3Jl"/>
<COUNTRY Iso="SGS" Translation="U291dGggR2VvcmdpYSBhbmQgVGhlIFNvdXRoIFNhbmR3aWNoIElzbGFuZHM="/>
<COUNTRY Iso="SHN" Translation="U3QuIGhlbGVuYQ=="/>
<COUNTRY Iso="SJM" Translation="U3ZhbGJhcmQgYW5kIEphbiBNYXllbiBJc2xhbmRz"/>
<COUNTRY Iso="SLB" Translation="U29sb21vbiBJc2xhbmRz"/>
<COUNTRY Iso="SLE" Translation="U2llcnJhIExlb25l"/>
<COUNTRY Iso="SLV" Translation="RWwgU2FsdmFkb3I="/>
<COUNTRY Iso="SMR" Translation="U2FuIE1hcmlubw=="/>
<COUNTRY Iso="SOM" Translation="U29tYWxpYQ=="/>
<COUNTRY Iso="SPM" Translation="U3QuIFBpZXJyZSBhbmQgTWlxdWVsb24="/>
<COUNTRY Iso="STP" Translation="U2FvIFRvbWUgYW5kIFByaW5jaXBl"/>
<COUNTRY Iso="SUR" Translation="U3VyaW5hbWU="/>
<COUNTRY Iso="SVK" Translation="U2xvdmFraWEgKFNsb3ZhayBSZXB1YmxpYyk="/>
<COUNTRY Iso="SVN" Translation="U2xvdmVuaWE="/>
<COUNTRY Iso="SWE" Translation="U3dlZGVu"/>
<COUNTRY Iso="SWZ" Translation="U3dhemlsYW5k"/>
<COUNTRY Iso="SYC" Translation="U2V5Y2hlbGxlcw=="/>
<COUNTRY Iso="SYR" Translation="U3lyaWFuIEFyYWIgUmVwdWJsaWM="/>
<COUNTRY Iso="TCA" Translation="VHVya3MgYW5kIENhaWNvcyBJc2xhbmRz"/>
<COUNTRY Iso="TCD" Translation="Q2hhZA=="/>
<COUNTRY Iso="TGO" Translation="VG9nbw=="/>
<COUNTRY Iso="THA" Translation="VGhhaWxhbmQ="/>
<COUNTRY Iso="TJK" Translation="VGFqaWtpc3Rhbg=="/>
<COUNTRY Iso="TKL" Translation="VG9rZWxhdQ=="/>
<COUNTRY Iso="TKM" Translation="VHVya21lbmlzdGFu"/>
<COUNTRY Iso="TLS" Translation="RWFzdCBUaW1vcg=="/>
<COUNTRY Iso="TON" Translation="VG9uZ2E="/>
<COUNTRY Iso="TTO" Translation="VHJpbmlkYWQgYW5kIFRvYmFnbw=="/>
<COUNTRY Iso="TUN" Translation="VHVuaXNpYQ=="/>
<COUNTRY Iso="TUR" Translation="VHVya2V5"/>
<COUNTRY Iso="TUV" Translation="VHV2YWx1"/>
<COUNTRY Iso="TWN" Translation="VGFpd2Fu"/>
<COUNTRY Iso="TZA" Translation="VGFuemFuaWEsIFVuaXRlZCBSZXB1YmxpYyBvZg=="/>
<COUNTRY Iso="UGA" Translation="VWdhbmRh"/>
<COUNTRY Iso="UKR" Translation="VWtyYWluZQ=="/>
<COUNTRY Iso="UMI" Translation="VW5pdGVkIFN0YXRlcyBNaW5vciBPdXRseWluZyBJc2xhbmRz"/>
<COUNTRY Iso="URY" Translation="VXJ1Z3VheQ=="/>
<COUNTRY Iso="USA" Translation="VW5pdGVkIFN0YXRlcw==">
<STATE Iso="AK" Translation="QWxhc2th"/>
<STATE Iso="AL" Translation="QWxhYmFtYQ=="/>
<STATE Iso="AR" Translation="QXJrYW5zYXM="/>
<STATE Iso="AZ" Translation="QXJpem9uYQ=="/>
<STATE Iso="CA" Translation="Q2FsaWZvcm5pYQ=="/>
<STATE Iso="CO" Translation="Q29sb3JhZG8="/>
<STATE Iso="CT" Translation="Q29ubmVjdGljdXQ="/>
<STATE Iso="DC" Translation="RGlzdHJpY3Qgb2YgQ29sdW1iaWE="/>
<STATE Iso="DE" Translation="RGVsYXdhcmU="/>
<STATE Iso="FL" Translation="RmxvcmlkYQ=="/>
<STATE Iso="GA" Translation="R2VvcmdpYQ=="/>
<STATE Iso="HI" Translation="SGF3YWlp"/>
<STATE Iso="IA" Translation="SW93YQ=="/>
<STATE Iso="ID" Translation="SWRhaG8="/>
<STATE Iso="IL" Translation="SWxsaW5vaXM="/>
<STATE Iso="IN" Translation="SW5kaWFuYQ=="/>
<STATE Iso="KS" Translation="S2Fuc2Fz"/>
<STATE Iso="KY" Translation="S2VudHVja3k="/>
<STATE Iso="LA" Translation="TG91aXNpYW5h"/>
<STATE Iso="MA" Translation="TWFzc2FjaHVzZXR0cw=="/>
<STATE Iso="MD" Translation="TWFyeWxhbmQ="/>
<STATE Iso="ME" Translation="TWFpbmU="/>
<STATE Iso="MI" Translation="TWljaGlnYW4="/>
<STATE Iso="MN" Translation="TWlubmVzb3Rh"/>
<STATE Iso="MO" Translation="TWlzc291cmk="/>
<STATE Iso="MS" Translation="TWlzc2lzc2lwcGk="/>
<STATE Iso="MT" Translation="TW9udGFuYQ=="/>
<STATE Iso="NC" Translation="Tm9ydGggQ2Fyb2xpbmE="/>
<STATE Iso="ND" Translation="Tm9ydGggRGFrb3Rh"/>
<STATE Iso="NE" Translation="TmVicmFza2E="/>
<STATE Iso="NH" Translation="TmV3IEhhbXBzaGlyZQ=="/>
<STATE Iso="NJ" Translation="TmV3IEplcnNleQ=="/>
<STATE Iso="NM" Translation="TmV3IE1leGljbw=="/>
<STATE Iso="NV" Translation="TmV2YWRh"/>
<STATE Iso="NY" Translation="TmV3IFlvcms="/>
<STATE Iso="OH" Translation="T2hpbw=="/>
<STATE Iso="OK" Translation="T2tsYWhvbWE="/>
<STATE Iso="OR" Translation="T3JlZ29u"/>
<STATE Iso="PA" Translation="UGVubnN5bHZhbmlh"/>
<STATE Iso="PR" Translation="UHVlcnRvIFJpY28="/>
<STATE Iso="RI" Translation="UmhvZGUgSXNsYW5k"/>
<STATE Iso="SC" Translation="U291dGggQ2Fyb2xpbmE="/>
<STATE Iso="SD" Translation="U291dGggRGFrb3Rh"/>
<STATE Iso="TN" Translation="VGVubmVzc2Vl"/>
<STATE Iso="TX" Translation="VGV4YXM="/>
<STATE Iso="UT" Translation="VXRhaA=="/>
<STATE Iso="VA" Translation="VmlyZ2luaWE="/>
<STATE Iso="VT" Translation="VmVybW9udA=="/>
<STATE Iso="WA" Translation="V2FzaGluZ3Rvbg=="/>
<STATE Iso="WI" Translation="V2lzY29uc2lu"/>
<STATE Iso="WV" Translation="V2VzdCBWaXJnaW5pYQ=="/>
<STATE Iso="WY" Translation="V3lvbWluZw=="/>
</COUNTRY>
<COUNTRY Iso="UZB" Translation="VXpiZWtpc3Rhbg=="/>
<COUNTRY Iso="VAT" Translation="VmF0aWNhbiBDaXR5IFN0YXRlIChIb2x5IFNlZSk="/>
<COUNTRY Iso="VCT" Translation="U2FpbnQgVmluY2VudCBhbmQgVGhlIEdyZW5hZGluZXM="/>
<COUNTRY Iso="VEN" Translation="VmVuZXp1ZWxh"/>
<COUNTRY Iso="VGB" Translation="VmlyZ2luIElzbGFuZHMgKEJyaXRpc2gp"/>
<COUNTRY Iso="VIR" Translation="VmlyZ2luIElzbGFuZHMgKFUuUy4p"/>
<COUNTRY Iso="VNM" Translation="VmlldG5hbQ=="/>
<COUNTRY Iso="VUT" Translation="VmFudWF0dQ=="/>
<COUNTRY Iso="WLF" Translation="V2FsbGlzIGFuZCBGdXR1bmEgSXNsYW5kcw=="/>
<COUNTRY Iso="WSM" Translation="U2Ftb2E="/>
<COUNTRY Iso="YEM" Translation="WWVtZW4="/>
<COUNTRY Iso="YUG" Translation="WXVnb3NsYXZpYQ=="/>
<COUNTRY Iso="ZAF" Translation="U291dGggQWZyaWNh"/>
<COUNTRY Iso="ZMB" Translation="WmFtYmlh"/>
<COUNTRY Iso="ZWE" Translation="WmltYmFid2U="/>
</COUNTRIES>
</LANGUAGE>
</LANGUAGES>

Event Timeline