Page 1 of 1

%username% is NOT included in authorURL

Posted: Fri Mar 30, 2007 8:28 pm
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

Re: %username% is NOT included in authorURL

Posted: Sat Mar 31, 2007 2:59 pm
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

Re: %username% is NOT included in authorURL

Posted: Sat Mar 31, 2007 5:05 pm
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.

Re: %username% is NOT included in authorURL

Posted: Sun Apr 01, 2007 1:17 pm
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

Re: %username% is NOT included in authorURL

Posted: Sun Apr 01, 2007 4:34 pm
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.