Project

General

Profile

« Previous | Next » 

Revision 2a4ca2d1

Added by Andreas Kohlbecker over 12 years ago

fixing #2529 (Remove dulicates in image tab)

View differences:

modules/cdm_dataportal/theme/cdm_dataportal.media.theme
255 255
		return;
256 256
	}
257 257

  
258
	// --- duplicate supression: media can be reused but should only be shown once.
259
	$tempMediaList = array();
260
	$tempMediaUuids = array();
261
	foreach ($mediaList as $media) {
262
      if(!in_array($media->uuid, $tempMediaUuids)) {
263
        $tempMediaList[] = $media;
264
        $tempMediaUuids[] = $media->uuid;
265
      }
266
	}
267
	$mediaList = $tempMediaList;
268

  
269
	// ---
258 270
	$galleryID = "media_gallery_".$galleryName;
259 271
	$mediaPartLinkAttributes = array();
260 272
	$openMediaLinkAttributes = array();
......
276 288
		$out .= '<col width="'.(100 / $cols).'%">';
277 289
	}
278 290
	$out .= '</colgroup>';
291

  
292

  
279 293
	for($r = 0; ($r < $maxRows || !$maxRows) && count($mediaList) > 0; $r++){
280 294
		$captionParts = array();
281 295
		$out .= '<tr>';
282 296
		for($c = 0; $c < $cols; $c++){
283 297
			$media = array_shift($mediaList);
298

  
284 299
			if(isset($media->representations[0]->parts[0])){
285 300

  
286 301
				//

Also available in: Unified diff