Coauthors and revisions

I've changed the way co-authors work, and I've also added in thread revisions. So, geoffrey, when you read this, go into this thread, on the top right (in the main menu), you should see 'edit' and 'history' as pink buttons. Click edit, and edit my thread. Unless you check the option to remove all previous revisions, the old info will be put into the revisions table and the new info stored.

If you have any suggestions on a better way to store the old body text (it's only stored if it's different), such as, maybe what a diff might return? (only the parts that are changed)

Oh well, try it out.

P.S. the 'history' button doesn't do anything yet :P

OneLobby
QueryQuery TimeAffected Rows
SELECT o.object_name,o.object_perms,p.perm_grant,p.perm_deny FROM k4_objects o, k4_perms p, k4_roles r, k4_user_roles u WHERE u.user_id=1  AND u.role_id=r.role_id  AND p.role_id=r.role_id  AND o.object_id=p.object_id ORDER BY r.perm_level ASC

 0.1214 

 3 

SELECT DISTINCT t.thread_id, t.*, ts.tag_name, GROUP_CONCAT(ts.tag_name SEPARATOR ',') AS tags, u.name AS user_name, uu.name AS edit_user_name FROM k4_thread_tags tt, k4_tags ts, k4_threads t, k4_users u, k4_users uu WHERE t.thread_id=15 AND t.thread_id=tt.thread_id AND ts.tag_id=tt.tag_id AND t.user_id=u.user_id AND t.edit_user_id=uu.user_id GROUP BY t.thread_id LIMIT 1

 0.1247 

 1 

UPDATE `k4_threads` SET views=191 WHERE thread_id=15

 0.0011 

 1 

SELECT tu.*, u.name AS user_name FROM k4_thread_users tu, k4_users u WHERE tu.thread_id=15 AND tu.user_id = u.user_id GROUP BY tu.user_id ORDER BY u.name ASC

 0.1339 

 1