fixed #9596: Articles now use a semi-unique pagination variable based on asset id
also restored the 'synopsis = first page' feature in Asset::Post::getSynopsisAndContent
This commit is contained in:
parent
70b0c262f5
commit
e3e24b37b0
3 changed files with 18 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
7.6.11
|
||||
- fixed #9596: Articles now use a semi-unique pagination variable based on asset id
|
||||
- fixed: Syndicated Content asset doesn't work with feeds that specify their encodings via HTTP headers
|
||||
- fixed #9375: Syndicated Content asset improperly decodes wide XML entities
|
||||
- fixed #9592: DataForm deleteAttachedFiles method can crash
|
||||
|
|
|
|||
|
|
@ -550,6 +550,8 @@ sub getSynopsisAndContent {
|
|||
my $body = shift;
|
||||
unless ($synopsis) {
|
||||
my @content;
|
||||
if( $body =~ /\^\-\;/ ) {
|
||||
@content = split(/\^\-\;/, $body ,2);
|
||||
if( $body =~ /<p>/ ) {
|
||||
@content = WebGUI::HTML::splitTag($body);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ sub view {
|
|||
$var{"description.first.2sentences"} =~ s/^((.*?\.){2}).*/$1/s;
|
||||
$var{"description.first.sentence"} = $var{"description.first.2sentences"};
|
||||
$var{"description.first.sentence"} =~ s/^(.*?\.).*/$1/s;
|
||||
my $p = WebGUI::Paginator->new($self->session,$self->getUrl,1);
|
||||
my $p = WebGUI::Paginator->new($self->session,$self->getUrl,1,$self->paginateVar);
|
||||
if ($self->session->form->process("makePrintable") || $var{description} eq "") {
|
||||
$var{description} =~ s/\^\-\;//g;
|
||||
$p->setDataByArrayRef([$var{description}]);
|
||||
|
|
@ -351,6 +351,20 @@ sub view {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 paginateVar ( )
|
||||
|
||||
create a semi-unique variable for pagination based on the Asset Id
|
||||
|
||||
=cut
|
||||
|
||||
sub paginateVar {
|
||||
my $self = shift;
|
||||
my $id = $self->getId();
|
||||
return 'pn' . substr($id,0,2) . substr($id,-2,2) ;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_deleteFile ( )
|
||||
|
||||
Deletes and attached file.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue