Skip to content

Commit

Permalink
set error for sources with unknown spout
Browse files Browse the repository at this point in the history
  • Loading branch information
jtojnar committed Jan 9, 2018
1 parent 5aabcd6 commit 77d57d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions helpers/ContentLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public function fetch($source) {
$spout = $spoutLoader->get($source['spout']);
if ($spout === false) {
\F3::get('logger')->error('unknown spout: ' . $source['spout']);
$this->sourceDao->error($source['id'], 'unknown spout');

return;
}
Expand Down
2 changes: 1 addition & 1 deletion templates/source.phtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php $idAttr = isset($this->source) ? $this->source['id'] : 'new-' . rand(); ?>
<div role="form" id="source<?= $idAttr ?>"
class="source <?= isset($this->source) === false ? 'source-new' : '' ?> <?= (isset($this->source) && isset($this->source['error']) && strlen($this->source['error'] > 0)) ? 'error' : '' ?>">
class="source <?= isset($this->source) === false ? 'source-new' : '' ?> <?= (isset($this->source) && isset($this->source['error']) && strlen($this->source['error']) > 0) ? 'error' : '' ?>">
<div class="source-icon">
<?php if (isset($this->source) && isset($this->source['icon']) && $this->source['icon'] !== false && $this->source['icon'] != '0') : ?>
<img src="<?= 'favicons/' . $this->source['icon']; ?>" alt="" />
Expand Down

0 comments on commit 77d57d1

Please sign in to comment.