JOIN ' . $ci_table . ' ci ON c.CategoryId = ci.CategoryId
WHERE (c.TreeLeft BETWEEN ' . $object->GetDBField('TreeLeft') . ' AND ' . $object->GetDBField('TreeRight') . ') AND (ci.ItemPrefix IN (' . $module_prefixes . '))';
return $this->Conn->GetOne($sql);
}
function _getModulePrefixes()
{
$ret = Array ();
foreach ($this->Application->ModuleInfo as $module_info) {
* Parses category part of url, build main part of url
*
* @param int $rewrite_mode Mode in what rewrite listener was called. Possbile two modes: REWRITE_MODE_BUILD, REWRITE_MODE_PARSE.
* @param string $prefix Prefix, that listener uses for system integration
* @param Array $params Params, that are used for url building or created during url parsing.
* @param Array $url_parts Url parts to parse (only for parsing).
* @param bool $keep_events Keep event names in resulting url (only for building).
* @return bool|string|Array Return true to continue to next listener; return false (when building) not to rewrite given prefix; return false (when parsing) to stop processing at this listener.
*/
public function CategoryRewriteListener($rewrite_mode = REWRITE_MODE_BUILD, $prefix, &$params, &$url_parts, $keep_events = false)
INSERT INTO SystemSettings 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 SystemSettings 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 SystemSettings VALUES(DEFAULT, 'User_NewGroup', '13', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_new_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>UserGroups WHERE Enabled=1 AND Personal=0</SQL>', 10.08, 0, 1, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'User_LoggedInGroup', '15', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_assign_all_to', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>UserGroups WHERE Enabled=1 AND Personal=0</SQL>', 10.09, 0, 1, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'User_GuestGroup', '14', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_guest_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>UserGroups WHERE Enabled=1 AND Personal=0</SQL>', 10.1, 0, 1, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'User_SubscriberGroup', '12', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_subscriber_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>UserGroups WHERE Enabled=1 AND Personal=0</SQL>', 10.11, 0, 1, NULL);
INSERT INTO SystemSettings 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>UserGroups WHERE Enabled=1 AND Personal=0</SQL>', 10.12, 0, 1, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'User_Default_Registration_Country', '', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_DefaultRegistrationCountry', 'select', NULL, '=+||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>', 10.13, 0, 0, NULL);
INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, 'Core', 'This e-mail is sent to a user after filling in the Contact Us form', 1, 1, 1);
INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, 'Core', 'This e-mail is sent to a user after filling in the Contact Us form', 0, 1, 1);
INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.TO.USER', NULL, 1, 0, 'Core', 'Admin Reply to User Form Submission', 1, 1, 1);
INSERT INTO EmailEvents (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER', NULL, 1, 0, 'Core', 'User Replied to It\'s Form Submission', 1, 1, 1);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>Categories WHERE Status=1 ', NULL, 'la_prompt_ActiveCategories', '0', '1');
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>Users WHERE Status=1 ', NULL, 'la_prompt_ActiveUsers', '0', '1');
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>UserSessions', NULL, 'la_prompt_CurrentSessions', '0', '1');
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) as CategoryCount FROM <%prefix%>Categories', NULL, 'la_prompt_TotalCategories', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ActiveCategories FROM <%prefix%>Categories WHERE Status = 1', NULL, 'la_prompt_ActiveCategories', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS PendingCategories FROM <%prefix%>Categories WHERE Status = 2', NULL, 'la_prompt_PendingCategories', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS DisabledCategories FROM <%prefix%>Categories WHERE Status = 0', NULL, 'la_prompt_DisabledCategories', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS NewCategories FROM <%prefix%>Categories WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="Category_DaysNew"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewCategories', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) FROM <%prefix%>Categories WHERE EditorsPick = 1', NULL, 'la_prompt_CategoryEditorsPick', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>Categories', NULL, 'la_prompt_NewestCategoryDate', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>Categories', NULL, 'la_prompt_LastCategoryUpdate', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS TotalUsers FROM <%prefix%>Users', NULL, 'la_prompt_TopicsUsers', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ActiveUsers FROM <%prefix%>Users WHERE Status = 1', NULL, 'la_prompt_UsersActive', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS PendingUsers FROM <%prefix%>Users WHERE Status = 2', NULL, 'la_prompt_UsersPending', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS DisabledUsers FROM <%prefix%>Users WHERE Status = 0', NULL, 'la_prompt_UsersDisabled', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>Users', NULL, 'la_prompt_NewestUserDate', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT( DISTINCT LOWER( Country ) ) FROM <%prefix%>Users WHERE LENGTH(Country) > 0', NULL, 'la_prompt_UsersUniqueCountries', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT( DISTINCT LOWER( State ) ) FROM <%prefix%>Users WHERE LENGTH(State) > 0', NULL, 'la_prompt_UsersUniqueStates', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS TotalUserGroups FROM <%prefix%>UserGroups', NULL, 'la_prompt_TotalUserGroups', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS BannedUsers FROM <%prefix%>Users WHERE IsBanned = 1', NULL, 'la_prompt_BannedUsers', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS NonExipedSessions FROM <%prefix%>UserSessions WHERE Status = 1', NULL, 'la_prompt_NonExpiredSessions', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ThemeCount FROM <%prefix%>Themes', NULL, 'la_prompt_ThemeCount', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS RegionsCount FROM <%prefix%>Languages', NULL, 'la_prompt_RegionsCount', 0, 2);
#INSERT INTO PageContent VALUES (DEFAULT, 1, 1, '<span style="font-weight: bold;">In-portal</span> is a revolutionary Web Site management system that allows you to automate and facilitate management of large portal and community web sites. Regardless of whether you are running a directory site or a content news portal, a community site or an online mall, In-portal will enhance your web site management experience with innovative.</span><br><br>We are proud to present our newly developed <b>"default"</b> theme that introduces a fresh look as well totally new approach in the template system.</span><br>', NULL, NULL, NULL, NULL, 0, 0, 0, 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 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';
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'
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';
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');
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);
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>)%';
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',
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',
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');