[Customisation Database Commits] r1178 - in /branches/stable: ./ titania/contributions/ titania/download/ titania/includes/objects/ titania/includes/tools/ titania/language/en/ titania/styles/default/template/common/ titania/styles/default/template/contributions/ titania/styles/default/template/posting/attachments/ titania/styles/default/theme/ titania/styles/prosilver/template/common/ titania/styles/prosilver/theme/

Nathan Guse exreaction at phpbb.com
Fri Apr 30 00:29:41 BST 2010


Author: exreaction
Date: Fri Apr 30 00:29:41 2010
New Revision: 1178

Log:
Merging stuff to stable

Added:
    branches/stable/titania/contributions/revision_edit.php
      - copied unchanged from r1176, trunk/titania/contributions/revision_edit.php
    branches/stable/titania/styles/default/template/contributions/contribution_revision_edit.html
      - copied unchanged from r1176, trunk/titania/styles/default/template/contributions/contribution_revision_edit.html
Modified:
    branches/stable/   (props changed)
    branches/stable/titania/contributions/index.php
    branches/stable/titania/download/file.php
    branches/stable/titania/includes/objects/contribution.php
    branches/stable/titania/includes/objects/revision.php
    branches/stable/titania/includes/tools/message.php
    branches/stable/titania/language/en/contributions.php
    branches/stable/titania/styles/default/template/common/contribution_details.html
    branches/stable/titania/styles/default/template/posting/attachments/default.html
    branches/stable/titania/styles/default/theme/common.css
    branches/stable/titania/styles/prosilver/template/common/contribution_details.html
    branches/stable/titania/styles/prosilver/theme/common.css

Propchange: branches/stable/
------------------------------------------------------------------------------
*** svn:mergeinfo (original)
--- svn:mergeinfo Fri Apr 30 00:29:41 2010
***************
*** 1 ****
! /trunk:1058,1060,1062-1072,1075-1076,1078,1080-1082,1084-1085,1087-1088,1090,1092-1096,1098,1100-1102,1104-1105,1107,1109-1114,1117,1119,1121,1123-1125,1127-1134,1136,1138,1141,1143-1144,1148-1150,1152-1154,1157,1159-1160,1162-1166,1168-1169
--- 1 ----
! /trunk:1058,1060,1062-1072,1075-1076,1078,1080-1082,1084-1085,1087-1088,1090,1092-1096,1098,1100-1102,1104-1105,1107,1109-1114,1117,1119,1121,1123-1125,1127-1134,1136,1138,1141,1143-1144,1148-1150,1152-1154,1157,1159-1160,1162-1166,1168-1169,1171-1176

Modified: branches/stable/titania/contributions/index.php
==============================================================================
*** branches/stable/titania/contributions/index.php (original)
--- branches/stable/titania/contributions/index.php Fri Apr 30 00:29:41 2010
***************
*** 52,57 ****
--- 52,58 ----
  	case 'support' :
  	case 'manage' :
  	case 'revision' :
+ 	case 'revision_edit' :
  		include(TITANIA_ROOT . 'contributions/' . $page . '.' . PHP_EXT);
  	break;
  

Modified: branches/stable/titania/download/file.php
==============================================================================
*** branches/stable/titania/download/file.php (original)
--- branches/stable/titania/download/file.php Fri Apr 30 00:29:41 2010
***************
*** 72,77 ****
--- 72,99 ----
  $attachment = phpbb::$db->sql_fetchrow($result);
  phpbb::$db->sql_freeresult($result);
  
+ // Don't allow downloads of revisions for cleaned items unless on the team or an author.
+ if ($attachment['object_type'] == TITANIA_CONTRIB)
+ {
+ 	$sql = 'SELECT contrib_id FROM ' . TITANIA_REVISIONS_TABLE . '
+ 		WHERE  attachment_id = ' . $attachment['attachment_id'];
+ 	phpbb::$db->sql_query($sql);
+ 	$contrib_id = phpbb::$db->sql_fetchfield('contrib_id');
+ 	phpbb::$db->sql_freeresult();
+ 
+ 	$contrib = new titania_contribution;
+ 	if (!$contrib->load($contrib_id))
+ 	{
+ 		trigger_error('NO_ATTACHMENT_SELECTED');
+ 	}
+ 
+ 	if ($contrib->contrib_status == TITANIA_CONTRIB_CLEANED && titania::$access_level != TITANIA_ACCESS_TEAMS && !$contrib->is_author && !$contrib->is_active_coauthor)
+ 	{
+ 		trigger_error('NO_ATTACHMENT_SELECTED');
+ 	}
+ 	unset($contrib);
+ }
+ 
  if (!$attachment)
  {
  	trigger_error('ERROR_NO_ATTACHMENT');

Modified: branches/stable/titania/includes/objects/contribution.php
==============================================================================
*** branches/stable/titania/includes/objects/contribution.php (original)
--- branches/stable/titania/includes/objects/contribution.php Fri Apr 30 00:29:41 2010
***************
*** 453,467 ****
  	* Build view URL for a contribution
  	*
  	* @param string $page The page we are on (Ex: faq/support/details)
  	*/
! 	public function get_url($page = '')
  	{
  		if ($page)
  		{
! 			return titania_url::build_url(titania_types::$types[$this->contrib_type]->url . '/' . $this->contrib_name_clean . '/' . $page);
  		}
  
! 		return titania_url::build_url(titania_types::$types[$this->contrib_type]->url . '/' . $this->contrib_name_clean);
  	}
  
  	/**
--- 453,468 ----
  	* Build view URL for a contribution
  	*
  	* @param string $page The page we are on (Ex: faq/support/details)
+ 	* @param array $parameters The parameters for the page
  	*/
! 	public function get_url($page = '', $parameters = array())
  	{
  		if ($page)
  		{
! 			return titania_url::build_url(titania_types::$types[$this->contrib_type]->url . '/' . $this->contrib_name_clean . '/' . $page, $parameters);
  		}
  
! 		return titania_url::build_url(titania_types::$types[$this->contrib_type]->url . '/' . $this->contrib_name_clean, $parameters);
  	}
  
  	/**

Modified: branches/stable/titania/includes/objects/revision.php
==============================================================================
*** branches/stable/titania/includes/objects/revision.php (original)
--- branches/stable/titania/includes/objects/revision.php Fri Apr 30 00:29:41 2010
***************
*** 135,140 ****
--- 135,141 ----
  			'PHPBB_VERSION'		=> (sizeof($this->phpbb_versions) == 1) ? $versions[$this->phpbb_versions[0]['phpbb_version_branch'] . $this->phpbb_versions[0]['phpbb_version_revision']] : '',
  
  			'U_DOWNLOAD'		=> $this->get_url(),
+ 			'U_EDIT'			=> ($this->contrib && (phpbb::$auth->acl_get('u_titania_mod_contrib_mod') || titania_types::$types[$this->contrib->contrib_type]->acl_get('moderate'))) ? $this->contrib->get_url('revision_edit', array('revision' => $this->revision_id)) : '',
  
  			'S_VALIDATED'		=> (!$this->revision_validated && titania::$config->use_queue) ? false : true,
  		));
***************
*** 156,167 ****
  			));
  		}
  
  		// Hooks
  		titania::$hook->call_hook(array(__CLASS__, __FUNCTION__), $this, $tpl_block);
  	}
  
  	/**
! 	 * Handle some stuff we need when submitting an attachment
  	 */
  	public function submit()
  	{
--- 157,170 ----
  			));
  		}
  
