Index: branches/RC/core/install/install_schema.sql =================================================================== diff -u -N -r10987 -r11121 --- branches/RC/core/install/install_schema.sql (.../install_schema.sql) (revision 10987) +++ branches/RC/core/install/install_schema.sql (.../install_schema.sql) (revision 11121) @@ -643,3 +643,322 @@ ANSICodePage varchar(10) NOT NULL default '', PRIMARY KEY (LocaleId) ); + +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) +); \ No newline at end of file Index: branches/RC/core/install/remove_schema.sql =================================================================== diff -u -N -r10976 -r11121 --- branches/RC/core/install/remove_schema.sql (.../remove_schema.sql) (revision 10976) +++ branches/RC/core/install/remove_schema.sql (.../remove_schema.sql) (revision 11121) @@ -39,4 +39,27 @@ DROP TABLE Agents; DROP TABLE SpellingDictionary; DROP TABLE Thesaurus; -DROP TABLE LocalesList; \ No newline at end of file +DROP TABLE LocalesList; +DROP TABLE BanRules; +DROP TABLE CountCache; +DROP TABLE Favorites; +DROP TABLE Images; +DROP TABLE ItemRating; +DROP TABLE ItemReview; +DROP TABLE ItemTypes; +DROP TABLE ItemFiles; +DROP TABLE Relationship; +DROP TABLE SearchConfig; +DROP TABLE SearchLog; +DROP TABLE IgnoreKeywords; +DROP TABLE SpamControl; +DROP TABLE StatItem; +DROP TABLE SuggestMail; +DROP TABLE SysCache; +DROP TABLE TagLibrary; +DROP TABLE TagAttributes; +DROP TABLE ImportScripts; +DROP TABLE StylesheetSelectors; +DROP TABLE Visits; +DROP TABLE ImportCache; +DROP TABLE RelatedSearches; \ No newline at end of file Index: branches/RC/core/install/upgrades.sql =================================================================== diff -u -N -r11120 -r11121 --- branches/RC/core/install/upgrades.sql (.../upgrades.sql) (revision 11120) +++ branches/RC/core/install/upgrades.sql (.../upgrades.sql) (revision 11121) @@ -608,4 +608,326 @@ 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_tab_Files' WHERE Phrase = 'la_tab_files'; \ No newline at end of file +UPDATE Phrase SET Phrase = 'la_tab_Files' WHERE Phrase = 'la_tab_files'; + +DROP TABLE ImportScripts; +DELETE FROM Modules WHERE Name = 'In-Portal'; + +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) +); \ No newline at end of file Index: branches/RC/kernel/install/prerequisites.php =================================================================== diff -u -N --- branches/RC/kernel/install/prerequisites.php (revision 10832) +++ branches/RC/kernel/install/prerequisites.php (revision 0) @@ -1,50 +0,0 @@ -_toolkit =& $instance; - } - - /** - * Checks minimal version, that could be upgradeable - * - * @param string $mode when called mode {install, upgrade) - */ - function CheckPrerequisites($versions, $mode) - { - $errors = Array (); - - if ($mode == 'upgrade') { - $min_version = '4.3.2'; - - $current_version = $this->_toolkit->ConvertModuleVersion($versions[0]); - $needed_version = $this->_toolkit->ConvertModuleVersion($min_version); - if ($current_version < $needed_version) { - $errors[] = 'Please upgrade "In-Portal" to version ' . $min_version . ' or above'; - } - } - - return $errors; - } - } - -?> \ No newline at end of file Index: branches/RC/kernel/install/install_data.sql =================================================================== diff -u -N --- branches/RC/kernel/install/install_data.sql (revision 10832) +++ branches/RC/kernel/install/install_data.sql (revision 0) @@ -1,243 +0,0 @@ -INSERT INTO ConfigurationAdmin VALUES ('AllowDeleteRootCats', 'la_Text_General', 'la_AllowDeleteRootCats', 'checkbox', NULL , NULL , 10.09, 0, 0); -INSERT INTO ConfigurationAdmin VALUES ('Catalog_PreselectModuleTab', 'la_Text_General', 'la_config_CatalogPreselectModuleTab', 'checkbox', NULL, NULL, 10.10, 0, 1); -INSERT INTO ConfigurationAdmin VALUES ('RecycleBinFolder', 'la_Text_General', 'la_config_RecycleBinFolder', 'text', NULL , NULL , 10.11, 0, 0); - -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'AllowDeleteRootCats', '0', 'In-Portal', 'in-portal:configure_categories'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Catalog_PreselectModuleTab', 1, 'In-Portal', 'in-portal:configure_categories'); -INSERT INTO ConfigurationValues VALUES (DEFAULT, 'RecycleBinFolder', '', 'In-Portal', 'in-portal:configure_categories'); - -INSERT INTO ItemTypes VALUES (1, 'In-Portal', 'c', 'Category', 'Name', 'CreatedById', NULL, NULL, 'la_ItemTab_Categories', 1, 'admin/category/addcategory.php', 'clsCategory', 'Category'); -INSERT INTO ItemTypes VALUES (6, 'In-Portal', 'u', 'PortalUser', 'Login', 'PortalUserId', NULL, NULL, '', 0, '', 'clsPortalUser', 'User'); - -INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.ADD', 'lu_PermName_Category.Add_desc', 'lu_PermName_Category.Add_error', 'In-Portal'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.DELETE', 'lu_PermName_Category.Delete_desc', 'lu_PermName_Category.Delete_error', 'In-Portal'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.ADD.PENDING', 'lu_PermName_Category.AddPending_desc', 'lu_PermName_Category.AddPending_error', 'In-Portal'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.MODIFY', 'lu_PermName_Category.Modify_desc', 'lu_PermName_Category.Modify_error', 'In-Portal'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'ADMIN', 'lu_PermName_Admin_desc', 'lu_PermName_Admin_error', 'Admin'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'LOGIN', 'lu_PermName_Login_desc', 'lu_PermName_Admin_error', 'Front'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'DEBUG.ITEM', 'lu_PermName_Debug.Item_desc', '', 'Admin'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'DEBUG.LIST', 'lu_PermName_Debug.List_desc', '', 'Admin'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'DEBUG.INFO', 'lu_PermName_Debug.Info_desc', '', 'Admin'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'PROFILE.MODIFY', 'lu_PermName_Profile.Modify_desc', '', 'Admin'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'SHOWLANG', 'lu_PermName_ShowLang_desc', '', 'Admin'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'FAVORITES', 'lu_PermName_favorites_desc', 'lu_PermName_favorites_error', 'In-Portal'); -INSERT INTO PermissionConfig VALUES (DEFAULT, 'SYSTEM_ACCESS.READONLY', 'la_PermName_SystemAccess.ReadOnly_desc', 'la_PermName_SystemAccess.ReadOnly_error', 'Admin'); - -INSERT INTO Permissions VALUES (DEFAULT, 'LOGIN', 12, 1, 1, 0); - -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:site.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:browse.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:advanced_view.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:reviews.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_categories.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_categories.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_search.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_search.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_email.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_email.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.add', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.delete', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:users.view', 11, 1, 1, 0); - -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_list.advanced:ban', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_list.advanced:send_email', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.add', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.delete', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.advanced:send_email', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.advanced:manage_permissions', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_users.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_users.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_email.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_email.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.add', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.delete', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_banlist.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_banlist.add', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_banlist.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_banlist.delete', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:reports.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:log_summary.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:searchlog.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:searchlog.delete', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:sessionlog.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:sessionlog.delete', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:emaillog.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:emaillog.delete', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:visits.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:visits.delete', 11, 1, 1, 0); - -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_general.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_general.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:modules.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mod_status.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mod_status.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mod_status.advanced:approve', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mod_status.advanced:decline', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:addmodule.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:addmodule.add', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:addmodule.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:tag_library.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_themes.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_themes.add', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_themes.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_themes.delete', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_styles.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_styles.add', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_styles.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_styles.delete', 11, 1, 1, 0); - -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_lang.advanced:set_primary', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_lang.advanced:import', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_lang.advanced:export', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:tools.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:backup.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:restore.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:export.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:main_import.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:sql_query.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:sql_query.edit', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:server_info.view', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:help.view', 11, 1, 1, 0); - -INSERT INTO SearchConfig VALUES ('Category', 'NewItem', 0, 1, 'lu_fielddesc_category_newitem', 'lu_field_newitem', 'In-Portal', 'la_text_category', 18, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'PopItem', 0, 1, 'lu_fielddesc_category_popitem', 'lu_field_popitem', 'In-Portal', 'la_text_category', 19, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'HotItem', 0, 1, 'lu_fielddesc_category_hotitem', 'lu_field_hotitem', 'In-Portal', 'la_text_category', 17, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'MetaDescription', 0, 1, 'lu_fielddesc_category_metadescription', 'lu_field_metadescription', 'In-Portal', 'la_text_category', 16, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'ParentPath', 0, 1, 'lu_fielddesc_category_parentpath', 'lu_field_parentpath', 'In-Portal', 'la_text_category', 15, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'ResourceId', 0, 1, 'lu_fielddesc_category_resourceid', 'lu_field_resourceid', 'In-Portal', 'la_text_category', 14, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'CreatedById', 0, 1, 'lu_fielddesc_category_createdbyid', 'lu_field_createdbyid', 'In-Portal', 'la_text_category', 13, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'CachedNavbar', 0, 1, 'lu_fielddesc_category_cachednavbar', 'lu_field_cachednavbar', 'In-Portal', 'la_text_category', 12, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'CachedDescendantCatsQty', 0, 1, 'lu_fielddesc_category_cacheddescendantcatsqty', 'lu_field_cacheddescendantcatsqty', 'In-Portal', 'la_text_category', 11, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'MetaKeywords', 0, 1, 'lu_fielddesc_category_metakeywords', 'lu_field_metakeywords', 'In-Portal', 'la_text_category', 10, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'Priority', 0, 1, 'lu_fielddesc_category_priority', 'lu_field_priority', 'In-Portal', 'la_text_category', 9, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'Status', 0, 1, 'lu_fielddesc_category_status', 'lu_field_status', 'In-Portal', 'la_text_category', 7, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'EditorsPick', 0, 1, 'lu_fielddesc_category_editorspick', 'lu_field_editorspick', 'In-Portal', 'la_text_category', 6, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'CreatedOn', 0, 1, 'lu_fielddesc_category_createdon', 'lu_field_createdon', 'In-Portal', 'la_text_category', 5, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'Description', 1, 1, 'lu_fielddesc_category_description', 'lu_field_description', 'In-Portal', 'la_text_category', 4, DEFAULT, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'Name', 1, 1, 'lu_fielddesc_category_name', 'lu_field_name', 'In-Portal', 'la_text_category', 3, DEFAULT, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'ParentId', 0, 1, 'lu_fielddesc_category_parentid', 'lu_field_parentid', 'In-Portal', 'la_text_category', 2, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'CategoryId', 0, 1, 'lu_fielddesc_category_categoryid', 'lu_field_categoryid', 'In-Portal', 'la_text_category', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'Modified', 0, 1, 'lu_fielddesc_category_modified', 'lu_field_modified', 'In-Portal', 'la_text_category', 20, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('Category', 'ModifiedById', 0, 1, 'lu_fielddesc_category_modifiedbyid', 'lu_field_modifiedbyid', 'In-Portal', 'la_text_category', 21, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO SearchConfig VALUES ('PortalUser', 'PortalUserId', -1, 0, 'lu_fielddesc_user_portaluserid', 'lu_field_portaluserid', 'In-Portal', 'la_text_user', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'Login', -1, 0, 'lu_fielddesc_user_login', 'lu_field_login', 'In-Portal', 'la_text_user', 1, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'Password', -1, 0, 'lu_fielddesc_user_password', 'lu_field_password', 'In-Portal', 'la_text_user', 2, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'tz', -1, 0, 'lu_fielddesc_user_tz', 'lu_field_tz', 'In-Portal', 'la_text_user', 17, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'dob', -1, 0, 'lu_fielddesc_user_dob', 'lu_field_dob', 'In-Portal', 'la_text_user', 16, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'Modified', -1, 0, 'lu_fielddesc_user_modified', 'lu_field_modified', 'In-Portal', 'la_text_user', 15, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'Status', -1, 0, 'lu_fielddesc_user_status', 'lu_field_status', 'In-Portal', 'la_text_user', 14, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'ResourceId', -1, 0, 'lu_fielddesc_user_resourceid', 'lu_field_resourceid', 'In-Portal', 'la_text_user', 13, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'Country', -1, 0, 'lu_fielddesc_user_country', 'lu_field_country', 'In-Portal', 'la_text_user', 12, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'Zip', -1, 0, 'lu_fielddesc_user_zip', 'lu_field_zip', 'In-Portal', 'la_text_user', 11, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'State', -1, 0, 'lu_fielddesc_user_state', 'lu_field_state', 'In-Portal', 'la_text_user', 10, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'City', -1, 0, 'lu_fielddesc_user_city', 'lu_field_city', 'In-Portal', 'la_text_user', 9, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'Street', -1, 0, 'lu_fielddesc_user_street', 'lu_field_street', 'In-Portal', 'la_text_user', 8, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'Phone', -1, 0, 'lu_fielddesc_user_phone', 'lu_field_phone', 'In-Portal', 'la_text_user', 7, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'CreatedOn', -1, 0, 'lu_fielddesc_user_createdon', 'lu_field_createdon', 'In-Portal', 'la_text_user', 6, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'Email', -1, 0, 'lu_fielddesc_user_email', 'lu_field_email', 'In-Portal', 'la_text_user', 5, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'LastName', -1, 0, 'lu_fielddesc_user_lastname', 'lu_field_lastname', 'In-Portal', 'la_text_user', 4, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO SearchConfig VALUES ('PortalUser', 'FirstName', -1, 0, 'lu_fielddesc_user_firstname', 'lu_field_firstname', 'In-Portal', 'la_text_user', 3, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); - -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>Category WHERE Status=1 ', NULL, 'la_prompt_ActiveCategories', '0', '1'); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>PortalUser WHERE Status=1 ', NULL, 'la_prompt_ActiveUsers', '0', '1'); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>UserSession', NULL, 'la_prompt_CurrentSessions', '0', '1'); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) as CategoryCount FROM <%prefix%>Category', NULL, 'la_prompt_TotalCategories', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ActiveCategories FROM <%prefix%>Category WHERE Status = 1', NULL, 'la_prompt_ActiveCategories', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS PendingCategories FROM <%prefix%>Category WHERE Status = 2', NULL, 'la_prompt_PendingCategories', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS DisabledCategories FROM <%prefix%>Category WHERE Status = 0', NULL, 'la_prompt_DisabledCategories', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS NewCategories FROM <%prefix%>Category 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%>Category 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%>Category', NULL, 'la_prompt_NewestCategoryDate', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>Category', NULL, 'la_prompt_LastCategoryUpdate', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS TotalUsers FROM <%prefix%>PortalUser', NULL, 'la_prompt_TopicsUsers', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ActiveUsers FROM <%prefix%>PortalUser WHERE Status = 1', NULL, 'la_prompt_UsersActive', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS PendingUsers FROM <%prefix%>PortalUser WHERE Status = 2', NULL, 'la_prompt_UsersPending', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS DisabledUsers FROM <%prefix%>PortalUser 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%>PortalUser', NULL, 'la_prompt_NewestUserDate', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT( DISTINCT LOWER( Country ) ) FROM <%prefix%>PortalUser WHERE LENGTH(Country) > 0', NULL, 'la_prompt_UsersUniqueCountries', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT( DISTINCT LOWER( State ) ) FROM <%prefix%>PortalUser WHERE LENGTH(State) > 0', NULL, 'la_prompt_UsersUniqueStates', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS TotalUserGroups FROM <%prefix%>PortalGroup', NULL, 'la_prompt_TotalUserGroups', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS BannedUsers FROM <%prefix%>PortalUser WHERE IsBanned = 1', NULL, 'la_prompt_BannedUsers', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS NonExipedSessions FROM <%prefix%>UserSession WHERE Status = 1', NULL, 'la_prompt_NonExpiredSessions', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ThemeCount FROM <%prefix%>Theme', NULL, 'la_prompt_ThemeCount', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS RegionsCount FROM <%prefix%>Language', NULL, 'la_prompt_RegionsCount', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', '<%m:sql_action sql="SHOW+TABLES" action="COUNT" field="*"%>', NULL, 'la_prompt_TablesCount', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', '<%m:sql_action sql="SHOW+TABLE+STATUS" action="SUM" field="Rows"%>', NULL, 'la_prompt_RecordsCount', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', '<%m:custom_action sql="empty" action="SysFileSize"%>', NULL, 'la_prompt_SystemFileSize', 0, 2); -INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', '<%m:sql_action sql="SHOW+TABLE+STATUS" action="SUM" format_as="file" field="Data_length"%>', NULL, 'la_prompt_DataSize', 0, 2); - -INSERT INTO StylesheetSelectors VALUES (169, 8, 'Calendar''s selected days', '.calendar tbody .selected', 'a:0:{}', '', 1, 'font-weight: bold;\r\nbackground-color: #9ED7ED;\r\nborder: 1px solid #83B2C5;', 0); -INSERT INTO StylesheetSelectors VALUES (118, 8, 'Data grid row', 'td.block-data-row', 'a:0:{}', '', 2, 'border-bottom: 1px solid #cccccc;', 48); -INSERT INTO StylesheetSelectors VALUES (81, 8, '"More" link', 'a.link-more', 'a:0:{}', '', 2, 'text-decoration: underline;', 64); -INSERT INTO StylesheetSelectors VALUES (88, 8, 'Block data, separated rows', 'td.block-data-grid', 'a:0:{}', '', 2, 'border: 1px solid #cccccc;', 48); -INSERT INTO StylesheetSelectors VALUES (42, 8, 'Block Header', 'td.block-header', 'a:4:{s:5:"color";s:16:"rgb(0, 159, 240)";s:9:"font-size";s:4:"20px";s:11:"font-weight";s:6:"normal";s:7:"padding";s:3:"5px";}', 'Block Header', 1, 'font-family: Verdana, Helvetica, sans-serif;', 0); -INSERT INTO StylesheetSelectors VALUES (76, 8, 'Navigation bar menu', 'tr.head-nav td', 'a:0:{}', '', 1, 'vertical-align: middle;', 0); -INSERT INTO StylesheetSelectors VALUES (48, 8, 'Block data', 'td.block-data', 'a:2:{s:9:"font-size";s:5:"12px;";s:7:"padding";s:3:"5px";}', '', 1, '', 0); -INSERT INTO StylesheetSelectors VALUES (78, 8, 'Body main style', 'body', 'a:0:{}', '', 1, 'padding: 0px; \r\nbackground-color: #ffffff; \r\nfont-family: arial, verdana, helvetica; \r\nfont-size: small;\r\nwidth: auto;\r\nmargin: 0px;', 0); -INSERT INTO StylesheetSelectors VALUES (58, 8, 'Main table', 'table.main-table', 'a:0:{}', '', 1, 'width: 770px;\r\nmargin: 0px;\r\n/*table-layout: fixed;*/', 0); -INSERT INTO StylesheetSelectors VALUES (79, 8, 'Block: header of data block', 'span.block-data-grid-header', 'a:0:{}', '', 1, 'font-family: Arial, Helvetica, sans-serif;\r\ncolor: #009DF6;\r\nfont-size: 12px;\r\nfont-weight: bold;\r\nbackground-color: #E6EEFF;\r\npadding: 6px;\r\nwhite-space: nowrap;', 0); -INSERT INTO StylesheetSelectors VALUES (64, 8, 'Link', 'a', 'a:0:{}', '', 1, '', 0); -INSERT INTO StylesheetSelectors VALUES (46, 8, 'Product title link', 'a.link-product1', 'a:0:{}', 'Product title link', 1, 'color: #62A1DE;\r\nfont-size: 14px;\r\nfont-weight: bold;\r\nline-height: 20px;\r\npadding-bottom: 10px;', 0); -INSERT INTO StylesheetSelectors VALUES (75, 8, 'Copy of Main path link', 'table.main-path td a:hover', 'a:0:{}', '', 1, 'color: #ffffff;', 0); -INSERT INTO StylesheetSelectors VALUES (160, 8, 'Current item in navigation bar', '.checkout-step-current', 'a:0:{}', '', 1, 'color: #A20303;\r\nfont-weight: bold;', 0); -INSERT INTO StylesheetSelectors VALUES (51, 8, 'Right block data', 'td.right-block-data', 'a:1:{s:9:"font-size";s:4:"11px";}', '', 2, 'padding: 7px;\r\nbackground: #e3edf6 url("/in-commerce4/themes/default/img/bgr_login.jpg") repeat-y scroll left top;\r\nborder-bottom: 1px solid #64a1df;', 48); -INSERT INTO StylesheetSelectors VALUES (67, 8, 'Pagination bar: text', 'table.block-pagination td', 'a:3:{s:5:"color";s:7:"#8B898B";s:9:"font-size";s:4:"12px";s:11:"font-weight";s:6:"normal";}', '', 1, '', 0); -INSERT INTO StylesheetSelectors VALUES (45, 8, 'Category link', 'a.subcat', 'a:0:{}', 'Category link', 1, 'color: #2069A4', 0); -INSERT INTO StylesheetSelectors VALUES (68, 8, 'Pagination bar: link', 'table.block-pagination td a', 'a:3:{s:5:"color";s:7:"#8B898B";s:9:"font-size";s:5:"12px;";s:11:"font-weight";s:6:"normal";}', '', 1, '', 0); -INSERT INTO StylesheetSelectors VALUES (69, 8, 'Product description in product list', '.product-list-description', 'a:2:{s:5:"color";s:7:"#8B898B";s:9:"font-size";s:4:"12px";}', '', 1, '', 0); -INSERT INTO StylesheetSelectors VALUES (73, 8, 'Main path link', 'table.main-path td a', 'a:0:{}', '', 1, 'color: #d5e231;', 0); -INSERT INTO StylesheetSelectors VALUES (83, 8, 'Product title link in list (shopping cart)', 'a.link-product-cart', 'a:0:{}', 'Product title link', 1, 'color: #18559C;\r\nfont-size: 12px;\r\nfont-weight: bold;\r\ntext-decoration: none;\r\n\r\n', 0); -INSERT INTO StylesheetSelectors VALUES (72, 8, 'Main path block text', 'table.main-path td', 'a:0:{}', '', 1, 'color: #ffffff;\r\nfont-size: 10px;\r\nfont-weight: normal;\r\npadding: 1px;\r\n', 0); -INSERT INTO StylesheetSelectors VALUES (61, 8, 'Block: header of data table', 'td.block-data-grid-header', 'a:6:{s:4:"font";s:28:"Arial, Helvetica, sans-serif";s:5:"color";s:7:"#009DF6";s:9:"font-size";s:4:"12px";s:11:"font-weight";s:4:"bold";s:16:"background-color";s:7:"#E6EEFF";s:7:"padding";s:3:"6px";}', '', 1, 'white-space: nowrap;\r\npadding-left: 10px;\r\n/*\r\nbackground-image: url(/in-commerce4/themes/default/img/bullet1.gif);\r\nbackground-position: 10px 12px;\r\nbackground-repeat: no-repeat;\r\n*/', 0); -INSERT INTO StylesheetSelectors VALUES (65, 8, 'Link in product list additional row', 'td.product-list-additional a', 'a:1:{s:5:"color";s:7:"#8B898B";}', '', 2, '', 64); -INSERT INTO StylesheetSelectors VALUES (55, 8, 'Main table, left column', 'td.main-column-left', 'a:0:{}', '', 1, 'width:180px;\r\nborder: 1px solid #62A1DE;\r\nborder-top: 0px;', 0); -INSERT INTO StylesheetSelectors VALUES (70, 8, 'Product title link in list (category)', 'a.link-product-category', 'a:0:{}', 'Product title link', 1, 'color: #18559C;\r\nfont-size: 12px;\r\nfont-weight: bold;\r\ntext-decoration: none;\r\n\r\n', 0); -INSERT INTO StylesheetSelectors VALUES (66, 8, 'Pagination bar block', 'table.block-pagination', 'a:0:{}', '', 1, '', 0); -INSERT INTO StylesheetSelectors VALUES (49, 8, 'Bulleted list inside block', 'td.block-data ul li', 'a:0:{}', '', 1, ' list-style-image: url(/in-commerce4/themes/default/img/bullet2.gif);\r\n margin-bottom: 10px;\r\n font-size: 11px;', 0); -INSERT INTO StylesheetSelectors VALUES (87, 8, 'Cart item input form element', 'td.cart-item-atributes input', 'a:0:{}', '', 1, 'border: 1px solid #7BB2E6;', 0); -INSERT INTO StylesheetSelectors VALUES (119, 8, 'Data grid row header', 'td.block-data-row-hdr', 'a:0:{}', 'Used in order preview', 2, 'background-color: #eeeeee;\r\nborder-bottom: 1px solid #dddddd;\r\nborder-top: 1px solid #cccccc;\r\nfont-weight: bold;', 48); -INSERT INTO StylesheetSelectors VALUES (82, 8, '"More" link image', 'a.link-more img', 'a:0:{}', '', 2, 'text-decoration: none;\r\npadding-left: 5px;', 64); -INSERT INTO StylesheetSelectors VALUES (63, 8, 'Additional info under product description in list', 'td.product-list-additional', 'a:5:{s:5:"color";s:7:"#8B898B";s:9:"font-size";s:4:"11px";s:11:"font-weight";s:6:"normal";s:10:"border-top";s:18:"1px dashed #8B898B";s:13:"border-bottom";s:18:"1px dashed #8B898B";}', '', 2, '', 48); -INSERT INTO StylesheetSelectors VALUES (43, 8, 'Block', 'table.block', 'a:2:{s:16:"background-color";s:7:"#E3EEF9";s:6:"border";s:17:"1px solid #64A1DF";}', 'Block', 1, 'border: 0; \r\nmargin-bottom: 1px;\r\nwidth: 100%;', 0); -INSERT INTO StylesheetSelectors VALUES (84, 8, 'Cart item cell', 'td.cart-item', 'a:0:{}', '', 1, 'background-color: #F6FAFF;\r\nborder-left: 1px solid #ffffff;\r\nborder-bottom: 1px solid #ffffff;\r\npadding: 4px;', 0); -INSERT INTO StylesheetSelectors VALUES (57, 8, 'Main table, right column', 'td.main-column-right', 'a:0:{}', '', 1, 'width:220px;\r\nborder: 1px solid #62A1DE;\r\nborder-top: 0px;', 0); -INSERT INTO StylesheetSelectors VALUES (161, 8, 'Block for sub categories', 'td.block-data-subcats', 'a:0:{}', '', 2, ' background: #FFFFFF\r\nurl(/in-commerce4/themes/default/in-commerce/img/bgr_categories.jpg);\r\n background-repeat: no-repeat;\r\n background-position: top right;\r\nborder-bottom: 5px solid #DEEAFF;\r\npadding-left: 10px;', 48); -INSERT INTO StylesheetSelectors VALUES (77, 8, 'Left block header', 'td.left-block-header', 'a:0:{}', '', 2, 'font-family : verdana, helvetica, sans-serif;\r\ncolor : #ffffff;\r\nfont-size : 12px;\r\nfont-weight : bold;\r\ntext-decoration : none;\r\nbackground-color: #64a1df;\r\npadding: 5px;\r\npadding-left: 7px;', 42); -INSERT INTO StylesheetSelectors VALUES (80, 8, 'Right block data - text', 'td.right-block-data td', 'a:1:{s:9:"font-size";s:5:"11px;";}', '', 2, '', 48); -INSERT INTO StylesheetSelectors VALUES (53, 8, 'Right block header', 'td.right-block-header', 'a:0:{}', '', 2, 'font-family : verdana, helvetica, sans-serif;\r\ncolor : #ffffff;\r\nfont-size : 12px;\r\nfont-weight : bold;\r\ntext-decoration : none;\r\nbackground-color: #64a1df;\r\npadding: 5px;\r\npadding-left: 7px;', 42); -INSERT INTO StylesheetSelectors VALUES (85, 8, 'Cart item cell with attributes', 'td.cart-item-attributes', 'a:0:{}', '', 1, 'background-color: #E6EEFF;\r\nborder-left: 1px solid #ffffff;\r\nborder-bottom: 1px solid #ffffff;\r\npadding: 4px;\r\ntext-align: center;\r\nvertical-align: middle;\r\nfont-size: 12px;\r\nfont-weight: normal;', 0); -INSERT INTO StylesheetSelectors VALUES (86, 8, 'Cart item cell with name', 'td.cart-item-name', 'a:0:{}', '', 1, 'background-color: #F6FAFF;\r\nborder-left: 1px solid #ffffff;\r\nborder-bottom: 1px solid #ffffff;\r\npadding: 3px;', 0); -INSERT INTO StylesheetSelectors VALUES (47, 8, 'Block content of featured product', 'td.featured-block-data', 'a:0:{}', '', 1, 'font-family: Arial,Helvetica,sans-serif;\r\nfont-size: 12px;', 0); -INSERT INTO StylesheetSelectors VALUES (56, 8, 'Main table, middle column', 'td.main-column-center', 'a:0:{}', '', 1, '\r\n', 0); -INSERT INTO StylesheetSelectors VALUES (50, 8, 'Product title link in list', 'a.link-product2', 'a:0:{}', 'Product title link', 1, 'color: #62A1DE;\r\nfont-size: 12px;\r\nfont-weight: bold;\r\ntext-decoration: none;\r\n\r\n', 0); -INSERT INTO StylesheetSelectors VALUES (71, 8, 'Main path block', 'table.main-path', 'a:0:{}', '', 1, 'background: #61b0ec url("/in-commerce4/themes/default/img/bgr_path.jpg") repeat-y scroll left top;\r\nwidth: 100%;\r\nmargin-bottom: 1px;\r\nmargin-right: 1px; \r\nmargin-left: 1px;', 0); -INSERT INTO StylesheetSelectors VALUES (62, 8, 'Block: columns header for data table', 'table.block-no-border th', 'a:6:{s:4:"font";s:28:"Arial, Helvetica, sans-serif";s:5:"color";s:7:"#18559C";s:9:"font-size";s:4:"11px";s:11:"font-weight";s:4:"bold";s:16:"background-color";s:7:"#B4D2EE";s:7:"padding";s:3:"6px";}', '', 1, 'text-align: left;', 0); -INSERT INTO StylesheetSelectors VALUES (59, 8, 'Block without border', 'table.block-no-border', 'a:0:{}', '', 1, 'border: 0px; \r\nmargin-bottom: 10px;\r\nwidth: 100%;', 0); -INSERT INTO StylesheetSelectors VALUES (74, 8, 'Main path language selector cell', 'td.main-path-language', 'a:0:{}', '', 1, 'vertical-align: middle;\r\ntext-align: right;\r\npadding-right: 6px;', 0); -INSERT INTO StylesheetSelectors VALUES (171, 8, 'Calendar''s highlighted day', '.calendar tbody .hilite', 'a:0:{}', '', 1, 'background-color: #f6f6f6;\r\nborder: 1px solid #83B2C5 !important;', 0); -INSERT INTO StylesheetSelectors VALUES (175, 8, 'Calendar''s days', '.calendar tbody .day', 'a:0:{}', '', 1, 'text-align: right;\r\npadding: 2px 4px 2px 2px;\r\nwidth: 2em;\r\nborder: 1px solid #fefefe;', 0); -INSERT INTO StylesheetSelectors VALUES (170, 8, 'Calendar''s weekends', '.calendar .weekend', 'a:0:{}', '', 1, 'color: #990000;', 0); -INSERT INTO StylesheetSelectors VALUES (173, 8, 'Calendar''s control buttons', '.calendar .calendar_button', 'a:0:{}', '', 1, 'color: black;\r\nfont-size: 12px;\r\nbackground-color: #eeeeee;', 0); -INSERT INTO StylesheetSelectors VALUES (174, 8, 'Calendar''s day names', '.calendar thead .name', 'a:0:{}', '', 1, 'background-color: #DEEEF6;\r\nborder-bottom: 1px solid #000000;', 0); -INSERT INTO StylesheetSelectors VALUES (172, 8, 'Calendar''s top and bottom titles', '.calendar .title', 'a:0:{}', '', 1, 'color: #FFFFFF;\r\nbackground-color: #62A1DE;\r\nborder: 1px solid #107DC5;\r\nborder-top: 0px;\r\npadding: 1px;', 0); -INSERT INTO StylesheetSelectors VALUES (60, 8, 'Block header for featured product', 'td.featured-block-header', 'a:0:{}', '', 2, '\r\n', 42); -INSERT INTO StylesheetSelectors VALUES (54, 8, 'Right block', 'table.right-block', 'a:0:{}', '', 2, 'background-color: #E3EEF9;\r\nborder: 0px;\r\nwidth: 100%;', 43); -INSERT INTO StylesheetSelectors VALUES (44, 8, 'Block content', 'td.block-data-big', 'a:0:{}', 'Block content', 1, ' background: #DEEEF6\r\nurl(/in-commerce4/themes/default/img/menu_bg.gif);\r\n background-repeat: no-repeat;\r\n background-position: top right;\r\n', 0); - -INSERT INTO Stylesheets VALUES (8, 'Default', 'In-Portal Default Theme', '', 1124952555, 1); - -INSERT INTO Counters VALUES (DEFAULT, 'members_count', 'SELECT COUNT(*) FROM <%PREFIX%>PortalUser WHERE Status = 1', NULL , NULL , '3600', '0', '|PortalUser|'); -INSERT INTO Counters VALUES (DEFAULT, 'members_online', 'SELECT COUNT(*) FROM <%PREFIX%>UserSession WHERE PortalUserId > 0', NULL , NULL , '3600', '0', '|UserSession|'); -INSERT INTO Counters VALUES (DEFAULT, 'guests_online', 'SELECT COUNT(*) FROM <%PREFIX%>UserSession WHERE PortalUserId <= 0', NULL , NULL , '3600', '0', '|UserSession|'); -INSERT INTO Counters VALUES (DEFAULT, 'users_online', 'SELECT COUNT(*) FROM <%PREFIX%>UserSession', NULL , NULL , '3600', '0', '|UserSession|'); - -UPDATE ConfigurationValues SET VariableValue = 1 WHERE VariableName = 'KeepSessionOnBrowserClose'; - -INSERT INTO Modules VALUES ('In-Portal', 'kernel/', 'm', '0.0.0', 1, 0, '', 0, '1054738405'); Index: branches/RC/kernel/install/upgrades.sql =================================================================== diff -u -N --- branches/RC/kernel/install/upgrades.sql (revision 11046) +++ branches/RC/kernel/install/upgrades.sql (revision 0) @@ -1,16 +0,0 @@ -# ===== v 4.3.9 ===== -DROP TABLE ImportScripts; - -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) -); \ No newline at end of file Index: branches/RC/kernel/install/install_order.txt =================================================================== diff -u -N --- branches/RC/kernel/install/install_order.txt (revision 10832) +++ branches/RC/kernel/install/install_order.txt (revision 0) @@ -1 +0,0 @@ -101 \ No newline at end of file Index: branches/RC/kernel/install/upgrades.php =================================================================== diff -u -N --- branches/RC/kernel/install/upgrades.php (revision 10832) +++ branches/RC/kernel/install/upgrades.php (revision 0) @@ -1,95 +0,0 @@ -_toolkit =& $instance; - } - - /** - * Replace any mensions of "/kernel/" in database to "/system/" - * - * @param string $mode when called mode {before, after) - */ - function Upgrade_4_3_1($mode) - { - if ($mode == 'after') { - // Tables: PageContent, Images - - if ($this->Conn->TableFound('PageContent')) { - // 1. replaces "/kernel/user_files/" references in content blocks - $ml_helper =& $this->Application->recallObject('kMultiLanguageHelper'); - /* @var $ml_helper kMultiLanguageHelper */ - - $language_count = $ml_helper->getLanguageCount(); - $replace_sql = '%1$s = REPLACE(%1$s, "/kernel/user_files/", "/system/user_files/")'; - - $update_sqls = Array (); - for ($i = 1; $i <= $language_count; $i++) { - if (!$ml_helper->LanguageFound($i)) { - continue; - } - - $field = 'l' . $i . '_Content'; - $update_sqls[] = sprintf($replace_sql, $field); - } - - if ($update_sqls) { - $sql = 'UPDATE ' . TABLE_PREFIX . 'PageContent - SET ' . implode(', ', $update_sqls); - $this->Conn->Query($sql); - } - } - - // 2. replace path of images uploaded via "Images" tab of category items - $this->_replaceImageFolder('/kernel/images/', '/system/images/'); - - // 3. replace path of images uploaded via "Images" tab of category items (when badly formatted) - $this->_replaceImageFolder('kernel/images/', 'system/images/'); - - // 4. replace images uploaded via "In-Bulletin -> Emoticons" section - $this->_replaceImageFolder('in-bulletin/images/emoticons/', 'system/images/emoticons/'); - - // 5. update backup path in config - $this->_toolkit->saveConfigValues( - Array ( - 'Backup_Path' => FULL_PATH . '/system/backupdata' - ) - ); - } - } - - /** - * Replaces mentions of "/kernel/images" folder in Images table - * - * @param string $from - * @param string $to - */ - function _replaceImageFolder($from, $to) - { - $replace_sql = '%1$s = REPLACE(%1$s, "' . $from . '", "' . $to . '")'; - $sql = 'UPDATE ' . TABLE_PREFIX . 'Images - SET ' . sprintf($replace_sql, 'ThumbPath') . ', ' . sprintf($replace_sql, 'LocalPath'); - $this->Conn->Query($sql); - } - } - -?> \ No newline at end of file Index: branches/RC/kernel/install/install_schema.sql =================================================================== diff -u -N --- branches/RC/kernel/install/install_schema.sql (revision 11046) +++ branches/RC/kernel/install/install_schema.sql (revision 0) @@ -1,318 +0,0 @@ -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) -); \ No newline at end of file Index: branches/RC/kernel/install/remove_schema.sql =================================================================== diff -u -N --- branches/RC/kernel/install/remove_schema.sql (revision 10924) +++ branches/RC/kernel/install/remove_schema.sql (revision 0) @@ -1,23 +0,0 @@ -DROP TABLE BanRules; -DROP TABLE CountCache; -DROP TABLE Favorites; -DROP TABLE Images; -DROP TABLE ItemRating; -DROP TABLE ItemReview; -DROP TABLE ItemTypes; -DROP TABLE ItemFiles; -DROP TABLE Relationship; -DROP TABLE SearchConfig; -DROP TABLE SearchLog; -DROP TABLE IgnoreKeywords; -DROP TABLE SpamControl; -DROP TABLE StatItem; -DROP TABLE SuggestMail; -DROP TABLE SysCache; -DROP TABLE TagLibrary; -DROP TABLE TagAttributes; -DROP TABLE ImportScripts; -DROP TABLE StylesheetSelectors; -DROP TABLE Visits; -DROP TABLE ImportCache; -DROP TABLE RelatedSearches; \ No newline at end of file Index: branches/RC/core/install/install_data.sql =================================================================== diff -u -N -r11042 -r11121 --- branches/RC/core/install/install_data.sql (.../install_data.sql) (revision 11042) +++ branches/RC/core/install/install_data.sql (.../install_data.sql) (revision 11121) @@ -89,6 +89,10 @@ INSERT INTO ConfigurationAdmin VALUES ('RememberLastAdminTemplate', 'la_Text_General', 'la_config_RememberLastAdminTemplate', 'checkbox', '', '', 10.13, 0, 0); INSERT INTO ConfigurationAdmin VALUES('YahooApplicationId', 'la_Text_General', 'la_config_YahooApplicationId', 'text', NULL, NULL, 10.28, 0, 0); +INSERT INTO ConfigurationAdmin VALUES ('AllowDeleteRootCats', 'la_Text_General', 'la_AllowDeleteRootCats', 'checkbox', NULL , NULL , 10.09, 0, 0); +INSERT INTO ConfigurationAdmin VALUES ('Catalog_PreselectModuleTab', 'la_Text_General', 'la_config_CatalogPreselectModuleTab', 'checkbox', NULL, NULL, 10.10, 0, 1); +INSERT INTO ConfigurationAdmin VALUES ('RecycleBinFolder', 'la_Text_General', 'la_config_RecycleBinFolder', 'text', NULL , NULL , 10.11, 0, 0); + INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Columns_Category', '2', 'In-Portal', 'Categories'); INSERT INTO ConfigurationValues VALUES (DEFAULT, 'DomainSelect','1','In-Portal','in-portal:configure_general'); INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Site_Path', '/', 'In-Portal', 'in-portal:configure_general'); @@ -251,6 +255,13 @@ INSERT INTO ConfigurationValues VALUES (DEFAULT, 'RememberLastAdminTemplate', '', 'In-Portal:Users', 'in-portal:configure_users'); INSERT INTO ConfigurationValues VALUES(NULL, 'YahooApplicationId', '', 'In-Portal', 'in-portal:configure_categories'); +INSERT INTO ConfigurationValues VALUES (DEFAULT, 'AllowDeleteRootCats', '0', 'In-Portal', 'in-portal:configure_categories'); +INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Catalog_PreselectModuleTab', 1, 'In-Portal', 'in-portal:configure_categories'); +INSERT INTO ConfigurationValues VALUES (DEFAULT, 'RecycleBinFolder', '', 'In-Portal', 'in-portal:configure_categories'); + +INSERT INTO ItemTypes VALUES (1, 'In-Portal', 'c', 'Category', 'Name', 'CreatedById', NULL, NULL, 'la_ItemTab_Categories', 1, 'admin/category/addcategory.php', 'clsCategory', 'Category'); +INSERT INTO ItemTypes VALUES (6, 'In-Portal', 'u', 'PortalUser', 'Login', 'PortalUserId', NULL, NULL, '', 0, '', 'clsPortalUser', 'User'); + INSERT INTO Events VALUES (DEFAULT, 'USER.ADD', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.add', 0); INSERT INTO Events VALUES (DEFAULT, 'USER.ADD', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.add', 1); INSERT INTO Events VALUES (DEFAULT, 'USER.APPROVE', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.approve', 0); @@ -603,10 +614,24 @@ INSERT INTO StdDestinations VALUES (306, 2, 225, 'la_state_AL', 'AL', DEFAULT); INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.VIEW', 'lu_PermName_Category.View_desc', 'lu_PermName_Category.View_error', 'In-Portal'); +INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.ADD', 'lu_PermName_Category.Add_desc', 'lu_PermName_Category.Add_error', 'In-Portal'); +INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.DELETE', 'lu_PermName_Category.Delete_desc', 'lu_PermName_Category.Delete_error', 'In-Portal'); +INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.ADD.PENDING', 'lu_PermName_Category.AddPending_desc', 'lu_PermName_Category.AddPending_error', 'In-Portal'); +INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.MODIFY', 'lu_PermName_Category.Modify_desc', 'lu_PermName_Category.Modify_error', 'In-Portal'); +INSERT INTO PermissionConfig VALUES (DEFAULT, 'ADMIN', 'lu_PermName_Admin_desc', 'lu_PermName_Admin_error', 'Admin'); +INSERT INTO PermissionConfig VALUES (DEFAULT, 'LOGIN', 'lu_PermName_Login_desc', 'lu_PermName_Admin_error', 'Front'); +INSERT INTO PermissionConfig VALUES (DEFAULT, 'DEBUG.ITEM', 'lu_PermName_Debug.Item_desc', '', 'Admin'); +INSERT INTO PermissionConfig VALUES (DEFAULT, 'DEBUG.LIST', 'lu_PermName_Debug.List_desc', '', 'Admin'); +INSERT INTO PermissionConfig VALUES (DEFAULT, 'DEBUG.INFO', 'lu_PermName_Debug.Info_desc', '', 'Admin'); +INSERT INTO PermissionConfig VALUES (DEFAULT, 'PROFILE.MODIFY', 'lu_PermName_Profile.Modify_desc', '', 'Admin'); +INSERT INTO PermissionConfig VALUES (DEFAULT, 'SHOWLANG', 'lu_PermName_ShowLang_desc', '', 'Admin'); +INSERT INTO PermissionConfig VALUES (DEFAULT, 'FAVORITES', 'lu_PermName_favorites_desc', 'lu_PermName_favorites_error', 'In-Portal'); +INSERT INTO PermissionConfig VALUES (DEFAULT, 'SYSTEM_ACCESS.READONLY', 'la_PermName_SystemAccess.ReadOnly_desc', 'la_PermName_SystemAccess.ReadOnly_error', 'Admin'); INSERT INTO PermCache VALUES (DEFAULT, 0, 1, '11,12,13,14,15'); INSERT INTO Permissions VALUES (DEFAULT, 'LOGIN', 13, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'LOGIN', 12, 1, 1, 0); INSERT INTO Permissions VALUES (DEFAULT, 'LOGIN', 11, 1, 1, 0); INSERT INTO Permissions VALUES (DEFAULT, 'ADMIN', 11, 1, 1, 0); @@ -639,7 +664,86 @@ 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); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:site.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:browse.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:advanced_view.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:reviews.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_categories.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_categories.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_search.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_search.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_email.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_email.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.add', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.delete', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:users.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_list.advanced:ban', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_list.advanced:send_email', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.add', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.delete', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.advanced:send_email', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.advanced:manage_permissions', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_users.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_users.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_email.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_email.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.add', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.delete', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_banlist.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_banlist.add', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_banlist.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_banlist.delete', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:reports.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:log_summary.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:searchlog.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:searchlog.delete', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:sessionlog.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:sessionlog.delete', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:emaillog.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:emaillog.delete', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:visits.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:visits.delete', 11, 1, 1, 0); + +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_general.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_general.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:modules.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mod_status.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mod_status.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mod_status.advanced:approve', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mod_status.advanced:decline', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:addmodule.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:addmodule.add', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:addmodule.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:tag_library.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_themes.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_themes.add', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_themes.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_themes.delete', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_styles.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_styles.add', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_styles.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_styles.delete', 11, 1, 1, 0); + +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_lang.advanced:set_primary', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_lang.advanced:import', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_lang.advanced:export', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:tools.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:backup.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:restore.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:export.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:main_import.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:sql_query.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:sql_query.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:server_info.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:help.view', 11, 1, 1, 0); + 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.layout-only-table td {\r\n border: none !important;\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 overflow: hidden;\r\n border-right: 1px solid #c9c9c9;\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, table tr.grid-data-row[_row_highlighted] 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, table tr.grid-data-row[_row_selected] td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td, .grid-data-row-even[_row_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 #777;\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, input.filter-active, select.filter-active {\r\n margin-bottom: 0px;\r\n border: 1px solid #aaa;\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 vertical-align: middle;\r\n}\r\n\r\n.subsectiontitle td {\r\n vertical-align: middle;\r\n padding: 3px 5px 3px 5px;\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.error {\r\n color: red;\r\n}\r\n.error-cell {\r\n color: red;\r\n}\r\n\r\n.field-required {\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_1.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";}}', 1206520493, 1); INSERT INTO LocalesList VALUES @@ -852,4 +956,137 @@ (207, '0x046a', 'Yoruba (Nigeria)', 'yo-NG', '', ''), (208, '0x0435', 'Zulu/isiZulu (South Africa)', 'zu-ZA', 'Latn', '1252'); +INSERT INTO SearchConfig VALUES ('Category', 'NewItem', 0, 1, 'lu_fielddesc_category_newitem', 'lu_field_newitem', 'In-Portal', 'la_text_category', 18, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'PopItem', 0, 1, 'lu_fielddesc_category_popitem', 'lu_field_popitem', 'In-Portal', 'la_text_category', 19, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'HotItem', 0, 1, 'lu_fielddesc_category_hotitem', 'lu_field_hotitem', 'In-Portal', 'la_text_category', 17, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'MetaDescription', 0, 1, 'lu_fielddesc_category_metadescription', 'lu_field_metadescription', 'In-Portal', 'la_text_category', 16, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'ParentPath', 0, 1, 'lu_fielddesc_category_parentpath', 'lu_field_parentpath', 'In-Portal', 'la_text_category', 15, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'ResourceId', 0, 1, 'lu_fielddesc_category_resourceid', 'lu_field_resourceid', 'In-Portal', 'la_text_category', 14, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'CreatedById', 0, 1, 'lu_fielddesc_category_createdbyid', 'lu_field_createdbyid', 'In-Portal', 'la_text_category', 13, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'CachedNavbar', 0, 1, 'lu_fielddesc_category_cachednavbar', 'lu_field_cachednavbar', 'In-Portal', 'la_text_category', 12, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'CachedDescendantCatsQty', 0, 1, 'lu_fielddesc_category_cacheddescendantcatsqty', 'lu_field_cacheddescendantcatsqty', 'In-Portal', 'la_text_category', 11, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'MetaKeywords', 0, 1, 'lu_fielddesc_category_metakeywords', 'lu_field_metakeywords', 'In-Portal', 'la_text_category', 10, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'Priority', 0, 1, 'lu_fielddesc_category_priority', 'lu_field_priority', 'In-Portal', 'la_text_category', 9, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'Status', 0, 1, 'lu_fielddesc_category_status', 'lu_field_status', 'In-Portal', 'la_text_category', 7, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'EditorsPick', 0, 1, 'lu_fielddesc_category_editorspick', 'lu_field_editorspick', 'In-Portal', 'la_text_category', 6, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'CreatedOn', 0, 1, 'lu_fielddesc_category_createdon', 'lu_field_createdon', 'In-Portal', 'la_text_category', 5, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'Description', 1, 1, 'lu_fielddesc_category_description', 'lu_field_description', 'In-Portal', 'la_text_category', 4, DEFAULT, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'Name', 1, 1, 'lu_fielddesc_category_name', 'lu_field_name', 'In-Portal', 'la_text_category', 3, DEFAULT, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'ParentId', 0, 1, 'lu_fielddesc_category_parentid', 'lu_field_parentid', 'In-Portal', 'la_text_category', 2, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'CategoryId', 0, 1, 'lu_fielddesc_category_categoryid', 'lu_field_categoryid', 'In-Portal', 'la_text_category', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'Modified', 0, 1, 'lu_fielddesc_category_modified', 'lu_field_modified', 'In-Portal', 'la_text_category', 20, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('Category', 'ModifiedById', 0, 1, 'lu_fielddesc_category_modifiedbyid', 'lu_field_modifiedbyid', 'In-Portal', 'la_text_category', 21, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +INSERT INTO SearchConfig VALUES ('PortalUser', 'PortalUserId', -1, 0, 'lu_fielddesc_user_portaluserid', 'lu_field_portaluserid', 'In-Portal', 'la_text_user', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'Login', -1, 0, 'lu_fielddesc_user_login', 'lu_field_login', 'In-Portal', 'la_text_user', 1, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'Password', -1, 0, 'lu_fielddesc_user_password', 'lu_field_password', 'In-Portal', 'la_text_user', 2, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'tz', -1, 0, 'lu_fielddesc_user_tz', 'lu_field_tz', 'In-Portal', 'la_text_user', 17, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'dob', -1, 0, 'lu_fielddesc_user_dob', 'lu_field_dob', 'In-Portal', 'la_text_user', 16, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'Modified', -1, 0, 'lu_fielddesc_user_modified', 'lu_field_modified', 'In-Portal', 'la_text_user', 15, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'Status', -1, 0, 'lu_fielddesc_user_status', 'lu_field_status', 'In-Portal', 'la_text_user', 14, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'ResourceId', -1, 0, 'lu_fielddesc_user_resourceid', 'lu_field_resourceid', 'In-Portal', 'la_text_user', 13, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'Country', -1, 0, 'lu_fielddesc_user_country', 'lu_field_country', 'In-Portal', 'la_text_user', 12, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'Zip', -1, 0, 'lu_fielddesc_user_zip', 'lu_field_zip', 'In-Portal', 'la_text_user', 11, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'State', -1, 0, 'lu_fielddesc_user_state', 'lu_field_state', 'In-Portal', 'la_text_user', 10, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'City', -1, 0, 'lu_fielddesc_user_city', 'lu_field_city', 'In-Portal', 'la_text_user', 9, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'Street', -1, 0, 'lu_fielddesc_user_street', 'lu_field_street', 'In-Portal', 'la_text_user', 8, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'Phone', -1, 0, 'lu_fielddesc_user_phone', 'lu_field_phone', 'In-Portal', 'la_text_user', 7, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'CreatedOn', -1, 0, 'lu_fielddesc_user_createdon', 'lu_field_createdon', 'In-Portal', 'la_text_user', 6, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'Email', -1, 0, 'lu_fielddesc_user_email', 'lu_field_email', 'In-Portal', 'la_text_user', 5, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'LastName', -1, 0, 'lu_fielddesc_user_lastname', 'lu_field_lastname', 'In-Portal', 'la_text_user', 4, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO SearchConfig VALUES ('PortalUser', 'FirstName', -1, 0, 'lu_fielddesc_user_firstname', 'lu_field_firstname', 'In-Portal', 'la_text_user', 3, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>Category WHERE Status=1 ', NULL, 'la_prompt_ActiveCategories', '0', '1'); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>PortalUser WHERE Status=1 ', NULL, 'la_prompt_ActiveUsers', '0', '1'); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>UserSession', NULL, 'la_prompt_CurrentSessions', '0', '1'); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) as CategoryCount FROM <%prefix%>Category', NULL, 'la_prompt_TotalCategories', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ActiveCategories FROM <%prefix%>Category WHERE Status = 1', NULL, 'la_prompt_ActiveCategories', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS PendingCategories FROM <%prefix%>Category WHERE Status = 2', NULL, 'la_prompt_PendingCategories', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS DisabledCategories FROM <%prefix%>Category WHERE Status = 0', NULL, 'la_prompt_DisabledCategories', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS NewCategories FROM <%prefix%>Category 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%>Category 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%>Category', NULL, 'la_prompt_NewestCategoryDate', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>Category', NULL, 'la_prompt_LastCategoryUpdate', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS TotalUsers FROM <%prefix%>PortalUser', NULL, 'la_prompt_TopicsUsers', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ActiveUsers FROM <%prefix%>PortalUser WHERE Status = 1', NULL, 'la_prompt_UsersActive', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS PendingUsers FROM <%prefix%>PortalUser WHERE Status = 2', NULL, 'la_prompt_UsersPending', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS DisabledUsers FROM <%prefix%>PortalUser 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%>PortalUser', NULL, 'la_prompt_NewestUserDate', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT( DISTINCT LOWER( Country ) ) FROM <%prefix%>PortalUser WHERE LENGTH(Country) > 0', NULL, 'la_prompt_UsersUniqueCountries', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT( DISTINCT LOWER( State ) ) FROM <%prefix%>PortalUser WHERE LENGTH(State) > 0', NULL, 'la_prompt_UsersUniqueStates', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS TotalUserGroups FROM <%prefix%>PortalGroup', NULL, 'la_prompt_TotalUserGroups', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS BannedUsers FROM <%prefix%>PortalUser WHERE IsBanned = 1', NULL, 'la_prompt_BannedUsers', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS NonExipedSessions FROM <%prefix%>UserSession WHERE Status = 1', NULL, 'la_prompt_NonExpiredSessions', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ThemeCount FROM <%prefix%>Theme', NULL, 'la_prompt_ThemeCount', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS RegionsCount FROM <%prefix%>Language', NULL, 'la_prompt_RegionsCount', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', '<%m:sql_action sql="SHOW+TABLES" action="COUNT" field="*"%>', NULL, 'la_prompt_TablesCount', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', '<%m:sql_action sql="SHOW+TABLE+STATUS" action="SUM" field="Rows"%>', NULL, 'la_prompt_RecordsCount', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', '<%m:custom_action sql="empty" action="SysFileSize"%>', NULL, 'la_prompt_SystemFileSize', 0, 2); +INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', '<%m:sql_action sql="SHOW+TABLE+STATUS" action="SUM" format_as="file" field="Data_length"%>', NULL, 'la_prompt_DataSize', 0, 2); + +INSERT INTO StylesheetSelectors VALUES (169, 8, 'Calendar''s selected days', '.calendar tbody .selected', 'a:0:{}', '', 1, 'font-weight: bold;\r\nbackground-color: #9ED7ED;\r\nborder: 1px solid #83B2C5;', 0); +INSERT INTO StylesheetSelectors VALUES (118, 8, 'Data grid row', 'td.block-data-row', 'a:0:{}', '', 2, 'border-bottom: 1px solid #cccccc;', 48); +INSERT INTO StylesheetSelectors VALUES (81, 8, '"More" link', 'a.link-more', 'a:0:{}', '', 2, 'text-decoration: underline;', 64); +INSERT INTO StylesheetSelectors VALUES (88, 8, 'Block data, separated rows', 'td.block-data-grid', 'a:0:{}', '', 2, 'border: 1px solid #cccccc;', 48); +INSERT INTO StylesheetSelectors VALUES (42, 8, 'Block Header', 'td.block-header', 'a:4:{s:5:"color";s:16:"rgb(0, 159, 240)";s:9:"font-size";s:4:"20px";s:11:"font-weight";s:6:"normal";s:7:"padding";s:3:"5px";}', 'Block Header', 1, 'font-family: Verdana, Helvetica, sans-serif;', 0); +INSERT INTO StylesheetSelectors VALUES (76, 8, 'Navigation bar menu', 'tr.head-nav td', 'a:0:{}', '', 1, 'vertical-align: middle;', 0); +INSERT INTO StylesheetSelectors VALUES (48, 8, 'Block data', 'td.block-data', 'a:2:{s:9:"font-size";s:5:"12px;";s:7:"padding";s:3:"5px";}', '', 1, '', 0); +INSERT INTO StylesheetSelectors VALUES (78, 8, 'Body main style', 'body', 'a:0:{}', '', 1, 'padding: 0px; \r\nbackground-color: #ffffff; \r\nfont-family: arial, verdana, helvetica; \r\nfont-size: small;\r\nwidth: auto;\r\nmargin: 0px;', 0); +INSERT INTO StylesheetSelectors VALUES (58, 8, 'Main table', 'table.main-table', 'a:0:{}', '', 1, 'width: 770px;\r\nmargin: 0px;\r\n/*table-layout: fixed;*/', 0); +INSERT INTO StylesheetSelectors VALUES (79, 8, 'Block: header of data block', 'span.block-data-grid-header', 'a:0:{}', '', 1, 'font-family: Arial, Helvetica, sans-serif;\r\ncolor: #009DF6;\r\nfont-size: 12px;\r\nfont-weight: bold;\r\nbackground-color: #E6EEFF;\r\npadding: 6px;\r\nwhite-space: nowrap;', 0); +INSERT INTO StylesheetSelectors VALUES (64, 8, 'Link', 'a', 'a:0:{}', '', 1, '', 0); +INSERT INTO StylesheetSelectors VALUES (46, 8, 'Product title link', 'a.link-product1', 'a:0:{}', 'Product title link', 1, 'color: #62A1DE;\r\nfont-size: 14px;\r\nfont-weight: bold;\r\nline-height: 20px;\r\npadding-bottom: 10px;', 0); +INSERT INTO StylesheetSelectors VALUES (75, 8, 'Copy of Main path link', 'table.main-path td a:hover', 'a:0:{}', '', 1, 'color: #ffffff;', 0); +INSERT INTO StylesheetSelectors VALUES (160, 8, 'Current item in navigation bar', '.checkout-step-current', 'a:0:{}', '', 1, 'color: #A20303;\r\nfont-weight: bold;', 0); +INSERT INTO StylesheetSelectors VALUES (51, 8, 'Right block data', 'td.right-block-data', 'a:1:{s:9:"font-size";s:4:"11px";}', '', 2, 'padding: 7px;\r\nbackground: #e3edf6 url("/in-commerce4/themes/default/img/bgr_login.jpg") repeat-y scroll left top;\r\nborder-bottom: 1px solid #64a1df;', 48); +INSERT INTO StylesheetSelectors VALUES (67, 8, 'Pagination bar: text', 'table.block-pagination td', 'a:3:{s:5:"color";s:7:"#8B898B";s:9:"font-size";s:4:"12px";s:11:"font-weight";s:6:"normal";}', '', 1, '', 0); +INSERT INTO StylesheetSelectors VALUES (45, 8, 'Category link', 'a.subcat', 'a:0:{}', 'Category link', 1, 'color: #2069A4', 0); +INSERT INTO StylesheetSelectors VALUES (68, 8, 'Pagination bar: link', 'table.block-pagination td a', 'a:3:{s:5:"color";s:7:"#8B898B";s:9:"font-size";s:5:"12px;";s:11:"font-weight";s:6:"normal";}', '', 1, '', 0); +INSERT INTO StylesheetSelectors VALUES (69, 8, 'Product description in product list', '.product-list-description', 'a:2:{s:5:"color";s:7:"#8B898B";s:9:"font-size";s:4:"12px";}', '', 1, '', 0); +INSERT INTO StylesheetSelectors VALUES (73, 8, 'Main path link', 'table.main-path td a', 'a:0:{}', '', 1, 'color: #d5e231;', 0); +INSERT INTO StylesheetSelectors VALUES (83, 8, 'Product title link in list (shopping cart)', 'a.link-product-cart', 'a:0:{}', 'Product title link', 1, 'color: #18559C;\r\nfont-size: 12px;\r\nfont-weight: bold;\r\ntext-decoration: none;\r\n\r\n', 0); +INSERT INTO StylesheetSelectors VALUES (72, 8, 'Main path block text', 'table.main-path td', 'a:0:{}', '', 1, 'color: #ffffff;\r\nfont-size: 10px;\r\nfont-weight: normal;\r\npadding: 1px;\r\n', 0); +INSERT INTO StylesheetSelectors VALUES (61, 8, 'Block: header of data table', 'td.block-data-grid-header', 'a:6:{s:4:"font";s:28:"Arial, Helvetica, sans-serif";s:5:"color";s:7:"#009DF6";s:9:"font-size";s:4:"12px";s:11:"font-weight";s:4:"bold";s:16:"background-color";s:7:"#E6EEFF";s:7:"padding";s:3:"6px";}', '', 1, 'white-space: nowrap;\r\npadding-left: 10px;\r\n/*\r\nbackground-image: url(/in-commerce4/themes/default/img/bullet1.gif);\r\nbackground-position: 10px 12px;\r\nbackground-repeat: no-repeat;\r\n*/', 0); +INSERT INTO StylesheetSelectors VALUES (65, 8, 'Link in product list additional row', 'td.product-list-additional a', 'a:1:{s:5:"color";s:7:"#8B898B";}', '', 2, '', 64); +INSERT INTO StylesheetSelectors VALUES (55, 8, 'Main table, left column', 'td.main-column-left', 'a:0:{}', '', 1, 'width:180px;\r\nborder: 1px solid #62A1DE;\r\nborder-top: 0px;', 0); +INSERT INTO StylesheetSelectors VALUES (70, 8, 'Product title link in list (category)', 'a.link-product-category', 'a:0:{}', 'Product title link', 1, 'color: #18559C;\r\nfont-size: 12px;\r\nfont-weight: bold;\r\ntext-decoration: none;\r\n\r\n', 0); +INSERT INTO StylesheetSelectors VALUES (66, 8, 'Pagination bar block', 'table.block-pagination', 'a:0:{}', '', 1, '', 0); +INSERT INTO StylesheetSelectors VALUES (49, 8, 'Bulleted list inside block', 'td.block-data ul li', 'a:0:{}', '', 1, ' list-style-image: url(/in-commerce4/themes/default/img/bullet2.gif);\r\n margin-bottom: 10px;\r\n font-size: 11px;', 0); +INSERT INTO StylesheetSelectors VALUES (87, 8, 'Cart item input form element', 'td.cart-item-atributes input', 'a:0:{}', '', 1, 'border: 1px solid #7BB2E6;', 0); +INSERT INTO StylesheetSelectors VALUES (119, 8, 'Data grid row header', 'td.block-data-row-hdr', 'a:0:{}', 'Used in order preview', 2, 'background-color: #eeeeee;\r\nborder-bottom: 1px solid #dddddd;\r\nborder-top: 1px solid #cccccc;\r\nfont-weight: bold;', 48); +INSERT INTO StylesheetSelectors VALUES (82, 8, '"More" link image', 'a.link-more img', 'a:0:{}', '', 2, 'text-decoration: none;\r\npadding-left: 5px;', 64); +INSERT INTO StylesheetSelectors VALUES (63, 8, 'Additional info under product description in list', 'td.product-list-additional', 'a:5:{s:5:"color";s:7:"#8B898B";s:9:"font-size";s:4:"11px";s:11:"font-weight";s:6:"normal";s:10:"border-top";s:18:"1px dashed #8B898B";s:13:"border-bottom";s:18:"1px dashed #8B898B";}', '', 2, '', 48); +INSERT INTO StylesheetSelectors VALUES (43, 8, 'Block', 'table.block', 'a:2:{s:16:"background-color";s:7:"#E3EEF9";s:6:"border";s:17:"1px solid #64A1DF";}', 'Block', 1, 'border: 0; \r\nmargin-bottom: 1px;\r\nwidth: 100%;', 0); +INSERT INTO StylesheetSelectors VALUES (84, 8, 'Cart item cell', 'td.cart-item', 'a:0:{}', '', 1, 'background-color: #F6FAFF;\r\nborder-left: 1px solid #ffffff;\r\nborder-bottom: 1px solid #ffffff;\r\npadding: 4px;', 0); +INSERT INTO StylesheetSelectors VALUES (57, 8, 'Main table, right column', 'td.main-column-right', 'a:0:{}', '', 1, 'width:220px;\r\nborder: 1px solid #62A1DE;\r\nborder-top: 0px;', 0); +INSERT INTO StylesheetSelectors VALUES (161, 8, 'Block for sub categories', 'td.block-data-subcats', 'a:0:{}', '', 2, ' background: #FFFFFF\r\nurl(/in-commerce4/themes/default/in-commerce/img/bgr_categories.jpg);\r\n background-repeat: no-repeat;\r\n background-position: top right;\r\nborder-bottom: 5px solid #DEEAFF;\r\npadding-left: 10px;', 48); +INSERT INTO StylesheetSelectors VALUES (77, 8, 'Left block header', 'td.left-block-header', 'a:0:{}', '', 2, 'font-family : verdana, helvetica, sans-serif;\r\ncolor : #ffffff;\r\nfont-size : 12px;\r\nfont-weight : bold;\r\ntext-decoration : none;\r\nbackground-color: #64a1df;\r\npadding: 5px;\r\npadding-left: 7px;', 42); +INSERT INTO StylesheetSelectors VALUES (80, 8, 'Right block data - text', 'td.right-block-data td', 'a:1:{s:9:"font-size";s:5:"11px;";}', '', 2, '', 48); +INSERT INTO StylesheetSelectors VALUES (53, 8, 'Right block header', 'td.right-block-header', 'a:0:{}', '', 2, 'font-family : verdana, helvetica, sans-serif;\r\ncolor : #ffffff;\r\nfont-size : 12px;\r\nfont-weight : bold;\r\ntext-decoration : none;\r\nbackground-color: #64a1df;\r\npadding: 5px;\r\npadding-left: 7px;', 42); +INSERT INTO StylesheetSelectors VALUES (85, 8, 'Cart item cell with attributes', 'td.cart-item-attributes', 'a:0:{}', '', 1, 'background-color: #E6EEFF;\r\nborder-left: 1px solid #ffffff;\r\nborder-bottom: 1px solid #ffffff;\r\npadding: 4px;\r\ntext-align: center;\r\nvertical-align: middle;\r\nfont-size: 12px;\r\nfont-weight: normal;', 0); +INSERT INTO StylesheetSelectors VALUES (86, 8, 'Cart item cell with name', 'td.cart-item-name', 'a:0:{}', '', 1, 'background-color: #F6FAFF;\r\nborder-left: 1px solid #ffffff;\r\nborder-bottom: 1px solid #ffffff;\r\npadding: 3px;', 0); +INSERT INTO StylesheetSelectors VALUES (47, 8, 'Block content of featured product', 'td.featured-block-data', 'a:0:{}', '', 1, 'font-family: Arial,Helvetica,sans-serif;\r\nfont-size: 12px;', 0); +INSERT INTO StylesheetSelectors VALUES (56, 8, 'Main table, middle column', 'td.main-column-center', 'a:0:{}', '', 1, '\r\n', 0); +INSERT INTO StylesheetSelectors VALUES (50, 8, 'Product title link in list', 'a.link-product2', 'a:0:{}', 'Product title link', 1, 'color: #62A1DE;\r\nfont-size: 12px;\r\nfont-weight: bold;\r\ntext-decoration: none;\r\n\r\n', 0); +INSERT INTO StylesheetSelectors VALUES (71, 8, 'Main path block', 'table.main-path', 'a:0:{}', '', 1, 'background: #61b0ec url("/in-commerce4/themes/default/img/bgr_path.jpg") repeat-y scroll left top;\r\nwidth: 100%;\r\nmargin-bottom: 1px;\r\nmargin-right: 1px; \r\nmargin-left: 1px;', 0); +INSERT INTO StylesheetSelectors VALUES (62, 8, 'Block: columns header for data table', 'table.block-no-border th', 'a:6:{s:4:"font";s:28:"Arial, Helvetica, sans-serif";s:5:"color";s:7:"#18559C";s:9:"font-size";s:4:"11px";s:11:"font-weight";s:4:"bold";s:16:"background-color";s:7:"#B4D2EE";s:7:"padding";s:3:"6px";}', '', 1, 'text-align: left;', 0); +INSERT INTO StylesheetSelectors VALUES (59, 8, 'Block without border', 'table.block-no-border', 'a:0:{}', '', 1, 'border: 0px; \r\nmargin-bottom: 10px;\r\nwidth: 100%;', 0); +INSERT INTO StylesheetSelectors VALUES (74, 8, 'Main path language selector cell', 'td.main-path-language', 'a:0:{}', '', 1, 'vertical-align: middle;\r\ntext-align: right;\r\npadding-right: 6px;', 0); +INSERT INTO StylesheetSelectors VALUES (171, 8, 'Calendar''s highlighted day', '.calendar tbody .hilite', 'a:0:{}', '', 1, 'background-color: #f6f6f6;\r\nborder: 1px solid #83B2C5 !important;', 0); +INSERT INTO StylesheetSelectors VALUES (175, 8, 'Calendar''s days', '.calendar tbody .day', 'a:0:{}', '', 1, 'text-align: right;\r\npadding: 2px 4px 2px 2px;\r\nwidth: 2em;\r\nborder: 1px solid #fefefe;', 0); +INSERT INTO StylesheetSelectors VALUES (170, 8, 'Calendar''s weekends', '.calendar .weekend', 'a:0:{}', '', 1, 'color: #990000;', 0); +INSERT INTO StylesheetSelectors VALUES (173, 8, 'Calendar''s control buttons', '.calendar .calendar_button', 'a:0:{}', '', 1, 'color: black;\r\nfont-size: 12px;\r\nbackground-color: #eeeeee;', 0); +INSERT INTO StylesheetSelectors VALUES (174, 8, 'Calendar''s day names', '.calendar thead .name', 'a:0:{}', '', 1, 'background-color: #DEEEF6;\r\nborder-bottom: 1px solid #000000;', 0); +INSERT INTO StylesheetSelectors VALUES (172, 8, 'Calendar''s top and bottom titles', '.calendar .title', 'a:0:{}', '', 1, 'color: #FFFFFF;\r\nbackground-color: #62A1DE;\r\nborder: 1px solid #107DC5;\r\nborder-top: 0px;\r\npadding: 1px;', 0); +INSERT INTO StylesheetSelectors VALUES (60, 8, 'Block header for featured product', 'td.featured-block-header', 'a:0:{}', '', 2, '\r\n', 42); +INSERT INTO StylesheetSelectors VALUES (54, 8, 'Right block', 'table.right-block', 'a:0:{}', '', 2, 'background-color: #E3EEF9;\r\nborder: 0px;\r\nwidth: 100%;', 43); +INSERT INTO StylesheetSelectors VALUES (44, 8, 'Block content', 'td.block-data-big', 'a:0:{}', 'Block content', 1, ' background: #DEEEF6\r\nurl(/in-commerce4/themes/default/img/menu_bg.gif);\r\n background-repeat: no-repeat;\r\n background-position: top right;\r\n', 0); + +INSERT INTO Stylesheets VALUES (8, 'Default', 'In-Portal Default Theme', '', 1124952555, 1); + +INSERT INTO Counters VALUES (DEFAULT, 'members_count', 'SELECT COUNT(*) FROM <%PREFIX%>PortalUser WHERE Status = 1', NULL , NULL , '3600', '0', '|PortalUser|'); +INSERT INTO Counters VALUES (DEFAULT, 'members_online', 'SELECT COUNT(*) FROM <%PREFIX%>UserSession WHERE PortalUserId > 0', NULL , NULL , '3600', '0', '|UserSession|'); +INSERT INTO Counters VALUES (DEFAULT, 'guests_online', 'SELECT COUNT(*) FROM <%PREFIX%>UserSession WHERE PortalUserId <= 0', NULL , NULL , '3600', '0', '|UserSession|'); +INSERT INTO Counters VALUES (DEFAULT, 'users_online', 'SELECT COUNT(*) FROM <%PREFIX%>UserSession', NULL , NULL , '3600', '0', '|UserSession|'); + INSERT INTO Modules VALUES ('Core', 'core/', 'adm', DEFAULT, 1, 1, '', 0, '0'); \ No newline at end of file Index: branches/RC/core/install/install_toolkit.php =================================================================== diff -u -N -r10886 -r11121 --- branches/RC/core/install/install_toolkit.php (.../install_toolkit.php) (revision 10886) +++ branches/RC/core/install/install_toolkit.php (.../install_toolkit.php) (revision 11121) @@ -271,11 +271,13 @@ // add prefix to all tables if (strlen($table_prefix) > 0) { - $replacements = Array ('CREATE TABLE ', 'INSERT INTO ', 'UPDATE ', 'ALTER TABLE ', 'DELETE FROM ', 'REPLACE INTO '); + $replacements = Array ('INSERT INTO ', 'UPDATE ', 'ALTER TABLE ', 'DELETE FROM ', 'REPLACE INTO '); foreach ($replacements as $replacement) { $sqls = str_replace($replacement, $replacement.$table_prefix, $sqls); } - $sqls = str_replace('DROP TABLE ', 'DROP TABLE IF EXISTS '.$table_prefix, $sqls); + + $sqls = str_replace('CREATE TABLE ', 'CREATE TABLE IF NOT EXISTS ' . $table_prefix, $sqls); + $sqls = str_replace('DROP TABLE ', 'DROP TABLE IF EXISTS ' . $table_prefix, $sqls); } if (isset($replace_from) && isset($replace_to)) { Index: branches/RC/core/install/prerequisites.php =================================================================== diff -u -N --- branches/RC/core/install/prerequisites.php (revision 0) +++ branches/RC/core/install/prerequisites.php (revision 11121) @@ -0,0 +1,60 @@ +_toolkit =& $instance; + } + + /** + * Checks minimal version, that could be upgradeable + * + * @param string $mode when called mode {install, upgrade, standalone) + */ + function CheckPrerequisites($versions, $mode) + { + $errors = Array (); + + if ($mode == 'upgrade') { + $sql = 'SELECT Version + FROM ' . TABLE_PREFIX . 'Modules + WHERE Name = "In-Portal"'; + $inportal_version = $this->Conn->GetOne($sql); + + if ($inportal_version === false) { + // only, when In-Portal was installed + return $errors; + } + + $min_version = '4.3.1'; + + $current_version = $this->_toolkit->ConvertModuleVersion($inportal_version); + $needed_version = $this->_toolkit->ConvertModuleVersion($min_version); + if ($current_version < $needed_version) { + $errors[] = 'Please upgrade "In-Portal" to version ' . $min_version; + } + } + + return $errors; + } + } + +?> \ No newline at end of file Index: branches/RC/core/install/upgrades.php =================================================================== diff -u -N -r11120 -r11121 --- branches/RC/core/install/upgrades.php (.../upgrades.php) (revision 11120) +++ branches/RC/core/install/upgrades.php (.../upgrades.php) (revision 11121) @@ -205,50 +205,424 @@ } /** - * Removes duplicate phrases (created during proj-base and in-portal shared installation) + * Removes duplicate phrases, update file paths in database * * @param string $mode when called mode {before, after) */ function Upgrade_4_3_9($mode) { if ($mode == 'after') { - $id_field = $this->Application->getUnitOption('phrases', 'IDField'); - $table_name = $this->Application->getUnitOption('phrases', 'TableName'); + $this->_insertInPortalData(); + $this->_removeDuplicatePhrases(); + $this->_moveDatabaseFolders(); + } + } - $sql = 'SELECT LanguageId, Phrase, MIN(LastChanged) AS LastChanged, COUNT(*) AS DupeCount - FROM ' . $table_name . ' - GROUP BY LanguageId, Phrase - HAVING COUNT(*) > 1'; - $duplicate_phrases = $this->Conn->Query($sql); + function _insertInPortalData() + { + $data = Array ( + 'ConfigurationAdmin' => Array ( + 'UniqueField' => 'VariableName', + 'Records' => Array ( + 'AllowDeleteRootCats' => "(DEFAULT, 'AllowDeleteRootCats', 'la_Text_General', 'la_AllowDeleteRootCats', 'checkbox', NULL , NULL , 10.09, 0, 0)", + 'Catalog_PreselectModuleTab' => "(DEFAULT, 'Catalog_PreselectModuleTab', 'la_Text_General', 'la_config_CatalogPreselectModuleTab', 'checkbox', NULL, NULL, 10.10, 0, 1)", + 'RecycleBinFolder' => "(DEFAULT, 'RecycleBinFolder', 'la_Text_General', 'la_config_RecycleBinFolder', 'text', NULL , NULL , 10.11, 0, 0)", + ), + ), - foreach ($duplicate_phrases as $phrase_record) { - // 1. keep phrase, that was added first, because it is selected in PhrasesCache::LoadPhraseByLabel - $where_clause = Array ( - 'LanguageId = ' . $phrase_record['LanguageId'], - 'Phrase = ' . $this->Conn->qstr($phrase_record['Phrase']), - 'LastChanged' . ' = ' . $phrase_record['LastChanged'], - ); + 'ItemTypes' => Array ( + 'UniqueField' => 'ItemType', + 'Records' => Array ( + '1' => "(1, 'In-Portal', 'c', 'Category', 'Name', 'CreatedById', NULL, NULL, 'la_ItemTab_Categories', 1, 'admin/category/addcategory.php', 'clsCategory', 'Category')", + '6' => "(6, 'In-Portal', 'u', 'PortalUser', 'Login', 'PortalUserId', NULL, NULL, '', 0, '', 'clsPortalUser', 'User')", + ), + ), - $sql = 'SELECT ' . $id_field . ' - FROM ' . $table_name . ' - WHERE (' . implode(') AND (', $where_clause) . ')'; - $phrase_id = $this->Conn->GetOne($sql); + 'PermissionConfig' => Array ( + 'UniqueField' => 'PermissionName', + 'Records' => Array ( + 'CATEGORY.ADD' => "(DEFAULT, 'CATEGORY.ADD', 'lu_PermName_Category.Add_desc', 'lu_PermName_Category.Add_error', 'In-Portal')", + 'CATEGORY.DELETE' => "(DEFAULT, 'CATEGORY.DELETE', 'lu_PermName_Category.Delete_desc', 'lu_PermName_Category.Delete_error', 'In-Portal')", + 'CATEGORY.ADD.PENDING' => "(DEFAULT, 'CATEGORY.ADD.PENDING', 'lu_PermName_Category.AddPending_desc', 'lu_PermName_Category.AddPending_error', 'In-Portal')", + 'CATEGORY.MODIFY' => "(DEFAULT, 'CATEGORY.MODIFY', 'lu_PermName_Category.Modify_desc', 'lu_PermName_Category.Modify_error', 'In-Portal')", + 'ADMIN' => "(DEFAULT, 'ADMIN', 'lu_PermName_Admin_desc', 'lu_PermName_Admin_error', 'Admin')", + 'LOGIN' => "(DEFAULT, 'LOGIN', 'lu_PermName_Login_desc', 'lu_PermName_Admin_error', 'Front')", + 'DEBUG.ITEM' => "(DEFAULT, 'DEBUG.ITEM', 'lu_PermName_Debug.Item_desc', '', 'Admin')", + 'DEBUG.LIST' => "(DEFAULT, 'DEBUG.LIST', 'lu_PermName_Debug.List_desc', '', 'Admin')", + 'DEBUG.INFO' => "(DEFAULT, 'DEBUG.INFO', 'lu_PermName_Debug.Info_desc', '', 'Admin')", + 'PROFILE.MODIFY' => "(DEFAULT, 'PROFILE.MODIFY', 'lu_PermName_Profile.Modify_desc', '', 'Admin')", + 'SHOWLANG' => "(DEFAULT, 'SHOWLANG', 'lu_PermName_ShowLang_desc', '', 'Admin')", + 'FAVORITES' => "(DEFAULT, 'FAVORITES', 'lu_PermName_favorites_desc', 'lu_PermName_favorites_error', 'In-Portal')", + 'SYSTEM_ACCESS.READONLY' => "(DEFAULT, 'SYSTEM_ACCESS.READONLY', 'la_PermName_SystemAccess.ReadOnly_desc', 'la_PermName_SystemAccess.ReadOnly_error', 'Admin')", + ), + ), - // 2. delete all other duplicates - $where_clause = Array ( - 'LanguageId = ' . $phrase_record['LanguageId'], - 'Phrase = ' . $this->Conn->qstr($phrase_record['Phrase']), - $id_field . ' <> ' . $phrase_id, - ); + 'Permissions' => Array ( + 'UniqueField' => 'Permission;GroupId;Type;CatId', + 'Records' => Array ( + 'LOGIN;12;1;0' => "(DEFAULT, 'LOGIN', 12, 1, 1, 0)", + 'in-portal:site.view;11;1;0' => "(DEFAULT, 'in-portal:site.view', 11, 1, 1, 0)", + 'in-portal:browse.view;11;1;0' => "(DEFAULT, 'in-portal:browse.view', 11, 1, 1, 0)", + 'in-portal:advanced_view.view;11;1;0' => "(DEFAULT, 'in-portal:advanced_view.view', 11, 1, 1, 0)", + 'in-portal:reviews.view;11;1;0' => "(DEFAULT, 'in-portal:reviews.view', 11, 1, 1, 0)", + 'in-portal:configure_categories.view;11;1;0' => "(DEFAULT, 'in-portal:configure_categories.view', 11, 1, 1, 0)", + 'in-portal:configure_categories.edit;11;1;0' => "(DEFAULT, 'in-portal:configure_categories.edit', 11, 1, 1, 0)", + 'in-portal:configuration_search.view;11;1;0' => "(DEFAULT, 'in-portal:configuration_search.view', 11, 1, 1, 0)", + 'in-portal:configuration_search.edit;11;1;0' => "(DEFAULT, 'in-portal:configuration_search.edit', 11, 1, 1, 0)", + 'in-portal:configuration_email.view;11;1;0' => "(DEFAULT, 'in-portal:configuration_email.view', 11, 1, 1, 0)", + 'in-portal:configuration_email.edit;11;1;0' => "(DEFAULT, 'in-portal:configuration_email.edit', 11, 1, 1, 0)", + 'in-portal:configuration_custom.view;11;1;0' => "(DEFAULT, 'in-portal:configuration_custom.view', 11, 1, 1, 0)", + 'in-portal:configuration_custom.add;11;1;0' => "(DEFAULT, 'in-portal:configuration_custom.add', 11, 1, 1, 0)", + 'in-portal:configuration_custom.edit;11;1;0' => "(DEFAULT, 'in-portal:configuration_custom.edit', 11, 1, 1, 0)", + 'in-portal:configuration_custom.delete;11;1;0' => "(DEFAULT, 'in-portal:configuration_custom.delete', 11, 1, 1, 0)", + 'in-portal:users.view;11;1;0' => "(DEFAULT, 'in-portal:users.view', 11, 1, 1, 0)", + 'in-portal:user_list.advanced:ban;11;1;0' => "(DEFAULT, 'in-portal:user_list.advanced:ban', 11, 1, 1, 0)", + 'in-portal:user_list.advanced:send_email;11;1;0' => "(DEFAULT, 'in-portal:user_list.advanced:send_email', 11, 1, 1, 0)", + 'in-portal:user_groups.view;11;1;0' => "(DEFAULT, 'in-portal:user_groups.view', 11, 1, 1, 0)", + 'in-portal:user_groups.add;11;1;0' => "(DEFAULT, 'in-portal:user_groups.add', 11, 1, 1, 0)", + 'in-portal:user_groups.edit;11;1;0' => "(DEFAULT, 'in-portal:user_groups.edit', 11, 1, 1, 0)", + 'in-portal:user_groups.delete;11;1;0' => "(DEFAULT, 'in-portal:user_groups.delete', 11, 1, 1, 0)", + 'in-portal:user_groups.advanced:send_email;11;1;0' => "(DEFAULT, 'in-portal:user_groups.advanced:send_email', 11, 1, 1, 0)", + 'in-portal:user_groups.advanced:manage_permissions;11;1;0' => "(DEFAULT, 'in-portal:user_groups.advanced:manage_permissions', 11, 1, 1, 0)", + 'in-portal:configure_users.view;11;1;0' => "(DEFAULT, 'in-portal:configure_users.view', 11, 1, 1, 0)", + 'in-portal:configure_users.edit;11;1;0' => "(DEFAULT, 'in-portal:configure_users.edit', 11, 1, 1, 0)", + 'in-portal:user_email.view;11;1;0' => "(DEFAULT, 'in-portal:user_email.view', 11, 1, 1, 0)", + 'in-portal:user_email.edit;11;1;0' => "(DEFAULT, 'in-portal:user_email.edit', 11, 1, 1, 0)", + 'in-portal:user_custom.view;11;1;0' => "(DEFAULT, 'in-portal:user_custom.view', 11, 1, 1, 0)", + 'in-portal:user_custom.add;11;1;0' => "(DEFAULT, 'in-portal:user_custom.add', 11, 1, 1, 0)", + 'in-portal:user_custom.edit;11;1;0' => "(DEFAULT, 'in-portal:user_custom.edit', 11, 1, 1, 0)", + 'in-portal:user_custom.delete;11;1;0' => "(DEFAULT, 'in-portal:user_custom.delete', 11, 1, 1, 0)", + 'in-portal:user_banlist.view;11;1;0' => "(DEFAULT, 'in-portal:user_banlist.view', 11, 1, 1, 0)", + 'in-portal:user_banlist.add;11;1;0' => "(DEFAULT, 'in-portal:user_banlist.add', 11, 1, 1, 0)", + 'in-portal:user_banlist.edit;11;1;0' => "(DEFAULT, 'in-portal:user_banlist.edit', 11, 1, 1, 0)", + 'in-portal:user_banlist.delete;11;1;0' => "(DEFAULT, 'in-portal:user_banlist.delete', 11, 1, 1, 0)", + 'in-portal:reports.view;11;1;0' => "(DEFAULT, 'in-portal:reports.view', 11, 1, 1, 0)", + 'in-portal:log_summary.view;11;1;0' => "(DEFAULT, 'in-portal:log_summary.view', 11, 1, 1, 0)", + 'in-portal:searchlog.view;11;1;0' => "(DEFAULT, 'in-portal:searchlog.view', 11, 1, 1, 0)", + 'in-portal:searchlog.delete;11;1;0' => "(DEFAULT, 'in-portal:searchlog.delete', 11, 1, 1, 0)", + 'in-portal:sessionlog.view;11;1;0' => "(DEFAULT, 'in-portal:sessionlog.view', 11, 1, 1, 0)", + 'in-portal:sessionlog.delete;11;1;0' => "(DEFAULT, 'in-portal:sessionlog.delete', 11, 1, 1, 0)", + 'in-portal:emaillog.view;11;1;0' => "(DEFAULT, 'in-portal:emaillog.view', 11, 1, 1, 0)", + 'in-portal:emaillog.delete;11;1;0' => "(DEFAULT, 'in-portal:emaillog.delete', 11, 1, 1, 0)", + 'in-portal:visits.view;11;1;0' => "(DEFAULT, 'in-portal:visits.view', 11, 1, 1, 0)", + 'in-portal:visits.delete;11;1;0' => "(DEFAULT, 'in-portal:visits.delete', 11, 1, 1, 0)", + 'in-portal:configure_general.view;11;1;0' => "(DEFAULT, 'in-portal:configure_general.view', 11, 1, 1, 0)", + 'in-portal:configure_general.edit;11;1;0' => "(DEFAULT, 'in-portal:configure_general.edit', 11, 1, 1, 0)", + 'in-portal:modules.view;11;1;0' => "(DEFAULT, 'in-portal:modules.view', 11, 1, 1, 0)", + 'in-portal:mod_status.view;11;1;0' => "(DEFAULT, 'in-portal:mod_status.view', 11, 1, 1, 0)", + 'in-portal:mod_status.edit;11;1;0' => "(DEFAULT, 'in-portal:mod_status.edit', 11, 1, 1, 0)", + 'in-portal:mod_status.advanced:approve;11;1;0' => "(DEFAULT, 'in-portal:mod_status.advanced:approve', 11, 1, 1, 0)", + 'in-portal:mod_status.advanced:decline;11;1;0' => "(DEFAULT, 'in-portal:mod_status.advanced:decline', 11, 1, 1, 0)", + 'in-portal:addmodule.view;11;1;0' => "(DEFAULT, 'in-portal:addmodule.view', 11, 1, 1, 0)", + 'in-portal:addmodule.add;11;1;0' => "(DEFAULT, 'in-portal:addmodule.add', 11, 1, 1, 0)", + 'in-portal:addmodule.edit;11;1;0' => "(DEFAULT, 'in-portal:addmodule.edit', 11, 1, 1, 0)", + 'in-portal:tag_library.view;11;1;0' => "(DEFAULT, 'in-portal:tag_library.view', 11, 1, 1, 0)", + 'in-portal:configure_themes.view;11;1;0' => "(DEFAULT, 'in-portal:configure_themes.view', 11, 1, 1, 0)", + 'in-portal:configure_themes.add;11;1;0' => "(DEFAULT, 'in-portal:configure_themes.add', 11, 1, 1, 0)", + 'in-portal:configure_themes.edit;11;1;0' => "(DEFAULT, 'in-portal:configure_themes.edit', 11, 1, 1, 0)", + 'in-portal:configure_themes.delete;11;1;0' => "(DEFAULT, 'in-portal:configure_themes.delete', 11, 1, 1, 0)", + 'in-portal:configure_styles.view;11;1;0' => "(DEFAULT, 'in-portal:configure_styles.view', 11, 1, 1, 0)", + 'in-portal:configure_styles.add;11;1;0' => "(DEFAULT, 'in-portal:configure_styles.add', 11, 1, 1, 0)", + 'in-portal:configure_styles.edit;11;1;0' => "(DEFAULT, 'in-portal:configure_styles.edit', 11, 1, 1, 0)", + 'in-portal:configure_styles.delete;11;1;0' => "(DEFAULT, 'in-portal:configure_styles.delete', 11, 1, 1, 0)", + 'in-portal:configure_lang.advanced:set_primary;11;1;0' => "(DEFAULT, 'in-portal:configure_lang.advanced:set_primary', 11, 1, 1, 0)", + 'in-portal:configure_lang.advanced:import;11;1;0' => "(DEFAULT, 'in-portal:configure_lang.advanced:import', 11, 1, 1, 0)", + 'in-portal:configure_lang.advanced:export;11;1;0' => "(DEFAULT, 'in-portal:configure_lang.advanced:export', 11, 1, 1, 0)", + 'in-portal:tools.view;11;1;0' => "(DEFAULT, 'in-portal:tools.view', 11, 1, 1, 0)", + 'in-portal:backup.view;11;1;0' => "(DEFAULT, 'in-portal:backup.view', 11, 1, 1, 0)", + 'in-portal:restore.view;11;1;0' => "(DEFAULT, 'in-portal:restore.view', 11, 1, 1, 0)", + 'in-portal:export.view;11;1;0' => "(DEFAULT, 'in-portal:export.view', 11, 1, 1, 0)", + 'in-portal:main_import.view;11;1;0' => "(DEFAULT, 'in-portal:main_import.view', 11, 1, 1, 0)", + 'in-portal:sql_query.view;11;1;0' => "(DEFAULT, 'in-portal:sql_query.view', 11, 1, 1, 0)", + 'in-portal:sql_query.edit;11;1;0' => "(DEFAULT, 'in-portal:sql_query.edit', 11, 1, 1, 0)", + 'in-portal:server_info.view;11;1;0' => "(DEFAULT, 'in-portal:server_info.view', 11, 1, 1, 0)", + 'in-portal:help.view;11;1;0' => "(DEFAULT, 'in-portal:help.view', 11, 1, 1, 0)", + ), + ), - $sql = 'DELETE FROM ' . $table_name . ' + 'SearchConfig' => Array ( + 'UniqueField' => 'TableName;FieldName;ModuleName', + 'Records' => Array ( + 'Category;NewItem;In-Portal' => "('Category', 'NewItem', 0, 1, 'lu_fielddesc_category_newitem', 'lu_field_newitem', 'In-Portal', 'la_text_category', 18, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;PopItem;In-Portal' => "('Category', 'PopItem', 0, 1, 'lu_fielddesc_category_popitem', 'lu_field_popitem', 'In-Portal', 'la_text_category', 19, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;HotItem;In-Portal' => "('Category', 'HotItem', 0, 1, 'lu_fielddesc_category_hotitem', 'lu_field_hotitem', 'In-Portal', 'la_text_category', 17, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;MetaDescription;In-Portal' => "('Category', 'MetaDescription', 0, 1, 'lu_fielddesc_category_metadescription', 'lu_field_metadescription', 'In-Portal', 'la_text_category', 16, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;ParentPath;In-Portal' => "('Category', 'ParentPath', 0, 1, 'lu_fielddesc_category_parentpath', 'lu_field_parentpath', 'In-Portal', 'la_text_category', 15, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;ResourceId;In-Portal' => "('Category', 'ResourceId', 0, 1, 'lu_fielddesc_category_resourceid', 'lu_field_resourceid', 'In-Portal', 'la_text_category', 14, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;CreatedById;In-Portal' => "('Category', 'CreatedById', 0, 1, 'lu_fielddesc_category_createdbyid', 'lu_field_createdbyid', 'In-Portal', 'la_text_category', 13, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;CachedNavbar;In-Portal' => "('Category', 'CachedNavbar', 0, 1, 'lu_fielddesc_category_cachednavbar', 'lu_field_cachednavbar', 'In-Portal', 'la_text_category', 12, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;CachedDescendantCatsQty;In-Portal' => "('Category', 'CachedDescendantCatsQty', 0, 1, 'lu_fielddesc_category_cacheddescendantcatsqty', 'lu_field_cacheddescendantcatsqty', 'In-Portal', 'la_text_category', 11, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;MetaKeywords;In-Portal' => "('Category', 'MetaKeywords', 0, 1, 'lu_fielddesc_category_metakeywords', 'lu_field_metakeywords', 'In-Portal', 'la_text_category', 10, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;Priority;In-Portal' => "('Category', 'Priority', 0, 1, 'lu_fielddesc_category_priority', 'lu_field_priority', 'In-Portal', 'la_text_category', 9, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;Status;In-Portal' => "('Category', 'Status', 0, 1, 'lu_fielddesc_category_status', 'lu_field_status', 'In-Portal', 'la_text_category', 7, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;EditorsPick;In-Portal' => "('Category', 'EditorsPick', 0, 1, 'lu_fielddesc_category_editorspick', 'lu_field_editorspick', 'In-Portal', 'la_text_category', 6, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;CreatedOn;In-Portal' => "('Category', 'CreatedOn', 0, 1, 'lu_fielddesc_category_createdon', 'lu_field_createdon', 'In-Portal', 'la_text_category', 5, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;Description;In-Portal' => "('Category', 'Description', 1, 1, 'lu_fielddesc_category_description', 'lu_field_description', 'In-Portal', 'la_text_category', 4, DEFAULT, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;Name;In-Portal' => "('Category', 'Name', 1, 1, 'lu_fielddesc_category_name', 'lu_field_name', 'In-Portal', 'la_text_category', 3, DEFAULT, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;ParentId;In-Portal' => "('Category', 'ParentId', 0, 1, 'lu_fielddesc_category_parentid', 'lu_field_parentid', 'In-Portal', 'la_text_category', 2, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;CategoryId;In-Portal' => "('Category', 'CategoryId', 0, 1, 'lu_fielddesc_category_categoryid', 'lu_field_categoryid', 'In-Portal', 'la_text_category', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;Modified;In-Portal' => "('Category', 'Modified', 0, 1, 'lu_fielddesc_category_modified', 'lu_field_modified', 'In-Portal', 'la_text_category', 20, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'Category;ModifiedById;In-Portal' => "('Category', 'ModifiedById', 0, 1, 'lu_fielddesc_category_modifiedbyid', 'lu_field_modifiedbyid', 'In-Portal', 'la_text_category', 21, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + + 'PortalUser;PortalUserId;In-Portal' => "('PortalUser', 'PortalUserId', -1, 0, 'lu_fielddesc_user_portaluserid', 'lu_field_portaluserid', 'In-Portal', 'la_text_user', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;Login;In-Portal' => "('PortalUser', 'Login', -1, 0, 'lu_fielddesc_user_login', 'lu_field_login', 'In-Portal', 'la_text_user', 1, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;Password;In-Portal' => "('PortalUser', 'Password', -1, 0, 'lu_fielddesc_user_password', 'lu_field_password', 'In-Portal', 'la_text_user', 2, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;tz;In-Portal' => "('PortalUser', 'tz', -1, 0, 'lu_fielddesc_user_tz', 'lu_field_tz', 'In-Portal', 'la_text_user', 17, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;dob;In-Portal' => "('PortalUser', 'dob', -1, 0, 'lu_fielddesc_user_dob', 'lu_field_dob', 'In-Portal', 'la_text_user', 16, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;Modified;In-Portal' => "('PortalUser', 'Modified', -1, 0, 'lu_fielddesc_user_modified', 'lu_field_modified', 'In-Portal', 'la_text_user', 15, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;Status;In-Portal' => "('PortalUser', 'Status', -1, 0, 'lu_fielddesc_user_status', 'lu_field_status', 'In-Portal', 'la_text_user', 14, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;ResourceId;In-Portal' => "('PortalUser', 'ResourceId', -1, 0, 'lu_fielddesc_user_resourceid', 'lu_field_resourceid', 'In-Portal', 'la_text_user', 13, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;Country;In-Portal' => "('PortalUser', 'Country', -1, 0, 'lu_fielddesc_user_country', 'lu_field_country', 'In-Portal', 'la_text_user', 12, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;Zip;In-Portal' => "('PortalUser', 'Zip', -1, 0, 'lu_fielddesc_user_zip', 'lu_field_zip', 'In-Portal', 'la_text_user', 11, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;State;In-Portal' => "('PortalUser', 'State', -1, 0, 'lu_fielddesc_user_state', 'lu_field_state', 'In-Portal', 'la_text_user', 10, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;City;In-Portal' => "('PortalUser', 'City', -1, 0, 'lu_fielddesc_user_city', 'lu_field_city', 'In-Portal', 'la_text_user', 9, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;Street;In-Portal' => "('PortalUser', 'Street', -1, 0, 'lu_fielddesc_user_street', 'lu_field_street', 'In-Portal', 'la_text_user', 8, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;Phone;In-Portal' => "('PortalUser', 'Phone', -1, 0, 'lu_fielddesc_user_phone', 'lu_field_phone', 'In-Portal', 'la_text_user', 7, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;CreatedOn;In-Portal' => "('PortalUser', 'CreatedOn', -1, 0, 'lu_fielddesc_user_createdon', 'lu_field_createdon', 'In-Portal', 'la_text_user', 6, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;Email;In-Portal' => "('PortalUser', 'Email', -1, 0, 'lu_fielddesc_user_email', 'lu_field_email', 'In-Portal', 'la_text_user', 5, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;LastName;In-Portal' => "('PortalUser', 'LastName', -1, 0, 'lu_fielddesc_user_lastname', 'lu_field_lastname', 'In-Portal', 'la_text_user', 4, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + 'PortalUser;FirstName;In-Portal' => "('PortalUser', 'FirstName', -1, 0, 'lu_fielddesc_user_firstname', 'lu_field_firstname', 'In-Portal', 'la_text_user', 3, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL)", + ), + ), + + 'StatItem' => Array ( + 'UniqueField' => 'Module;ListLabel', + 'Records' => Array ( + 'In-Portal;la_prompt_ActiveCategories' => "(DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>Category WHERE Status=1 ', NULL, 'la_prompt_ActiveCategories', '0', '1')", + 'In-Portal;la_prompt_ActiveUsers' => "(DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>PortalUser WHERE Status=1 ', NULL, 'la_prompt_ActiveUsers', '0', '1')", + 'In-Portal;la_prompt_CurrentSessions' => "(DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>UserSession', NULL, 'la_prompt_CurrentSessions', '0', '1')", + 'In-Portal;la_prompt_TotalCategories' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) as CategoryCount FROM <%prefix%>Category', NULL, 'la_prompt_TotalCategories', 0, 2)", + 'In-Portal;la_prompt_ActiveCategories' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ActiveCategories FROM <%prefix%>Category WHERE Status = 1', NULL, 'la_prompt_ActiveCategories', 0, 2)", + 'In-Portal;la_prompt_PendingCategories' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS PendingCategories FROM <%prefix%>Category WHERE Status = 2', NULL, 'la_prompt_PendingCategories', 0, 2)", + 'In-Portal;la_prompt_DisabledCategories' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS DisabledCategories FROM <%prefix%>Category WHERE Status = 0', NULL, 'la_prompt_DisabledCategories', 0, 2)", + 'In-Portal;la_prompt_NewCategories' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS NewCategories FROM <%prefix%>Category WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name=\"Category_DaysNew\"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewCategories', 0, 2)", + 'In-Portal;la_prompt_CategoryEditorsPick' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) FROM <%prefix%>Category WHERE EditorsPick = 1', NULL, 'la_prompt_CategoryEditorsPick', 0, 2)", + 'In-Portal;la_prompt_NewestCategoryDate' => "(DEFAULT, 'In-Portal', 'SELECT <%m:post_format field=\"MAX(CreatedOn)\" type=\"date\"%> FROM <%prefix%>Category', NULL, 'la_prompt_NewestCategoryDate', 0, 2)", + 'In-Portal;la_prompt_LastCategoryUpdate' => "(DEFAULT, 'In-Portal', 'SELECT <%m:post_format field=\"MAX(Modified)\" type=\"date\"%> FROM <%prefix%>Category', NULL, 'la_prompt_LastCategoryUpdate', 0, 2)", + 'In-Portal;la_prompt_TopicsUsers' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS TotalUsers FROM <%prefix%>PortalUser', NULL, 'la_prompt_TopicsUsers', 0, 2)", + 'In-Portal;la_prompt_UsersActive' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ActiveUsers FROM <%prefix%>PortalUser WHERE Status = 1', NULL, 'la_prompt_UsersActive', 0, 2)", + 'In-Portal;la_prompt_UsersPending' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS PendingUsers FROM <%prefix%>PortalUser WHERE Status = 2', NULL, 'la_prompt_UsersPending', 0, 2)", + 'In-Portal;la_prompt_UsersDisabled' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS DisabledUsers FROM <%prefix%>PortalUser WHERE Status = 0', NULL, 'la_prompt_UsersDisabled', 0, 2)", + 'In-Portal;la_prompt_NewestUserDate' => "(DEFAULT, 'In-Portal', 'SELECT <%m:post_format field=\"MAX(CreatedOn)\" type=\"date\"%> FROM <%prefix%>PortalUser', NULL, 'la_prompt_NewestUserDate', 0, 2)", + 'In-Portal;la_prompt_UsersUniqueCountries' => "(DEFAULT, 'In-Portal', 'SELECT COUNT( DISTINCT LOWER( Country ) ) FROM <%prefix%>PortalUser WHERE LENGTH(Country) > 0', NULL, 'la_prompt_UsersUniqueCountries', 0, 2)", + 'In-Portal;la_prompt_UsersUniqueStates' => "(DEFAULT, 'In-Portal', 'SELECT COUNT( DISTINCT LOWER( State ) ) FROM <%prefix%>PortalUser WHERE LENGTH(State) > 0', NULL, 'la_prompt_UsersUniqueStates', 0, 2)", + 'In-Portal;la_prompt_TotalUserGroups' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS TotalUserGroups FROM <%prefix%>PortalGroup', NULL, 'la_prompt_TotalUserGroups', 0, 2)", + 'In-Portal;la_prompt_BannedUsers' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS BannedUsers FROM <%prefix%>PortalUser WHERE IsBanned = 1', NULL, 'la_prompt_BannedUsers', 0, 2)", + 'In-Portal;la_prompt_NonExpiredSessions' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS NonExipedSessions FROM <%prefix%>UserSession WHERE Status = 1', NULL, 'la_prompt_NonExpiredSessions', 0, 2)", + 'In-Portal;la_prompt_ThemeCount' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ThemeCount FROM <%prefix%>Theme', NULL, 'la_prompt_ThemeCount', 0, 2)", + 'In-Portal;la_prompt_RegionsCount' => "(DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS RegionsCount FROM <%prefix%>Language', NULL, 'la_prompt_RegionsCount', 0, 2)", + 'In-Portal;la_prompt_TablesCount' => "(DEFAULT, 'In-Portal', '<%m:sql_action sql=\"SHOW+TABLES\" action=\"COUNT\" field=\"*\"%>', NULL, 'la_prompt_TablesCount', 0, 2)", + 'In-Portal;la_prompt_RecordsCount' => "(DEFAULT, 'In-Portal', '<%m:sql_action sql=\"SHOW+TABLE+STATUS\" action=\"SUM\" field=\"Rows\"%>', NULL, 'la_prompt_RecordsCount', 0, 2)", + 'In-Portal;la_prompt_SystemFileSize' => "(DEFAULT, 'In-Portal', '<%m:custom_action sql=\"empty\" action=\"SysFileSize\"%>', NULL, 'la_prompt_SystemFileSize', 0, 2)", + 'In-Portal;la_prompt_DataSize' => "(DEFAULT, 'In-Portal', '<%m:sql_action sql=\"SHOW+TABLE+STATUS\" action=\"SUM\" format_as=\"file\" field=\"Data_length\"%>', NULL, 'la_prompt_DataSize', 0, 2)", + ), + ), + + 'StylesheetSelectors' => Array ( + 'UniqueField' => 'SelectorId', + 'Records' => Array ( + '169' => "(169, 8, 'Calendar''s selected days', '.calendar tbody .selected', 'a:0:{}', '', 1, 'font-weight: bold;\\\r\\nbackground-color: #9ED7ED;\\r\\nborder: 1px solid #83B2C5;', 0)", + '118' => "(118, 8, 'Data grid row', 'td.block-data-row', 'a:0:{}', '', 2, 'border-bottom: 1px solid #cccccc;', 48)", + '81' => "(81, 8, '\"More\" link', 'a.link-more', 'a:0:{}', '', 2, 'text-decoration: underline;', 64)", + '88' => "(88, 8, 'Block data, separated rows', 'td.block-data-grid', 'a:0:{}', '', 2, 'border: 1px solid #cccccc;', 48)", + '42' => "(42, 8, 'Block Header', 'td.block-header', 'a:4:{s:5:\"color\";s:16:\"rgb(0, 159, 240)\";s:9:\"font-size\";s:4:\"20px\";s:11:\"font-weight\";s:6:\"normal\";s:7:\"padding\";s:3:\"5px\";}', 'Block Header', 1, 'font-family: Verdana, Helvetica, sans-serif;', 0)", + '76' => "(76, 8, 'Navigation bar menu', 'tr.head-nav td', 'a:0:{}', '', 1, 'vertical-align: middle;', 0)", + '48' => "(48, 8, 'Block data', 'td.block-data', 'a:2:{s:9:\"font-size\";s:5:\"12px;\";s:7:\"padding\";s:3:\"5px\";}', '', 1, '', 0)", + '78' => "(78, 8, 'Body main style', 'body', 'a:0:{}', '', 1, 'padding: 0px; \\r\\nbackground-color: #ffffff; \\r\\nfont-family: arial, verdana, helvetica; \\r\\nfont-size: small;\\r\\nwidth: auto;\\r\\nmargin: 0px;', 0)", + '58' => "(58, 8, 'Main table', 'table.main-table', 'a:0:{}', '', 1, 'width: 770px;\\r\\nmargin: 0px;\\r\\n/*table-layout: fixed;*/', 0)", + '79' => "(79, 8, 'Block: header of data block', 'span.block-data-grid-header', 'a:0:{}', '', 1, 'font-family: Arial, Helvetica, sans-serif;\\r\\ncolor: #009DF6;\\r\\nfont-size: 12px;\\r\\nfont-weight: bold;\\r\\nbackground-color: #E6EEFF;\\r\\npadding: 6px;\\r\\nwhite-space: nowrap;', 0)", + '64' => "(64, 8, 'Link', 'a', 'a:0:{}', '', 1, '', 0)", + '46' => "(46, 8, 'Product title link', 'a.link-product1', 'a:0:{}', 'Product title link', 1, 'color: #62A1DE;\\r\\nfont-size: 14px;\\r\\nfont-weight: bold;\\r\\nline-height: 20px;\\r\\npadding-bottom: 10px;', 0)", + '75' => "(75, 8, 'Copy of Main path link', 'table.main-path td a:hover', 'a:0:{}', '', 1, 'color: #ffffff;', 0)", + '160' => "(160, 8, 'Current item in navigation bar', '.checkout-step-current', 'a:0:{}', '', 1, 'color: #A20303;\\r\\nfont-weight: bold;', 0)", + '51' => "(51, 8, 'Right block data', 'td.right-block-data', 'a:1:{s:9:\"font-size\";s:4:\"11px\";}', '', 2, 'padding: 7px;\\r\\nbackground: #e3edf6 url(\"/in-commerce4/themes/default/img/bgr_login.jpg\") repeat-y scroll left top;\\r\\nborder-bottom: 1px solid #64a1df;', 48)", + '67' => "(67, 8, 'Pagination bar: text', 'table.block-pagination td', 'a:3:{s:5:\"color\";s:7:\"#8B898B\";s:9:\"font-size\";s:4:\"12px\";s:11:\"font-weight\";s:6:\"normal\";}', '', 1, '', 0)", + '45' => "(45, 8, 'Category link', 'a.subcat', 'a:0:{}', 'Category link', 1, 'color: #2069A4', 0)", + '68' => "(68, 8, 'Pagination bar: link', 'table.block-pagination td a', 'a:3:{s:5:\"color\";s:7:\"#8B898B\";s:9:\"font-size\";s:5:\"12px;\";s:11:\"font-weight\";s:6:\"normal\";}', '', 1, '', 0)", + '69' => "(69, 8, 'Product description in product list', '.product-list-description', 'a:2:{s:5:\"color\";s:7:\"#8B898B\";s:9:\"font-size\";s:4:\"12px\";}', '', 1, '', 0)", + '73' => "(73, 8, 'Main path link', 'table.main-path td a', 'a:0:{}', '', 1, 'color: #d5e231;', 0)", + '83' => "(83, 8, 'Product title link in list (shopping cart)', 'a.link-product-cart', 'a:0:{}', 'Product title link', 1, 'color: #18559C;\\r\\nfont-size: 12px;\\r\\nfont-weight: bold;\\r\\ntext-decoration: none;\\r\\n\\r\\n', 0)", + '72' => "(72, 8, 'Main path block text', 'table.main-path td', 'a:0:{}', '', 1, 'color: #ffffff;\\r\\nfont-size: 10px;\\r\\nfont-weight: normal;\\r\\npadding: 1px;\\r\\n', 0)", + '61' => "(61, 8, 'Block: header of data table', 'td.block-data-grid-header', 'a:6:{s:4:\"font\";s:28:\"Arial, Helvetica, sans-serif\";s:5:\"color\";s:7:\"#009DF6\";s:9:\"font-size\";s:4:\"12px\";s:11:\"font-weight\";s:4:\"bold\";s:16:\"background-color\";s:7:\"#E6EEFF\";s:7:\"padding\";s:3:\"6px\";}', '', 1, 'white-space: nowrap;\\r\\npadding-left: 10px;\\r\\n/*\\r\\nbackground-image: url(/in-commerce4/themes/default/img/bullet1.gif);\\r\\nbackground-position: 10px 12px;\\r\\nbackground-repeat: no-repeat;\\r\\n*/', 0)", + '65' => "(65, 8, 'Link in product list additional row', 'td.product-list-additional a', 'a:1:{s:5:\"color\";s:7:\"#8B898B\";}', '', 2, '', 64)", + '55' => "(55, 8, 'Main table, left column', 'td.main-column-left', 'a:0:{}', '', 1, 'width:180px;\\r\\nborder: 1px solid #62A1DE;\\r\\nborder-top: 0px;', 0)", + '70' => "(70, 8, 'Product title link in list (category)', 'a.link-product-category', 'a:0:{}', 'Product title link', 1, 'color: #18559C;\\r\\nfont-size: 12px;\\r\\nfont-weight: bold;\\r\\ntext-decoration: none;\\r\\n\\r\\n', 0)", + '66' => "(66, 8, 'Pagination bar block', 'table.block-pagination', 'a:0:{}', '', 1, '', 0)", + '49' => "(49, 8, 'Bulleted list inside block', 'td.block-data ul li', 'a:0:{}', '', 1, ' list-style-image: url(/in-commerce4/themes/default/img/bullet2.gif);\\r\\n margin-bottom: 10px;\\r\\n font-size: 11px;', 0)", + '87' => "(87, 8, 'Cart item input form element', 'td.cart-item-atributes input', 'a:0:{}', '', 1, 'border: 1px solid #7BB2E6;', 0)", + '119' => "(119, 8, 'Data grid row header', 'td.block-data-row-hdr', 'a:0:{}', 'Used in order preview', 2, 'background-color: #eeeeee;\\r\\nborder-bottom: 1px solid #dddddd;\\r\\nborder-top: 1px solid #cccccc;\\r\\nfont-weight: bold;', 48)", + '82' => "(82, 8, '\"More\" link image', 'a.link-more img', 'a:0:{}', '', 2, 'text-decoration: none;\\r\\npadding-left: 5px;', 64)", + '63' => "(63, 8, 'Additional info under product description in list', 'td.product-list-additional', 'a:5:{s:5:\"color\";s:7:\"#8B898B\";s:9:\"font-size\";s:4:\"11px\";s:11:\"font-weight\";s:6:\"normal\";s:10:\"border-top\";s:18:\"1px dashed #8B898B\";s:13:\"border-bottom\";s:18:\"1px dashed #8B898B\";}', '', 2, '', 48)", + '43' => "(43, 8, 'Block', 'table.block', 'a:2:{s:16:\"background-color\";s:7:\"#E3EEF9\";s:6:\"border\";s:17:\"1px solid #64A1DF\";}', 'Block', 1, 'border: 0; \\r\\nmargin-bottom: 1px;\\r\\nwidth: 100%;', 0)", + '84' => "(84, 8, 'Cart item cell', 'td.cart-item', 'a:0:{}', '', 1, 'background-color: #F6FAFF;\\r\\nborder-left: 1px solid #ffffff;\\r\\nborder-bottom: 1px solid #ffffff;\\r\\npadding: 4px;', 0)", + '57' => "(57, 8, 'Main table, right column', 'td.main-column-right', 'a:0:{}', '', 1, 'width:220px;\\r\\nborder: 1px solid #62A1DE;\\r\\nborder-top: 0px;', 0)", + '161' => "(161, 8, 'Block for sub categories', 'td.block-data-subcats', 'a:0:{}', '', 2, ' background: #FFFFFF\\r\\nurl(/in-commerce4/themes/default/in-commerce/img/bgr_categories.jpg);\\r\\n background-repeat: no-repeat;\\r\\n background-position: top right;\\r\\nborder-bottom: 5px solid #DEEAFF;\\r\\npadding-left: 10px;', 48)", + '77' => "(77, 8, 'Left block header', 'td.left-block-header', 'a:0:{}', '', 2, 'font-family : verdana, helvetica, sans-serif;\\r\\ncolor : #ffffff;\\r\\nfont-size : 12px;\\r\\nfont-weight : bold;\\r\\ntext-decoration : none;\\r\\nbackground-color: #64a1df;\\r\\npadding: 5px;\\r\\npadding-left: 7px;', 42)", + '80' => "(80, 8, 'Right block data - text', 'td.right-block-data td', 'a:1:{s:9:\"font-size\";s:5:\"11px;\";}', '', 2, '', 48)", + '53' => "(53, 8, 'Right block header', 'td.right-block-header', 'a:0:{}', '', 2, 'font-family : verdana, helvetica, sans-serif;\\r\\ncolor : #ffffff;\\r\\nfont-size : 12px;\\r\\nfont-weight : bold;\\r\\ntext-decoration : none;\\r\\nbackground-color: #64a1df;\\r\\npadding: 5px;\\r\\npadding-left: 7px;', 42)", + '85' => "(85, 8, 'Cart item cell with attributes', 'td.cart-item-attributes', 'a:0:{}', '', 1, 'background-color: #E6EEFF;\\r\\nborder-left: 1px solid #ffffff;\\r\\nborder-bottom: 1px solid #ffffff;\\r\\npadding: 4px;\\r\\ntext-align: center;\\r\\nvertical-align: middle;\\r\\nfont-size: 12px;\\r\\nfont-weight: normal;', 0)", + '86' => "(86, 8, 'Cart item cell with name', 'td.cart-item-name', 'a:0:{}', '', 1, 'background-color: #F6FAFF;\\r\\nborder-left: 1px solid #ffffff;\\r\\nborder-bottom: 1px solid #ffffff;\\r\\npadding: 3px;', 0)", + '47' => "(47, 8, 'Block content of featured product', 'td.featured-block-data', 'a:0:{}', '', 1, 'font-family: Arial,Helvetica,sans-serif;\\r\\nfont-size: 12px;', 0)", + '56' => "(56, 8, 'Main table, middle column', 'td.main-column-center', 'a:0:{}', '', 1, '\\r\\n', 0)", + '50' => "(50, 8, 'Product title link in list', 'a.link-product2', 'a:0:{}', 'Product title link', 1, 'color: #62A1DE;\\r\\nfont-size: 12px;\\r\\nfont-weight: bold;\\r\\ntext-decoration: none;\\r\\n\\r\\n', 0)", + '71' => "(71, 8, 'Main path block', 'table.main-path', 'a:0:{}', '', 1, 'background: #61b0ec url(\"/in-commerce4/themes/default/img/bgr_path.jpg\") repeat-y scroll left top;\\r\\nwidth: 100%;\\r\\nmargin-bottom: 1px;\\r\\nmargin-right: 1px; \\r\\nmargin-left: 1px;', 0)", + '62' => "(62, 8, 'Block: columns header for data table', 'table.block-no-border th', 'a:6:{s:4:\"font\";s:28:\"Arial, Helvetica, sans-serif\";s:5:\"color\";s:7:\"#18559C\";s:9:\"font-size\";s:4:\"11px\";s:11:\"font-weight\";s:4:\"bold\";s:16:\"background-color\";s:7:\"#B4D2EE\";s:7:\"padding\";s:3:\"6px\";}', '', 1, 'text-align: left;', 0)", + '59' => "(59, 8, 'Block without border', 'table.block-no-border', 'a:0:{}', '', 1, 'border: 0px; \\r\\nmargin-bottom: 10px;\\r\\nwidth: 100%;', 0)", + '74' => "(74, 8, 'Main path language selector cell', 'td.main-path-language', 'a:0:{}', '', 1, 'vertical-align: middle;\\r\\ntext-align: right;\\r\\npadding-right: 6px;', 0)", + '171' => "(171, 8, 'Calendar''s highlighted day', '.calendar tbody .hilite', 'a:0:{}', '', 1, 'background-color: #f6f6f6;\\r\\nborder: 1px solid #83B2C5 !important;', 0)", + '175' => "(175, 8, 'Calendar''s days', '.calendar tbody .day', 'a:0:{}', '', 1, 'text-align: right;\\r\\npadding: 2px 4px 2px 2px;\\r\\nwidth: 2em;\\r\\nborder: 1px solid #fefefe;', 0)", + '170' => "(170, 8, 'Calendar''s weekends', '.calendar .weekend', 'a:0:{}', '', 1, 'color: #990000;', 0)", + '173' => "(173, 8, 'Calendar''s control buttons', '.calendar .calendar_button', 'a:0:{}', '', 1, 'color: black;\\r\\nfont-size: 12px;\\r\\nbackground-color: #eeeeee;', 0)", + '174' => "(174, 8, 'Calendar''s day names', '.calendar thead .name', 'a:0:{}', '', 1, 'background-color: #DEEEF6;\\r\\nborder-bottom: 1px solid #000000;', 0)", + '172' => "(172, 8, 'Calendar''s top and bottom titles', '.calendar .title', 'a:0:{}', '', 1, 'color: #FFFFFF;\\r\\nbackground-color: #62A1DE;\\r\\nborder: 1px solid #107DC5;\\r\\nborder-top: 0px;\\r\\npadding: 1px;', 0)", + '60' => "(60, 8, 'Block header for featured product', 'td.featured-block-header', 'a:0:{}', '', 2, '\\r\\n', 42)", + '54' => "(54, 8, 'Right block', 'table.right-block', 'a:0:{}', '', 2, 'background-color: #E3EEF9;\\r\\nborder: 0px;\\r\\nwidth: 100%;', 43)", + '44' => "(44, 8, 'Block content', 'td.block-data-big', 'a:0:{}', 'Block content', 1, ' background: #DEEEF6\\r\\nurl(/in-commerce4/themes/default/img/menu_bg.gif);\\r\\n background-repeat: no-repeat;\\r\\n background-position: top right;\\r\\n', 0)", + ), + ), + + 'Stylesheets' => Array ( + 'UniqueField' => 'StylesheetId', + 'Records' => Array ( + '8' => "(8, 'Default', 'In-Portal Default Theme', '', 1124952555, 1)", + ), + ), + + 'Counters' => Array ( + 'UniqueField' => 'Name', + 'Records' => Array ( + 'members_count' => "(DEFAULT, 'members_count', 'SELECT COUNT(*) FROM <%PREFIX%>PortalUser WHERE Status = 1', NULL , NULL , '3600', '0', '|PortalUser|')", + 'members_online' => "(DEFAULT, 'members_online', 'SELECT COUNT(*) FROM <%PREFIX%>UserSession WHERE PortalUserId > 0', NULL , NULL , '3600', '0', '|UserSession|')", + 'guests_online' => "(DEFAULT, 'guests_online', 'SELECT COUNT(*) FROM <%PREFIX%>UserSession WHERE PortalUserId <= 0', NULL , NULL , '3600', '0', '|UserSession|')", + 'users_online' => "(DEFAULT, 'users_online', 'SELECT COUNT(*) FROM <%PREFIX%>UserSession', NULL , NULL , '3600', '0', '|UserSession|')", + ), + ), + ); + + // check & insert if not found defined before data + foreach ($data as $table_name => $table_info) { + $unique_fields = explode(';', $table_info['UniqueField']); + foreach ($table_info['Records'] as $unique_value => $insert_sql) { + $unique_values = explode(';', $unique_value); + + $where_clause = Array (); + foreach ($unique_fields as $field_index => $unique_field) { + $where_clause[] = $unique_field . ' = ' . $this->Conn->qstr($unique_values[$field_index]); + } + + $sql = 'SELECT ' . implode(', ', $unique_fields) . ' + FROM ' . TABLE_PREFIX . $table_name . ' WHERE (' . implode(') AND (', $where_clause) . ')'; - $this->Conn->Query($sql); + $found = $this->Conn->GetRow($sql); + if ($found) { + $found = implode(';', $found); + } + + if ($found != $unique_value) { + $this->Conn->Query('INSERT INTO ' . TABLE_PREFIX . $table_name . ' VALUES ' . $insert_sql); + } } + } + } + /** + * Removes duplicate phrases per language basis (created during proj-base and in-portal shared installation) + * + */ + function _removeDuplicatePhrases() + { + $id_field = $this->Application->getUnitOption('phrases', 'IDField'); + $table_name = $this->Application->getUnitOption('phrases', 'TableName'); + + $sql = 'SELECT LanguageId, Phrase, MIN(LastChanged) AS LastChanged, COUNT(*) AS DupeCount + FROM ' . $table_name . ' + GROUP BY LanguageId, Phrase + HAVING COUNT(*) > 1'; + $duplicate_phrases = $this->Conn->Query($sql); + + foreach ($duplicate_phrases as $phrase_record) { + // 1. keep phrase, that was added first, because it is selected in PhrasesCache::LoadPhraseByLabel + $where_clause = Array ( + 'LanguageId = ' . $phrase_record['LanguageId'], + 'Phrase = ' . $this->Conn->qstr($phrase_record['Phrase']), + 'LastChanged' . ' = ' . $phrase_record['LastChanged'], + ); + + $sql = 'SELECT ' . $id_field . ' + FROM ' . $table_name . ' + WHERE (' . implode(') AND (', $where_clause) . ')'; + $phrase_id = $this->Conn->GetOne($sql); + + // 2. delete all other duplicates + $where_clause = Array ( + 'LanguageId = ' . $phrase_record['LanguageId'], + 'Phrase = ' . $this->Conn->qstr($phrase_record['Phrase']), + $id_field . ' <> ' . $phrase_id, + ); + + $sql = 'DELETE FROM ' . $table_name . ' + WHERE (' . implode(') AND (', $where_clause) . ')'; + $this->Conn->Query($sql); } } - } + function _moveDatabaseFolders() + { + // Tables: PageContent, Images + if ($this->Conn->TableFound('PageContent')) { + // 1. replaces "/kernel/user_files/" references in content blocks + $ml_helper =& $this->Application->recallObject('kMultiLanguageHelper'); + /* @var $ml_helper kMultiLanguageHelper */ -?> \ No newline at end of file + $language_count = $ml_helper->getLanguageCount(); + $replace_sql = '%1$s = REPLACE(%1$s, "/kernel/user_files/", "/system/user_files/")'; + + $update_sqls = Array (); + for ($i = 1; $i <= $language_count; $i++) { + if (!$ml_helper->LanguageFound($i)) { + continue; + } + + $field = 'l' . $i . '_Content'; + $update_sqls[] = sprintf($replace_sql, $field); + } + + if ($update_sqls) { + $sql = 'UPDATE ' . TABLE_PREFIX . 'PageContent + SET ' . implode(', ', $update_sqls); + $this->Conn->Query($sql); + } + } + + // 2. replace path of images uploaded via "Images" tab of category items + $this->_replaceImageFolder('/kernel/images/', '/system/images/'); + + // 3. replace path of images uploaded via "Images" tab of category items (when badly formatted) + $this->_replaceImageFolder('kernel/images/', 'system/images/'); + + // 4. replace images uploaded via "In-Bulletin -> Emoticons" section + $this->_replaceImageFolder('in-bulletin/images/emoticons/', 'system/images/emoticons/'); + + // 5. update backup path in config + $this->_toolkit->saveConfigValues( + Array ( + 'Backup_Path' => FULL_PATH . '/system/backupdata' + ) + ); + } + + /** + * Replaces mentions of "/kernel/images" folder in Images table + * + * @param string $from + * @param string $to + */ + function _replaceImageFolder($from, $to) + { + $replace_sql = '%1$s = REPLACE(%1$s, "' . $from . '", "' . $to . '")'; + $sql = 'UPDATE ' . TABLE_PREFIX . 'Images + SET ' . sprintf($replace_sql, 'ThumbPath') . ', ' . sprintf($replace_sql, 'LocalPath'); + $this->Conn->Query($sql); + } + + } \ No newline at end of file Index: branches/RC/core/install.php =================================================================== diff -u -N -r11074 -r11121 --- branches/RC/core/install.php (.../install.php) (revision 11074) +++ branches/RC/core/install.php (.../install.php) (revision 11121) @@ -450,9 +450,9 @@ // check interface modules $available_modules = $selected_modules = Array (); - $interface_modules = Array ('In-Portal', 'Proj-Base'); + $interface_modules = Array ('Core', 'Proj-Base'); foreach ($interface_modules as $interface_module) { - $module_folder = strtolower($interface_module == 'In-Portal' ? 'kernel' : $interface_module); + $module_folder = strtolower($interface_module); if (file_exists(MODULES_PATH . '/' . $module_folder)) { array_push($available_modules, $interface_module); @@ -461,7 +461,7 @@ $module_selected[$interface_module] = in_array($module_folder, $modules); } - if (!$module_selected['In-Portal'] && !$module_selected['Proj-Base']) { + if (!$module_selected['Core'] && !$module_selected['Proj-Base']) { $this->errorMessage = 'Please ' . ($modules ? 'also ' : '') . 'select "' . implode('" or "', $available_modules) . '" as interface module'; }