[Customisation Database Commits] r941 - in /trunk/titania: includes/objects/queue.php includes/tools/contrib_tools.php index.php store/phpbb_packages/extracted/

Nathan Guse exreaction at phpbb.com
Tue Mar 30 03:20:10 BST 2010


Author: exreaction
Date: Tue Mar 30 03:20:10 2010
New Revision: 941

Log:
Fix some small things

Modified:
    trunk/titania/includes/objects/queue.php
    trunk/titania/includes/tools/contrib_tools.php
    trunk/titania/index.php
    trunk/titania/store/phpbb_packages/extracted/   (props changed)

Modified: trunk/titania/includes/objects/queue.php
==============================================================================
*** trunk/titania/includes/objects/queue.php (original)
--- trunk/titania/includes/objects/queue.php Tue Mar 30 03:20:10 2010
***************
*** 199,205 ****
  		// Add the queue notes
  		$queue_notes = $this->queue_notes;
  		decode_message($queue_notes, $this->queue_notes_uid);
! 		$post->post_text .= '[quote="' . phpbb::$user->lang['VALIDATION_NOTES'] . '"]' . $queue_notes . "[/quote]\n\n";
  
  		// Add the MPV results
  		if ($this->mpv_results)
--- 199,208 ----
  		// Add the queue notes
  		$queue_notes = $this->queue_notes;
  		decode_message($queue_notes, $this->queue_notes_uid);
! 		if ($queue_notes)
! 		{
! 			$post->post_text .= '[quote="' . phpbb::$user->lang['VALIDATION_NOTES'] . '"]' . $queue_notes . "[/quote]\n\n";
! 		}
  
  		// Add the MPV results
  		if ($this->mpv_results)

Modified: trunk/titania/includes/tools/contrib_tools.php
==============================================================================
*** trunk/titania/includes/tools/contrib_tools.php (original)
--- trunk/titania/includes/tools/contrib_tools.php Tue Mar 30 03:20:10 2010
***************
*** 456,462 ****
  				$this->mvdir_recursive($phpbb_root . $package_root, $phpbb_root);
  
  				// Now remove the old directory
! 				$this->rmdir_recursive($phpbb_root . $sub_dir . '/');
  			}
  		}
  
--- 456,462 ----
  				$this->mvdir_recursive($phpbb_root . $package_root, $phpbb_root);
  
  				// Now remove the old directory
! 				$this->rmdir_recursive($phpbb_root . $sub_dir);
  			}
  		}
  
***************
*** 631,645 ****
  	*/
  	public function mvdir_recursive($source, $destination)
  	{
! 		if ($source[strlen($source) - 1] != '/')
! 		{
! 			$source .= '/';
! 		}
! 
! 		if ($destination[strlen($destination) - 1] != '/')
! 		{
! 			$destination .= '/';
! 		}
  
  		if (!is_dir($source))
  		{
--- 631,638 ----
  	*/
  	public function mvdir_recursive($source, $destination)
  	{
! 		$source = (substr($source, -1) == '/') ? $source : $source . '/';
! 		$destination = (substr($destination, -1) == '/') ? $destination : $destination . '/';
  
  		if (!is_dir($source))
  		{
***************
*** 677,682 ****
--- 670,677 ----
  	*/
  	public function mkdir_recursive($target_filename)
  	{
+ 		$target_filename = (substr($target_filename, -1) == '/') ? $target_filename : $target_filename . '/';
+ 
  		if (!is_dir($target_filename))
  		{
  			$str = '';
***************
*** 708,718 ****
  	*/
  	public function rmdir_recursive($target_filename)
  	{
! 		// Prevent getting out of our temp directory
! 		if (strpos($target_filename, titania::$config->contrib_temp_path) !== 0 || strpos(str_replace(titania::$config->contrib_temp_path, '', $target_filename), '..') !== false)
! 		{
! 			return false;
! 		}
  
  		if (!is_dir($target_filename))
  		{
--- 703,709 ----
  	*/
  	public function rmdir_recursive($target_filename)
  	{
! 		$target_filename = (substr($target_filename, -1) == '/') ? $target_filename : $target_filename . '/';
  
  		if (!is_dir($target_filename))
  		{
***************
*** 735,741 ****
  				@unlink($target_filename . $item);
  			}
          }
- 
  		return @rmdir($target_filename);
  	}
  
--- 726,731 ----

Modified: trunk/titania/index.php
==============================================================================
*** trunk/titania/index.php (original)
--- trunk/titania/index.php Tue Mar 30 03:20:10 2010
***************
*** 178,185 ****
  			$queue->submit();
  
  			$contrib_tools->remove_temp_files();
  
! 			unset($contrib_tools);
  		}
  
  		redirect(titania_url::build_url('manage/queue', array('queue' => titania_types::$types[$queue->queue_type]->url, 'q' => $queue->queue_id)));
--- 178,188 ----
  			$queue->submit();
  
  			$contrib_tools->remove_temp_files();
+ 		}
  
! 		if (sizeof($contrib_tools->error))
! 		{
! 			trigger_error(implode('<br />', $contrib_tools->error));
  		}
  
  		redirect(titania_url::build_url('manage/queue', array('queue' => titania_types::$types[$queue->queue_type]->url, 'q' => $queue->queue_id)));

Propchange: trunk/titania/store/phpbb_packages/extracted/
------------------------------------------------------------------------------
*** svn:ignore (original)
--- svn:ignore Tue Mar 30 03:20:10 2010
***************
*** 1 ****
--- 1,2 ----
+ 3.0.6
  3.0.7-pl1




More information about the customisationdb-commits mailing list