@@ -327,9 +327,9 @@ |
||
327 | 327 | |
328 | 328 | // Now fetch these anniversaries |
329 | 329 | foreach ([ |
330 | - 'INDI' => $ind_sql . $where . $order_by, |
|
331 | - 'FAM' => $fam_sql . $where . $order_by, |
|
332 | - ] as $type => $sql) { |
|
330 | + 'INDI' => $ind_sql . $where . $order_by, |
|
331 | + 'FAM' => $fam_sql . $where . $order_by, |
|
332 | + ] as $type => $sql) { |
|
333 | 333 | $rows = Database::prepare($sql)->execute($args)->fetchAll(); |
334 | 334 | foreach ($rows as $row) { |
335 | 335 | if ($type === 'INDI') { |
@@ -377,7 +377,7 @@ |
||
377 | 377 | |
378 | 378 | // convert separate place fields into a comma separated placename |
379 | 379 | $fqdn = implode(Place::GEDCOM_SEPARATOR, array_filter(array_reverse( |
380 | - \array_slice($row, 1, $fields - 5)))); |
|
380 | + \array_slice($row, 1, $fields - 5)))); |
|
381 | 381 | |
382 | 382 | $places[] = [ |
383 | 383 | 'pl_level' => $row[0], |
@@ -160,8 +160,8 @@ |
||
160 | 160 | $html = ''; |
161 | 161 | foreach ($options as $value => $option) { |
162 | 162 | $option_attributes = self::attributes([ |
163 | - 'value' => $value, |
|
164 | - 'selected' => \in_array((string)$value, $selected), |
|
163 | + 'value' => $value, |
|
164 | + 'selected' => \in_array((string)$value, $selected), |
|
165 | 165 | ]); |
166 | 166 | |
167 | 167 | $html .= '<option ' . $option_attributes . '>' . e($option) . '</option>'; |
@@ -123,49 +123,49 @@ |
||
123 | 123 | |
124 | 124 | <p class="card-text"> |
125 | 125 | <?php |
126 | - // Show file details |
|
127 | - $mediatype = $media_file->type(); |
|
128 | - if ($mediatype) { |
|
129 | - echo GedcomTag::getLabelValue('TYPE', GedcomTag::getFileFormTypeValue($mediatype)); |
|
130 | - } |
|
131 | - echo FunctionsPrintFacts::printFactSources($tree, $media_object->getGedcom(), 1); |
|
132 | - echo FunctionsPrint::printFactNotes($tree, $media_object->getGedcom(), 1); |
|
133 | - if ($media_file->isExternal()) { |
|
134 | - echo GedcomTag::getLabelValue('URL', $media_file->filename()); |
|
135 | - } elseif ($media_file->fileExists()) { |
|
136 | - ?> |
|
126 | + // Show file details |
|
127 | + $mediatype = $media_file->type(); |
|
128 | + if ($mediatype) { |
|
129 | + echo GedcomTag::getLabelValue('TYPE', GedcomTag::getFileFormTypeValue($mediatype)); |
|
130 | + } |
|
131 | + echo FunctionsPrintFacts::printFactSources($tree, $media_object->getGedcom(), 1); |
|
132 | + echo FunctionsPrint::printFactNotes($tree, $media_object->getGedcom(), 1); |
|
133 | + if ($media_file->isExternal()) { |
|
134 | + echo GedcomTag::getLabelValue('URL', $media_file->filename()); |
|
135 | + } elseif ($media_file->fileExists()) { |
|
136 | + ?> |
|
137 | 137 | <button class="btn btn-secondary" type="button" data-toggle="collapse" data-target="#details-<?= e($n) ?>" aria-expanded="false" aria-controls="details-<?= e($n) ?>"> |
138 | 138 | <?= I18N::translate('Media file') ?> |
139 | 139 | </button> |
140 | 140 | <div class="collapse" id="details-<?= e($n) ?>"> |
141 | 141 | <?php |
142 | - if (Auth::isEditor($tree)) { |
|
143 | - echo GedcomTag::getLabelValue('FILE', $media_file->filename()); |
|
144 | - } |
|
145 | - echo GedcomTag::getLabelValue('FORM', $media_file->mimeType()); |
|
146 | - foreach ($media_file->attributes() as $tag => $value) { |
|
147 | - echo GedcomTag::getLabelValue($tag, $value); |
|
148 | - } |
|
149 | - ?> |
|
142 | + if (Auth::isEditor($tree)) { |
|
143 | + echo GedcomTag::getLabelValue('FILE', $media_file->filename()); |
|
144 | + } |
|
145 | + echo GedcomTag::getLabelValue('FORM', $media_file->mimeType()); |
|
146 | + foreach ($media_file->attributes() as $tag => $value) { |
|
147 | + echo GedcomTag::getLabelValue($tag, $value); |
|
148 | + } |
|
149 | + ?> |
|
150 | 150 | </div> |
151 | 151 | <?php |
152 | - } else { |
|
153 | - echo '<p class="alert alert-danger">', /* I18N: %s is a filename */ I18N::translate('The file “%s” does not exist.', $media_file->filename()), '</p>'; |
|
154 | - } |
|
155 | - ?> |
|
152 | + } else { |
|
153 | + echo '<p class="alert alert-danger">', /* I18N: %s is a filename */ I18N::translate('The file “%s” does not exist.', $media_file->filename()), '</p>'; |
|
154 | + } |
|
155 | + ?> |
|
156 | 156 | </p> |
157 | 157 | </div> |
158 | 158 | <div class="card-footer"> |
159 | 159 | <?php |
160 | - foreach ($media_object->linkedIndividuals('OBJE') as $individual) { |
|
161 | - echo '<a href="' . e($individual->url()) . '">' . FontAwesome::semanticIcon('individual', I18N::translate('Individual')) . ' ' . $individual->getFullName() . '</a><br>'; |
|
162 | - } |
|
163 | - foreach ($media_object->linkedFamilies('OBJE') as $family) { |
|
164 | - echo '<a href="' . e($family->url()) . '">' . FontAwesome::semanticIcon('family', I18N::translate('Family')) . ' ' . $family->getFullName() . '</a><br>'; |
|
165 | - } |
|
166 | - foreach ($media_object->linkedSources('OBJE') as $source) { |
|
167 | - echo '<a href="' . e($source->url()) . '">' . FontAwesome::semanticIcon('source', I18N::translate('Source')) . ' ' . $source->getFullName() . '</a><br>'; |
|
168 | - } ?> |
|
160 | + foreach ($media_object->linkedIndividuals('OBJE') as $individual) { |
|
161 | + echo '<a href="' . e($individual->url()) . '">' . FontAwesome::semanticIcon('individual', I18N::translate('Individual')) . ' ' . $individual->getFullName() . '</a><br>'; |
|
162 | + } |
|
163 | + foreach ($media_object->linkedFamilies('OBJE') as $family) { |
|
164 | + echo '<a href="' . e($family->url()) . '">' . FontAwesome::semanticIcon('family', I18N::translate('Family')) . ' ' . $family->getFullName() . '</a><br>'; |
|
165 | + } |
|
166 | + foreach ($media_object->linkedSources('OBJE') as $source) { |
|
167 | + echo '<a href="' . e($source->url()) . '">' . FontAwesome::semanticIcon('source', I18N::translate('Source')) . ' ' . $source->getFullName() . '</a><br>'; |
|
168 | + } ?> |
|
169 | 169 | </div> |
170 | 170 | </div> |
171 | 171 | </div> |
@@ -159,16 +159,16 @@ |
||
159 | 159 | </td> |
160 | 160 | <td class="topbottombar width50"> |
161 | 161 | <?php |
162 | - $n = 0; |
|
163 | - foreach (Date::calendarNames() as $newcal => $cal_name) { |
|
164 | - $tmp = $cal_date->convertToCalendar($newcal); |
|
165 | - if ($tmp->inValidRange()) { |
|
166 | - if ($n++) { |
|
167 | - echo ' | '; |
|
168 | - } |
|
169 | - echo '<a ' . (get_class($tmp) === get_class($cal_date) ? 'class="error"' : '') . 'href="' . e(route('calendar', ['cal' => $tmp->format('%@'), 'day' => $tmp->d, 'month' => $tmp->format('%O'), 'year' => $tmp->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'ged' => $tree->getName()])) . '" rel="nofollow">', $cal_name, '</a>'; |
|
170 | - } |
|
171 | - } ?> |
|
162 | + $n = 0; |
|
163 | + foreach (Date::calendarNames() as $newcal => $cal_name) { |
|
164 | + $tmp = $cal_date->convertToCalendar($newcal); |
|
165 | + if ($tmp->inValidRange()) { |
|
166 | + if ($n++) { |
|
167 | + echo ' | '; |
|
168 | + } |
|
169 | + echo '<a ' . (get_class($tmp) === get_class($cal_date) ? 'class="error"' : '') . 'href="' . e(route('calendar', ['cal' => $tmp->format('%@'), 'day' => $tmp->d, 'month' => $tmp->format('%O'), 'year' => $tmp->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'ged' => $tree->getName()])) . '" rel="nofollow">', $cal_name, '</a>'; |
|
170 | + } |
|
171 | + } ?> |
|
172 | 172 | </td> |
173 | 173 | </tr> |
174 | 174 | </table> |