Project

General

Profile

« Previous | Next » 

Revision ce027d48

Added by Katja Luther over 14 years ago

View differences:

modules/cdm_dataportal/cdm_dataportal.theme.php
2362 2362
		if($source->citation){
2363 2363
			$authorTeam = $source->citation->authorTeam->teamMembers;
2364 2364
			if (count($authorTeam) > 2){
2365
				$authorA = $authorTeam[0]->lastname;
2365
				if (isset($authorTeam[0]->lastname)){
2366
					$authorA = $authorTeam[0]->lastname;
2367
				}else{
2368
					$authorA = $authorTeam[0]->titlecache;
2369
					$authorA = substr($authorA, strrpos($authorA, " "));
2370
				}
2366 2371
				$authorA .= " et al.";
2372
			}elseif (count($authorTeam = 2)){
2373
				if (isset($authorTeam[0]->lastname )&& isset($authorTeam[1]->lastname ))
2374
				{
2375
					$authorA = $authorTeam[0]->lastname;
2376
					$authorB = $authorTeam[1]->lastname;
2377
				}else{
2378
					$authorA = $authorTeam[0]->titlecache;
2379
					$authorB = $authorTeam[1]->titlecache;
2380
					$authorA = substr($authorA, strrpos($authorA, " "));
2381
					$authorB = substr($authorB, strrpos($authorB, " "));
2382
				}
2383
				$authorA = $authorA . " & " . $authorB;
2384
			}else{
2385
    			if (isset($authorTeam[0]->lastname))
2386
				{
2387
					$authorA = $authorTeam[0]->lastname;
2388
				}else{
2389
					$authorA = $authorTeam[0]->titlecache;
2390
					$authorA = substr($authorA, strrpos($authorA, " "));
2391
				}
2367 2392
			}
2368
			elseif (count($authorTeam = 2)){
2369
				$authorA = $authorTeam[0] -> lastname . " & " . $authorTeam[1] ->lastname;
2370
			}
2371
			else
2372
		}
2373
		$authorA .= " et al.";
2374
	}
2375
	elseif (count($authorTeam = 2)){
2376
		if (isset($authorTeam[0]->lastname )&& isset($authorTeam[1]->lastname ))
2377
		{
2378
			$authorA = $authorTeam[0]->lastname;
2379
			$authorB = $authorTeam[1]->lastname;
2380
		}else{
2381
			$authorA = $authorTeam[0]->titlecache;
2382
			$authorB = $authorTeam[1]->titlecache;
2383
			$authorA = substr($authorA, strrpos($authorA, " "));
2384
			$authorB = substr($authorB, strrpos($authorB, " "));
2385
		}
2386
		$authorA = $authorA . " & " . $authorB;
2387
	}
2388
	else
2389
    if (isset($authorTeam[0]->lastname))
2390
		{
2391
			$authorA = $authorTeam[0]->lastname;
2392
		}else{
2393
			$authorA = $authorTeam[0]->titlecache;
2394
			$authorA = substr($authorA, strrpos($authorA, " "));
2395
		}
2396
		
2397 2393
		
2398 2394
    	//$authorTeam = $source->citation->authorTeam->titleCache;
2399 2395
		

Also available in: Unified diff