diff options
Diffstat (limited to 'application/ApplicationUtils.php')
-rw-r--r-- | application/ApplicationUtils.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/application/ApplicationUtils.php b/application/ApplicationUtils.php index 978fc9da..e67b2902 100644 --- a/application/ApplicationUtils.php +++ b/application/ApplicationUtils.php | |||
@@ -132,11 +132,11 @@ class ApplicationUtils | |||
132 | /** | 132 | /** |
133 | * Checks Shaarli has the proper access permissions to its resources | 133 | * Checks Shaarli has the proper access permissions to its resources |
134 | * | 134 | * |
135 | * @param array $globalConfig The $GLOBALS['config'] array | 135 | * @param ConfigManager $conf Configuration Manager instance. |
136 | * | 136 | * |
137 | * @return array A list of the detected configuration issues | 137 | * @return array A list of the detected configuration issues |
138 | */ | 138 | */ |
139 | public static function checkResourcePermissions($globalConfig) | 139 | public static function checkResourcePermissions($conf) |
140 | { | 140 | { |
141 | $errors = array(); | 141 | $errors = array(); |
142 | 142 | ||
@@ -145,7 +145,7 @@ class ApplicationUtils | |||
145 | 'application', | 145 | 'application', |
146 | 'inc', | 146 | 'inc', |
147 | 'plugins', | 147 | 'plugins', |
148 | $globalConfig['RAINTPL_TPL'] | 148 | $conf->get('resource.raintpl_tpl'), |
149 | ) as $path) { | 149 | ) as $path) { |
150 | if (! is_readable(realpath($path))) { | 150 | if (! is_readable(realpath($path))) { |
151 | $errors[] = '"'.$path.'" directory is not readable'; | 151 | $errors[] = '"'.$path.'" directory is not readable'; |
@@ -154,10 +154,10 @@ class ApplicationUtils | |||
154 | 154 | ||
155 | // Check cache and data directories are readable and writeable | 155 | // Check cache and data directories are readable and writeable |
156 | foreach (array( | 156 | foreach (array( |
157 | $globalConfig['CACHEDIR'], | 157 | $conf->get('resource.thumbnails_cache'), |
158 | $globalConfig['DATADIR'], | 158 | $conf->get('resource.data_dir'), |
159 | $globalConfig['PAGECACHE'], | 159 | $conf->get('resource.page_cache'), |
160 | $globalConfig['RAINTPL_TMP'] | 160 | $conf->get('resource.raintpl_tmp'), |
161 | ) as $path) { | 161 | ) as $path) { |
162 | if (! is_readable(realpath($path))) { | 162 | if (! is_readable(realpath($path))) { |
163 | $errors[] = '"'.$path.'" directory is not readable'; | 163 | $errors[] = '"'.$path.'" directory is not readable'; |
@@ -169,11 +169,11 @@ class ApplicationUtils | |||
169 | 169 | ||
170 | // Check configuration files are readable and writeable | 170 | // Check configuration files are readable and writeable |
171 | foreach (array( | 171 | foreach (array( |
172 | $globalConfig['CONFIG_FILE'], | 172 | $conf->getConfigFileExt(), |
173 | $globalConfig['DATASTORE'], | 173 | $conf->get('resource.datastore'), |
174 | $globalConfig['IPBANS_FILENAME'], | 174 | $conf->get('resource.ban_file'), |
175 | $globalConfig['LOG_FILE'], | 175 | $conf->get('resource.log'), |
176 | $globalConfig['UPDATECHECK_FILENAME'] | 176 | $conf->get('resource.update_check'), |
177 | ) as $path) { | 177 | ) as $path) { |
178 | if (! is_file(realpath($path))) { | 178 | if (! is_file(realpath($path))) { |
179 | # the file may not exist yet | 179 | # the file may not exist yet |