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
|
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: 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 #9375: Syndicated Content asset improperly decodes wide XML entities
|
||||||
- fixed #9592: DataForm deleteAttachedFiles method can crash
|
- fixed #9592: DataForm deleteAttachedFiles method can crash
|
||||||
|
|
|
||||||
|
|
@ -550,6 +550,8 @@ sub getSynopsisAndContent {
|
||||||
my $body = shift;
|
my $body = shift;
|
||||||
unless ($synopsis) {
|
unless ($synopsis) {
|
||||||
my @content;
|
my @content;
|
||||||
|
if( $body =~ /\^\-\;/ ) {
|
||||||
|
@content = split(/\^\-\;/, $body ,2);
|
||||||
if( $body =~ /<p>/ ) {
|
if( $body =~ /<p>/ ) {
|
||||||
@content = WebGUI::HTML::splitTag($body);
|
@content = WebGUI::HTML::splitTag($body);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -332,7 +332,7 @@ sub view {
|
||||||
$var{"description.first.2sentences"} =~ s/^((.*?\.){2}).*/$1/s;
|
$var{"description.first.2sentences"} =~ s/^((.*?\.){2}).*/$1/s;
|
||||||
$var{"description.first.sentence"} = $var{"description.first.2sentences"};
|
$var{"description.first.sentence"} = $var{"description.first.2sentences"};
|
||||||
$var{"description.first.sentence"} =~ s/^(.*?\.).*/$1/s;
|
$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 "") {
|
if ($self->session->form->process("makePrintable") || $var{description} eq "") {
|
||||||
$var{description} =~ s/\^\-\;//g;
|
$var{description} =~ s/\^\-\;//g;
|
||||||
$p->setDataByArrayRef([$var{description}]);
|
$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 ( )
|
=head2 www_deleteFile ( )
|
||||||
|
|
||||||
Deletes and attached file.
|
Deletes and attached file.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue