~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to lib/Controller/Settings.php

  • Committer: GitHub
  • Author(s): Dan Garner
  • Date: 2018-06-20 16:27:37 UTC
  • mfrom: (652)
  • mto: This revision was merged to the branch mainline in revision 653.
  • Revision ID: git-v1:1a1ca01506202d782ed245fa27b6ce6c32f0a216
Merge branch 'release18' into bugfix/1.8.10-pack2

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
namespace Xibo\Controller;
22
22
use Respect\Validation\Validator as v;
23
23
use Xibo\Exception\AccessDeniedException;
 
24
use Xibo\Exception\NotFoundException;
24
25
use Xibo\Factory\LayoutFactory;
25
26
use Xibo\Factory\SettingsFactory;
26
27
use Xibo\Service\ConfigServiceInterface;
137
138
                // convert to a dropdown
138
139
                $setting['fieldType'] = 'dropdown';
139
140
 
140
 
                foreach ($this->layoutFactory->query(null, ['disableUserCheck' => 1]) as $layout) {
 
141
                try {
141
142
                    /** @var \Xibo\Entity\Layout $layout */
142
 
                    $options[] = ['id' => $layout->layoutId, 'value' => $layout->layout];
 
143
                    $options[] = $this->layoutFactory->getById($setting['value']);
 
144
                } catch (NotFoundException $notFoundException) {
 
145
                    $options = [];
143
146
                }
144
147
 
145
148
            } else {