Code Duplication    Length = 4-7 lines in 2 locations

main/admin/index.php 1 location

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

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

@@ 6750-6753 (lines=4) @@
6747
 */
6748
function api_check_archive_dir()
6749
{
6750
    if (is_dir(api_get_path(SYS_ARCHIVE_PATH)) && !is_writable(api_get_path(SYS_ARCHIVE_PATH))) {
6751
        $message = Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'),'warning');
6752
        api_not_allowed(true, $message);
6753
    }
6754
}
6755
6756
/**