Bug Bug in gallery

Status
Not open for further replies.
Possible solution - add exit() call after echo file_get_contents call in DBTECH_GALLERY::fetch_thumb_display and similar methods.

dbtech\gallery\includes\class_core.php
PHP:
	public static function fetch_thumb_display($imageid)
	{
		global $stylevar;

		$image_query = self::$vbulletin->db->query_first_slave("
			SELECT 
				dateline, 
				filetype
			FROM " . TABLE_PREFIX . "dbtech_gallery_images 
			WHERE 
				imageid = " . intval($imageid)
		);

		$file_dir = self::fetch_image_path($imageid, 'local');

		if (($image_query['filetype'] == 'flv') || ($image_query['filetype'] == 'swf'))
		{
			$img_location = $file_dir . '/thumb/' . $imageid . '_' . $image_query['dateline'] . '.png';
		} else {
			$img_location = $file_dir . '/thumb/' . $imageid . '_' . $image_query['dateline'] . '.' . $image_query['filetype'];
		}

		if (!file_exists($img_location))
		{
			$img_location = 'dbtech/gallery/images/missing_image_thumb.png';
			$noimage = true;
		}

		switch ($image_query['filetype'])
		{
			case 'gif':
				$mime_type = 'image/gif';
				break;
			case 'jpeg':
			case 'jpg':
				$mime_type = 'image/jpeg';
				break;
			case 'png':
				$mime_type = 'image/png';
				break;
		}

		header("Content-type: " . $mime_type); 
		echo file_get_contents($img_location);


		exit(); //<---- here it is


	}
 
I've hotfixed v1.3.2 with that script termination and added it to a few other locations that had the same issue. Could you re-download v1.3.2 and re-upload dbtech/gallery/includes/class_core.php and let me know if it works correctly for you when displaying thumbnails and images themselves?
 
Status
Not open for further replies.

Legacy DragonByte Gallery

vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
862
Customer rating
0.00 star(s) 0 ratings
Back
Top