Opened 16 years ago
Closed 16 years ago
#1319 closed defect (bug) (fixed)
get_topic_author, get_post_author: anonymous handling
| Reported by: | mr_pelle | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 1.1 |
| Component: | Back-end | Version: | 1.1-alpha |
| Severity: | normal | Keywords: | has-patch tested |
| Cc: | gautam.2011@… |
Description
How to replicate:
Do an anonymous post in an existing topic.
Delete a topic (not the one just created) by a registered user.
Result
In Recently Moderated Items you'll end up having:
"Post on Topic 1 Name by Anomymous User (name linked to /profile)
Topic titled Topic 2 Name started by Anomymous User (name linked correctly to author's profile)
Also
"Topic 2" metadata says started by Anomymous.
If you then delete another topic by a different registered user, it appears in Recently Moderated Items and in bb-admin/topic.php as started by Anonymous (name linked correctly)
get_user_display_name( $topic->topic_poster ) works perfectly for registered users, but returns an empty string in case of anonymous ones.
Gautam thoughts here.
I've tried a couple of ideas, but no results...
Attachments (2)
Change History (10)
#2
@
16 years ago
- Keywords has-patch removed
I've tried other options and I can confirm that bb_get_first_post() plays a central role.
Also, in bb-admin/topics.php, topic poster is retrieved in an unconsistent way: line 220-221 via $topic->topic_poster while line 222 via topic_author() BUT at line 205 we've already fetched topic's first post, whom infos could be used instead! =P
#3
follow-up:
↓ 4
@
16 years ago
I've found a working patch, but it's a bit rough.. I'll upload it in a moment.
#4
in reply to: ↑ 3
@
16 years ago
- Keywords has-patch tested added
Replying to mr_pelle:
I've found a working patch, but it's a bit rough.. I'll upload it in a moment.
What I do not like about it are:
1) get_topic() @line 130: is there another way to retrieve it?
2) var names @lines 139,140: yeah, I'm no good at naming... =P
#5
@
16 years ago
OT: is it just my database or bb_topics field topic_last_poster_name is always left empty? 0_o"
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I've attached a patch that works everywhere but for deleted topics by registered users: the topic itself page displays "by Anonymous", while
bb-admin/topics.phpdisplays "Anonymous" or the latest anonymous poster username as topic author.The root of all evil is
bb_get_first_post(), I suppose...