Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly setting the layout to FALSE in case of no view layout set #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions kernel/content/versionview.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@
array( 'remote_id', $contentObject->attribute( 'remote_id' ) ),
array( 'class', $class->attribute( 'id' ) ), // Class ID
array( 'class_identifier', $class->attribute( 'identifier' ) ), // Class identifier
array( 'viewmode', 'full' ) ); // View mode
array( 'viewmode', 'full' ),
array( 'layout', false )
); // View mode

if ( $assignment )
{
Expand All @@ -273,7 +275,6 @@
$designKeys[] = array( 'depth', $parentNodeObject->attribute( 'depth' ) + 1 );
}


$res->setKeys( $designKeys );

unset( $contentObject );
Expand Down
4 changes: 3 additions & 1 deletion kernel/content/versionviewframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,9 @@
array( 'url_alias', $node->attribute( 'url_alias' ) ),
array( 'class_group', $contentObject->attribute( 'match_ingroup_id_list' ) ),
array( 'state', $contentObject->attribute( 'state_id_array' ) ),
array( 'state_identifier', $contentObject->attribute( 'state_identifier_array' ) ) );
array( 'state_identifier', $contentObject->attribute( 'state_identifier_array' ) ),
array( 'layout', false )
);

$parentNode = $node->attribute( 'parent' );
if ( is_object( $parentNode ) )
Expand Down
7 changes: 7 additions & 0 deletions kernel/content/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,19 @@
if ( isset( $Params['AttributeValidation'] ) )
$validation = $Params['AttributeValidation'];

// Get layout for the cache key
$res = eZTemplateDesignResource::instance();
$keys = $res->keys();
if ( isset( $keys['layout'] ) )
{
$layout = $keys['layout'];
}
else
{
$layout = false;
}
// Making sure we have the layout design key even if it's 'false'
$res->setKeys( array( array( 'layout', $layout ) ) );

$viewParameters = array(
'offset' => $Offset,
Expand Down