Project

General

Profile

« Previous | Next » 

Revision 032afbf4

Added by Andreas Kohlbecker almost 11 years ago

View differences:

5.x/themes/palmweb_2/template.php
357 357
				$currentRecord = 1;
358 358
				if (!empty($reference->citation->authorTeam->teamMembers)) {
359 359
					foreach ($reference->citation->authorTeam->teamMembers as $teamMember) {
360
						if(!empty($teamMember->lastname)) {
360
						if(!empty($teamMember->lastname) && !empty($teamMember->firstname)) {
361 361
							if ($currentRecord == 1) {
362 362
								$referenceString .= $teamMember->lastname . ", " . $teamMember->firstname;
363 363
							}
......
405 405
				$currentRecord = 1;
406 406
				if (!empty($reference->citation->authorTeam->teamMembers)) {
407 407
					foreach ($reference->citation->authorTeam->teamMembers as $teamMember) {
408
						if(!empty($teamMember->lastname)) {
408
						if(!empty($teamMember->lastname) && !empty($teamMember->firstname)) {
409 409
							if ($currentRecord == 1) {
410 410
								$referenceString .= $teamMember->lastname . ", " . $teamMember->firstname;
411 411
							}
......
451 451
				$referenceString .= "<li class=\"descriptionText DescriptionElement\">";
452 452
				$numberOfTeamMembers = count($reference->citation->authorTeam->teamMembers);
453 453
				$currentRecord = 1;
454
				if (!empty($reference->citation->authorTeam->teamMembers) || $reference->citation->authorTeam->titleCache != "-empty team-") {
454
				if (!empty($reference->citation->authorTeam->teamMembers) && $reference->citation->authorTeam->titleCache != "-empty team-") {
455 455
					foreach ($reference->citation->authorTeam->teamMembers as $teamMember) {
456
						if(!empty($teamMember->lastname)) {
456
						if(!empty($teamMember->lastname) && !empty($teamMember->firstname)) {
457 457
							if ($numberOfTeamMembers != $currentRecord) {
458 458
								$referenceString .= $teamMember->lastname . ", " . $teamMember->firstname. " & ";	
459 459
							}
......
506 506
				$currentRecord = 1;
507 507
				if (!empty($reference->citation->authorTeam->teamMembers)) {
508 508
					foreach ($reference->citation->authorTeam->teamMembers as $teamMember) {
509
						if(!empty($teamMember->lastname)) {
509
						if(!empty($teamMember->lastname) && !empty($teamMember->firstname)) {
510 510
							if ($numberOfTeamMembers != $currentRecord) {
511 511
								$referenceString .= $teamMember->lastname . ", " . $teamMember->firstname. " & ";	
512 512
							}
......
533 533
				$currentRecordinReference = 1;
534 534
				if (!empty($reference->citation->inReference->authorTeam->teamMembers)) {
535 535
					foreach ($reference->citation->inReference->authorTeam->teamMembers as $teamMember) {
536
						if(!empty($teamMember->lastname)) {
536
						if(!empty($teamMember->lastname) && !empty($teamMember->firstname)) {
537 537
							if ($numberOfTeamMembers != $currentRecord) {
538 538
								$referenceString .= $teamMember->lastname . ", " . $teamMember->firstname. " & ";	
539 539
							}
......
573 573
				$currentRecord = 1;
574 574
				if (!empty($reference->citation->authorTeam->teamMembers)) {
575 575
					foreach ($reference->citation->authorTeam->teamMembers as $teamMember) {
576
						if(!empty($teamMember->lastname)) {
576
						if(!empty($teamMember->lastname) && !empty($teamMember->firstname)) {
577 577
							if ($currentRecord == 1) {
578 578
								$referenceString .= $teamMember->lastname . ", " . $teamMember->firstname;
579 579
							}
......
598 598
						}
599 599
					}
600 600
				}
601
				else {
601
				else if(!empty($reference->citation->authorTeam->titleCache)) {
602 602
					$referenceString .= $reference->citation->authorTeam->titleCache;
603 603
					$referenceString .= ((str_endsWith($referenceString, ".") || str_endsWith($referenceString, ". ")) ? " " : ". ");
604 604
				}
605
				else {
606
					$referenceString .= $reference->citation->titleCache;
607
					$referenceString .= ((str_endsWith($out, ".") || str_endsWith($out, ". ")) ? " " : ". ");
608
				}
605 609
				/*else {
606 610
					$referenceString .= $teamMember->lastname . ", " . $teamMember->firstname . " ";
607 611
				}*/
608 612
				if (!empty($reference->citation->datePublished->start)) {
609 613
					$referenceString .= substr($reference->citation->datePublished->start,0,4);
610
					$referenceString .= ((str_endsWith($referenceString, ".") || str_endsWith($referenceString, ". ")) ? "" : ". ");
614
					$referenceString .= ((str_endsWith($referenceString, ".") || str_endsWith($referenceString, ". ")) ? " " : ". ");
611 615
				}
612 616
				$referenceString .= $reference->citation->title . ". " . $reference->citation->publisher;
613
				$referenceString .= ((str_endsWith($referenceString, ".") || str_endsWith($referenceString, ". ")) ? "" : ". ");
617
				$referenceString .= ((str_endsWith($referenceString, ".") || str_endsWith($referenceString, ". ")) ? " " : ". ");
618
				$referenceString .= ((str_endsWith($referenceString, ".") ) ? " " : "");
614 619
				$referenceString .= "</li>";
615 620
				break;
616 621
			default:

Also available in: Unified diff