[Customisation Database Commits] r675 - in /trunk/titania: ./ authors/ contributions/ includes/ includes/objects/ includes/overlords/ language/en/

Nathan Guse exreaction at phpbb.com
Fri Mar 5 00:49:55 GMT 2010


Author: exreaction
Date: Fri Mar  5 00:49:54 2010
New Revision: 675

Log:
Adding contribs_overlord (not having this has annoyed me for a while)

Add the queue discussion topic when creating the first queue item

Added:
    trunk/titania/includes/overlords/contribs.php   (with props)
Modified:
    trunk/titania/authors/contributions.php
    trunk/titania/contributions/revision.php
    trunk/titania/includes/functions_display.php
    trunk/titania/includes/objects/queue.php
    trunk/titania/includes/overlords/posts.php
    trunk/titania/includes/overlords/topics.php
    trunk/titania/index.php
    trunk/titania/language/en/posting.php

Modified: trunk/titania/authors/contributions.php
==============================================================================
*** trunk/titania/authors/contributions.php (original)
--- trunk/titania/authors/contributions.php Fri Mar  5 00:49:54 2010
***************
*** 16,24 ****
  	exit;
  }
  
! titania::_include('functions_display', 'titania_display_contribs');
! 
! titania_display_contribs('author', titania::$author->user_id);
  
  titania::page_header('AUTHOR_CONTRIBS');
  titania::page_footer(true, 'authors/author_contributions.html');
\ No newline at end of file
--- 16,22 ----
  	exit;
  }
  
! contribs_overlord::display_contribs('author', titania::$author->user_id);
  
  titania::page_header('AUTHOR_CONTRIBS');
  titania::page_footer(true, 'authors/author_contributions.html');
\ No newline at end of file

Modified: trunk/titania/contributions/revision.php
==============================================================================
*** trunk/titania/contributions/revision.php (original)
--- trunk/titania/contributions/revision.php Fri Mar  5 00:49:54 2010
***************
*** 137,143 ****
  				$contrib_tools->clean_package();
  
  				// Restore the root package directory
! 				$package_root = $this->find_root();
  				$contrib_tools->restore_root($package_root);
  
  				$error = array_merge($error, $contrib_tools->error);
--- 137,143 ----
  				$contrib_tools->clean_package();
  
  				// Restore the root package directory
! 				$package_root = $contrib_tools->find_root();
  				$contrib_tools->restore_root($package_root);
  
  				$error = array_merge($error, $contrib_tools->error);

Modified: trunk/titania/includes/functions_display.php
==============================================================================
*** trunk/titania/includes/functions_display.php (original)
--- trunk/titania/includes/functions_display.php Fri Mar  5 00:49:54 2010
***************
*** 79,241 ****
  	phpbb::$db->sql_freeresult($result);
  
  	unset($category);
