Code Duplication    Length = 5-5 lines in 2 locations

admin.settings.php 1 location

@@ 787-791 (lines=5) @@
784
                    </td><td>
785
                    <input type="hidden" id="roles_allowed_to_print" name="roles_allowed_to_print" value="', isset($SETTINGS['roles_allowed_to_print']) ? $SETTINGS['roles_allowed_to_print'] : '', '" />
786
                    <select id="roles_allowed_to_print_select" name="roles_allowed_to_print_select" class="text ui-widget-content" multiple="multiple" onchange="refreshInput()">';
787
if (!isset($SETTINGS['roles_allowed_to_print']) || empty($SETTINGS['roles_allowed_to_print'])) {
788
    $arrRolesToPrint = array();
789
} else {
790
    $arrRolesToPrint = explode(";", $SETTINGS['roles_allowed_to_print']);
791
}
792
$roles = DB::query("SELECT id, title FROM ".prefix_table("roles_title"));
793
foreach ($roles as $role) {
794
    echo '<option value="'.$role['id'].'"', in_array($role['id'], $arrRolesToPrint) ? ' selected="selected"' : '', '>'.addslashes($role['title']).'</option>';

sources/main.functions.php 1 location

@@ 378-382 (lines=5) @@
375
    global $SETTINGS;
376
377
    // load PhpEncryption library
378
    if (!isset($SETTINGS['cpassman_dir']) || empty($SETTINGS['cpassman_dir'])) {
379
        $path = '../includes/libraries/Encryption/Encryption/';
380
    } else {
381
        $path = $SETTINGS['cpassman_dir'].'/includes/libraries/Encryption/Encryption/';
382
    }
383
384
    require_once $path.'Crypto.php';
385
    require_once $path.'Encoding.php';