Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: devel

view diff

 

 

Bricolage devel RSS feed   Index | Next | Previous | View Threaded


kjallad at dpsource

Jan 12, 2009, 12:44 PM

Post #1 of 2 (984 views)
Permalink
view diff

Hello all,



When trying to "View Diff" on templates in 1.11 I was getting:

[Mon Jan 12 19:29:11 2009] [error] [client 192.168.1.101] Invalid
property 'Limit'.,

[/bricolage/lib/Bric/Util/Event.pm:1482]

[/bricolage/lib/Bric/Util/Event.pm:391]

...

The small attached patch seems to have fixed it.



I was also getting SQL errors from line 318 of Event.pm, trying to save
an event with a null obj_id, this was while I was messing around with
the conversion from 1.10 so I might have had bad data in the DB or
something - if I can re-create and verify the problem I'll post
something.



Regards,

Kahil
Attachments: patch2.txt (0.56 KB)


david at kineticode

Jan 12, 2009, 12:50 PM

Post #2 of 2 (885 views)
Permalink
Re: view diff [In reply to]

On Jan 12, 2009, at 12:44 PM, Kahil Jallad wrote:

> Hello all,
>
> When trying to “View Diff” on templates in 1.11 I was getting:
> [Mon Jan 12 19:29:11 2009] [error] [client 192.168.1.101] Invalid
> property 'Limit'.,
> [/bricolage/lib/Bric/Util/Event.pm:1482]
> [/bricolage/lib/Bric/Util/Event.pm:391]
> …
> The small attached patch seems to have fixed it.


God. Dunno who wrote that, but it's awful. This patch is better.

Index: Event.pm
===================================================================
--- Event.pm (revision 8399)
+++ Event.pm (working copy)
@@ -1406,16 +1406,14 @@
$order_by .= ' ' . delete $params->{OrderDirection}
if $params->{OrderDirection};
}
- my $limit = LIMIT_DEFAULT if (exists $params->{Offset});
- $limit = (exists $params->{Limit})
- ? delete $params->{Limit}
- : '' if !$limit;
- ;
- $limit = 'LIMIT ' . $limit if $limit ne '';
- my $offset = exists $params->{Offset}
+
+ my $limit = exists $params->{Limit} ? 'LIMIT ' . delete $params-
>{Limit}
+ : exists $params->{Offset} ? 'LIMIT ' . LIMIT_DEFAULT
+ : '';
+
+ my $offset = exists $params->{Offset}
? 'OFFSET ' . delete $params->{Offset}
- : ''
- ;
+ : '';

while (my ($k, $v) = each %$params) {
if ($k eq 'timestamp') {

> I was also getting SQL errors from line 318 of Event.pm, trying to
> save an event with a null obj_id, this was while I was messing
> around with the conversion from 1.10 so I might have had bad data in
> the DB or something – if I can re-create and verify the problem I’ll
> post something.

Yes, please do.

Best,

David

Bricolage devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.