Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
627 views
in Q2A Core by
edited by
I know that when you edit a post within a few minutes (5? 10?) of posting, it doesn't register it as an edit on the site. Does it throw the q_edit or a_edit event?

2 Answers

+1 vote
by

It does register it as an edit in the database, but it doesn't show it as an edit in the interface. See the condition starting isset($post['updated'])... at the end of qa_post_html_fields(...) in qa-app-format.php

So by the same measure, it does throw an event, but you can perform a similar check in your event module, if you want to match the interface's behavior.

+1 vote
by
Yep, sure does... I would guess it registers as an edit as well, but just doesn't show up, due to some check in the display function.  Here's the report call:

        qa_report_event('q_edit', $userid, $handle, $cookieid, array(
            'postid' => $oldquestion['postid'],
            'title' => $title,
            'content' => $content,
            'format' => $format,
            'text' => $text,
            'tags' => $tagstring,
            'oldtitle' => $oldquestion['title'],
            'oldcontent' => $oldquestion['content'],
            'oldformat' => $oldquestion['format'],
            'oldtags' => $oldquestion['tags'],
        ));

in qa-include/qa-app-post-update.php, and it gets called even for edits right after posts.
...