- }
- 
- /**
-  * Display contributions
-  *
-  * @param string $mode The mode (category, author)
-  * @param int $id The parent id (only show contributions under this category, author, etc)
-  * @param string $pagination_url The url to display for pagination.
-  * @param string $blockname The name of the template block to use (contribs by default)
-  */
- function titania_display_contribs($mode, $id, $sort = false, $pagination = false, $blockname = 'contribs')
- {
- 	if ($sort === false)
- 	{
- 		// Setup the sort tool
- 		$sort = new titania_sort();
- 		$sort->default_key = 'c';
- 	}
- 
- 	if ($pagination === false)
- 	{
- 		// Setup the pagination tool
- 		$pagination = new titania_pagination();
- 		$pagination->default_limit = phpbb::$config['topics_per_page'];
- 		$pagination->request();
- 	}
- 	$pagination->result_lang = 'TOTAL_CONTRIBS';
- 
- 	switch ($mode)
- 	{
- 		case 'author' :
- 			$sort->set_sort_keys(array(
- 				't' => array('UPDATE_TIME', 'c.contrib_last_update'),
- 				'c' => array('SORT_CONTRIB_NAME', 'c.contrib_name'),
- 			));
- 
- 			// Get the contrib_ids this user is an author in (includes as a co-author)
- 			$contrib_ids = titania::$cache->get_author_contribs($id);
- 
- 			if (!sizeof($contrib_ids))
- 			{
- 				return;
- 			}
- 
- 			$sql_ary = array(
- 				'SELECT'	=> '*',
- 
- 				'FROM'		=> array(
- 					TITANIA_CONTRIBS_TABLE	=> 'c',
- 					USERS_TABLE				=> 'u',
- 				),
- 
- 				'WHERE'		=> phpbb::$db->sql_in_set('c.contrib_id', $contrib_ids) . '
- 					AND u.user_id = c.contrib_user_id
- 					AND c.contrib_visible = 1',
- 
- 				'ORDER_BY'	=> $sort->get_order_by(),
- 			);
- 
- 			titania_tracking::get_track_sql($sql_ary, TITANIA_CONTRIB, 'c.contrib_id');
- 		break;
- 
- 		case 'category' :
- 			$sort->set_sort_keys(array(
- 				'a' => array('AUTHOR', 'u.username_clean'),
- 				't' => array('UPDATE_TIME', 'c.contrib_last_update'),
- 				'c' => array('SORT_CONTRIB_NAME', 'c.contrib_name'),
- 			));
- 
- 			$sql_ary = array(
- 				// DO NOT change to *, we do not need all rows from ANY table with the query!
- 				'SELECT'	=> 'c.contrib_id, c.contrib_name, c.contrib_name_clean, c.contrib_status, c.contrib_downloads, c.contrib_views, c.contrib_rating, c.contrib_rating_count, c.contrib_type, c.contrib_last_update,
- 					u.username, u.user_colour, u.username_clean',
- 
- 				'FROM'		=> array(
- 					TITANIA_CONTRIB_IN_CATEGORIES_TABLE => 'cic',
- 				),
- 
- 				'LEFT_JOIN'	=> array(
- 					array(
- 						'FROM'	=> array(TITANIA_CONTRIBS_TABLE => 'c'),
- 						'ON'	=> 'cic.contrib_id = c.contrib_id',
- 					),
- 					array(
- 						'FROM'	=> array(USERS_TABLE => 'u'),
- 						'ON'	=> 'u.user_id = c.contrib_user_id',
- 					),
- 				),
- 
- 				'WHERE'		=> 'cic.category_id = ' . (int) $id . '
- 					AND c.contrib_visible = 1',
- 
- 				'ORDER_BY'	=> $sort->get_order_by(),
- 			);
- 
- 			titania_tracking::get_track_sql($sql_ary, TITANIA_CONTRIB, 'c.contrib_id');
- 		break;
- 	}
- 
- 	// Permissions
- 	if (titania::$config->require_validation && !titania::$access_level == TITANIA_ACCESS_TEAMS)
- 	{
- 		$sql_ary['LEFT_JOIN'][] = array(
- 			'FROM'	=> array(TITANIA_CONTRIB_COAUTHORS_TABLE => 'cc'),
- 			'ON'	=> 'cc.contrib_id = c.contrib_id AND cc.user_id = ' . phpbb::$user->data['user_id'],
- 		);
- 		$sql_ary['WHERE'] .= ' AND (c.contrib_status = ' . TITANIA_CONTRIB_APPROVED . '
- 			OR c.contrib_user_id = ' . phpbb::$user->data['user_id'] . '
- 			OR cc.active = 1)';
- 	}
- 
- 	// Main SQL Query
- 	$sql = phpbb::$db->sql_build_query('SELECT', $sql_ary);
- 
- 	// Handle pagination
- 	$pagination->sql_count($sql_ary, 'c.contrib_id');
- 	$pagination->build_pagination(titania_url::$current_page, titania_url::$params);
- 
- 	// Setup some objects we'll use for temps
- 	$contrib = new titania_contribution();
- 	$contrib->author = new titania_author();
- 
- 	$result = phpbb::$db->sql_query_limit($sql, $pagination->limit, $pagination->start);
- 
- 	while ($row = phpbb::$db->sql_fetchrow($result))
- 	{
- 		$contrib->__set_array($row);
- 
- 		$contrib->author->__set_array($row);
- 
- 		// Store the tracking info we grabbed in the tool
- 		if (isset($row['track_time']))
- 		{
- 			titania_tracking::store_track(TITANIA_CONTRIB, $contrib->contrib_id, $row['track_time']);
- 		}
- 
- 		// Get the folder image
- 		$folder_img = $folder_alt = '';
- 		titania_topic_folder_img($folder_img, $folder_alt, 0, titania_tracking::is_unread(TITANIA_CONTRIB, $contrib->contrib_id, $contrib->contrib_last_update));
- 
- 		phpbb::$template->assign_block_vars($blockname, array_merge($contrib->assign_details(true, true), array(
- 			'FOLDER_IMG'				=> phpbb::$user->img($folder_img, $folder_alt),
- 			'FOLDER_IMG_SRC'			=> phpbb::$user->img($folder_img, $folder_alt, false, '', 'src'),
- 			'FOLDER_IMG_ALT'			=> phpbb::$user->lang[$folder_alt],
- 			'FOLDER_IMG_ALT'			=> phpbb::$user->lang[$folder_alt],
- 			'FOLDER_IMG_WIDTH'			=> phpbb::$user->img($folder_img, '', false, '', 'width'),
- 			'FOLDER_IMG_HEIGHT'			=> phpbb::$user->img($folder_img, '', false, '', 'height'),
- 		)));
- 
- 		$contrib_type = $row['contrib_type'];
- 	}
- 	phpbb::$db->sql_freeresult($result);
- 	unset($contrib);
- 
- 	phpbb::$template->assign_vars(array(
- 		'U_ACTION'			=> titania_url::$current_page,
- 		'S_MODE_SELECT'		=> $sort->get_sort_key_list(),
- 		'S_ORDER_SELECT'	=> $sort->get_sort_dir_list(),
- 	));
  }
