Code Duplication    Length = 5-6 lines in 2 locations

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

@@ 544-548 (lines=5) @@
541
            if (file_exists($store_path)) {
542
                $web_path   = api_get_path(WEB_COURSE_PATH).$course_info['path'].'/'.api_get_current_access_url_id().'_pdf_watermark.png';
543
            }
544
        } else {
545
            $store_path = api_get_path(SYS_CODE_PATH).'default_course_document/images/'.api_get_current_access_url_id().'_pdf_watermark.png';   // course path
546
            if (file_exists($store_path))
547
                $web_path   = api_get_path(WEB_CODE_PATH).'default_course_document/images/'.api_get_current_access_url_id().'_pdf_watermark.png';
548
        }
549
        return $web_path;
550
    }
551

main/install/install.lib.php 1 location

@@ 961-966 (lines=6) @@
958
    }
959
960
    $oldConf = '';
961
    if (file_exists(api_get_path(SYS_CODE_PATH).'inc/conf/configuration.php')) {
962
        $oldConf = '<tr>
963
            <td class="requirements-item">'.api_get_path(SYS_CODE_PATH).'inc/conf</td>
964
            <td class="requirements-value">'.check_writable(api_get_path(SYS_CODE_PATH).'inc/conf').'</td>
965
        </tr>';
966
    }
967
968
    echo '<table class="table">
969
            '.$oldConf.'