Completed
Push — master ( a26fec...153c83 )
by Jonathan
15:10
created
src/Webtrees/Functions/FunctionsPrint.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 * @return string List of elements
32 32
 	 */
33 33
 	public static function getListFromArray(array $array) {
34
-		$n=count($array);
34
+		$n = count($array);
35 35
 		switch ($n) {
36 36
 			case 0:
37 37
 				return '';
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 			default:
41 41
 				return implode(
42 42
 						/* I18N: list separator */ I18N::translate(', '), 
43
-						array_slice($array, 0, $n-1)
44
-					) .
45
-					/* I18N: last list separator, " and " in English, " et " in French  */ I18N::translate(' and ') . 
46
-					$array[$n-1];
43
+						array_slice($array, 0, $n - 1)
44
+					).
45
+					/* I18N: last list separator, " and " in English, " et " in French  */ I18N::translate(' and '). 
46
+					$array[$n - 1];
47 47
 		}
48 48
 	}
49 49
 
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
 			\MyArtJaub\Webtrees\Map\MapProviderInterface $mapProvider
60 60
 	) {
61 61
 		$place = $fact->getPlace();
62
-		if(!$place->isEmpty()) {
63
-			$iconPlace= $mapProvider->getPlaceIcon($place);	
64
-			if($iconPlace && strlen($iconPlace) > 0){
65
-				return	'<div class="fact_flag">'. self::htmlPlaceIcon($place, $iconPlace, 50). '</div>';
62
+		if (!$place->isEmpty()) {
63
+			$iconPlace = $mapProvider->getPlaceIcon($place);	
64
+			if ($iconPlace && strlen($iconPlace) > 0) {
65
+				return	'<div class="fact_flag">'.self::htmlPlaceIcon($place, $iconPlace, 50).'</div>';
66 66
 			}
67 67
 		}
68 68
 		return '';
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
 	 * @param number $size
77 77
 	 * @return string HTML code of the inserted flag
78 78
 	 */
79
-	public static function htmlPlaceIcon(\Fisharebest\Webtrees\Place $place, $icon_path , $size = 50) {
80
-	    return '<img class="flag_gm_h'. $size . '" src="' . $icon_path . '" title="' . $place->getGedcomName() . '" alt="' . $place->getGedcomName() . '" />';
79
+	public static function htmlPlaceIcon(\Fisharebest\Webtrees\Place $place, $icon_path, $size = 50) {
80
+	    return '<img class="flag_gm_h'.$size.'" src="'.$icon_path.'" title="'.$place->getGedcomName().'" alt="'.$place->getGedcomName().'" />';
81 81
 	}
82 82
 	
83 83
 	/**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 		$minimum = PHP_INT_MAX;
96 96
 		$maximum = 1;
97 97
 		foreach ($list as $params) {
98
-			if(array_key_exists('count', $params)) {
98
+			if (array_key_exists('count', $params)) {
99 99
 				$maximum = max($maximum, $params['count']);
100 100
 				$minimum = min($minimum, $params['count']);
101 101
 			}
@@ -113,15 +113,15 @@  discard block
 block discarded – undo
113 113
 				$size = 75.0 + 125.0 * ($count - $minimum) / ($maximum - $minimum);
114 114
 			}
115 115
 			
116
-			$html .= '<a style="font-size:' . $size . '%" href="' . $url . '">';
116
+			$html .= '<a style="font-size:'.$size.'%" href="'.$url.'">';
117 117
 			if ($totals) {
118
-				$html .= I18N::translate('%1$s (%2$s)', '<span dir="auto">' . $text . '</span>', I18N::number($count));
118
+				$html .= I18N::translate('%1$s (%2$s)', '<span dir="auto">'.$text.'</span>', I18N::number($count));
119 119
 			} else {
120 120
 				$html .= $text;
121 121
 			}
122 122
 			$html .= '</a>';
123 123
 		}
124
-		return '<div class="tag_cloud">' . $html . '</div>';
124
+		return '<div class="tag_cloud">'.$html.'</div>';
125 125
 	}
126 126
 	
127 127
 
@@ -156,11 +156,11 @@  discard block
 block discarded – undo
156 156
 	 * @param bool $isStrong Bolden the name ?
157 157
 	 * @return string HTML Code for individual item
158 158
 	 */
159
-	public static function htmlIndividualForList(\Fisharebest\Webtrees\Individual $individual, $isStrong = true){
159
+	public static function htmlIndividualForList(\Fisharebest\Webtrees\Individual $individual, $isStrong = true) {
160 160
 		$html = '';
161 161
 		$tag = 'em';
162
-		if($isStrong) $tag = 'strong';
163
-		if($individual && $individual->canShow()){
162
+		if ($isStrong) $tag = 'strong';
163
+		if ($individual && $individual->canShow()) {
164 164
 			$dindi = new Individual($individual);
165 165
 			$html = $individual->getSexImage();
166 166
 			$html .= '<a class="list_item" href="'.
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 			$html .= '</a>';
176 176
 		}
177 177
 		else {
178
-			$html .= '<span class=\"list_item\"><'.$tag.'>' . I18N::translate('Private') . '</'.$tag.'></span>';
178
+			$html .= '<span class=\"list_item\"><'.$tag.'>'.I18N::translate('Private').'</'.$tag.'></span>';
179 179
 		}
180 180
 		return $html;
181 181
 	}
@@ -187,22 +187,22 @@  discard block
 block discarded – undo
187 187
 	 * @param boolean $anchor option to print a link to calendar
188 188
 	 * @return string HTML code for short date
189 189
 	 */
190
-	public static function formatFactDateShort(\Fisharebest\Webtrees\Fact $fact, $anchor=false) {
190
+	public static function formatFactDateShort(\Fisharebest\Webtrees\Fact $fact, $anchor = false) {
191 191
 		global $SEARCH_SPIDER;
192 192
 
193
-		$html='';
193
+		$html = '';
194 194
 		$date = $fact->getDate();
195
-		if($date->isOK()){
196
-			$html.=' '.$date->Display($anchor && !$SEARCH_SPIDER, '%Y');
195
+		if ($date->isOK()) {
196
+			$html .= ' '.$date->Display($anchor && !$SEARCH_SPIDER, '%Y');
197 197
 		}
198
-		else{
198
+		else {
199 199
 			// 1 DEAT Y with no DATE => print YES
200 200
 			// 1 BIRT 2 SOUR @S1@ => print YES
201 201
 			// 1 DEAT N is not allowed
202 202
 			// It is not proper GEDCOM form to use a N(o) value with an event tag to infer that it did not happen.
203 203
 			$factdetail = explode(' ', trim($fact->getGedcom()));
204 204
 			if (isset($factdetail) && (count($factdetail) == 3 && strtoupper($factdetail[2]) == 'Y') || (count($factdetail) == 4 && $factdetail[2] == 'SOUR')) {
205
-				$html.=I18N::translate('yes');
205
+				$html .= I18N::translate('yes');
206 206
 			}
207 207
 		}
208 208
 		return $html;
@@ -216,12 +216,12 @@  discard block
 block discarded – undo
216 216
 	 * @param boolean $anchor option to print a link to placelist
217 217
 	 * @return string HTML code for short place
218 218
 	 */
219
-	public static function formatFactPlaceShort(\Fisharebest\Webtrees\Fact $fact, $format, $anchor=false){
220
-		$html='';
219
+	public static function formatFactPlaceShort(\Fisharebest\Webtrees\Fact $fact, $format, $anchor = false) {
220
+		$html = '';
221 221
 		
222 222
 		if ($fact === null) return $html;
223 223
 		$place = $fact->getPlace();
224
-		if($place){
224
+		if ($place) {
225 225
 			$dplace = new Place($place);
226 226
 			$html .= $dplace->htmlFormattedName($format, $anchor);
227 227
 		}
@@ -239,21 +239,21 @@  discard block
 block discarded – undo
239 239
 	 * @param string $size CSS size for the icon. A CSS style css_$size is required
240 240
 	 * @return string HTML code for the formatted Sosa numbers
241 241
 	 */
242
-	public static function formatSosaNumbers(array $sosatab, $format = 1, $size = 'small'){
242
+	public static function formatSosaNumbers(array $sosatab, $format = 1, $size = 'small') {
243 243
 		$html = '';
244
-		switch($format){
244
+		switch ($format) {
245 245
 			case 1:
246
-				if(count($sosatab)>0){
246
+				if (count($sosatab) > 0) {
247 247
 					$html = '<i class="icon-maj-sosa_'.$size.'" title="'.I18N::translate('Sosa').'"></i>';
248 248
 				}
249 249
 				break;
250 250
 			case 2:
251
-				if(count($sosatab)>0){
251
+				if (count($sosatab) > 0) {
252 252
 					ksort($sosatab);
253 253
 					$tmp_html = array();
254 254
 					foreach ($sosatab as $sosa => $gen) {
255 255
 						$tmp_html[] = sprintf(
256
-								'<i class="icon-maj-sosa_%1$s" title="'.I18N::translate('Sosa').'"></i>&nbsp;<strong>%2$d&nbsp;'.I18N::translate('(G%s)', $gen) .'</strong>',
256
+								'<i class="icon-maj-sosa_%1$s" title="'.I18N::translate('Sosa').'"></i>&nbsp;<strong>%2$d&nbsp;'.I18N::translate('(G%s)', $gen).'</strong>',
257 257
 								$size,
258 258
 								$sosa
259 259
 							);
@@ -279,15 +279,15 @@  discard block
 block discarded – undo
279 279
 	 * @param string $size CSS size for the icon. A CSS style css_$size is required
280 280
 	 * @return string HTML code for IsSourced icon
281 281
 	 */
282
-	public static function formatIsSourcedIcon($sourceType, $isSourced, $tag='EVEN', $format = 1, $size='normal'){
283
-		$html='';
284
-		$image=null;
285
-		$title=null;
286
-		switch($format){
282
+	public static function formatIsSourcedIcon($sourceType, $isSourced, $tag = 'EVEN', $format = 1, $size = 'normal') {
283
+		$html = '';
284
+		$image = null;
285
+		$title = null;
286
+		switch ($format) {
287 287
 			case 1:
288
-				switch($sourceType){
288
+				switch ($sourceType) {
289 289
 					case 'E':
290
-						switch($isSourced){
290
+						switch ($isSourced) {
291 291
 							case 0:
292 292
 								$image = 'event_unknown';
293 293
 								$title = I18N::translate('%s not found', GedcomTag::getLabel($tag));
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 						}
318 318
 						break;
319 319
 					case 'R':
320
-						switch($isSourced){
320
+						switch ($isSourced) {
321 321
 							case -1:
322 322
 								$image = 'record_notsourced';
323 323
 								$title = I18N::translate('%s not sourced', GedcomTag::getLabel($tag));
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 					default:
338 338
 						break;
339 339
 				}
340
-				if($image && $title) $html = '<i class="icon-maj-sourced-'.$size.'_'.$image.'" title="'.$title.'"></i>';
340
+				if ($image && $title) $html = '<i class="icon-maj-sourced-'.$size.'_'.$image.'" title="'.$title.'"></i>';
341 341
 				break;
342 342
 			default:
343 343
 				break;
Please login to merge, or discard this patch.
src/Webtrees/Map/GoogleMapsProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@  discard block
 block discarded – undo
25 25
 	 * @see \MyArtJaub\Webtrees\Map\MapProviderInterface::getProviderPlaceId()
26 26
 	 */
27 27
 	public function getProviderPlaceId(\Fisharebest\Webtrees\Place $place) {
28
-		if(!$place->isEmpty()) {
29
-			$parent = array_reverse(explode (',', $place->getGedcomName()));
28
+		if (!$place->isEmpty()) {
29
+			$parent = array_reverse(explode(',', $place->getGedcomName()));
30 30
 			$place_id = 0;
31 31
 			$nb_levels = count($parent);
32
-			for ($i=0; $i < $nb_levels; $i++) {
32
+			for ($i = 0; $i < $nb_levels; $i++) {
33 33
 				$parent[$i] = trim($parent[$i]);
34
-				if (empty($parent[$i])) $parent[$i]='unknown';// GoogleMap module uses "unknown" while GEDCOM uses , ,
35
-				$pl_id=Database::prepare('SELECT pl_id FROM `##placelocation` WHERE pl_level=? AND pl_parent_id=? AND pl_place LIKE ? ORDER BY pl_place')
34
+				if (empty($parent[$i])) $parent[$i] = 'unknown'; // GoogleMap module uses "unknown" while GEDCOM uses , ,
35
+				$pl_id = Database::prepare('SELECT pl_id FROM `##placelocation` WHERE pl_level=? AND pl_parent_id=? AND pl_place LIKE ? ORDER BY pl_place')
36 36
 					->execute(array($i, $place_id, $parent[$i]))
37 37
 					->fetchOne();
38 38
 				if (empty($pl_id)) break;
@@ -48,12 +48,12 @@  discard block
 block discarded – undo
48 48
 	 * @see \MyArtJaub\Webtrees\Map\MapProviderInterface::getPlaceIcon()
49 49
 	 */
50 50
 	public function getPlaceIcon(\Fisharebest\Webtrees\Place $place) {
51
-		if(!$place->isEmpty()){
51
+		if (!$place->isEmpty()) {
52 52
 			$place_details =
53 53
 				Database::prepare('SELECT SQL_CACHE pl_icon FROM `##placelocation` WHERE pl_id=? ORDER BY pl_place')	
54 54
 				->execute(array($this->getProviderPlaceId($place)))
55 55
 				->fetchOneRow();
56
-			if($place_details){
56
+			if ($place_details) {
57 57
 				return WT_MODULES_DIR.'googlemap/'.$place_details->pl_icon;
58 58
 			}
59 59
 		}
Please login to merge, or discard this patch.
src/Webtrees/Module/Sosa/Views/SosaListIndiView.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
 	 */
33 33
     protected function renderContent() { 
34 34
         
35
-        if($this->data->get('has_sosa', false)) {
35
+        if ($this->data->get('has_sosa', false)) {
36 36
             $table_id = $this->data->get('table_id');            
37 37
         ?>   
38 38
         
39 39
         <div id="sosa-indi-list" class="sosa-list">
40
-        	<table id="<?php echo $table_id;?>">
40
+        	<table id="<?php echo $table_id; ?>">
41 41
 				<thead>
42 42
     				<tr>
43 43
     					<th colspan="22">
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 				</thead>
185 185
 			<tbody>
186 186
 			
187
-			<?php foreach($this->data->get('sosa_list') as $sosa => $person) {
187
+			<?php foreach ($this->data->get('sosa_list') as $sosa => $person) {
188 188
 			    /** @var \Fisharebest\Webtrees\Individual $person */
189 189
 			    if ($person->isPendingAddtion()) {
190 190
 			        $class = ' class="new"';
@@ -200,18 +200,18 @@  discard block
 block discarded – undo
200 200
         			<td class="transparent"><?php echo $person->getXref(); ?></td>
201 201
         			<td colspan="2">
202 202
         			<?php foreach ($person->getAllNames() as $num=>$name) {
203
-        				if ($name['type']=='NAME') {
204
-        					$title='';
203
+        				if ($name['type'] == 'NAME') {
204
+        					$title = '';
205 205
         				} else {
206
-        					$title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"';
206
+        					$title = 'title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"';
207 207
         				}
208
-        				if ($num==$person->getPrimaryName()) {
209
-        					$class=' class="name2"';
210
-        					$sex_image=$person->getSexImage();
211
-        					list($surn, $givn)=explode(',', $name['sort']);
208
+        				if ($num == $person->getPrimaryName()) {
209
+        					$class = ' class="name2"';
210
+        					$sex_image = $person->getSexImage();
211
+        					list($surn, $givn) = explode(',', $name['sort']);
212 212
         				} else {
213
-        					$class='';
214
-        					$sex_image='';
213
+        					$class = '';
214
+        					$sex_image = '';
215 215
         				} ?>
216 216
         				<a <?php echo $title.' '.$class; ?> href="<?php echo $person->getHtmlUrl(); ?>">
217 217
         					<?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?>
@@ -224,14 +224,14 @@  discard block
 block discarded – undo
224 224
             		</td>
225 225
             		<td style="display:none;"></td>
226 226
             		<td>
227
-            			<?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)) . 'AAAA' . Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?>
227
+            			<?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)).'AAAA'.Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?>
228 228
             		</td>
229 229
             		<td>
230
-            			<?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)) . 'AAAA' . Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?>
230
+            			<?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)).'AAAA'.Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?>
231 231
             		</td>
232 232
             		<td>
233 233
             		<?php 
234
-            		if ($birth_dates=$person->getAllBirthDates()) {
234
+            		if ($birth_dates = $person->getAllBirthDates()) {
235 235
 			            foreach ($birth_dates as $num=>$birth_date) {
236 236
     					   if ($num) { ?><br/><?php } ?>
237 237
     						<?php  echo $birth_date->display(true);
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
             		} else {
240 240
             		    $birth_date = new Date('');
241 241
             		    if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES')) {
242
-            		        $birth_date=$person->getEstimatedBirthDate();
242
+            		        $birth_date = $person->getEstimatedBirthDate();
243 243
             		        echo $birth_date->display(true);
244 244
             		    } else {
245 245
             		        echo '&nbsp;';
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
             		}
249 249
             		?>
250 250
             		</td>
251
-            		<td><?php echo $birth_date->julianDay();?></td>
251
+            		<td><?php echo $birth_date->julianDay(); ?></td>
252 252
         			<td>
253 253
         			<?php foreach ($person->getAllBirthPlaces() as $n => $birth_place) {
254 254
 				        $tmp = new \Fisharebest\Webtrees\Place($birth_place, $person->getTree());
@@ -345,10 +345,10 @@  discard block
 block discarded – undo
345 345
 							<?php echo I18N::translate('Number of Sosa ancestors: %1$s known / %2$s theoretical (%3$s)',
346 346
 							    I18N::number($this->data->get('sosa_count')),
347 347
 							    I18N::number($this->data->get('sosa_theo')), 
348
-							    I18N::percentage($this->data->get('sosa_ratio'),2)
348
+							    I18N::percentage($this->data->get('sosa_ratio'), 2)
349 349
 							    ); ?>
350
-							<?php if($this->data->get('sosa_hidden') > 0) {
351
-							    echo '['. I18N::translate('%s hidden', I18N::number($this->data->get('sosa_hidden'))).']';
350
+							<?php if ($this->data->get('sosa_hidden') > 0) {
351
+							    echo '['.I18N::translate('%s hidden', I18N::number($this->data->get('sosa_hidden'))).']';
352 352
 							} ?>
353 353
 						</div>
354 354
 					</th>
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 								<button type="button" class="ui-state-default btn-toggle-parents">
361 361
 									<?php echo I18N::translate('Show parents') ?>
362 362
 								</button>
363
-								<button id="btn-toggle-statistics-<?php echo $table_id ;?>" type="button" class="ui-state-default btn-toggle-statistics">
363
+								<button id="btn-toggle-statistics-<?php echo $table_id; ?>" type="button" class="ui-state-default btn-toggle-statistics">
364 364
 									<?php echo I18N::translate('Show statistics charts') ?>
365 365
 								</button>
366 366
 							</div>
Please login to merge, or discard this patch.
src/Webtrees/Module/Sosa/Views/SosaConfigView.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,13 +47,13 @@
 block discarded – undo
47 47
         			<div class="value">
48 48
         				<?php 
49 49
         				    $users = $this->data->get('users_settings');
50
-        				    if(count($users) == 1) {
51
-        				        $root_indi = $users[0]['rootid'];  ?>
50
+        				    if (count($users) == 1) {
51
+        				        $root_indi = $users[0]['rootid']; ?>
52 52
         					<label>
53 53
         						<input id="maj_sosa_input_userid" type="hidden" name="userid" value="<?php echo $users[0]['user']->getUserId(); ?>" />
54 54
         						<?php echo $users[0]['user']->getRealNameHtml() ?>
55 55
         					</label>
56
-        				<?php  } else if(count($users) > 1) { ?>
56
+        				<?php  } else if (count($users) > 1) { ?>
57 57
         					<select id='maj-sosa-config-select' name="userid">
58 58
         					<?php 
59 59
         					   $root_indi = $users[0]['rootid'];
Please login to merge, or discard this patch.
src/Webtrees/Module/Sosa/Views/SosaListMissingView.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
             <div id="maj-sosa-missing-page" class="center">
35 35
     			<h2><?php echo $this->data->get('title'); ?></h2>
36 36
     			
37
-    			<?php  if($this->data->get('is_setup')) { 
37
+    			<?php  if ($this->data->get('is_setup')) { 
38 38
     			    $this->renderSosaHeader();
39
-    			    if($this->data->get('has_missing', false)) {
39
+    			    if ($this->data->get('has_missing', false)) {
40 40
     			        $table_id = $this->data->get('table_id');
41 41
     			        ?>
42 42
     			<div id="sosa-indi-missing" class="smissing-list">
43
-                	<table id="<?php echo $table_id;?>">
43
+                	<table id="<?php echo $table_id; ?>">
44 44
         				<thead>     
45 45
             				<tr>
46 46
     							<th colspan="16">
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         				</thead>
109 109
         			<tbody>
110 110
         			
111
-        			<?php foreach($this->data->get('missing_list') as $missing_tab) {
111
+        			<?php foreach ($this->data->get('missing_list') as $missing_tab) {
112 112
         			    $person = $missing_tab['indi'];
113 113
         			    
114 114
         			    /** @var \Fisharebest\Webtrees\Individual $person */
@@ -126,18 +126,18 @@  discard block
 block discarded – undo
126 126
                 			<td class="transparent"><?php echo $person->getXref(); ?></td>
127 127
                 			<td colspan="2">
128 128
                 			<?php foreach ($person->getAllNames() as $num=>$name) {
129
-                				if ($name['type']=='NAME') {
130
-                					$title='';
129
+                				if ($name['type'] == 'NAME') {
130
+                					$title = '';
131 131
                 				} else {
132
-                					$title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"';
132
+                					$title = 'title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"';
133 133
                 				}
134
-                				if ($num==$person->getPrimaryName()) {
135
-                					$class=' class="name2"';
136
-                					$sex_image=$person->getSexImage();
137
-                					list($surn, $givn)=explode(',', $name['sort']);
134
+                				if ($num == $person->getPrimaryName()) {
135
+                					$class = ' class="name2"';
136
+                					$sex_image = $person->getSexImage();
137
+                					list($surn, $givn) = explode(',', $name['sort']);
138 138
                 				} else {
139
-                					$class='';
140
-                					$sex_image='';
139
+                					$class = '';
140
+                					$sex_image = '';
141 141
                 				} ?>
142 142
                 				<a <?php echo $title.' '.$class; ?> href="<?php echo $person->getHtmlUrl(); ?>">
143 143
                 					<?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?>
@@ -150,10 +150,10 @@  discard block
 block discarded – undo
150 150
                     		</td>
151 151
                     		<td style="display:none;"></td>
152 152
                     		<td>
153
-                    			<?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)) . 'AAAA' . Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?>
153
+                    			<?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)).'AAAA'.Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?>
154 154
                     		</td>
155 155
                     		<td>
156
-                    			<?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)) . 'AAAA' . Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?>
156
+                    			<?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)).'AAAA'.Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?>
157 157
                     		</td>                    		
158 158
                 			<?php if (ModuleManager::getInstance()->isOperational(Constants::MODULE_MAJ_ISSOURCED_NAME)) {
159 159
         				        $isISourced = $dperson->isSourced(); ?>
@@ -163,11 +163,11 @@  discard block
 block discarded – undo
163 163
         					<td>&nbsp;</td>
164 164
         					<td></td>
165 165
         					<?php } ?>
166
-        					<td><?php echo $missing_tab['has_father'] ? '&nbsp;' : 'X';?></td>
167
-        					<td><?php echo $missing_tab['has_mother'] ? '&nbsp;' : 'X';?></td>
166
+        					<td><?php echo $missing_tab['has_father'] ? '&nbsp;' : 'X'; ?></td>
167
+        					<td><?php echo $missing_tab['has_mother'] ? '&nbsp;' : 'X'; ?></td>
168 168
         					<td>
169 169
                     		<?php 
170
-                    		if ($birth_dates=$person->getAllBirthDates()) {
170
+                    		if ($birth_dates = $person->getAllBirthDates()) {
171 171
         			            foreach ($birth_dates as $num=>$birth_date) {
172 172
             					   if ($num) { ?><br/><?php } ?>
173 173
             						<?php  echo $birth_date->display(true);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
                     		} else {
176 176
                     		    $birth_date = new Date('');
177 177
                     		    if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES')) {
178
-                    		        $birth_date=$person->getEstimatedBirthDate();
178
+                    		        $birth_date = $person->getEstimatedBirthDate();
179 179
                     		        echo $birth_date->display(true);
180 180
                     		    } else {
181 181
                     		        echo '&nbsp;';
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
                     		}
185 185
                     		?>
186 186
                     		</td>
187
-                    		<td><?php echo $birth_date->julianDay();?></td>
187
+                    		<td><?php echo $birth_date->julianDay(); ?></td>
188 188
                 			<td>
189 189
                 			<?php foreach ($person->getAllBirthPlaces() as $n => $birth_place) {
190 190
         				        $tmp = new \Fisharebest\Webtrees\Place($birth_place, $person->getTree());
@@ -211,9 +211,9 @@  discard block
 block discarded – undo
211 211
 							<td class="ui-state-default" colspan="16">
212 212
 								<div class="center">
213 213
 									<?php echo I18N::translate('Number of different missing ancestors: %s', I18N::number($this->data->get('missing_diff_count'))); ?>
214
-									<?php if($this->data->get('missing_hidden') > 0) echo ' ['. I18N::translate('%s hidden', I18N::number($this->data->get('missing_hidden'))).']'; ?>
215
-									<?php echo ' - ' . I18N::translate('Generation complete at %s', I18N::percentage($this->data->get('perc_sosa'), 2)); ?>
216
-									<?php echo ' [' . I18N::translate('Potential %s', I18N::percentage($this->data->get('perc_sosa_potential'),2)).']'; ?>
214
+									<?php if ($this->data->get('missing_hidden') > 0) echo ' ['.I18N::translate('%s hidden', I18N::number($this->data->get('missing_hidden'))).']'; ?>
215
+									<?php echo ' - '.I18N::translate('Generation complete at %s', I18N::percentage($this->data->get('perc_sosa'), 2)); ?>
216
+									<?php echo ' ['.I18N::translate('Potential %s', I18N::percentage($this->data->get('perc_sosa_potential'), 2)).']'; ?>
217 217
 								</div>
218 218
 							</td>
219 219
 						</tr>
Please login to merge, or discard this patch.