Index: branches/5.2.x/core/units/content/content_config.php =================================================================== diff -u -N -r14585 -r14856 --- branches/5.2.x/core/units/content/content_config.php (.../content_config.php) (revision 14585) +++ branches/5.2.x/core/units/content/content_config.php (.../content_config.php) (revision 14856) @@ -1,6 +1,6 @@ 'PageContentId', - 'ParentTableKey' => 'CategoryId', // linked field in master table - 'ForeignKey' => 'PageId', // linked field in subtable + 'ParentTableKey' => Array ('c' => 'CategoryId', 'st' => 'CategoryId', 'page-revision' => 'RevisionId'), // linked field in master table + 'ForeignKey' => Array ('c' => 'PageId', 'st' => 'PageId', 'page-revision' => 'RevisionId'), // linked field in subtable 'ParentPrefix' => 'c', 'AutoDelete' => true, 'AutoClone' => true, @@ -48,17 +48,22 @@ 'TableName' => TABLE_PREFIX . 'PageContent', - 'ListSQLs' => Array ('' => 'SELECT * FROM %s'), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + JOIN ' . TABLE_PREFIX . '%3$sPageRevisions pr ON pr.PageId = %1$s.PageId AND pr.RevisionId = %1$s.RevisionId' + ), 'ListSortings' => Array ( '' => Array ( - 'Sorting' => Array ('ContentNum' => 'asc'), + 'Sorting' => Array ('ContentNum' => 'asc', 'RevisionNumber' => 'desc'), ) ), 'Fields' => Array ( 'PageContentId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'ContentNum' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'PageId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'RevisionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'Content' => Array ( 'type' => 'string', 'min_len' => 0, 'max_len' => 65536, 'formatter' => 'kMultiLanguage', 'using_fck' => 1,