~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to lib/Controller/Error.php

  • Committer: Dan Garner
  • Date: 2015-11-20 14:18:04 UTC
  • mfrom: (454.3.22)
  • Revision ID: git-v1:140e411ecd1777e5e9a27bf4326db2d8f947d534
Merge pull request #125 from dasgarner/upgrader

Upgrader

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
use Xibo\Exception\FormExpiredException;
15
15
use Xibo\Exception\InstanceSuspendedException;
16
16
use Xibo\Exception\NotFoundException;
 
17
use Xibo\Exception\UpgradePendingException;
 
18
use Xibo\Helper\Config;
17
19
use Xibo\Helper\Log;
18
20
use Xibo\Helper\Translate;
19
21
 
115
117
                    // get the exception class
116
118
                    $exceptionClass = 'error-' . strtolower(str_replace('\\', '-', get_class($e)));
117
119
 
 
120
                    // An upgrade might be pending
 
121
                    if ($e instanceof AccessDeniedException && Config::isUpgradePending())
 
122
                        $exceptionClass = 'upgrade-in-progress-page';
 
123
 
118
124
                    if (file_exists(PROJECT_ROOT . '/views/' . $exceptionClass . '.twig'))
119
125
                        $this->getState()->template = $exceptionClass;
120
126
                    else
181
187
            || $e instanceof NotFoundException
182
188
            || $e instanceof InstanceSuspendedException
183
189
            || $e instanceof ConfigurationException
 
190
            || $e instanceof UpgradePendingException
184
191
        );
185
192
    }
186
193
}
 
 
b'\\ No newline at end of file'