[Customisation Database Commits] r680 - in /trunk/titania: includes/objects/queue.php language/en/manage.php
Nathan Guse
exreaction at phpbb.com
Fri Mar 5 02:18:00 GMT 2010
Author: exreaction
Date: Fri Mar 5 02:18:00 2010
New Revision: 680
Log:
Put the queue discussion link in the queue topic (will look for some better ways to link to it later)
Modified:
trunk/titania/includes/objects/queue.php
trunk/titania/language/en/manage.php
Modified: trunk/titania/includes/objects/queue.php
==============================================================================
*** trunk/titania/includes/objects/queue.php (original)
--- trunk/titania/includes/objects/queue.php Fri Mar 5 02:18:00 2010
***************
*** 100,108 ****
// Submit here first to make sure we have a queue_id for the topic url
parent::submit();
- titania::add_lang('manage');
- $this->update_first_queue_post(phpbb::$user->lang['VALIDATION'] . ' - ' . $row['contrib_name'] . ' - ' . $row['revision_version']);
-
// Is there a queue discussion topic? If not we should create one
$sql = 'SELECT topic_id FROM ' . TITANIA_TOPICS_TABLE . '
WHERE parent_id = ' . $this->contrib_id . '
--- 100,105 ----
***************
*** 127,132 ****
--- 124,131 ----
$post->submit();
}
phpbb::$db->sql_freeresult($result);
+
+ $this->update_first_queue_post(phpbb::$user->lang['VALIDATION'] . ' - ' . $row['contrib_name'] . ' - ' . $row['revision_version']);
}
else if ($update_first_post)
{
***************
*** 172,177 ****
--- 171,192 ----
// Need at least some text in the post body...
$post->post_text = phpbb::$user->lang['VALIDATION_SUBMISSION'] . "\n\n";
+ // Put the queue discussion link in the post
+ $sql = 'SELECT topic_id, topic_url, topic_subject_clean FROM ' . TITANIA_TOPICS_TABLE . '
+ WHERE parent_id = ' . $this->contrib_id . '
+ AND topic_type = ' . TITANIA_QUEUE_DISCUSSION;
+ $result = phpbb::$db->sql_query($sql);
+ $queue_topic_row = phpbb::$db->sql_fetchrow($result);
+ phpbb::$db->sql_freeresult($result);
+
+ if ($queue_topic_row)
+ {
+ $queue_topic = new titania_topic;
+ $queue_topic->__set_array($queue_topic_row);
+
+ $post->post_text .= '<a href="' . $queue_topic->get_url() . '">' . phpbb::$user->lang['QUEUE_DISCUSSION_TOPIC'] . "</a>\n\n";
+ }
+
// Add the queue notes
$queue_notes = $this->queue_notes;
decode_message($queue_notes, $this->queue_notes_uid);
Modified: trunk/titania/language/en/manage.php
==============================================================================
*** trunk/titania/language/en/manage.php (original)
--- trunk/titania/language/en/manage.php Fri Mar 5 02:18:00 2010
***************
*** 39,44 ****
--- 39,45 ----
'MARK_NO_PROGRESS' => 'Mark no Progress',
'MARK_IN_PROGRESS' => 'Mark in Progress',
'QUEUE_DISCUSSION' => 'Queue Discussion',
+ 'QUEUE_DISCUSSION_TOPIC' => 'Queue Discussion Topic',
'SUBMIT_TIME' => 'Submission Time',
'VALIDATION_QUEUE' => 'Validation Queue',
'VALIDATION_NOTES' => 'Validation Notes',
More information about the customisationdb-commits
mailing list