Index: trunk/core/install/install_schema.sql =================================================================== diff -u -N -r6707 -r6729 --- trunk/core/install/install_schema.sql (.../install_schema.sql) (revision 6707) +++ trunk/core/install/install_schema.sql (.../install_schema.sql) (revision 6729) @@ -270,3 +270,90 @@ DestAbbr2 char(2) default '', PRIMARY KEY (DestId) ); + +CREATE TABLE Category ( + CategoryId int(11) NOT NULL auto_increment, + `Type` int(11) NOT NULL default '0', + ParentId int(11) NOT NULL default '0', + Name varchar(255) NOT NULL default '', + l1_Name varchar(255) NOT NULL default '', + l2_Name varchar(255) NOT NULL default '', + l3_Name varchar(255) NOT NULL default '', + l4_Name varchar(255) NOT NULL default '', + l5_Name varchar(255) NOT NULL default '', + Filename varchar(255) NOT NULL default '', + AutomaticFilename tinyint(3) unsigned NOT NULL default '1', + Description text NOT NULL, + l1_Description text NOT NULL, + l2_Description text NOT NULL, + l3_Description text NOT NULL, + l4_Description text NOT NULL, + l5_Description text NOT NULL, + CreatedOn int(11) NOT NULL default '0', + EditorsPick tinyint(4) NOT NULL default '0', + `Status` tinyint(4) NOT NULL default '0', + Pop tinyint(4) default NULL, + Priority int(11) NOT NULL default '0', + MetaKeywords varchar(255) default NULL, + CachedDescendantCatsQty int(11) default NULL, + CachedNavbar text NOT NULL, + l1_CachedNavbar text NOT NULL, + l2_CachedNavbar text NOT NULL, + l3_CachedNavbar text NOT NULL, + l4_CachedNavbar text NOT NULL, + l5_CachedNavbar text NOT NULL, + CreatedById int(11) NOT NULL default '0', + ResourceId int(11) default NULL, + ParentPath text NOT NULL, + NamedParentPath text NOT NULL, + MetaDescription varchar(255) default NULL, + HotItem int(11) NOT NULL default '2', + NewItem int(11) NOT NULL default '2', + PopItem int(11) NOT NULL default '2', + Modified int(11) NOT NULL default '0', + ModifiedById int(11) NOT NULL default '0', + CategoryTemplate varchar(255) NOT NULL default '', + CachedCategoryTemplate varchar(255) NOT NULL default '', + PRIMARY KEY (CategoryId), + UNIQUE KEY ResourceId (ResourceId), + KEY ParentId (ParentId), + KEY Modified (Modified), + KEY Priority (Priority), + KEY sorting (Name,Priority), + KEY Filename (Filename(5)), + KEY l1_Name (l1_Name(5)), + KEY l2_Name (l2_Name(5)), + KEY l3_Name (l3_Name(5)), + KEY l4_Name (l4_Name(5)), + KEY l5_Name (l5_Name(5)), + KEY l1_Description (l1_Description(5)), + KEY l2_Description (l2_Description(5)), + KEY l3_Description (l3_Description(5)), + KEY l4_Description (l4_Description(5)), + KEY l5_Description (l5_Description(5)) +); + +CREATE TABLE CategoryItems ( + `CategoryId` int(11) NOT NULL default '0', + `ItemResourceId` int(11) NOT NULL default '0', + `PrimaryCat` tinyint(4) NOT NULL default '0', + `ItemPrefix` varchar(50) NOT NULL default '', + `Filename` varchar(255) NOT NULL default '', + UNIQUE KEY `CategoryId` (`CategoryId`,`ItemResourceId`), + KEY `PrimaryCat` (`PrimaryCat`), + KEY `ItemPrefix` (`ItemPrefix`), + KEY `Filename` (`Filename`(4)) +); + +CREATE TABLE PermCache ( + PermCacheId int(11) NOT NULL auto_increment, + CategoryId int(11) NOT NULL default '0', + PermId int(11) NOT NULL default '0', + ACL varchar(255) NOT NULL default '', + DACL varchar(255) NOT NULL default '', + PRIMARY KEY (PermCacheId), + KEY CategoryId (CategoryId), + KEY PermId (PermId) +); + + Index: trunk/core/units/general/cat_tag_processor.php =================================================================== diff -u -N -r6583 -r6729 --- trunk/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 6583) +++ trunk/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 6729) @@ -26,11 +26,12 @@ if (!$status_fields) return $icons['default']; $value = $object->GetDBField($status_fields[0]); // sets base status icon + /* @var $object kDBItem */ if ($value == STATUS_ACTIVE) { - if( $object->GetDBField('IsPop') ) $value = 'POP'; - if( $object->GetDBField('IsHot') ) $value = 'HOT'; - if( $object->GetDBField('IsNew') ) $value = 'NEW'; - if( $object->GetDBField('EditorsPick') ) $value = 'PICK'; + if( $object->HasField('IsPop') && $object->GetDBField('IsPop') ) $value = 'POP'; + if( $object->HasField('IsHot') && $object->GetDBField('IsHot') ) $value = 'HOT'; + if( $object->HasField('IsNew') && $object->GetDBField('IsNew') ) $value = 'NEW'; + if( $object->HasField('EditorsPick') && $object->GetDBField('EditorsPick') ) $value = 'PICK'; } return isset($icons[$value]) ? $icons[$value] : $icons['default']; Index: trunk/core/install/install_data.sql =================================================================== diff -u -N -r6707 -r6729 --- trunk/core/install/install_data.sql (.../install_data.sql) (revision 6707) +++ trunk/core/install/install_data.sql (.../install_data.sql) (revision 6729) @@ -546,4 +546,6 @@ INSERT INTO StdDestinations VALUES (309, 2, 225, 'la_state_AR', 'AR', NULL); INSERT INTO StdDestinations VALUES (308, 2, 225, 'la_state_AZ', 'AZ', NULL); INSERT INTO StdDestinations VALUES (307, 2, 225, 'la_state_AK', 'AK', NULL); -INSERT INTO StdDestinations VALUES (306, 2, 225, 'la_state_AL', 'AL', NULL); \ No newline at end of file +INSERT INTO StdDestinations VALUES (306, 2, 225, 'la_state_AL', 'AL', NULL); + +INSERT INTO PermCache (CategoryId, PermId, ACL) VALUES (0, 1, '11,12,13,14,15');