get_url()
s2
so, the question is, should people know better and update their code or should
Perlfunction builtin get_url(string user, string view) : string "Returns a URL to the specified view for the specified user. Views use the same names as elsewhere. (recent, friends, archive, month, userinfo)"; function builtin get_url(UserLite user, string view) : string "Returns a URL to the specified view for the specified user. Views use the same names as elsewhere. (recent, friends, archive, month, userinfo)";
sub get_url
{
my ($ctx, $obj, $view) = @_;
my $user;
[...]
my $u = LJ::load_user($user);
[...]
my $base = $u->journal_base;
return "$base/$view";
}views are in fact not using the all of the same names as LiveJournal. so, it blindly returns whatever string is given. layouts originating on LJ and being ported over to DW can potentially have old code like get_url($e.journal, "friends") and still get http://kunzite.dreamwidth.org/friends which results in a 404 here.so, the question is, should people know better and update their code or should
get_url() have a clause that $view = "read" if $view eq "friends";?
no subject
no subject
no subject
They already have to, anyway, if they're checking the view (i.e., $.view == "read", not $.view == "friends").
no subject
no subject
no subject
no subject