Code Duplication    Length = 12-12 lines in 2 locations

main/install/install.lib.php 2 locations

@@ 275-286 (lines=12) @@
272
 * @param   bool    $suggestion Whether to show a suggestion or not
273
 * @return  string
274
 */
275
function check_writable($folder, $suggestion = false)
276
{
277
    if (is_writable($folder)) {
278
        return Display::label(get_lang('Writable'), 'success');
279
    } else {
280
        if ($suggestion) {
281
            return Display::label(get_lang('NotWritable'), 'info');
282
        } else {
283
            return Display::label(get_lang('NotWritable'), 'important');
284
        }
285
    }
286
}
287
288
/**
289
 * This function checks if the given folder is readable
@@ 295-306 (lines=12) @@
292
 *
293
 * @return  string
294
 */
295
function checkReadable($folder, $suggestion = false)
296
{
297
    if (is_readable($folder)) {
298
        return Display::label(get_lang('Readable'), 'success');
299
    } else {
300
        if ($suggestion) {
301
            return Display::label(get_lang('NotReadable'), 'info');
302
        } else {
303
            return Display::label(get_lang('NotReadable'), 'important');
304
        }
305
    }
306
}
307
308
/**
309
 * This function is similar to the core file() function, except that it