Wedge
Public area => The Pub => Topic started by: live627 on October 6th, 2012, 03:13 AM
-
Why is $topic_info populated in Post2(), but not Post()?
-
That's the way SMF always did it... IIRC, Post() populates $topicinfo with other stuff, just to be awkward.
Either way, this is not logic we've introduced at any point, if we had there would have been a reason for it that I'd be able to tell you :P
-
Could it be done, for reuse in plugins and such?
-
Given how volatile that is, you're almost better off just getting it yourself.
And isn't it global anyway meaning you're free to pull it whenever?
-
What I'm asking, is if the same global variable can be populated the same way in both functions.
-
Aside from the fact that it would just be unnecessary database queries in most cases to do that?
-
Just need to convert this
list ($locked, $context['notify'], $pinned, $pollID, $context['topic_last_message'], $id_member_poster, $id_first_msg, $first_subject, $lastPostTime) = wesql::fetch_row($request); to this $topic_info = wesql::fetch_assoc($request); changing every occurance of the affected variables. Or is there something deeper that I missed?
-
I think it's a bit deeper than that, especially since remember that Post2() can and will call Post()...