aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/ApplicationUtils.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-10-22 13:19:51 +0200
committerGitHub <noreply@github.com>2017-10-22 13:19:51 +0200
commitd8acf8550480694d050091e270a06c01e7b313f0 (patch)
treef62befb2351c4b6550f71e11f6845bc3acb78a5d /application/ApplicationUtils.php
parentefd3a6405a381501b070b8805ae37d1313969784 (diff)
parent1a47014f99d2f7aae00d37e62e0364d4eaa1ce29 (diff)
downloadShaarli-d8acf8550480694d050091e270a06c01e7b313f0.tar.gz
Shaarli-d8acf8550480694d050091e270a06c01e7b313f0.tar.zst
Shaarli-d8acf8550480694d050091e270a06c01e7b313f0.zip
Merge pull request #871 from ArthurHoaro/feature/translation
Shaarli's translation
Diffstat (limited to 'application/ApplicationUtils.php')
-rw-r--r--application/ApplicationUtils.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/application/ApplicationUtils.php b/application/ApplicationUtils.php
index 5643f4a0..911873a0 100644
--- a/application/ApplicationUtils.php
+++ b/application/ApplicationUtils.php
@@ -149,12 +149,13 @@ class ApplicationUtils
149 public static function checkPHPVersion($minVersion, $curVersion) 149 public static function checkPHPVersion($minVersion, $curVersion)
150 { 150 {
151 if (version_compare($curVersion, $minVersion) < 0) { 151 if (version_compare($curVersion, $minVersion) < 0) {
152 throw new Exception( 152 $msg = t(
153 'Your PHP version is obsolete!' 153 'Your PHP version is obsolete!'
154 .' Shaarli requires at least PHP '.$minVersion.', and thus cannot run.' 154 . ' Shaarli requires at least PHP %s, and thus cannot run.'
155 .' Your PHP version has known security vulnerabilities and should be' 155 . ' Your PHP version has known security vulnerabilities and should be'
156 .' updated as soon as possible.' 156 . ' updated as soon as possible.'
157 ); 157 );
158 throw new Exception(sprintf($msg, $minVersion));
158 } 159 }
159 } 160 }
160 161
@@ -179,7 +180,7 @@ class ApplicationUtils
179 $rainTplDir.'/'.$conf->get('resource.theme'), 180 $rainTplDir.'/'.$conf->get('resource.theme'),
180 ) as $path) { 181 ) as $path) {
181 if (! is_readable(realpath($path))) { 182 if (! is_readable(realpath($path))) {
182 $errors[] = '"'.$path.'" directory is not readable'; 183 $errors[] = '"'.$path.'" '. t('directory is not readable');
183 } 184 }
184 } 185 }
185 186
@@ -191,10 +192,10 @@ class ApplicationUtils
191 $conf->get('resource.raintpl_tmp'), 192 $conf->get('resource.raintpl_tmp'),
192 ) as $path) { 193 ) as $path) {
193 if (! is_readable(realpath($path))) { 194 if (! is_readable(realpath($path))) {
194 $errors[] = '"'.$path.'" directory is not readable'; 195 $errors[] = '"'.$path.'" '. t('directory is not readable');
195 } 196 }
196 if (! is_writable(realpath($path))) { 197 if (! is_writable(realpath($path))) {
197 $errors[] = '"'.$path.'" directory is not writable'; 198 $errors[] = '"'.$path.'" '. t('directory is not writable');
198 } 199 }
199 } 200 }
200 201
@@ -212,10 +213,10 @@ class ApplicationUtils
212 } 213 }
213 214
214 if (! is_readable(realpath($path))) { 215 if (! is_readable(realpath($path))) {
215 $errors[] = '"'.$path.'" file is not readable'; 216 $errors[] = '"'.$path.'" '. t('file is not readable');
216 } 217 }
217 if (! is_writable(realpath($path))) { 218 if (! is_writable(realpath($path))) {
218 $errors[] = '"'.$path.'" file is not writable'; 219 $errors[] = '"'.$path.'" '. t('file is not writable');
219 } 220 }
220 } 221 }
221 222