Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: live627 on June 29th, 2013, 11:27 PM

Title: Template logic error for unapproved topics
Post by: live627 on June 29th, 2013, 11:27 PM
Code: [Select]
Index: I:/Backups/Linux Drive/john/repos/arantor_wedge/trunk/Themes/default/MessageIndex.template.php
===================================================================
--- I:/Backups/Linux Drive/john/repos/arantor_wedge/trunk/Themes/default/MessageIndex.template.php (revision 2166)
+++ I:/Backups/Linux Drive/john/repos/arantor_wedge/trunk/Themes/default/MessageIndex.template.php (working copy)
@@ -111,7 +111,7 @@
  <td class="subject ', $alternate_class, '">
  <div', (!empty($topic['quick_mod']['modify']) ? ' id="topic_' . $topic['id'] . '" ondblclick="modify_topic(' . $topic['id'] . ', ' . $topic['first_post']['id'] . ');"' : ''), '>
  <span id="msg_' . $topic['first_post']['id'] . '">', $topic['new'] && we::$is_member ? $topic['new_link'] : $topic['first_post']['link'],
- !$context['can_approve_posts'] && !$topic['approved'] ? ' <em>(' . $txt['awaiting_approval'] . ')</em>' : '', '</span>';
+ $context['can_approve_posts'] && !$topic['approved'] ? ' <em>(' . $txt['awaiting_approval'] . ')</em>' : '', '</span>';
 
  // Is this topic new? (assuming they are logged in!)
  if ($topic['new'] && we::$is_member)
Title: Re: Template logic error for unapproved topics
Post by: Nao on June 30th, 2013, 11:37 PM
Very odd... This has been in Wedge since revision 1, so it's a SMF 2.0 bug. Did it ever get fixed, over there..?
Title: Re: Template logic error for unapproved topics
Post by: Arantor on June 30th, 2013, 11:43 PM
Actually, I'm not so sure that is a logic error. What we're saying, ultimately, is that the topic is awaiting approval. Previously it's telling people who can't approve posts that it's awaiting approval (i.e. the person who made the topic), as opposed to now telling people who can approve posts...

Thing is, now the person who posted it has no guide that it is awaiting approval other than the colour change.
Title: Re: Template logic error for unapproved topics
Post by: live627 on July 1st, 2013, 01:12 AM
I see. Now  what if we remove the permission check, because a moderator might not realize right away why a given topic is orange. Or add the different colors to the legend?
Title: Re: Template logic error for unapproved topics
Post by: Arantor on July 1st, 2013, 01:17 AM
Well... those who can approve should get a big red (!) symbol next to the topic, those who can't should get the 'Awaiting Approval' notice... at least that's how it was in SMF, I don't recall us breaking it.
Title: Re: Template logic error for unapproved topics
Post by: live627 on July 1st, 2013, 05:35 AM
This is what the in the sky currently sees - first topic is up for approval.
Title: Re: Template logic error for unapproved topics
Post by: Nao on July 1st, 2013, 09:48 AM
Personally, I'd be okay with removing the can_approve test entirely, as it's no big deal either way, and could save people some support work... ;)