Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Mon, Jan 6, 6:04 AM

in-portal

This file is larger than 256 KB, so syntax highlighting was skipped.
Index: branches/5.2.x/core/kernel/utility/email_send.php
===================================================================
--- branches/5.2.x/core/kernel/utility/email_send.php (revision 15460)
+++ branches/5.2.x/core/kernel/utility/email_send.php (revision 15461)
@@ -1,2075 +1,2087 @@
<?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 used to compose email message (using MIME standarts) and send it via mail function or via SMTP server
*
*/
class kEmailSendingHelper extends kHelper {
/**
* headers of main header part
*
* @var Array
*/
var $headers = Array ();
/**
* Tells if all message parts were combined together
*
* @var int
*/
var $bodyPartNumber = false;
/**
* Composed message parts
*
* @var Array
*/
var $parts = Array();
/**
* Lines separator by MIME standart
*
* @var string
*/
var $line_break = "\n";
/**
* Charset used for message composing
*
* @var string
*/
var $charset = 'utf-8';
/**
* Name of mailer program (X-Mailer header)
*
* @var string
*/
var $mailerName = '';
/**
* Options used for message content-type & structure guessing
*
* @var Array
*/
var $guessOptions = Array ();
/**
* Send messages using selected method
*
* @var string
*/
var $sendMethod = 'Mail';
/**
* Parameters used to initiate SMTP server connection
*
* @var Array
*/
var $smtpParams = Array ();
/**
* List of supported authentication methods, in preferential order.
* @var array
* @access public
*/
var $smtpAuthMethods = Array('CRAM-MD5', 'LOGIN', 'PLAIN');
/**
* The socket resource being used to connect to the SMTP server.
* @var kSocket
* @access private
*/
var $smtpSocket = null;
/**
* The most recent server response code.
* @var int
* @access private
*/
var $smtpResponceCode = -1;
/**
* The most recent server response arguments.
* @var array
* @access private
*/
var $smtpRespoceArguments = Array();
/**
* Stores detected features of the SMTP server.
* @var array
* @access private
*/
var $smtpFeatures = Array();
/**
* Stores log data
*
* @var Array
* @access protected
*/
protected $_logData = Array ();
public function __construct()
{
parent::__construct();
// set default guess options
$this->guessOptions = Array (
'attachments' => Array (),
'inline_attachments' => Array (),
'text_part' => false,
'html_part' => false,
);
// read SMTP server connection params from config
$smtp_mapping = Array ('server' => 'Smtp_Server', 'port' => 'Smtp_Port');
if ($this->Application->ConfigValue('Smtp_Authenticate')) {
$smtp_mapping['username'] = 'Smtp_User';
$smtp_mapping['password'] = 'Smtp_Pass';
}
foreach ($smtp_mapping as $smtp_name => $config_name) {
$this->smtpParams[$smtp_name] = $this->Application->ConfigValue($config_name);
}
$this->smtpParams['use_auth'] = isset($this->smtpParams['username']) ? true : false;
$this->smtpParams['localhost'] = 'localhost'; // The value to give when sending EHLO or HELO.
$this->sendMethod = $this->smtpParams['server'] && $this->smtpParams['port'] ? 'SMTP' : 'Mail';
if ($this->sendMethod == 'SMTP') {
// create connection object if we will use SMTP
$this->smtpSocket = $this->Application->makeClass('Socket');
}
$this->SetCharset(null, true);
}
/**
* Returns new message id header by sender's email address
*
* @param string $email_address email address
* @return string
*/
function GenerateMessageID($email_address)
{
list ($micros, $seconds) = explode(' ', microtime());
list ($user, $domain) = explode('@', $email_address, 2);
$message_id = strftime('%Y%m%d%H%M%S', $seconds).substr($micros, 1, 5).'.'.preg_replace('/[^A-Za-z]+/', '-', $user).'@'.$domain;
$this->SetHeader('Message-ID', '<'.$message_id.'>');
}
/**
* Returns extension of given filename
*
* @param string $filename
* @return string
*/
function GetFilenameExtension($filename)
{
$last_dot = mb_strrpos($filename, '.');
return $last_dot !== false ? mb_substr($filename, $last_dot + 1) : '';
}
/**
* Creates boundary for part by number (only if it's missing)
*
* @param int $part_number
*
*/
function CreatePartBoundary($part_number)
{
$part =& $this->parts[$part_number];
if (!isset($part['BOUNDARY'])) {
$part['BOUNDARY'] = md5(uniqid($part_number.time()));
}
}
/**
* Returns ready to use headers associative array of any message part by it's number
*
* @param int $part_number
* @return Array
*/
function GetPartHeaders($part_number)
{
$part =& $this->parts[$part_number];
if (!isset($part['Content-Type'])) {
return $this->SetError('MISSING_CONTENT_TYPE');
}
$full_type = strtolower($part['Content-Type']);
list ($type, $sub_type) = explode('/', $full_type);
$headers['Content-Type'] = $full_type;
switch ($type) {
case 'text':
case 'image':
case 'audio':
case 'video':
case 'application':
case 'message':
// 1. update content-type header
if (isset($part['CHARSET'])) {
$headers['Content-Type'] .= '; charset='.$part['CHARSET'];
}
if (isset($part['NAME'])) {
$headers['Content-Type'] .= '; name="'.$part['NAME'].'"';
}
// 2. set content-transfer-encoding header
if (isset($part['Content-Transfer-Encoding'])) {
$headers['Content-Transfer-Encoding'] = $part['Content-Transfer-Encoding'];
}
// 3. set content-disposition header
if (isset($part['DISPOSITION']) && $part['DISPOSITION']) {
$headers['Content-Disposition'] = $part['DISPOSITION'];
if (isset($part['NAME'])) {
$headers['Content-Disposition'] .= '; filename="'.$part['NAME'].'"';
}
}
break;
case 'multipart':
switch ($sub_type) {
case 'alternative':
case 'related':
case 'mixed':
case 'parallel':
$this->CreatePartBoundary($part_number);
$headers['Content-Type'] .= '; boundary="'.$part['BOUNDARY'].'"';
break;
default:
return $this->SetError('INVALID_MULTIPART_SUBTYPE', Array($sub_type));
}
break;
default:
return $this->SetError('INVALID_CONTENT_TYPE', Array($full_type));
}
// set content-id if any
if (isset($part['Content-ID'])) {
$headers['Content-ID'] = '<'.$part['Content-ID'].'>';
}
return $headers;
}
function GetPartBody($part_number)
{
$part =& $this->parts[$part_number];
if (!isset($part['Content-Type'])) {
return $this->SetError('MISSING_CONTENT_TYPE');
}
$full_type = strtolower($part['Content-Type']);
list ($type, $sub_type) = explode('/', $full_type);
$body = '';
switch ($type) {
// compose text/binary content
case 'text':
case 'image':
case 'audio':
case 'video':
case 'application':
case 'message':
// 1. get content of part
if (isset($part['FILENAME'])) {
// content provided via absolute path to content containing file
$filename = $part['FILENAME'];
$file_size = filesize($filename);
$body = file_get_contents($filename);
if ($body === false) {
return $this->SetError('FILE_PART_OPEN_ERROR', Array($filename));
}
$actual_size = strlen($body);
if (($file_size === false || $actual_size > $file_size) && get_magic_quotes_runtime()) {
$body = stripslashes($body);
}
if ($file_size !== false && $actual_size != $file_size) {
return $this->SetError('FILE_PART_DATA_ERROR', Array($filename));
}
}
else {
// content provided directly as one of part keys
if (!isset($part['DATA'])) {
return $this->SetError('FILE_PART_DATA_MISSING');
}
$body =& $part['DATA'];
}
// 2. get part transfer encoding
$encoding = isset($part['Content-Transfer-Encoding']) ? strtolower($part['Content-Transfer-Encoding']) : '';
if (!in_array($encoding, Array ('', 'base64', 'quoted-printable', '7bit'))) {
return $this->SetError('INVALID_ENCODING', Array($encoding));
}
if ($encoding == 'base64') {
// split base64 encoded text by 76 symbols at line (MIME requirement)
$body = chunk_split( base64_encode($body) );
}
break;
case 'multipart':
// compose multipart message
switch ($sub_type) {
case 'alternative':
case 'related':
case 'mixed':
case 'parallel':
$this->CreatePartBoundary($part_number);
$boundary = $this->line_break.'--'.$part['BOUNDARY'];
foreach ($part['PARTS'] as $multipart_number) {
$body .= $boundary.$this->line_break;
$part_headers = $this->GetPartHeaders($multipart_number);
if ($part_headers === false) {
// some of sub-part headers were invalid
return false;
}
foreach ($part_headers as $header_name => $header_value) {
$body .= $header_name.': '.$header_value.$this->line_break;
}
$part_body = $this->GetPartBody($multipart_number);
if ($part_body === false) {
// part body was invalid
return false;
}
$body .= $this->line_break.$part_body;
}
$body .= $boundary.'--'.$this->line_break;
break;
default:
return $this->SetError('INVALID_MULTIPART_SUBTYPE', Array($sub_type));
}
break;
default:
return $this->SetError('INVALID_CONTENT_TYPE', Array($full_type));
}
return $body;
}
/**
* Applies quoted-printable encoding to specified text
*
* @param string $text
* @param string $header_charset
* @param int $break_lines
* @return unknown
*/
function QuotedPrintableEncode($text, $header_charset = '', $break_lines = 1)
{
$ln = strlen($text);
$h = strlen($header_charset) > 0;
if ($h) {
$s = Array (
'=' => 1,
'?' => 1,
'_' => 1,
'(' => 1,
')' => 1,
'<' => 1,
'>' => 1,
'@' => 1,
',' => 1,
';' => 1,
'"' => 1,
'\\' => 1,
/*
'/' => 1,
'[' => 1,
']' => 1,
':' => 1,
'.' => 1,
*/
);
$b = $space = $break_lines = 0;
for ($i = 0; $i < $ln; $i++) {
if (isset($s[$text[$i]])) {
$b = 1;
break;
}
switch ($o = ord($text[$i])) {
case 9:
case 32:
$space = $i + 1;
$b = 1;
break 2;
case 10:
case 13:
break 2;
default:
if ($o < 32 || $o > 127) {
$b = 1;
break 2;
}
}
}
if($i == $ln) {
return $text;
}
if ($space > 0) {
return substr($text, 0, $space).($space < $ln ? $this->QuotedPrintableEncode(substr($text, $space), $header_charset, 0) : '');
}
}
for ($w = $e = '', $n = 0, $l = 0, $i = 0; $i < $ln; $i++) {
$c = $text[$i];
$o = ord($c);
$en = 0;
switch ($o) {
case 9:
case 32:
if (!$h) {
$w = $c;
$c = '';
}
else {
if ($b) {
if ($o == 32) {
$c = '_';
}
else {
$en = 1;
}
}
}
break;
case 10:
case 13:
if (strlen($w)) {
if ($break_lines && $l + 3 > 75) {
$e .= '='.$this->line_break;
$l = 0;
}
$e .= sprintf('=%02X', ord($w));
$l += 3;
$w = '';
}
$e .= $c;
if ($h) {
$e .= "\t";
}
$l = 0;
continue 2;
case 46:
case 70:
case 102:
$en = (!$h && ($l == 0 || $l + 1 > 75));
break;
default:
if ($o > 127 || $o < 32 || !strcmp($c, '=')) {
$en = 1;
}
elseif ($h && isset($s[$c])) {
$en = 1;
}
break;
}
if (strlen($w)) {
if ($break_lines && $l + 1 > 75) {
$e .= '='.$this->line_break;
$l = 0;
}
$e .= $w;
$l++;
$w = '';
}
if (strlen($c)) {
if ($en) {
$c = sprintf('=%02X', $o);
$el = 3;
$n = 1;
$b = 1;
}
else {
$el = 1;
}
if ($break_lines && $l + $el > 75) {
$e .= '='.$this->line_break;
$l = 0;
}
$e .= $c;
$l += $el;
}
}
if (strlen($w)) {
if ($break_lines && $l + 3 > 75) {
$e .= '='.$this->line_break;
}
$e .= sprintf('=%02X', ord($w));
}
return $h && $n ? '=?'.$header_charset.'?q?'.$e.'?=' : $e;
}
/**
* Sets message header + encodes is by quoted-printable using charset specified
*
* @param string $name
* @param string $value
* @param string $encoding_charset
*/
function SetHeader($name, $value, $encoding_charset = '')
{
if ($encoding_charset) {
// actually for headers base64 method may give shorter result
$value = $this->QuotedPrintableEncode($value, $encoding_charset);
}
$this->headers[$name] = $value;
}
/**
* Sets header + automatically encodes it using default charset
*
* @param string $name
* @param string $value
*/
function SetEncodedHeader($name, $value)
{
$this->SetHeader($name, $value, $this->charset);
}
/**
* Sets header which value is email and username +autoencode
*
* @param string $header
* @param string $address
* @param string $name
*/
function SetEncodedEmailHeader($header, $address, $name)
{
$this->SetHeader($header, $this->QuotedPrintableEncode($name, $this->charset) . ' <' . $address . '>');
}
function SetMultipleEncodedEmailHeader($header, $addresses)
{
$value = '';
foreach ($addresses as $name => $address) {
$value .= $this->QuotedPrintableEncode($name, $this->charset) . ' <' . $address . '>, ';
}
$this->SetHeader($header, substr($value, 0, -2));
}
/**
* Adds new part to message and returns it's number
*
* @param Array $part_definition
* @param int|bool $part_number number of new part
* @return int
*/
function AddPart(&$part_definition, $part_number = false)
{
$part_number = $part_number !== false ? $part_number : count($this->parts);
$this->parts[$part_number] =& $part_definition;
return $part_number;
}
/**
* Returns text version of HTML document
*
* @param string $html
* @param bool $keep_inp_tags
* @return string
*/
function ConvertToText($html, $keep_inp_tags = false)
{
if ( $keep_inp_tags && preg_match_all('/(<[\\/]?)inp2:([^>]*?)([\\/]?>)/s', $html, $regs) ) {
$found_tags = Array ();
foreach ($regs[0] as $index => $tag) {
$tag_placeholder = '%' . md5($index . ':' . $tag) . '%';
$found_tags[$tag_placeholder] = $tag;
// we can have duplicate tags -> replace only 1st occurrence (str_replace can't do that)
$html = preg_replace('/' . preg_quote($tag, '/') . '/', $tag_placeholder, $html, 1);
}
$html = $this->_convertToText($html);
foreach ($found_tags as $tag_placeholder => $tag) {
$html = str_replace($tag_placeholder, $tag, $html);
}
return $html;
}
return $this->_convertToText($html);
}
/**
* Returns text version of HTML document
*
* @param string $html
* @return string
*/
protected function _convertToText($html)
{
$search = Array (
"'(<\/td>.*)[\r\n]+(.*<td)'i",//formating text in tables
"'(<br[ ]?[\/]?>[\r\n]{0,2})|(<\/p>)|(<\/div>)|(<\/tr>)'i",
"'<head>(.*?)</head>'si",
"'<style(.*?)</style>'si",
"'<title>(.*?)</title>'si",
"'<script(.*?)</script>'si",
// "'^[\s\n\r\t]+'", //strip all spacers & newlines in the begin of document
// "'[\s\n\r\t]+$'", //strip all spacers & newlines in the end of document
"'&(quot|#34);'i",
"'&(amp|#38);'i",
"'&(lt|#60);'i",
"'&(gt|#62);'i",
"'&(nbsp|#160);'i",
"'&(iexcl|#161);'i",
"'&(cent|#162);'i",
"'&(pound|#163);'i",
"'&(copy|#169);'i",
"'&#(\d+);'e"
);
$replace = Array (
"\\1\t\\2",
"\n",
"",
"",
"",
"",
// "",
// "",
"\"",
"&",
"<",
">",
" ",
- chr(161),
- chr(162),
- chr(163),
- chr(169),
- "chr(\\1)"
+ $this->_safeCharEncode(161),
+ $this->_safeCharEncode(162),
+ $this->_safeCharEncode(163),
+ $this->_safeCharEncode(169),
+ "\$this->_safeCharEncode(\\1)"
);
return strip_tags( preg_replace ($search, $replace, $html) );
}
/**
+ * Returns symbols, that corresponds given ASCII code and also encodes it into proper charset
+ *
+ * @param int $ascii
+ * @return string
+ * @access protected
+ */
+ protected function _safeCharEncode($ascii)
+ {
+ return mb_convert_encoding(chr($ascii), $this->charset, 'ISO-8859-1');
+ }
+
+ /**
* Add text OR html part to message (optionally encoded)
*
* @param string $text part's text
* @param bool $is_html this html part or not
* @param bool $encode encode message using quoted-printable encoding
*
* @return int number of created part
*/
function CreateTextHtmlPart($text, $is_html = false, $encode = true)
{
if ($is_html) {
// if adding HTML part, then create plain-text part too
$this->CreateTextHtmlPart($this->ConvertToText($text));
}
// in case if text is from $_REQUEST, then line endings are "\r\n", but we need "\n" here
$text = str_replace("\r\n", "\n", $text); // possible case
$text = str_replace("\r", "\n", $text); // impossible case, but just in case replace this too
$definition = Array (
'Content-Type' => $is_html ? 'text/html' : 'text/plain',
'CHARSET' => $this->charset,
'DATA' => $encode ? $this->QuotedPrintableEncode($text) : $text,
);
if ($encode) {
$definition['Content-Transfer-Encoding'] = 'quoted-printable';
}
$guess_name = $is_html ? 'html_part' : 'text_part';
$part_number = $this->guessOptions[$guess_name] !== false ? $this->guessOptions[$guess_name] : false;
$part_number = $this->AddPart($definition, $part_number);
$this->guessOptions[$guess_name] = $part_number;
return $part_number;
}
/**
* Adds attachment part to message
*
* @param string $file name of the file with attachment body
* @param string $attach_name name for attachment (name of file is used, when not specified)
* @param string $content_type content type for attachment
* @param string $content body of file to be attached
* @param bool $inline is attachment inline or not
*
* @return int number of created part
*/
function AddAttachment($file = '', $attach_name = '', $content_type = '', $content = '', $inline = false)
{
$definition = Array (
'Disposition' => $inline ? 'inline' : 'attachment',
'Content-Type' => $content_type ? $content_type : 'automatic/name',
);
if ($file) {
// filename of attachment given
$definition['FileName'] = $file;
}
if ($attach_name) {
// name of attachment given
$definition['Name'] = $attach_name;
}
if ($content) {
// attachment data is given
$definition['Data'] = $content;
}
$definition =& $this->GetFileDefinition($definition);
$part_number = $this->AddPart($definition);
if ($inline) {
// it's inline attachment and needs content-id to be addressed by in message
$this->parts[$part_number]['Content-ID'] = md5(uniqid($part_number.time())).'.'.$this->GetFilenameExtension($attach_name ? $attach_name : $file);
}
$this->guessOptions[$inline ? 'inline_attachments' : 'attachments'][] = $part_number;
return $part_number;
}
/**
* Adds another MIME message as attachment to message being composed
*
* @param string $file name of the file with attachment body
* @param string $attach_name name for attachment (name of file is used, when not specified)
* @param string $content body of file to be attached
*
* @return int number of created part
*/
function AddMessageAttachment($file = '', $attach_name = '', $content = '')
{
$part_number = $this->AddAttachment($file, $attach_name, 'message/rfc822', $content, true);
unset($this->parts[$part_number]['Content-ID']); // messages don't have content-id, but have inline disposition
return $part_number;
}
/**
* Creates multipart of specified type and returns it's number
*
* @param Array $part_numbers
* @param string $multipart_type = {alternative,related,mixed,paralell}
* @return int
*/
function CreateMultipart($part_numbers, $multipart_type)
{
$types = Array ('alternative', 'related' , 'mixed', 'paralell');
if (!in_array($multipart_type, $types)) {
return $this->SetError('INVALID_MULTIPART_SUBTYPE', Array($multipart_type));
}
$definition = Array (
'Content-Type' => 'multipart/'.$multipart_type,
'PARTS' => $part_numbers,
);
return $this->AddPart($definition);
}
/**
* Creates missing content-id header for inline attachments
*
* @param int $part_number
*/
function CreateContentID($part_number)
{
$part =& $this->parts[$part_number];
if (!isset($part['Content-ID']) && $part['DISPOSITION'] == 'inline') {
$part['Content-ID'] = md5(uniqid($part_number.time())).'.'.$this->GetFilenameExtension($part['NAME']);
}
}
/**
* Returns attachment part based on file used in attachment
*
* @param Array $file
* @return Array
*/
function &GetFileDefinition ($file)
{
$name = '';
if (isset($file['Name'])) {
// if name is given directly, then use it
$name = $file['Name'];
}
else {
// auto-guess attachment name based on source filename
$name = isset($file['FileName']) ? basename($file['FileName']) : '';
}
if (!$name || (!isset($file['FileName']) && !isset($file['Data']))) {
// filename not specified || no filename + no direct file content
return $this->SetError('MISSING_FILE_DATA');
}
$encoding = 'base64';
if (isset($file['Content-Type'])) {
$content_type = $file['Content-Type'];
list ($type, $sub_type) = explode('/', $content_type);
switch ($type) {
case 'text':
case 'image':
case 'audio':
case 'video':
case 'application':
break;
case 'message':
$encoding = '7bit';
break;
case 'automatic':
if (!$name) {
return $this->SetError('MISSING_FILE_NAME');
}
$this->guessContentType($name, $content_type, $encoding);
break;
default:
return $this->SetError('INVALID_CONTENT_TYPE', Array($content_type));
}
}
else {
// encoding not passed in file part, then assume, that it's binary
$content_type = 'application/octet-stream';
}
$definition = Array (
'Content-Type' => $content_type,
'Content-Transfer-Encoding' => $encoding,
'NAME' => $name, // attachment name
);
if (isset($file['Disposition'])) {
$disposition = strtolower($file['Disposition']);
if ($disposition == 'inline' || $disposition == 'attachment') {
// valid disposition header value
$definition['DISPOSITION'] = $file['Disposition'];
}
else {
return $this->SetError('INVALID_DISPOSITION', Array($file['Disposition']));
}
}
if (isset($file['FileName'])) {
$definition['FILENAME'] = $file['FileName'];
}
elseif (isset($file['Data'])) {
$definition['DATA'] =& $file['Data'];
}
return $definition;
}
/**
* Returns content-type based on filename extension
*
* @param string $filename
* @param string $content_type
* @param string $encoding
*
* @todo Regular expression used is not completely finished, that's why if extension used for
* comparing in some other extension (from list) part, that partial match extension will be returned.
* Because of two extension that begins with same 2 letters always belong to same content type
* this unfinished regular expression still gives correct result in any case.
*/
function guessContentType($filename, &$content_type, &$encoding)
{
$content_type = kUtil::mimeContentTypeByExtension($filename);
if ( mb_strtolower($this->GetFilenameExtension($filename)) == 'eml' ) {
$encoding = '7bit';
}
}
/**
* Using guess options combines all added parts together and returns combined part number
*
* @return int
*/
function PrepareMessageBody()
{
if ($this->bodyPartNumber === false) {
$part_number = false; // number of generated body part
// 1. set text content of message
if ($this->guessOptions['text_part'] !== false && $this->guessOptions['html_part'] !== false) {
// text & html parts present -> compose into alternative part
$parts = Array (
$this->guessOptions['text_part'],
$this->guessOptions['html_part'],
);
$part_number = $this->CreateMultipart($parts, 'alternative');
}
elseif ($this->guessOptions['text_part'] !== false) {
// only text part is defined, then leave as is
$part_number = $this->guessOptions['text_part'];
}
if ($part_number === false) {
return $this->SetError('MESSAGE_TEXT_MISSING');
}
// 2. if inline attachments found, then create related multipart from text & inline attachments
if ($this->guessOptions['inline_attachments']) {
$parts = array_merge(Array($part_number), $this->guessOptions['inline_attachments']);
$part_number = $this->CreateMultipart($parts, 'related');
}
// 3. if normal attachments found, then create mixed multipart from text & attachments
if ($this->guessOptions['attachments']) {
$parts = array_merge(Array($part_number), $this->guessOptions['attachments']);
$part_number = $this->CreateMultipart($parts, 'mixed');
}
$this->bodyPartNumber = $part_number;
}
return $this->bodyPartNumber;
}
/**
* Returns message headers and body part (by reference in parameters)
*
* @param Array $message_headers
* @param string $message_body
* @return bool
*/
function GetHeadersAndBody(&$message_headers, &$message_body)
{
$part_number = $this->PrepareMessageBody();
if ($part_number === false) {
return $this->SetError('MESSAGE_COMPOSE_ERROR');
}
$message_headers = $this->GetPartHeaders($part_number);
// join message headers and body headers
$message_headers = array_merge($this->headers, $message_headers);
$message_headers['MIME-Version'] = '1.0';
if ($this->mailerName) {
$message_headers['X-Mailer'] = $this->mailerName;
}
$this->GenerateMessageID($message_headers['From']);
$valid_headers = $this->ValidateHeaders($message_headers);
if ($valid_headers) {
// set missing headers from existing
$from_headers = Array ('Reply-To', 'Errors-To');
foreach ($from_headers as $header_name) {
if (!isset($message_headers[$header_name])) {
$message_headers[$header_name] = $message_headers['From'];
}
}
$message_body = $this->GetPartBody($part_number);
return true;
}
return false;
}
/**
* Checks that all required headers are set and not empty
*
* @param Array $message_headers
* @return bool
*/
function ValidateHeaders($message_headers)
{
$from = isset($message_headers['From']) ? $message_headers['From'] : '';
if (!$from) {
return $this->SetError('HEADER_MISSING', Array('From'));
}
if (!isset($message_headers['To'])) {
return $this->SetError('HEADER_MISSING', Array('To'));
}
if (!isset($message_headers['Subject'])) {
return $this->SetError('HEADER_MISSING', Array('Subject'));
}
return true;
}
/**
* Returns full message source (headers + body) for sending to SMTP server
*
* @return string
*/
function GetMessage()
{
$composed = $this->GetHeadersAndBody($message_headers, $message_body);
if ($composed) {
// add headers to resulting message
$message = '';
foreach ($message_headers as $header_name => $header_value) {
$message .= $header_name.': '.$header_value.$this->line_break;
}
// add message body
$message .= $this->line_break.$message_body;
return $message;
}
return false;
}
/**
* Sets just happened error code
*
* @param string $code
* @param Array $params additional error params
* @param bool $fatal
* @return bool
*/
function SetError($code, $params = null, $fatal = true)
{
$error_msgs = Array (
'MAIL_NOT_FOUND' => 'the mail() function is not available in this PHP installation',
'MISSING_CONTENT_TYPE' => 'it was added a part without Content-Type: defined',
'INVALID_CONTENT_TYPE' => 'Content-Type: %s not yet supported',
'INVALID_MULTIPART_SUBTYPE' => 'multipart Content-Type sub_type %s not yet supported',
'FILE_PART_OPEN_ERROR' => 'could not open part file %s',
'FILE_PART_DATA_ERROR' => 'the length of the file that was read does not match the size of the part file %s due to possible data corruption',
'FILE_PART_DATA_MISSING' => 'it was added a part without a body PART',
'INVALID_ENCODING' => '%s is not yet a supported encoding type',
'MISSING_FILE_DATA' => 'file part data is missing',
'MISSING_FILE_NAME' => 'it is not possible to determine content type from the name',
'INVALID_DISPOSITION' => '%s is not a supported message part content disposition',
'MESSAGE_TEXT_MISSING' => 'text part of message was not defined',
'MESSAGE_COMPOSE_ERROR' => 'unknown message composing error',
'HEADER_MISSING' => 'header %s is required',
// SMTP errors
'INVALID_COMMAND' => 'Commands cannot contain newlines',
'CONNECTION_TERMINATED' => 'Connection was unexpectedly closed',
'HELO_ERROR' => 'HELO was not accepted: %s',
'AUTH_METHOD_NOT_SUPPORTED' => '%s is not a supported authentication method',
'AUTH_METHOD_NOT_IMPLEMENTED' => '%s is not a implemented authentication method',
);
if (!is_array($params)) {
$params = Array ();
}
$error_msg = 'mail error: ' . vsprintf($error_msgs[$code], $params);
if ($fatal) {
throw new Exception($error_msg);
}
else {
if ( $this->Application->isDebugMode() ) {
$this->Application->Debugger->appendTrace();
}
trigger_error($error_msg, E_USER_WARNING);
}
return false;
}
/**
* Simple method of message sending
*
* @param string $from_email
* @param string $to_email
* @param string $subject
* @param string $from_name
* @param string $to_name
*/
function Send($from_email, $to_email, $subject, $from_name = '', $to_name = '')
{
$this->SetSubject($subject);
$this->SetFrom($from_email, trim($from_name) ? trim($from_name) : $from_email);
if (!isset($this->headers['Return-Path'])) {
$this->SetReturnPath($from_email);
}
$this->SetTo($to_email, $to_name ? $to_name : $to_email);
return $this->Deliver();
}
/**
* Prepares class for sending another message
*
*/
function Clear()
{
$this->headers = Array ();
$this->bodyPartNumber = false;
$this->parts = Array ();
$this->guessOptions = Array (
'attachments' => Array (),
'inline_attachments' => Array (),
'text_part' => false,
'html_part' => false,
);
$this->SetCharset(null, true);
$this->_logData = Array ();
}
/**
* Sends message via php mail function
*
* @param Array $message_headers
* @param string $body
*
* @return bool
*/
function SendMail($message_headers, &$body)
{
if (!function_exists('mail')) {
return $this->SetError('MAIL_NOT_FOUND');
}
$to = $message_headers['To'];
$subject = $message_headers['Subject'];
$return_path = $message_headers['Return-Path'];
unset($message_headers['To'], $message_headers['Subject']);
$headers = '';
$header_separator = $this->Application->ConfigValue('MailFunctionHeaderSeparator') == 1 ? "\n" : "\r\n";
foreach ($message_headers as $header_name => $header_value) {
$headers .= $header_name.': '.$header_value.$header_separator;
}
if ($return_path) {
if (kUtil::constOn('SAFE_MODE') || (defined('PHP_OS') && substr(PHP_OS, 0, 3) == 'WIN')) {
// safe mode restriction OR is windows
$return_path = '';
}
}
return mail($to, $subject, $body, $headers, $return_path ? '-f'.$return_path : null);
}
/**
* Sends message via SMTP server
*
* @param Array $message_headers
* @param string $message_body
* @return bool
*/
function SendSMTP($message_headers, &$message_body)
{
if (!$this->SmtpConnect()) {
return false;
}
$from = $this->ExtractRecipientEmail($message_headers['From']);
if (!$this->SmtpSetFrom($from)) {
return false;
}
$recipients = '';
$recipient_headers = Array ('To', 'Cc', 'Bcc');
foreach ($recipient_headers as $recipient_header) {
if (isset($message_headers[$recipient_header])) {
$recipients .= ' '.$message_headers[$recipient_header];
}
}
$recipients_accepted = 0;
$recipients = $this->ExtractRecipientEmail($recipients, true);
foreach ($recipients as $recipient) {
if ($this->SmtpAddTo($recipient)) {
$recipients_accepted++;
}
}
if ($recipients_accepted == 0) {
// none of recipients were accepted
return false;
}
$headers = '';
foreach ($message_headers as $header_name => $header_value) {
$headers .= $header_name.': '.$header_value.$this->line_break;
}
if (!$this->SmtpSendMessage($headers . "\r\n" . $message_body)) {
return false;
}
$this->SmtpDisconnect();
return true;
}
/**
* Send a command to the server with an optional string of
* arguments. A carriage return / linefeed (CRLF) sequence will
* be appended to each command string before it is sent to the
* SMTP server.
*
* @param string $command The SMTP command to send to the server.
* @param string $args A string of optional arguments to append to the command.
*
* @return bool
*
*/
function SmtpSendCommand($command, $args = '')
{
if (!empty($args)) {
$command .= ' ' . $args;
}
if (strcspn($command, "\r\n") !== strlen($command)) {
return $this->SetError('INVALID_COMMAND');
}
return $this->smtpSocket->write($command . "\r\n") === false ? false : true;
}
/**
* Read a reply from the SMTP server. The reply consists of a response code and a response message.
*
* @param mixed $valid The set of valid response codes. These may be specified as an array of integer values or as a single integer value.
*
* @return bool
*
*/
function SmtpParseResponse($valid)
{
$this->smtpResponceCode = -1;
$this->smtpRespoceArguments = array();
while ($line = $this->smtpSocket->readLine()) {
// If we receive an empty line, the connection has been closed.
if (empty($line)) {
$this->SmtpDisconnect();
return $this->SetError('CONNECTION_TERMINATED', null, false);
}
// Read the code and store the rest in the arguments array.
$code = substr($line, 0, 3);
$this->smtpRespoceArguments[] = trim(substr($line, 4));
// Check the syntax of the response code.
if (is_numeric($code)) {
$this->smtpResponceCode = (int)$code;
} else {
$this->smtpResponceCode = -1;
break;
}
// If this is not a multiline response, we're done.
if (substr($line, 3, 1) != '-') {
break;
}
}
// Compare the server's response code with the valid code.
if (is_int($valid) && ($this->smtpResponceCode === $valid)) {
return true;
}
// If we were given an array of valid response codes, check each one.
if (is_array($valid)) {
foreach ($valid as $valid_code) {
if ($this->smtpResponceCode === $valid_code) {
return true;
}
}
}
return false;
}
/**
* Attempt to connect to the SMTP server.
*
* @param int $timeout The timeout value (in seconds) for the socket connection.
* @param bool $persistent Should a persistent socket connection be used ?
*
* @return bool
*
*/
function SmtpConnect($timeout = null, $persistent = false)
{
$result = $this->smtpSocket->connect($this->smtpParams['server'], $this->smtpParams['port'], $persistent, $timeout);
if (!$result) {
return false;
}
if ($this->SmtpParseResponse(220) === false) {
return false;
}
elseif ($this->SmtpNegotiate() === false) {
return false;
}
if ($this->smtpParams['use_auth']) {
$result = $this->SmtpAuthentificate($this->smtpParams['username'], $this->smtpParams['password']);
if (!$result) {
// authentification failed
return false;
}
}
return true;
}
/**
* Attempt to disconnect from the SMTP server.
*
* @return bool
*/
function SmtpDisconnect()
{
if ($this->SmtpSendCommand('QUIT') === false) {
return false;
}
elseif ($this->SmtpParseResponse(221) === false) {
return false;
}
return $this->smtpSocket->disconnect();
}
/**
* Attempt to send the EHLO command and obtain a list of ESMTP
* extensions available, and failing that just send HELO.
*
* @return bool
*/
function SmtpNegotiate()
{
if (!$this->SmtpSendCommand('EHLO', $this->smtpParams['localhost'])) {
return false;
}
if (!$this->SmtpParseResponse(250)) {
// If we receive a 503 response, we're already authenticated.
if ($this->smtpResponceCode === 503) {
return true;
}
// If the EHLO failed, try the simpler HELO command.
if (!$this->SmtpSendCommand('HELO', $this->smtpParams['localhost'])) {
return false;
}
if (!$this->SmtpParseResponse(250)) {
return $this->SetError('HELO_ERROR', Array($this->smtpResponceCode), false);
}
return true;
}
foreach ($this->smtpRespoceArguments as $argument) {
$verb = strtok($argument, ' ');
$arguments = substr($argument, strlen($verb) + 1, strlen($argument) - strlen($verb) - 1);
$this->smtpFeatures[$verb] = $arguments;
}
return true;
}
/**
* Attempt to do SMTP authentication.
*
* @param string $uid The userid to authenticate as.
* @param string $pwd The password to authenticate with.
* @param string $method The requested authentication method. If none is specified, the best supported method will be used.
*
* @return bool
*/
function SmtpAuthentificate($uid, $pwd , $method = '')
{
if (empty($this->smtpFeatures['AUTH'])) {
// server doesn't understand AUTH command, then don't authentificate
return true;
}
$available_methods = explode(' ', $this->smtpFeatures['AUTH']); // methods supported by SMTP server
if (empty($method)) {
foreach ($this->smtpAuthMethods as $supported_method) {
// check if server supports methods, that we have implemented
if (in_array($supported_method, $available_methods)) {
$method = $supported_method;
break;
}
}
} else {
$method = strtoupper($method);
}
if (!in_array($method, $available_methods)) {
// coosen method is not supported by server
return $this->SetError('AUTH_METHOD_NOT_SUPPORTED', Array($method));
}
switch ($method) {
case 'CRAM-MD5':
$result = $this->_authCRAM_MD5($uid, $pwd);
break;
case 'LOGIN':
$result = $this->_authLogin($uid, $pwd);
break;
case 'PLAIN':
$result = $this->_authPlain($uid, $pwd);
break;
default:
return $this->SetError('AUTH_METHOD_NOT_IMPLEMENTED', Array($method));
break;
}
return $result;
}
/**
* Function which implements HMAC MD5 digest
*
* @param string $key The secret key
* @param string $data The data to protect
* @return string The HMAC MD5 digest
*/
function _HMAC_MD5($key, $data)
{
if (strlen($key) > 64) {
$key = pack('H32', md5($key));
}
if (strlen($key) < 64) {
$key = str_pad($key, 64, chr(0));
}
$k_ipad = substr($key, 0, 64) ^ str_repeat(chr(0x36), 64);
$k_opad = substr($key, 0, 64) ^ str_repeat(chr(0x5C), 64);
$inner = pack('H32', md5($k_ipad . $data));
$digest = md5($k_opad . $inner);
return $digest;
}
/**
* Authenticates the user using the CRAM-MD5 method.
*
* @param string $uid The userid to authenticate as.
* @param string $pwd The password to authenticate with.
*
* @return bool
*/
function _authCRAM_MD5($uid, $pwd)
{
if (!$this->SmtpSendCommand('AUTH', 'CRAM-MD5')) {
return false;
}
// 334: Continue authentication request
if (!$this->SmtpParseResponse(334)) {
// 503: Error: already authenticated
return $this->smtpResponceCode === 503 ? true : false;
}
$challenge = base64_decode($this->smtpRespoceArguments[0]);
$auth_str = base64_encode($uid . ' ' . $this->_HMAC_MD5($pwd, $challenge));
if (!$this->SmtpSendCommand($auth_str)) {
return false;
}
// 235: Authentication successful
if (!$this->SmtpParseResponse(235)) {
return false;
}
return true;
}
/**
* Authenticates the user using the LOGIN method.
*
* @param string $uid The userid to authenticate as.
* @param string $pwd The password to authenticate with.
*
* @return bool
*/
function _authLogin($uid, $pwd)
{
if (!$this->SmtpSendCommand('AUTH', 'LOGIN')) {
return false;
}
// 334: Continue authentication request
if (!$this->SmtpParseResponse(334)) {
// 503: Error: already authenticated
return $this->smtpResponceCode === 503 ? true : false;
}
if (!$this->SmtpSendCommand(base64_encode($uid))) {
return false;
}
// 334: Continue authentication request
if (!$this->SmtpParseResponse(334)) {
return false;
}
if (!$this->SmtpSendCommand(base64_encode($pwd))) {
return false;
}
// 235: Authentication successful
if (!$this->SmtpParseResponse(235)) {
return false;
}
return true;
}
/**
* Authenticates the user using the PLAIN method.
*
* @param string $uid The userid to authenticate as.
* @param string $pwd The password to authenticate with.
*
* @return bool
*/
function _authPlain($uid, $pwd)
{
if (!$this->SmtpSendCommand('AUTH', 'PLAIN')) {
return false;
}
// 334: Continue authentication request
if (!$this->SmtpParseResponse(334)) {
// 503: Error: already authenticated
return $this->smtpResponceCode === 503 ? true : false;
}
$auth_str = base64_encode(chr(0) . $uid . chr(0) . $pwd);
if (!$this->SmtpSendCommand($auth_str)) {
return false;
}
// 235: Authentication successful
if (!$this->SmtpParseResponse(235)) {
return false;
}
return true;
}
/**
* Send the MAIL FROM: command.
*
* @param string $sender The sender (reverse path) to set.
* @param string $params String containing additional MAIL parameters, such as the NOTIFY flags defined by RFC 1891 or the VERP protocol.
*
* @return bool
*/
function SmtpSetFrom($sender, $params = null)
{
$args = "FROM:<$sender>";
if (is_string($params)) {
$args .= ' ' . $params;
}
if (!$this->SmtpSendCommand('MAIL', $args)) {
return false;
}
if (!$this->SmtpParseResponse(250)) {
return false;
}
return true;
}
/**
* Send the RCPT TO: command.
*
* @param string $recipient The recipient (forward path) to add.
* @param string $params String containing additional RCPT parameters, such as the NOTIFY flags defined by RFC 1891.
*
* @return bool
*/
function SmtpAddTo($recipient, $params = null)
{
$args = "TO:<$recipient>";
if (is_string($params)) {
$args .= ' ' . $params;
}
if (!$this->SmtpSendCommand('RCPT', $args)) {
return false;
}
if (!$this->SmtpParseResponse(array(250, 251))) {
return false;
}
return true;
}
/**
* Send the DATA command.
*
* @param string $data The message body to send.
*
* @return bool
*/
function SmtpSendMessage($data)
{
/* RFC 1870, section 3, subsection 3 states "a value of zero
* indicates that no fixed maximum message size is in force".
* Furthermore, it says that if "the parameter is omitted no
* information is conveyed about the server's fixed maximum
* message size". */
if (isset($this->smtpFeatures['SIZE']) && ($this->smtpFeatures['SIZE'] > 0)) {
if (strlen($data) >= $this->smtpFeatures['SIZE']) {
$this->SmtpDisconnect();
return $this->SetError('Message size excedes the server limit', null, false);
}
}
// Quote the data based on the SMTP standards
// Change Unix (\n) and Mac (\r) linefeeds into Internet-standard CRLF (\r\n) linefeeds.
$data = preg_replace(Array('/(?<!\r)\n/','/\r(?!\n)/'), "\r\n", $data);
// Because a single leading period (.) signifies an end to the data,
// legitimate leading periods need to be "doubled" (e.g. '..')
$data = str_replace("\n.", "\n..", $data);
if (!$this->SmtpSendCommand('DATA')) {
return false;
}
if (!$this->SmtpParseResponse(354)) {
return false;
}
if ($this->smtpSocket->write($data . "\r\n.\r\n") === false) {
return false;
}
if (!$this->SmtpParseResponse(250)) {
return false;
}
return true;
}
/**
* Sets global charset for every message part
*
* @param string $charset
* @param bool $is_system set charset to default for current language
*/
function SetCharset($charset, $is_system = false)
{
$this->charset = $is_system ? CHARSET : $charset;
}
/**
* Allows to extract recipient's name from text by specifying it's email
*
* @param string $text
* @param string $email
* @return string
*/
function ExtractRecipientName($text, $email = '')
{
$lastspace = mb_strrpos($text, ' ');
$name = trim(mb_substr($text, 0, $lastspace - mb_strlen($text)), " \r\n\t\0\x0b\"'");
if (empty($name)) {
$name = $email;
}
return $name;
}
/**
* Takes $text and returns an email address from it
* Set $multiple to true to retrieve all found addresses
* Returns false if no addresses were found
*
* @param string $text
* @param bool $multiple
* @param bool $allow_only_domain
* @return Array|bool
* @access public
*/
public function ExtractRecipientEmail($text, $multiple = false, $allow_only_domain = false)
{
if ( $allow_only_domain ) {
$pattern = '/((' . REGEX_EMAIL_USER . '@)?' . REGEX_EMAIL_DOMAIN . ')/i';
}
else {
$pattern = '/(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')/i';
}
if ( $multiple ) {
if ( preg_match_all($pattern, $text, $found_emails) >= 1 ) {
return $found_emails[1];
}
else {
return false;
}
}
else {
if ( preg_match($pattern, $text, $found_emails) == 1 ) {
return $found_emails[1];
}
else {
return false;
}
}
}
/**
* Returns array of recipient names and emails
*
* @param string $list
* @param string $separator
* @return Array
*/
function GetRecipients($list, $separator = ';')
{
// by MIME specs recipients should be separated using "," symbol,
// but users can write ";" too (like in OutLook)
if (!trim($list)) {
return false;
}
$list = explode(',', str_replace($separator, ',', $list));
$ret = Array ();
foreach ($list as $recipient) {
$email = $this->ExtractRecipientEmail($recipient);
if (!$email) {
// invalid email format -> error
return false;
}
$name = $this->ExtractRecipientName($recipient, $email);
$ret[] = Array('Name' => $name, 'Email' => $email);
}
return $ret;
}
/* methods for nice header setting */
/**
* Sets "From" header.
*
* @param string $email
* @param string $first_last_name FirstName and LastName or just FirstName
* @param string $last_name LastName (if not specified in previous parameter)
*/
function SetFrom($email, $first_last_name, $last_name = '')
{
$name = rtrim($first_last_name.' '.$last_name, ' ');
$this->SetEncodedEmailHeader('From', $email, $name ? $name : $email);
if (!isset($this->headers['Return-Path'])) {
$this->SetReturnPath($email);
}
}
/**
* Sets "To" header.
*
* @param string $email
* @param string $first_last_name FirstName and LastName or just FirstName
* @param string $last_name LastName (if not specified in previous parameter)
*/
function SetTo($email, $first_last_name, $last_name = '')
{
$name = rtrim($first_last_name.' '.$last_name, ' ');
$email = $this->_replaceRecipientEmail($email);
$this->SetEncodedEmailHeader('To', $email, $name ? $name : $email);
}
/**
* Sets "Return-Path" header (useful for spammers)
*
* @param string $email
*/
function SetReturnPath($email)
{
$this->SetHeader('Return-Path', $email);
}
/**
* Adds one more recipient into "To" header
*
* @param string $email
* @param string $first_last_name FirstName and LastName or just FirstName
* @param string $last_name LastName (if not specified in previous parameter)
*/
function AddTo($email, $first_last_name = '', $last_name = '')
{
$name = rtrim($first_last_name.' '.$last_name, ' ');
$this->AddRecipient('To', $email, $name);
}
/**
* Allows to replace recipient in all sent emails (used for debugging)
*
* @param string $email
* @return string
*/
function _replaceRecipientEmail($email)
{
if ( defined('OVERRIDE_EMAIL_RECIPIENTS') && OVERRIDE_EMAIL_RECIPIENTS ) {
if ( substr(OVERRIDE_EMAIL_RECIPIENTS, 0, 1) == '@' ) {
// domain
$email = str_replace('@', '_at_', $email) . OVERRIDE_EMAIL_RECIPIENTS;
}
else {
$email = OVERRIDE_EMAIL_RECIPIENTS;
}
}
return $email;
}
/**
* Adds one more recipient into "Cc" header
*
* @param string $email
* @param string $first_last_name FirstName and LastName or just FirstName
* @param string $last_name LastName (if not specified in previous parameter)
*/
function AddCc($email, $first_last_name = '', $last_name = '')
{
$name = rtrim($first_last_name.' '.$last_name, ' ');
$this->AddRecipient('Cc', $email, $name);
}
/**
* Adds one more recipient into "Bcc" header
*
* @param string $email
* @param string $first_last_name FirstName and LastName or just FirstName
* @param string $last_name LastName (if not specified in previous parameter)
*/
function AddBcc($email, $first_last_name = '', $last_name = '')
{
$name = rtrim($first_last_name.' '.$last_name, ' ');
$this->AddRecipient('Bcc', $email, $name);
}
/**
* Adds one more recipient to specified header
*
* @param string $header_name
* @param string $email
* @param string $name
*/
function AddRecipient($header_name, $email, $name = '')
{
$email = $this->_replaceRecipientEmail($email);
if (!$name) {
$name = $email;
}
$value = isset($this->headers[$header_name]) ? $this->headers[$header_name] : '';
if ( $value ) {
// not first recipient added - separate with comma
$value .= ', ';
}
$value .= $this->QuotedPrintableEncode($name, $this->charset) . ' <' . $email . '>';
$this->SetHeader($header_name, $value);
}
/**
* Sets "Subject" header.
*
* @param string $subject message subject
*/
function SetSubject($subject)
{
$this->setEncodedHeader('Subject', $subject);
}
/**
* Sets HTML part of message
*
* @param string $html
*/
function SetHTML($html)
{
$this->CreateTextHtmlPart($html, true);
}
/**
* Sets Plain-Text part of message
*
* @param string $plain_text
*/
function SetPlain($plain_text)
{
$this->CreateTextHtmlPart($plain_text);
}
/**
* Sets HTML and optionally plain part of the message
*
* @param string $html
* @param string $plain_text
*/
function SetBody($html, $plain_text = '')
{
$this->SetHTML($html);
if ($plain_text) {
$this->SetPlain($plain_text);
}
}
/**
* Performs mail delivery (supports delayed delivery)
*
* @param string $message message, if not given, then use composed one
* @param bool $immediate_send send message now or MailingId
* @param bool $immediate_clear clear message parts after message is sent
* @return bool
*/
function Deliver($message = null, $immediate_send = true, $immediate_clear = true)
{
if (isset($message)) {
// if message is given directly, then use it
if (is_array($message)) {
$message_headers =& $message[0];
$message_body =& $message[1];
}
else {
$message_headers = Array ();
list ($headers, $message_body) = explode("\n\n", $message, 2);
$headers = explode("\n", $headers);
foreach ($headers as $header) {
$header = explode(':', $header, 2);
$message_headers[ trim($header[0]) ] = trim($header[1]);
}
}
$composed = true;
} else {
// direct message not given, then assemble message from available parts
$composed = $this->GetHeadersAndBody($message_headers, $message_body);
}
if ( $composed ) {
if ( $immediate_send === true ) {
$send_method = 'Send' . $this->sendMethod;
$result = $this->$send_method($message_headers, $message_body);
if ( $result && $this->_logData ) {
// add e-mail log record
$this->Conn->doInsert($this->_logData, TABLE_PREFIX . 'EmailLog');
}
if ( $immediate_clear ) {
$this->Clear();
}
return $result;
}
else {
$fields_hash = Array (
'ToEmail' => $message_headers['To'],
'Subject' => $message_headers['Subject'],
'Queued' => adodb_mktime(),
'SendRetries' => 0,
'LastSendRetry' => 0,
'MailingId' => (int)$immediate_send,
'LogData' => serialize($this->_logData), // remember e-mail log record
);
$fields_hash['MessageHeaders'] = serialize($message_headers);
$fields_hash['MessageBody'] =& $message_body;
$this->Conn->doInsert($fields_hash, TABLE_PREFIX . 'EmailQueue');
if ( $immediate_clear ) {
$this->Clear();
}
}
}
// if not immediate send, then send result is positive :)
return $immediate_send !== true ? true : false;
}
/**
* Sets log data
*
* @param string $log_data
* @return void
* @access public
*/
public function setLogData($log_data)
{
$this->_logData = $log_data;
}
}
\ No newline at end of file
Index: branches/5.2.x/core/units/mailing_lists/mailing_lists_config.php
===================================================================
--- branches/5.2.x/core/units/mailing_lists/mailing_lists_config.php (revision 15460)
+++ branches/5.2.x/core/units/mailing_lists/mailing_lists_config.php (revision 15461)
@@ -1,145 +1,145 @@
<?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' => 'mailing-list',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'MailingListEventHandler', 'file' => 'mailing_list_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'MailingListTagProcessor', 'file' => 'mailing_list_tp.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'ScheduledTasks' => Array (
'generate_mailing_queue' => Array ('EventName' => 'OnGenerateEmailQueue', 'RunSchedule' => '*/30 * * * *'),
'process_mailing_queue' => Array ('EventName' => 'OnProcessEmailQueue', 'RunSchedule' => '*/30 * * * *'),
),
'IDField' => 'MailingId',
'TableName' => TABLE_PREFIX . 'MailingLists',
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('mailing-list' => '!la_title_AddingMailingList!'),
'edit_status_labels' => Array ('mailing-list' => '!la_title_ViewingMailingList!'),
),
'mailing_list_list' => Array (
'prefixes' => Array ('mailing-list_List'), 'format' => "!la_title_MailingLists!",
'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'primary_theme', 'clone', 'view', 'dbl-click'),
),
'mailing_list_edit' => Array (
'prefixes' => Array ('mailing-list'), 'format' => "#mailing-list_status#",
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
),
'PermSection' => Array('main' => 'in-portal:mailing_lists'),
'Sections' => Array (
'in-portal:mailing_folder' => Array (
'parent' => 'in-portal:users',
'icon' => 'mailing_list',
'label' => 'la_title_MailingLists',
'use_parent_header' => 1,
'permissions' => Array (),
'priority' => 5,
'type' => stTREE,
),
'in-portal:mailing_lists' => Array (
'parent' => 'in-portal:mailing_folder',
'icon' => 'mailing_list',
'label' => 'la_title_MailingLists',
'url' => Array('t' => 'mailing_lists/mailing_list_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete'),
'priority' => 5.1, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'type' => stTAB,
),
),
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s FROM %1$s',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('MailingId' => 'desc'),
)
),
'Fields' => Array (
'MailingId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'PortalUserId' => Array(
'type' => 'int',
'formatter' => 'kLEFTFormatter',
'options' => Array (USER_ROOT => 'root'),
'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Users WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username',
'required' => 1, 'not_null' => 1, 'default' => USER_ROOT,
),
'To' => Array ('type' => 'string', 'required' => 1, 'default' => NULL),
'ToParsed' => Array ('type' => 'string', 'default' => NULL),
'Attachments' => Array (
'type' => 'string',
'formatter' => 'kUploadFormatter', 'upload_dir' => ITEM_FILES_PATH, 'max_size' => 50000000,
'multiple' => 10, 'direct_links' => true, 'file_types' => '*.*', 'files_description' => '!la_hint_AllFiles!',
'default' => NULL
),
'Subject' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''),
'MessageText' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
'MessageHtml' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
'Status' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_NotProcessed', 2 => 'la_opt_PartiallyProcessed', 3 => 'la_opt_Processed', 4 => 'la_opt_Cancelled'), 'use_phrases' => 1,
'not_null' => 1, 'required' => 1, 'default' => 1
),
'EmailsQueued' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'EmailsSent' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'EmailsTotal' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array ('default' => 'icon16_item.png'),
'Fields' => Array (
- 'MailingId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
- 'Subject' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
- 'MessageText' => Array ('filter_block' => 'grid_like_filter', 'cut_first' => 100, 'width' => 120, ),
- 'MessageHtml' => Array ('title' => 'la_col_MessageHtml', 'filter_block' => 'grid_like_filter', 'cut_first' => 100, 'width' => 120, ),
- 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
- 'EmailsQueued' => Array ('filter_block' => 'grid_range_filter', 'width' => 80, ),
- 'EmailsSent' => Array ('filter_block' => 'grid_range_filter', 'width' => 80, ),
- 'EmailsTotal' => Array ('filter_block' => 'grid_range_filter', 'width' => 80, ),
+ 'MailingId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70),
+ 'Subject' => Array ('filter_block' => 'grid_like_filter', 'width' => 200),
+ 'MessageText' => Array ('filter_block' => 'grid_like_filter', 'cut_first' => 100, 'width' => 120, 'hidden' => 1),
+ 'MessageHtml' => Array ('title' => 'la_col_MessageHtml', 'filter_block' => 'grid_like_filter', 'cut_first' => 100, 'width' => 120, 'hidden' => 1),
+ 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
+ 'EmailsQueued' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
+ 'EmailsSent' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
+ 'EmailsTotal' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/core/units/mailing_lists/mailing_list_eh.php
===================================================================
--- branches/5.2.x/core/units/mailing_lists/mailing_list_eh.php (revision 15460)
+++ branches/5.2.x/core/units/mailing_lists/mailing_list_eh.php (revision 15461)
@@ -1,384 +1,402 @@
<?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 MailingListEventHandler extends kDBEventHandler {
/**
* Allows to override standard permission mapping
*
* @return void
* @access protected
* @see kEventHandler::$permMapping
*/
protected function mapPermissions()
{
parent::mapPermissions();
$permissions = Array (
'OnCancelMailing' => Array ('self' => 'edit'),
'OnGenerateEmailQueue' => Array ('self' => true),
'OnProcessEmailQueue' => Array ('self' => true),
+ 'OnGetHtmlBody' => Array ('self' => 'edit'),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
/**
* Prepare recipient list
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnNew(kEvent $event)
{
parent::OnNew($event);
$recipient_type = $this->Application->GetVar('mailing_recipient_type');
if ( !$recipient_type ) {
return;
}
$recipients = $this->Application->GetVar($recipient_type);
if ( $recipients ) {
$object = $event->getObject();
/* @var $object kDBItem */
$to = $recipient_type . '_' . implode(';' . $recipient_type . '_', array_keys($recipients));
$object->SetDBField('To', $to);
}
$this->setRequired($event);
}
/**
* Prepare recipient list
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnPreCreate(kEvent $event)
{
parent::OnPreCreate($event);
$this->setRequired($event);
}
/**
* Don't allow to delete mailings in progress
*
* @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 ) {
$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
$table_name = $this->Application->getUnitOption($event->Prefix, 'TableName');
$sql = 'SELECT ' . $id_field . '
FROM ' . $table_name . '
WHERE ' . $id_field . ' IN (' . implode(',', $ids) . ') AND Status <> ' . MailingList::PARTIALLY_PROCESSED;
$allowed_ids = $this->Conn->GetCol($sql);
$event->setEventParam('ids', $allowed_ids);
}
}
}
/**
* Delete all related mails in email queue
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemDelete(kEvent $event)
{
parent::OnAfterItemDelete($event);
$this->_deleteQueue($event);
$object = $event->getObject();
/* @var $object kDBItem */
// delete mailing attachments after mailing is deleted
$attachments = $object->GetField('Attachments', 'file_paths');
if ( $attachments ) {
$attachments = explode('|', $attachments);
foreach ($attachments as $attachment_file) {
if ( file_exists($attachment_file) ) {
unlink($attachment_file);
}
}
}
}
/**
* Cancels given mailing and deletes all it's email queue
*
* @param kEvent $event
*/
function OnCancelMailing($event)
{
$object = $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$ids = $this->StoreSelectedIDs($event);
if ($ids) {
foreach ($ids as $id) {
$object->Load($id);
$object->SetDBField('Status', MailingList::CANCELLED);
$object->Update();
}
}
$this->clearSelectedIDs($event);
}
/**
* Checks, that at least one message text field is filled
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemCreate(kEvent $event)
{
parent::OnBeforeItemCreate($event);
$object = $event->getObject();
/* @var $object kDBItem */
if ( !$this->Application->GetVar('mailing_recipient_type') ) {
// user manually typed email addresses -> normalize
$recipients = str_replace(',', ';', $object->GetDBField('To'));
$recipients = array_map('trim', explode(';', $recipients));
$object->SetDBField('To', implode(';', $recipients));
}
// remember user, who created mailing, because of his name
// is needed for "From" field, but mailing occurs from cron
$user_id = $this->Application->RecallVar('user_id');
$object->SetDBField('PortalUserId', $user_id);
$this->setRequired($event);
}
/**
* Checks, that at least one message text field is filled
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemUpdate(kEvent $event)
{
parent::OnBeforeItemUpdate($event);
$this->setRequired($event);
}
/**
* Dynamically changes required fields
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function setRequired(kEvent $event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$object->setRequired('MessageHtml', !$object->GetDBField('MessageText'));
$object->setRequired('MessageText', !$object->GetDBField('MessageHtml'));
}
/**
* Deletes mailing list email queue, when it becomes cancelled
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemUpdate(kEvent $event)
{
parent::OnAfterItemUpdate($event);
$object = $event->getObject();
/* @var $object kDBItem */
$status = $object->GetDBField('Status');
if ( ($status != $object->GetOriginalField('Status')) && ($status == MailingList::CANCELLED) ) {
$this->_deleteQueue($event);
}
}
/**
* Deletes email queue records related with given mailing list
*
* @param kEvent $event
*/
function _deleteQueue($event)
{
$object = $event->getObject();
/* @var $object kDBItem */
$sql = 'DELETE FROM ' . $this->Application->getUnitOption('email-queue', 'TableName') . '
WHERE MailingId = ' . $object->GetID();
$this->Conn->Query($sql);
}
/**
* Allows to safely get mailing configuration variables
*
* @param string $variable_name
* @return int
*/
function _ensureDefault($variable_name)
{
$value = $this->Application->ConfigValue($variable_name);
if ($value === false) {
// ensure default value, when configuration variable is missing
return 10;
}
if (!$value) {
// configuration variable found, but it's value is empty or zero
return false;
}
return $value;
}
/**
* Generates email queue for active mailing lists
*
* @param kEvent $event
*/
function OnGenerateEmailQueue($event)
{
$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
$table_name = $this->Application->getUnitOption($event->Prefix, 'TableName');
$where_clause = Array (
'Status NOT IN (' . MailingList::CANCELLED . ',' . MailingList::PROCESSED . ')',
'(EmailsQueued < EmailsTotal) OR (EmailsTotal = 0)',
'`To` <> ""',
);
$sql = 'SELECT *
FROM ' . $table_name . '
WHERE (' . implode(') AND (', $where_clause) . ')
ORDER BY ' . $id_field . ' ASC';
$mailing_lists = $this->Conn->Query($sql, $id_field);
if (!$mailing_lists) {
return ;
}
// queue 10 emails per step summary from all mailing lists (FIFO logic)
$to_queue = $this->_ensureDefault('MailingListQueuePerStep');
if ($to_queue === false) {
return ;
}
$mailing_list_helper = $this->Application->recallObject('MailingListHelper');
/* @var $mailing_list_helper MailingListHelper */
foreach ($mailing_lists as $mailing_id => $mailing_data) {
if ($mailing_data['EmailsTotal'] == 0) {
// no work performed on this mailing list -> calculate totals
$updated_fields = $mailing_list_helper->generateRecipients($mailing_id, $mailing_data);
$updated_fields['Status'] = MailingList::PARTIALLY_PROCESSED;
$mailing_data = array_merge($mailing_data, $updated_fields);
$this->Conn->doUpdate($updated_fields, $table_name, $id_field . ' = ' . $mailing_id);
}
$emails = unserialize( $mailing_data['ToParsed'] );
if (!$emails) {
continue;
}
// queue allowed count of emails
$i = 0;
$process_count = count($emails) >= $to_queue ? $to_queue : count($emails);
while ($i < $process_count) {
$mailing_list_helper->queueEmail($emails[$i], $mailing_id, $mailing_data);
$i++;
}
// remove processed emails from array
$to_queue -= $process_count; // decrement available for processing email count
array_splice($emails, 0, $process_count);
$updated_fields = Array (
'ToParsed' => serialize($emails),
'EmailsQueued' => $mailing_data['EmailsQueued'] + $process_count,
);
$mailing_data = array_merge($mailing_data, $updated_fields);
$this->Conn->doUpdate($updated_fields, $table_name, $id_field . ' = ' . $mailing_id);
if (!$to_queue) {
// emails to be queued per step reached -> leave
break;
}
}
}
/**
* Process email queue from cron
*
* @param kEvent $event
*/
function OnProcessEmailQueue($event)
{
$deliver_count = $this->_ensureDefault('MailingListSendPerStep');
if ($deliver_count === false) {
return ;
}
$queue_table = $this->Application->getUnitOption('email-queue', 'TableName');
// get queue part to send
$sql = 'SELECT *
FROM ' . $queue_table . '
WHERE (SendRetries < 5) AND (LastSendRetry < ' . strtotime('-2 hours') . ')
LIMIT 0,' . $deliver_count;
$messages = $this->Conn->Query($sql);
if (!$messages) {
// no more messages left in queue
return ;
}
$mailing_list_helper = $this->Application->recallObject('MailingListHelper');
/* @var $mailing_list_helper MailingListHelper */
$mailing_list_helper->processQueue($messages);
}
+
+ /**
+ * Returns HTML of sent e-mail for iframe
+ *
+ * @param kEvent $event
+ * @return void
+ * @access protected
+ */
+ protected function OnGetHtmlBody(kEvent $event)
+ {
+ $event->status = kEvent::erSTOP;
+
+ $object = $event->getObject();
+ /* @var $object kDBItem */
+
+ echo $object->GetDBField('MessageHtml');
+ }
}
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/mailing_lists/mailing_list_edit.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/mailing_lists/mailing_list_edit.tpl (revision 15460)
+++ branches/5.2.x/core/admin_templates/mailing_lists/mailing_list_edit.tpl (revision 15461)
@@ -1,136 +1,150 @@
<inp2:adm_SetPopupSize width="865" height="640"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:mailing_lists" prefix="mailing-list" title_preset="mailing_list_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_if check="mailing-list_IsNewItem">
a_toolbar.AddButton(
new ToolBarButton(
'select',
'<inp2:m_phrase label="la_ToolTip_Send" escape="1"/>',
function() {
submit_event('mailing-list', '<inp2:mailing-list_SaveEvent/>');
}
)
);
</inp2:m_if>
a_toolbar.AddButton(
new ToolBarButton(
'cancel',
'<inp2:m_phrase label="la_ToolTip_Close" escape="1"/>',
function() {
submit_event('mailing-list', 'OnGoBack');
}
)
);
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton(
new ToolBarButton(
'prev',
'<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>',
function() {
go_to_id('mailing-list', '<inp2:mailing-list_PrevId/>');
}
)
);
a_toolbar.AddButton(
new ToolBarButton(
'next',
'<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>',
function() {
go_to_id('mailing-list', '<inp2:mailing-list_NextId/>');
}
)
);
a_toolbar.Render();
<inp2:m_if check="mailing-list_IsSingle">
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="mailing-list_IsLast">
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="mailing-list_IsFirst">
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="<inp2:m_Compress files='js/uploader/upload_manager.js|js/uploader/uploader.js'/>"></script>
</td>
</tr>
</tbody>
</table>
<inp2:mailing-list_SaveWarning name="grid_save_warning"/>
<inp2:mailing-list_ErrorWarning name="form_error_warning"/>
<inp2:m_DefineElement name="recipient_element">
&lt;<inp2:m_Param name="recipient_name"/>&gt;
<inp2:m_if check="m_Param" name="not_last">; </inp2:m_if>
</inp2:m_DefineElement>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_General"/>
<inp2:m_RenderElement name="inp_id_label" prefix="mailing-list" field="MailingId" title="la_fld_Id"/>
<inp2:m_RenderElement design="form_row" prefix="mailing-list" field="To" title="la_fld_To" size="60">
<td class="control-cell">
<inp2:m_if check="{$prefix}_IsManualRecipient">
<input style="width: 100%;" type="text" name="<inp2:{$prefix}_InputName field="$field"/>" id="<inp2:{$prefix}_InputName field="$field"/>" value="<inp2:{$prefix}_Field field="$field"/>" tabindex="<inp2:m_get param="tab_index"/>" size="<inp2:m_param name="size"/>">
<inp2:m_else/>
<inp2:$prefix_PrintRecipients render_as="recipient_element" strip_nl="2"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="$prefix" field="$field"/>
</inp2:m_if>
</td>
</inp2:m_RenderElement>
<inp2:m_if check="mailing-list_IsNewItem">
<inp2:m_RenderElement name="inp_edit_box" prefix="mailing-list" field="Subject" title="la_fld_Subject" size="60"/>
<inp2:m_RenderElement name="inp_edit_swf_upload" prefix="mailing-list" field="Attachments" title="la_fld_Attachment"/>
<inp2:m_RenderElement name="inp_label" prefix="mailing-list" field="Status" title="la_fld_Status"/>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_label" prefix="mailing-list" field="Subject" title="la_fld_Subject"/>
<inp2:m_RenderElement name="inp_label" prefix="mailing-list" field="Attachments" title="la_fld_Attachment"/>
<inp2:m_RenderElement name="inp_label" prefix="mailing-list" field="Status" title="la_fld_Status"/>
<inp2:m_RenderElement name="inp_label" prefix="mailing-list" field="EmailsQueued" title="la_fld_EmailsQueued"/>
<inp2:m_RenderElement name="inp_label" prefix="mailing-list" field="EmailsSent" title="la_fld_EmailsSent"/>
<inp2:m_RenderElement name="inp_label" prefix="mailing-list" field="EmailsTotal" title="la_fld_EmailsTotal"/>
</inp2:m_if>
<inp2:m_RenderElement name="subsection" title="la_section_Message"/>
<inp2:m_if check="mailing-list_IsNewItem">
<inp2:m_RenderElement name="inp_edit_textarea" prefix="mailing-list" field="MessageHtml" title="la_fld_HtmlVersion" control_options="{min_height: 140}" rows="10" cols="75"/>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="mailing-list" field="MessageText" allow_html="0" title="la_fld_TextVersion" control_options="{min_height: 140}" rows="10" cols="75"/>
<inp2:m_else/>
- <inp2:m_RenderElement name="inp_label" prefix="mailing-list" field="MessageHtml" title="la_fld_HtmlVersion"/>
- <inp2:m_RenderElement name="inp_label" prefix="mailing-list" field="MessageText" title="la_fld_TextVersion" nl2br="1"/>
+
+ <inp2:m_RenderElement design="form_row" prefix="mailing-list" field="MessageHtml" 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="mailing-list" field="MessageText" title="la_fld_TextVersion">
+ <td class="control-cell" valign="top">
+ <div style="border: 1px solid black; width: 624px; height: 234px; padding: 8px; font-family: serif; font-size: 16px; overflow: auto;">
+ <inp2:$prefix_Field name="$field" nl2br="1"/>
+ </div>
+ </td>
+ </inp2:m_RenderElement>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
<input type="hidden" name="mailing_recipient_type" value="<inp2:m_Get name='mailing_recipient_type'/>"/>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/core/install/install_schema.sql
===================================================================
--- branches/5.2.x/core/install/install_schema.sql (revision 15460)
+++ branches/5.2.x/core/install/install_schema.sql (revision 15461)
@@ -1,1391 +1,1391 @@
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 text,
+ LogData longtext,
PRIMARY KEY (EmailQueueId),
KEY LastSendRetry (LastSendRetry),
KEY SendRetries (SendRetries),
KEY MailingId (MailingId)
);
CREATE TABLE EmailEvents (
EventId int(11) NOT NULL AUTO_INCREMENT,
`Event` 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,
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 (EventId),
KEY `Type` (`Type`),
KEY Enabled (Enabled),
KEY `Event` (`Event`),
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))
);
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)
);
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 '',
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,
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))
);
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',
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,
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,
EventName varchar(255) NOT NULL DEFAULT '',
EventType tinyint(4) DEFAULT NULL,
EventParams text,
AccessKey varchar(32) NOT NULL DEFAULT '',
PRIMARY KEY (EmailLogId),
KEY `timestamp` (SentOn)
);
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 '',
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',
EmailsQueued 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 (EmailsQueued),
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.2.x/core/install/upgrades.sql
===================================================================
--- branches/5.2.x/core/install/upgrades.sql (revision 15460)
+++ branches/5.2.x/core/install/upgrades.sql (revision 15461)
@@ -1,2792 +1,2795 @@
# ===== 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_.';

Event Timeline