Code Duplication    Length = 5-7 lines in 2 locations

plugin/sepe/src/configuration.php 1 location

@@ 22-28 (lines=7) @@
19
    $login = 'SEPE';
20
    $sql = "SELECT a.api_key AS api FROM $tUser u, $tApi a WHERE u.username='".$login."' and u.user_id = a.user_id AND a.api_service = 'dokeos';";
21
    $result = Database::query($sql);
22
    if (Database::num_rows($result) > 0) {
23
        $tmp = Database::fetch_assoc($result);
24
        $info = $tmp['api'];
25
        
26
    } else {
27
        $info = '';
28
    }
29
    $templateName = $plugin->get_lang('Setting');
30
    $interbreadcrumb[] = array("url" => "/plugin/sepe/src/sepe-administration-menu.php", "name" => $plugin->get_lang('MenuSepe'));
31
    $tpl = new Template($templateName);

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

@@ 2958-2962 (lines=5) @@
2955
        ";
2956
2957
        $result = Database::query($sql);
2958
        if (Database::num_rows($result) > 0) {
2959
            while ($row = Database::fetch_assoc($result)) {
2960
                $sessions[$row['id']] = $row;
2961
            }
2962
        }
2963
2964
        $sql = "SELECT DISTINCT
2965
                id, name, access_start_date, access_end_date