Skip to content

Commit

Permalink
Put glue before array in all join() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
dicksonlaw583 committed Oct 7, 2020
1 parent ae41245 commit 2f2c37e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions libraries/IiifItems/IiifUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ protected static function addDublinCoreMetadata(&$jsonData, $record) {
));
if (isset($elements['Dublin Core'])) {
if (isset($elements['Dublin Core']['Title'])) {
$jsonData['label'] = join($elements['Dublin Core']['Title'], ' ');
$jsonData['label'] = join(' ', $elements['Dublin Core']['Title']);
unset($elements['Dublin Core']['Title']);
}
if (isset($elements['Dublin Core']['Description'])) {
$jsonData['description'] = join($elements['Dublin Core']['Description'], '<br>');
$jsonData['description'] = join('<br>', $elements['Dublin Core']['Description']);
unset($elements['Dublin Core']['Description']);
}
if (isset($elements['Dublin Core']['Publisher'])) {
$jsonData['attribution'] = join($elements['Dublin Core']['Publisher'], '<br>');
$jsonData['attribution'] = join('<br>', $elements['Dublin Core']['Publisher']);
unset($elements['Dublin Core']['Publisher']);
}
if (isset($elements['Dublin Core']['Rights'])) {
$jsonData['license'] = join($elements['Dublin Core']['Rights'], '<br>');
$jsonData['license'] = join('<br>', $elements['Dublin Core']['Rights']);
unset($elements['Dublin Core']['Rights']);
}
if (!empty($elements['Dublin Core'])) {
Expand All @@ -79,7 +79,7 @@ protected static function addDublinCoreMetadata(&$jsonData, $record) {
foreach ($elements['Dublin Core'] as $elementName => $elementContent) {
$jsonData['metadata'][] = array(
'label' => $elementName,
'value' => join($elementContent, '<br>')
'value' => join('<br>', $elementContent)
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions libraries/IiifItems/Migration/0_0_1_7.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class IiifItems_Migration_0_0_1_7 extends IiifItems_BaseMigration {
public function up() {
// Copy over placeholder images
$storage = Zend_Registry::get('storage');
$placeholderDir = join(array(__DIR__, '..', '..', '..', 'placeholders'), DIRECTORY_SEPARATOR);
$placeholderDir = join(DIRECTORY_SEPARATOR, array(__DIR__, '..', '..', '..', 'placeholders'));
foreach (array_diff(scandir($placeholderDir), array('.', '..')) as $fname) {
try {
copy($placeholderDir . DIRECTORY_SEPARATOR . $fname, $storage->getTempDir() . DIRECTORY_SEPARATOR . $fname);
Expand All @@ -29,7 +29,7 @@ public function up() {
public function uninstall() {
// Uninstall placeholder images
$storage = Zend_Registry::get('storage');
$placeholderDir = join(array(__DIR__, '..', '..', '..', 'placeholders'), DIRECTORY_SEPARATOR);
$placeholderDir = join(DIRECTORY_SEPARATOR, array(__DIR__, '..', '..', '..', 'placeholders'));
foreach (array_diff(scandir($placeholderDir), array('.', '..')) as $fname) {
try {
$storage->delete($storage->getPathByType($fname, 'original'));
Expand Down
2 changes: 1 addition & 1 deletion libraries/IiifItems/Util/Annotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public static function findAnnotationsForNonIiif($item) {
'resource' => array(
'@type' => 'dctypes:Text',
'format' => 'text/html',
'chars' => '<ul><li>' . join($fileLinks, '</li><li>') . '</li></ul>'
'chars' => '<ul><li>' . join('</li><li>', $fileLinks) . '</li></ul>'
),
));
}
Expand Down

0 comments on commit 2f2c37e

Please sign in to comment.