%username% is NOT included in authorURL

Found a bug? Tell us!!
Post Reply
cress_cc
Posts: 3
Joined: Thu Mar 29, 2007 7:10 pm
Location: Chiba, JAPAN

%username% is NOT included in authorURL

Post by cress_cc »

Hello, ALL.
# Excuse my poor English. :?
I've used version 1.1.2 since the day before yesterday.
My format of author permanent link is "authors/%id%-%username%".
And its behavior is different each page.
  • /archives/* -> 1-unknown
  • (other pages) -> 1-cress (My username is "cress")
The function called by /archives and the others seems to be different.
So, I corrected include/functions_entries.inc.php as follows.

Code: Select all

*** functions_entries.inc.php.orig      Fri Mar  2 04:55:51 2007
--- functions_entries.inc.php   Sat Mar 31 02:37:06 2007
***************
*** 502,507 ****
--- 502,502 ----
                              e.moderate_comments,

                              a.realname AS author,
+                             a.username AS loginname,
                              a.email
                        FROM
                              {$serendipity['dbPrefix']}entries e
Thanks. :D
/* Cress */
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: %username% is NOT included in authorURL

Post by garvinhicking »

Hi!

Thanks a lot for reporting this! Your fix looks reasonable, I will commit this change next week, I'm not at my proper computer riught now :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
cress_cc
Posts: 3
Joined: Thu Mar 29, 2007 7:10 pm
Location: Chiba, JAPAN

Re: %username% is NOT included in authorURL

Post by cress_cc »

Hello. Thank you for applying my patch. :D
I think there is more fundamental problem. There are two similar functions, fetchEntry() and fetchEntries(). And they are independent for each other.
I think it's good if fetchEntry() calls fetchEntries() internally. I'm going to try it. :roll:
# Should I go to the development forum ???
Thanks.
/* Cress */
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: %username% is NOT included in authorURL

Post by garvinhicking »

Hi!

(BTW, I committed your patch today!)
I think there is more fundamental problem. There are two similar functions, fetchEntry() and fetchEntries(). And they are independent for each other.
I think it's good if fetchEntry() calls fetchEntries() internally. I'm going to try it. :roll:
Actually, having those 2 seperate functions is not so bad. Both functions perform different things because in the entry overview much more data has to be fetched and ordered than in a single entry. We prefer to have two functions to make debugging a bit easier - if we put it all into one single function, it would be a larger one.

Do you have any advantages in mind that merging the two functions would have?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
cress_cc
Posts: 3
Joined: Thu Mar 29, 2007 7:10 pm
Location: Chiba, JAPAN

Re: %username% is NOT included in authorURL

Post by cress_cc »

Hello.
garvinhicking wrote: (BTW, I committed your patch today!)
Thanks.
garvinhicking wrote: Do you have any advantages in mind that merging the two functions would have?
If two functions are achieved by one, it becomes easy to maintain.
I often do it, when I make a business application program. (Because it requires extendibility. :) )
At present it seems to be no problem...

Thanks.
/* Cress */
Post Reply