Code Duplication    Length = 4-7 lines in 2 locations

main/admin/index.php 1 location

@@ 37-43 (lines=7) @@
34
35
// Displaying the header
36
if (api_is_platform_admin()) {
37
    if (is_dir(api_get_path(SYS_ARCHIVE_PATH)) &&
38
        !is_writable(api_get_path(SYS_ARCHIVE_PATH))
39
    ) {
40
        Display::addFlash(
41
            Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'), 'warning')
42
        );
43
    }
44
45
    /* ACTION HANDLING */
46
    if (!empty($_POST['Register'])) {

main/inc/lib/api.lib.php 1 location

@@ 6491-6494 (lines=4) @@
6488
 * prints a warning message.
6489
 */
6490
function api_check_archive_dir() {
6491
    if (is_dir(api_get_path(SYS_ARCHIVE_PATH)) && !is_writable(api_get_path(SYS_ARCHIVE_PATH))) {
6492
        $message = Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'),'warning');
6493
        api_not_allowed(true, $message);
6494
    }
6495
}
6496
/**
6497
 * Returns an array of global configuration settings which should be ignored