\ No newline at end of file
--- 79,82 ----

Modified: trunk/titania/includes/objects/queue.php
==============================================================================
*** trunk/titania/includes/objects/queue.php (original)
--- trunk/titania/includes/objects/queue.php Fri Mar  5 00:49:54 2010
***************
*** 82,88 ****
  	{
  		if (!$this->queue_id)
  		{
! 			$sql = 'SELECT c.contrib_name, c.contrib_type, r.revision_version
  				FROM ' . TITANIA_CONTRIBS_TABLE . ' c, ' . TITANIA_REVISIONS_TABLE . ' r
  				WHERE r.revision_id = ' . (int) $this->revision_id . '
  					AND c.contrib_id = r.contrib_id';
--- 82,88 ----
  	{
  		if (!$this->queue_id)
  		{
! 			$sql = 'SELECT c.contrib_id, c.contrib_name_clean, c.contrib_name, c.contrib_type, r.revision_version
  				FROM ' . TITANIA_CONTRIBS_TABLE . ' c, ' . TITANIA_REVISIONS_TABLE . ' r
  				WHERE r.revision_id = ' . (int) $this->revision_id . '
  					AND c.contrib_id = r.contrib_id';
***************
*** 102,107 ****
--- 102,132 ----
  
  			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 . '
+ 					AND topic_type = ' . TITANIA_QUEUE_DISCUSSION;
+ 			$result = phpbb::$db->sql_query($sql);
+ 			if (!phpbb::$db->sql_fetchrow($result))
+ 			{
+ 				titania::add_lang('posting');
+ 
+ 				$post = new titania_post(TITANIA_QUEUE_DISCUSSION);
+ 				$post->topic->__set_array(array(
+ 					'parent_id'			=> $row['contrib_id'],
+ 					'topic_url'			=> titania_types::$types[$row['contrib_type']]->url . '/' . $row['contrib_name_clean'] . '/support/',
+ 					'topic_sticky'		=> true,
+ 				));
+ 				$post->__set_array(array(
+ 					'post_access'		=> TITANIA_ACCESS_TEAMS,
+ 					'post_subject'		=> sprintf(phpbb::$user->lang['QUEUE_DISCUSSION_TOPIC_TITLE'], $row['contrib_name']),
+ 					'post_text'			=> phpbb::$user->lang['QUEUE_DISCUSSION_TOPIC_MESSAGE'],
+ 				));
+ 				$post->generate_text_for_storage(true, true, true);
+ 				$post->submit();
+ 			}
+ 			phpbb::$db->sql_freeresult($result);
  		}
  		else if ($update_first_post)
  		{

Added: trunk/titania/includes/overlords/contribs.php
==============================================================================
*** trunk/titania/includes/overlords/contribs.php (added)
--- trunk/titania/includes/overlords/contribs.php Fri Mar  5 00:49:54 2010
***************
*** 0 ****
--- 1,259 ----
+ <?php
+ /**
+ *
+ * @package Titania
+ * @version $Id$
+ * @copyright (c) 2008 phpBB Customisation Database Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ *
+ */
+ 
+ /**
+ * @ignore
+ */
+ if (!defined('IN_TITANIA'))
+ {
+ 	exit;
+ }
+ 
+ class contribs_overlord
+ {
+ 	/**
+ 	* Contribs array
+ 	* Stores [id] => contrib row
+ 	*
+ 	* @var array
+ 	*/
+ 	public static $contribs = array();
+ 
+ 	public static $sort_by = array(
+ 		'a' => array('AUTHOR', 'u.username_clean'),
+ 		't' => array('UPDATE_TIME', 'c.contrib_last_update'),
+ 		'c' => array('SORT_CONTRIB_NAME', 'c.contrib_name'),
+ 	);
+ 
+ 	/**
+ 	* Load contrib(s) from contrib id(s)
+ 	*
+ 	* @param int|array $contrib_id topic_id or an array of contrib_ids
+ 	*/
+ 	public static function load_contrib($contrib_id)
+ 	{
+ 		if (!is_array($contrib_id))
+ 		{
+ 			$contrib_id = array($contrib_id);
+ 		}
+ 
+ 		// Only get the rows for those we have not gotten already
+ 		$contrib_id = array_diff($contrib_id, array_keys(self::$contribs));
+ 
+ 		if (!sizeof($contrib_id))
+ 		{
+ 			return;
+ 		}
+ 
+ 		$sql_ary = array(
+ 			'SELECT' => '*',
+ 
+ 			'FROM'		=> array(
+ 				TITANIA_CONTRIBS_TABLE	=> 'c',
+ 			),
+ 
+ 			'WHERE' => phpbb::$db->sql_in_set('c.contrib_id', array_map('intval', $contrib_id)),
+ 		);
+ 
+ 		$sql = phpbb::$db->sql_build_query('SELECT', $sql_ary);
+ 
+ 		$result = phpbb::$db->sql_query($sql);
+ 
+ 		while($row = phpbb::$db->sql_fetchrow($result))
+ 		{
+ 			self::$contribs[$row['contrib_id']] = $row;
+ 		}
+ 
+ 		phpbb::$db->sql_freeresult($result);
+ 	}
+ 
+ 	/**
+ 	 * Get the contrib object
+ 	 *
+ 	 * @param <int> $contrib_id
+ 	 * @param <bool> $query True to always query if it doesn't exist in self::$contribs, False to only grab from self::$contribs (if this is False and it does not exist in self::$contribs we return false)
+ 	 * @return <object|bool> False if the contrib does not exist in the self::$contribs array (load it first!) contrib object if it exists
+ 	 */
+ 	public static function get_contrib_object($contrib_id, $query = false)
+ 	{
+ 		if (!isset(self::$contribs[$contrib_id]))
+ 		{
+ 			if ($query)
+ 			{
+ 				self::load_contrib($contrib_id);
+ 
+ 				if (!isset(self::$contribs[$contrib_id]))
+ 				{
+ 					return false;
+ 				}
+ 			}
+ 			else
+ 			{
+ 				return false;
+ 			}
+ 		}
+ 
+ 		$contrib = new titania_contribution();
+ 		$contrib->__set_array(self::$contribs[$contrib_id]);
+ 
+ 		return $contrib;
+ 	}
+ 
+ 	/**
+ 	 * Display contributions
+ 	 *
+ 	 * @param string $mode The mode (category, author)
+ 	 * @param int $id The parent id (only show contributions under this category, author, etc)
+ 	 * @param string $pagination_url The url to display for pagination.
+ 	 * @param string $blockname The name of the template block to use (contribs by default)
+ 	 */
+ 	function display_contribs($mode, $id, $sort = false, $pagination = false, $blockname = 'contribs')
+ 	{
+ 		titania::_include('functions_display', 'titania_topic_folder_img');
+ 
+ 		if ($sort === false)
+ 		{
+ 			// Setup the sort tool
+ 			$sort = new titania_sort();
+ 			$sort->set_sort_keys(self::$sort_by);
+ 			$sort->default_key = 'c';
+ 		}
+ 
+ 		if ($pagination === false)
+ 		{
+ 			// Setup the pagination tool
+ 			$pagination = new titania_pagination();
+ 			$pagination->default_limit = phpbb::$config['topics_per_page'];
+ 			$pagination->request();
+ 		}
+ 		$pagination->result_lang = 'TOTAL_CONTRIBS';
+ 
+ 		switch ($mode)
+ 		{
+ 			case 'author' :
+ 				// Get the contrib_ids this user is an author in (includes as a co-author)
+ 				$contrib_ids = titania::$cache->get_author_contribs($id);
+ 
+ 				if (!sizeof($contrib_ids))
+ 				{
+ 					return;
+ 				}
+ 
+ 				$sql_ary = array(
+ 					'SELECT'	=> '*',
+ 
+ 					'FROM'		=> array(
+ 						TITANIA_CONTRIBS_TABLE	=> 'c',
+ 						USERS_TABLE				=> 'u',
+ 					),
+ 
+ 					'WHERE'		=> phpbb::$db->sql_in_set('c.contrib_id', $contrib_ids) . '
+ 						AND u.user_id = c.contrib_user_id
+ 						AND c.contrib_visible = 1',
+ 
+ 					'ORDER_BY'	=> $sort->get_order_by(),
+ 				);
+ 
+ 				titania_tracking::get_track_sql($sql_ary, TITANIA_CONTRIB, 'c.contrib_id');
+ 			break;
+ 
+ 			case 'category' :
+ 				$sql_ary = array(
+ 					// DO NOT change to *, we do not need all rows from ANY table with the query!
+ 					'SELECT'	=> 'c.contrib_id, c.contrib_name, c.contrib_name_clean, c.contrib_status, c.contrib_downloads, c.contrib_views, c.contrib_rating, c.contrib_rating_count, c.contrib_type, c.contrib_last_update,
+ 						u.username, u.user_colour, u.username_clean',
+ 
+ 					'FROM'		=> array(
+ 						TITANIA_CONTRIB_IN_CATEGORIES_TABLE => 'cic',
+ 					),
+ 
+ 					'LEFT_JOIN'	=> array(
+ 						array(
+ 							'FROM'	=> array(TITANIA_CONTRIBS_TABLE => 'c'),
+ 							'ON'	=> 'cic.contrib_id = c.contrib_id',
+ 						),
+ 						array(
+ 							'FROM'	=> array(USERS_TABLE => 'u'),
+ 							'ON'	=> 'u.user_id = c.contrib_user_id',
+ 						),
+ 					),
+ 
+ 					'WHERE'		=> 'cic.category_id = ' . (int) $id . '
+ 						AND c.contrib_visible = 1',
+ 
+ 					'ORDER_BY'	=> $sort->get_order_by(),
+ 				);
+ 
+ 				titania_tracking::get_track_sql($sql_ary, TITANIA_CONTRIB, 'c.contrib_id');
+ 			break;
+ 		}
+ 
+ 		// Permissions
+ 		if (titania::$config->require_validation && !titania::$access_level == TITANIA_ACCESS_TEAMS)
+ 		{
+ 			$sql_ary['LEFT_JOIN'][] = array(
+ 				'FROM'	=> array(TITANIA_CONTRIB_COAUTHORS_TABLE => 'cc'),
+ 				'ON'	=> 'cc.contrib_id = c.contrib_id AND cc.user_id = ' . phpbb::$user->data['user_id'],
+ 			);
+ 			$sql_ary['WHERE'] .= ' AND (c.contrib_status = ' . TITANIA_CONTRIB_APPROVED . '
+ 				OR c.contrib_user_id = ' . phpbb::$user->data['user_id'] . '
+ 				OR cc.active = 1)';
+ 		}
+ 
+ 		// Main SQL Query
+ 		$sql = phpbb::$db->sql_build_query('SELECT', $sql_ary);
+ 
+ 		// Handle pagination
+ 		$pagination->sql_count($sql_ary, 'c.contrib_id');
+ 		$pagination->build_pagination(titania_url::$current_page, titania_url::$params);
+ 
+ 		// Setup some objects we'll use for temps
+ 		$contrib = new titania_contribution();
+ 		$contrib->author = new titania_author();
+ 
+ 		$result = phpbb::$db->sql_query_limit($sql, $pagination->limit, $pagination->start);
+ 
+ 		while ($row = phpbb::$db->sql_fetchrow($result))
+ 		{
+ 			$contrib->__set_array($row);
+ 
+ 			$contrib->author->__set_array($row);
+ 
+ 			// Store the tracking info we grabbed in the tool
+ 			if (isset($row['track_time']))
+ 			{
+ 				titania_tracking::store_track(TITANIA_CONTRIB, $contrib->contrib_id, $row['track_time']);
+ 			}
+ 
+ 			// Get the folder image
+ 			$folder_img = $folder_alt = '';
+ 			titania_topic_folder_img($folder_img, $folder_alt, 0, titania_tracking::is_unread(TITANIA_CONTRIB, $contrib->contrib_id, $contrib->contrib_last_update));
+ 
+ 			phpbb::$template->assign_block_vars($blockname, array_merge($contrib->assign_details(true, true), array(
+ 				'FOLDER_IMG'				=> phpbb::$user->img($folder_img, $folder_alt),
+ 				'FOLDER_IMG_SRC'			=> phpbb::$user->img($folder_img, $folder_alt, false, '', 'src'),
+ 				'FOLDER_IMG_ALT'			=> phpbb::$user->lang[$folder_alt],
+ 				'FOLDER_IMG_ALT'			=> phpbb::$user->lang[$folder_alt],
+ 				'FOLDER_IMG_WIDTH'			=> phpbb::$user->img($folder_img, '', false, '', 'width'),
+ 				'FOLDER_IMG_HEIGHT'			=> phpbb::$user->img($folder_img, '', false, '', 'height'),
+ 			)));
+ 
+ 			$contrib_type = $row['contrib_type'];
+ 		}
+ 		phpbb::$db->sql_freeresult($result);
+ 		unset($contrib);
+ 
+ 		phpbb::$template->assign_vars(array(
+ 			'U_ACTION'			=> titania_url::$current_page,
+ 			'S_MODE_SELECT'		=> $sort->get_sort_key_list(),
+ 			'S_ORDER_SELECT'	=> $sort->get_sort_dir_list(),
+ 		));
+ 	}
+ }

Propchange: trunk/titania/includes/overlords/contribs.php
------------------------------------------------------------------------------
    svn:keywords = Revision Author Date Id

Modified: trunk/titania/includes/overlords/posts.php
==============================================================================
*** trunk/titania/includes/overlords/posts.php (original)
--- trunk/titania/includes/overlords/posts.php Fri Mar  5 00:49:54 2010
***************
*** 20,26 ****
  {
  	/**
  	* Posts array
! 	* Stores [id] => post object
  	*
  	* @var array
  	*/
--- 20,26 ----
  {
  	/**
  	* Posts array
! 	* Stores [id] => post row
  	*
  	* @var array
  	*/

Modified: trunk/titania/includes/overlords/topics.php
==============================================================================
*** trunk/titania/includes/overlords/topics.php (original)
--- trunk/titania/includes/overlords/topics.php Fri Mar  5 00:49:54 2010
***************
*** 20,26 ****
  {
  	/**
  	* Topics array
! 	* Stores [id] => topic object
  	*
  	* @var array
  	*/
--- 20,26 ----
  {
  	/**
  	* Topics array
! 	* Stores [id] => topic row
  	*
  	* @var array
  	*/
***************
*** 244,251 ****
  				$contrib_ids = titania::$cache->get_author_contribs($object->user_id);
  				$sql_ary['WHERE'] .= ' AND ' . phpbb::$db->sql_in_set('t.parent_id', array_map('intval', $contrib_ids));
  
! 				$sql_ary['WHERE'] .= ' AND t.topic_type = ' . TITANIA_SUPPORT;
! 				$sql_ary['WHERE'] .= ' AND ' . phpbb::$db->sql_in_set('t.parent_id', array_map('intval', titania::$cache->get_author_contribs($object->user_id)));
  			break;
  
  			case 'author_tracker' :
--- 244,251 ----
  				$contrib_ids = titania::$cache->get_author_contribs($object->user_id);
  				$sql_ary['WHERE'] .= ' AND ' . phpbb::$db->sql_in_set('t.parent_id', array_map('intval', $contrib_ids));
  
! 				// We also display the queue discussion topic between validators and authors in the support area
! 				$sql_ary['WHERE'] .= ' AND (t.topic_type = ' . TITANIA_SUPPORT . ' OR t.topic_type = ' . TITANIA_QUEUE_DISCUSSION . ')';
  			break;
  
  			case 'author_tracker' :
***************
*** 254,266 ****
  				$sql_ary['WHERE'] .= ' AND ' . phpbb::$db->sql_in_set('t.parent_id', array_map('intval', $contrib_ids));
  
  				$sql_ary['WHERE'] .= ' AND t.topic_type = ' . TITANIA_TRACKER;
- 				$sql_ary['WHERE'] .= ' AND ' . phpbb::$db->sql_in_set('t.parent_id', array_map('intval', titania::$cache->get_author_contribs($object->user_id)));
  			break;
  
  			case 'support' :
  			default :
  				$page_url = $object->get_url('support');
  				$sql_ary['WHERE'] .= ' AND t.parent_id = ' . (int) $object->contrib_id;
  				// We also display the queue discussion topic between validators and authors in the support area
  				$sql_ary['WHERE'] .= ' AND (t.topic_type = ' . TITANIA_SUPPORT . ' OR t.topic_type = ' . TITANIA_QUEUE_DISCUSSION . ')';
  			break;
--- 254,266 ----
  				$sql_ary['WHERE'] .= ' AND ' . phpbb::$db->sql_in_set('t.parent_id', array_map('intval', $contrib_ids));
  
  				$sql_ary['WHERE'] .= ' AND t.topic_type = ' . TITANIA_TRACKER;
  			break;
  
  			case 'support' :
  			default :
  				$page_url = $object->get_url('support');
  				$sql_ary['WHERE'] .= ' AND t.parent_id = ' . (int) $object->contrib_id;
+ 
  				// We also display the queue discussion topic between validators and authors in the support area
  				$sql_ary['WHERE'] .= ' AND (t.topic_type = ' . TITANIA_SUPPORT . ' OR t.topic_type = ' . TITANIA_QUEUE_DISCUSSION . ')';
  			break;

Modified: trunk/titania/index.php
==============================================================================
*** trunk/titania/index.php (original)
--- trunk/titania/index.php Fri Mar  5 00:49:54 2010
***************
*** 140,146 ****
  			// Start up the machine
  			$contrib_tools = new titania_contrib_tools($zip_file, $new_dir_name);
  
! 			//$package_root = $this->find_root();
  			//$contrib_tools->restore_root($package_root);
  			//$contrib_tools->replace_zip();
  
--- 140,146 ----
  			// Start up the machine
  			$contrib_tools = new titania_contrib_tools($zip_file, $new_dir_name);
  
! 			//$package_root = $contrib_tools->find_root();
  			//$contrib_tools->restore_root($package_root);
  			//$contrib_tools->replace_zip();
  
***************
*** 182,188 ****
  
  		if ($category_id != 0)
  		{
! 			titania_display_contribs('category', $category_id);
  		}
  
  		phpbb::$template->assign_vars(array(
--- 182,188 ----
  
  		if ($category_id != 0)
  		{
! 			contribs_overlord::display_contribs('category', $category_id);
  		}
  
  		phpbb::$template->assign_vars(array(

Modified: trunk/titania/language/en/posting.php
==============================================================================
*** trunk/titania/language/en/posting.php (original)
--- trunk/titania/language/en/posting.php Fri Mar  5 00:49:54 2010
***************
*** 48,51 ****
--- 48,60 ----
  
  	'STICKIES'			=> 'Stickies',
  	'STICKY_TOPIC'		=> 'Sticky Topic',
+ 
+ 	'QUEUE_DISCUSSION_TOPIC_TITLE'	=> 'Validation Discussion - %s',
+ 	'QUEUE_DISCUSSION_TOPIC_MESSAGE'	=> 'This topic is for validation discussion between the contribution authors and validators.
+ 
+ Anything posted in this topic will be noticed by those validating your contribution, so please post here instead of using private messages to validators.
+ 
+ Validation staff may also post questions to the authors here, so please reply with helpful information for them as it may be required to proceed with the validation procedure.
+ 
+ Note that by default this topic is private between authors and validators and cannot be seen by the public.',
  ));




More information about the customisationdb-commits mailing list