+ 		phpbb::$template->assign_var('ICON_EDIT', '<img src="' . titania::$images_path . 'icon_edit.gif" alt="' . phpbb::$user->lang['EDIT'] . '" title="' . phpbb::$user->lang['EDIT'] . '" />');
+ 
  		// Hooks
  		titania::$hook->call_hook(array(__CLASS__, __FUNCTION__), $this, $tpl_block);
  	}
  
  	/**
! 	 * Handle some stuff we need when submitting a revision
  	 */
  	public function submit()
  	{

Modified: branches/stable/titania/includes/tools/message.php
==============================================================================
*** branches/stable/titania/includes/tools/message.php (original)
--- branches/stable/titania/includes/tools/message.php Fri Apr 30 00:29:41 2010
***************
*** 143,148 ****
--- 143,159 ----
  		// Submit the data to the post object
  		if (method_exists($this->post_object, 'post_data') && $submit || $preview || $full_editor || ($this->attachments && ($this->attachments->uploaded || $this->attachments->deleted)))
  		{
+ 			// Resync inline attachments if any were deleted
+ 			if ($this->attachments && $this->attachments->deleted)
+ 			{
+ 				$delete = request_var('delete_file', array(0));
+ 				foreach ($delete as $attach_id => $null)
+ 				{
+ 					$index = request_var('index_'.$attach_id, 0);
+ 					$_REQUEST[$this->settings['text_name']] = preg_replace('#\[attachment=([0-9]+)\](.*?)\[\/attachment\]#e', "(\\1 == \$index) ? '' : ((\\1 > \$index) ? '[attachment=' . (\\1 - 1) . ']\\2[/attachment]' : '\\0')", $_REQUEST[$this->settings['text_name']]);
+ 				}
+ 			}
+ 
  			$this->post_object->post_data($this);
  		}
  

Modified: branches/stable/titania/language/en/contributions.php
==============================================================================
*** branches/stable/titania/language/en/contributions.php (original)
--- branches/stable/titania/language/en/contributions.php Fri Apr 30 00:29:41 2010
***************
*** 44,49 ****
--- 44,51 ----
  	'AUTOMOD_RESULTS'						=> '<strong>Please check over the AutoMod install results and make sure that nothing needs to be fixed.<br /><br />If an error comes up and you are certain that the error is incorrect, just hit continue below.</strong>',
  	'AUTOMOD_TEST'							=> 'The Mod will be tested against AutoMod and results will be shown (this may take a few moments, so please be patient).<br /><br />Please hit continue when you are ready.',
  
+ 	'BAD_VERSION_SELECTED'					=> '%s is not a proper phpBB versions.',
+ 
  	'CANNOT_ADD_SELF_COAUTHOR'				=> 'You are the main author, you can not add yourself to the list of co-authors.',
  	'CLEANED_CONTRIB'						=> 'Cleaned contribution',
  	'CONTRIB'								=> 'Contribution',
***************
*** 90,95 ****
--- 92,98 ----
  	'DOWNLOAD_CHECKSUM'						=> 'MD5 checksum',
  	'DUPLICATE_AUTHORS'						=> 'You have the following authors listed as both active and non-active (they can not be both): %s',
  
+ 	'EDIT_REVISION'							=> 'Edit Revision',
  	'EMPTY_CATEGORY'						=> 'Select one category at least',
  	'EMPTY_CONTRIB_DESC'					=> 'Enter the contrib description',
  	'EMPTY_CONTRIB_NAME'					=> 'Enter the contrib name',
***************
*** 120,125 ****
--- 123,129 ----
  	'MPV_TEST'								=> 'The Mod will be tested against MPV and results will be shown (this may take a few moments, so please be patient).<br /><br />Please hit continue when you are ready.',
  	'MPV_TEST_FAILED'						=> 'Sorry, the automatic MPV test failed and your MPV test results are not available.  Please continue.',
  	'MPV_TEST_FAILED_QUEUE_MSG'				=> 'Automated MPV test failed.  [url=%s]Click here to attempt running MPV automatically again[/url]',
+ 	'MUST_SELECT_ONE_VERSION'				=> 'You must select at least one phpBB version.',
  
  	'NEW_CONTRIBUTION'						=> 'New Contribution',
  	'NEW_REVISION'							=> 'New Revision',

Modified: branches/stable/titania/styles/default/template/common/contribution_details.html
==============================================================================
*** branches/stable/titania/styles/default/template/common/contribution_details.html (original)
--- branches/stable/titania/styles/default/template/common/contribution_details.html Fri Apr 30 00:29:41 2010
***************
*** 159,166 ****
  								<!-- ENDIF -->
  							</dd>
  							<dd class="general time-created">{revisions.CREATED}</dd>
! 							<!-- IF not revisions.S_VALIDATED or revisions.REVISION_QUEUE -->
! 							<dd class="general"><!-- IF not revisions.S_VALIDATED --><strong>{L_NOT_VALIDATED}</strong><!-- ENDIF --><!-- IF revisions.REVISION_QUEUE --><!-- IF not revisions.S_VALIDATED --> - <!-- ENDIF --><a href="{revisions.REVISION_QUEUE}">{L_QUEUE}</a><!-- ENDIF --></dd>
  							<!-- ENDIF -->
  						</dl>
  					</li>
--- 159,170 ----
  								<!-- ENDIF -->
  							</dd>
  							<dd class="general time-created">{revisions.CREATED}</dd>
! 							<!-- IF not revisions.S_VALIDATED or revisions.REVISION_QUEUE or revisions.U_EDIT -->
! 							<dd class="general">
! 								<!-- IF not revisions.S_VALIDATED --><strong>{L_NOT_VALIDATED}</strong><!-- ENDIF -->
! 								<!-- IF revisions.REVISION_QUEUE --><!-- IF not revisions.S_VALIDATED --> - <!-- ENDIF --><a href="{revisions.REVISION_QUEUE}">{L_QUEUE}</a><!-- ENDIF -->
! 								<!-- IF revisions.U_EDIT --> <a href="{revisions.U_EDIT}">{ICON_EDIT}</a><!-- ENDIF -->
! 							</dd>
  							<!-- ENDIF -->
  						</dl>
  					</li>

Modified: branches/stable/titania/styles/default/template/posting/attachments/default.html
==============================================================================
*** branches/stable/titania/styles/default/template/posting/attachments/default.html (original)
--- branches/stable/titania/styles/default/template/posting/attachments/default.html Fri Apr 30 00:29:41 2010
***************
*** 26,31 ****
--- 26,32 ----
  				<input type="hidden" name="delete_file[{attach_row.ATTACH_ID}]" value="1" />
  			<!-- ENDIF -->
  			<input type="hidden" name="{FORM_NAME}_attachments[]" value="{attach_row.ATTACH_ID}" />
+ 			<input type="hidden" name="index_{attach_row.ATTACH_ID}" value="{attach_row.S_ROW_COUNT}" />
  		</dd>
  	</dl>
  <!-- END attach_row -->

Modified: branches/stable/titania/styles/default/theme/common.css
==============================================================================
*** branches/stable/titania/styles/default/theme/common.css (original)
--- branches/stable/titania/styles/default/theme/common.css Fri Apr 30 00:29:41 2010
***************
*** 357,363 ****
  }
  
  dd.time-created {
! 	width: 20%;
  }
  
  img.icon {
--- 357,363 ----
  }
  
  dd.time-created {
! 	width: 150px;
  }
  
  img.icon {

Modified: branches/stable/titania/styles/prosilver/template/common/contribution_details.html
==============================================================================
*** branches/stable/titania/styles/prosilver/template/common/contribution_details.html (original)
--- branches/stable/titania/styles/prosilver/template/common/contribution_details.html Fri Apr 30 00:29:41 2010
***************
*** 150,157 ****
  								<!-- ENDIF -->
  							</dd>
  							<dd class="general time-created">{revisions.CREATED}</dd>
! 							<!-- IF not revisions.S_VALIDATED or revisions.REVISION_QUEUE -->
! 							<dd class="general"><!-- IF not revisions.S_VALIDATED --><strong>{L_NOT_VALIDATED}</strong><!-- ENDIF --><!-- IF revisions.REVISION_QUEUE --><!-- IF not revisions.S_VALIDATED --> - <!-- ENDIF --><a href="{revisions.REVISION_QUEUE}">{L_QUEUE}</a><!-- ENDIF --></dd>
  							<!-- ENDIF -->
  						</dl>
  					</li>
--- 150,161 ----
  								<!-- ENDIF -->
  							</dd>
  							<dd class="general time-created">{revisions.CREATED}</dd>
! 							<!-- IF not revisions.S_VALIDATED or revisions.REVISION_QUEUE or revisions.U_EDIT -->
! 							<dd class="general">
! 								<!-- IF not revisions.S_VALIDATED --><strong>{L_NOT_VALIDATED}</strong><!-- ENDIF -->
! 								<!-- IF revisions.REVISION_QUEUE --><!-- IF not revisions.S_VALIDATED --> - <!-- ENDIF --><a href="{revisions.REVISION_QUEUE}">{L_QUEUE}</a><!-- ENDIF -->
! 								<!-- IF revisions.U_EDIT --> <a href="{revisions.U_EDIT}">{ICON_EDIT}</a><!-- ENDIF -->
! 							</dd>
  							<!-- ENDIF -->
  						</dl>
  					</li>

Modified: branches/stable/titania/styles/prosilver/theme/common.css
==============================================================================
*** branches/stable/titania/styles/prosilver/theme/common.css (original)
--- branches/stable/titania/styles/prosilver/theme/common.css Fri Apr 30 00:29:41 2010
***************
*** 315,321 ****
  /* Listings
  --------------------------------------------- */
  #faqlist .topiclist dt {
! 	width: 80%;	
  }
  
  dd.faq-tools {
--- 315,321 ----
  /* Listings
  --------------------------------------------- */
  #faqlist .topiclist dt {
! 	width: 80%;
  }
  
  dd.faq-tools {
***************
*** 351,363 ****
  .container dd.type {
  	width: 15%;
  	text-align: center;
! 	padding-left: 5px;	
! 	padding-right: 5px;	
  }
  
  .container dd.contrib-author {
  	width: 20%;
! 	padding-left: 5px;	
  	padding-right: 5px;
  }
  
--- 351,363 ----
  .container dd.type {
  	width: 15%;
  	text-align: center;
! 	padding-left: 5px;
! 	padding-right: 5px;
  }
  
  .container dd.contrib-author {
  	width: 20%;
! 	padding-left: 5px;
  	padding-right: 5px;
  }
  
***************
*** 398,404 ****
  }
  
  dd.time-created {
! 	width: 20%;
  }
  
  img.icon {
--- 398,404 ----
  }
  
  dd.time-created {
! 	width: 150px;
  }
  
  img.icon {




More information about the customisationdb-commits mailing list