Code Duplication    Length = 6-6 lines in 5 locations

install/cli-install.php 5 locations

@@ 186-191 (lines=6) @@
183
// check directories
184
// cache exists?
185
echo strip_tags($_lang['checking_if_cache_exist']);
186
if (!file_exists($path . "../assets/cache") || !file_exists($path . "../assets/cache/rss")) {
187
    echo $_lang['failed'] . PHP_EOL;
188
    $errors++;
189
} else {
190
    echo $_lang['ok'] . PHP_EOL;
191
}
192
193
194
// cache writable?
@@ 196-201 (lines=6) @@
193
194
// cache writable?
195
echo strip_tags($_lang['checking_if_cache_writable']);
196
if (!is_writable($path . "../assets/cache")) {
197
    $errors++;
198
    echo $_lang['failed'] . PHP_EOL;
199
} else {
200
    echo $_lang['ok'] . PHP_EOL;
201
}
202
203
204
// cache files writable?
@@ 219-224 (lines=6) @@
216
217
218
echo strip_tags($_lang['checking_if_cache_file2_writable']);
219
if (!is_writable($path . "../assets/cache/sitePublishing.idx.php")) {
220
    $errors++;
221
    echo $_lang['failed'] . PHP_EOL;
222
} else {
223
    echo $_lang['ok'] . PHP_EOL;
224
}
225
226
227
// File Browser directories exists?
@@ 259-264 (lines=6) @@
256
257
// export exists?
258
echo strip_tags($_lang['checking_if_export_exists']);
259
if (!file_exists($path . "../assets/export")) {
260
    echo $_lang['failed'] . PHP_EOL;
261
    $errors++;
262
} else {
263
    echo $_lang['ok'] . PHP_EOL;
264
}
265
266
267
// export writable?
@@ 269-274 (lines=6) @@
266
267
// export writable?
268
echo strip_tags($_lang['checking_if_export_writable']);
269
if (!is_writable($path . "../assets/export")) {
270
    echo $_lang['failed'] . PHP_EOL;
271
    $errors++;
272
} else {
273
    echo $_lang['ok'] . PHP_EOL;
274
}
275
276
277
// config.inc.php writable?