Code Duplication    Length = 4-5 lines in 2 locations

main/admin/index.php 1 location

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

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

@@ 6593-6596 (lines=4) @@
6590
 * prints a warning message.
6591
 */
6592
function api_check_archive_dir() {
6593
    if (is_dir(api_get_path(SYS_ARCHIVE_PATH)) && !is_writable(api_get_path(SYS_ARCHIVE_PATH))) {
6594
        $message = Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'),'warning');
6595
        api_not_allowed(true, $message);
6596
    }
6597
}
6598
/**
6599
 * Returns an array of global configuration settings which should be ignored