Skip to content

Commit

Permalink
Fixed indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
surrim authored and garvinhicking committed Feb 20, 2024
1 parent ea7785e commit 383b667
Showing 1 changed file with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ function event_hook($event, &$bag, &$eventData, $addData = null)
);

$total = serendipity_getTotalEntries();
printf(PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL . '</h2>', $total);
printf(PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL . '</h2>', $total);

if (is_array($entries)) {
echo '<ul class="plainList">';
Expand Down Expand Up @@ -839,17 +839,19 @@ function event_hook($event, &$bag, &$eventData, $addData = null)

foreach($properties AS $idx => $row) {
if ($row['property'] == "ep_multi_authors") {
$tmp = explode(";", $row['value']);
$counter = 0;
unset($eventData[$addData[$row['entryid']]]['properties'][$row['property']]);
foreach($tmp as $key => $value) {
if (empty($value)) continue;
$tmp_author_array = serendipity_fetchAuthor($value);
$eventData[$addData[$row['entryid']]]['properties'][$row['property']][$counter]['author_id'] = $value;
$eventData[$addData[$row['entryid']]]['properties'][$row['property']][$counter]['author_name'] = $tmp_author_array[0]['realname'];
$eventData[$addData[$row['entryid']]]['properties'][$row['property']][$counter]['author_url'] = serendipity_authorURL($tmp_author_array[0]);
$counter++;
}
$tmp = explode(";", $row['value']);
$counter = 0;
unset($eventData[$addData[$row['entryid']]]['properties'][$row['property']]);
foreach($tmp as $key => $value) {
if (empty($value)) {
continue;
}
$tmp_author_array = serendipity_fetchAuthor($value);
$eventData[$addData[$row['entryid']]]['properties'][$row['property']][$counter]['author_id'] = $value;
$eventData[$addData[$row['entryid']]]['properties'][$row['property']][$counter]['author_name'] = $tmp_author_array[0]['realname'];
$eventData[$addData[$row['entryid']]]['properties'][$row['property']][$counter]['author_url'] = serendipity_authorURL($tmp_author_array[0]);
$counter++;
}
} else {
$eventData[$addData[$row['entryid']]]['properties'][$row['property']] = $row['value'];
}
Expand Down

0 comments on commit 383b667

Please sign in to comment.