WebGUI
      Click here to register.
      
YAPC North America 2008


     Report a Bug > WebGUI Bug Tracker

thread next/prev url

User xdanger
Date 5/10/2007 9:04 am
Severity Minor (annoying, but not harmful)
Version WebGUI
Views 212
Rating 1    Rate [
|
]
Karma Rank 0.000000
Previous · Next
User Message
xdanger

why
    $var->{"previous.url"} = $self->getUrl("func=previousThread") if (defined $previous);
why not
    $var->{"previous.url"} = $previous->getUrl() if (defined $previous);
in Thread.pm?

at some point someone removed "my $previous = $self->getPreviousThread;" in favor of the $self->getUrl("func=previousThread"), but now that It's back, why use that "ugly" and not the direct  url to the next/prev Thread...

this:
https://svn.webgui.org/svnweb/plainblack/diff/WebGUI/lib/WebGUI/Asset/Post/Thread.pm?rev1=1330;rev2=1331 is reversed by this:
https://svn.webgui.org/svnweb/plainblack/diff/WebGUI/lib/WebGUI/Asset/Post/Thread.pm?rev1=4031;rev2=4032



Back to Top
Rate [
|
]
 
 
yhkhoe

I didn't use the direct url because I don't really see what's ugly about using func=previousThread. Even if it was ugly i don't think that this can be considered a bug.

Yung 



Back to Top
Rate [
|
]
 
 
colink

From an OO standpoint, it breaks encapsulation.  But that happens so frequently in wG that it would be hypocritical to call it a bug.

So maybe we need a different category for code improvements? 



Back to Top
Rate [
|
]
 
 
colink
Yung is right.  The more I've looked at it, the more I see that it's functional.  xdanger's suggestion would prevent instanciating the Thread Asset for next and previous twice.  But what's there works now.


Back to Top
Rate [
|
]
 
 
DBell

I'm of the opinion that it's such a small change that it might be better to just do it.

One side effect of this bug is inaccurate information from macros (using the ^PageTitle(); macro, for example).



Back to Top
Rate [
|
]
 
 
colink
Fixed in 7.3.18


Back to Top
Rate [
|
]