mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 13:54:26 +02:00
parent
f4dbb4df96
commit
6c9947326d
@ -61,7 +61,10 @@ class Config extends Zend_Config
|
|||||||
$this->configFile = $filepath;
|
$this->configFile = $filepath;
|
||||||
$this->merge(new Zend_Config_Ini($filepath));
|
$this->merge(new Zend_Config_Ini($filepath));
|
||||||
} else {
|
} else {
|
||||||
throw new NotReadableError('Cannot read config file "' . $filename . '". Permission denied');
|
throw new NotReadableError(
|
||||||
|
'Cannot read config file "%s". Permission denied',
|
||||||
|
$filename
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,12 +110,14 @@ class Manager
|
|||||||
}
|
}
|
||||||
if (!is_dir($this->enableDir)) {
|
if (!is_dir($this->enableDir)) {
|
||||||
throw new NotReadableError(
|
throw new NotReadableError(
|
||||||
'Cannot read enabled modules. Module directory "' . $this->enableDir . '" is not a directory'
|
'Cannot read enabled modules. Module directory "%s" is not a directory',
|
||||||
|
$this->enableDir
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!is_readable($this->enableDir)) {
|
if (!is_readable($this->enableDir)) {
|
||||||
throw new NotReadableError(
|
throw new NotReadableError(
|
||||||
'Cannot read enabled modules. Module directory "' . $this->enableDir . '" is not readable'
|
'Cannot read enabled modules. Module directory "%s" is not readable',
|
||||||
|
$this->enableDir
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (($dh = opendir($canonical)) !== false) {
|
if (($dh = opendir($canonical)) !== false) {
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
namespace Icinga\Exception;
|
namespace Icinga\Exception;
|
||||||
|
|
||||||
use RuntimeException;
|
class NotReadableError extends IcingaException
|
||||||
|
|
||||||
class NotReadableError extends RuntimeException
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,9 @@ class DbStore extends PreferencesStore
|
|||||||
->fetchAll();
|
->fetchAll();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new NotReadableError(
|
throw new NotReadableError(
|
||||||
'Cannot fetch preferences for user ' . $this->getUser()->getUsername() . ' from database', 0, $e
|
'Cannot fetch preferences for user %s from database',
|
||||||
|
$this->getUser()->getUsername(),
|
||||||
|
$e
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,8 +62,9 @@ class IniStore extends PreferencesStore
|
|||||||
if (file_exists($this->preferencesFile)) {
|
if (file_exists($this->preferencesFile)) {
|
||||||
if (!is_readable($this->preferencesFile)) {
|
if (!is_readable($this->preferencesFile)) {
|
||||||
throw new NotReadableError(
|
throw new NotReadableError(
|
||||||
'Preferences INI file ' . $this->preferencesFile . ' for user '
|
'Preferences INI file %s for user %s is not readable',
|
||||||
. $this->getUser()->getUsername() . ' is not readable'
|
$this->preferencesFile,
|
||||||
|
$this->getUser()->getUsername()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$this->preferences = parse_ini_file($this->preferencesFile);
|
$this->preferences = parse_ini_file($this->preferencesFile);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user