Code Duplication    Length = 7-8 lines in 2 locations

main/session/session_list.php 1 location

@@ 96-102 (lines=7) @@
93
    $url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_sessions&_force_search=true&rows=20&page=1&sidx=&sord=asc&filters=&searchField=s.name&searchString='.Security::remove_XSS($_REQUEST['keyword']).'&searchOper=bw';
94
}
95
96
if (isset($_REQUEST['id_category'])) {
97
    $sessionCategory = SessionManager::get_session_category($_REQUEST['id_category']);
98
    if (!empty($sessionCategory)) {
99
        //Begin with see the searchOper param
100
        $url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_sessions&_force_search=true&rows=20&page=1&sidx=&sord=asc&filters=&searchField=sc.name&searchString='.Security::remove_XSS($sessionCategory['name']).'&searchOper=bw';
101
    }
102
}
103
104
$url .= '&list_type='.$list_type;
105

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

@@ 6271-6278 (lines=8) @@
6268
    public static function downloadDeletedDocument($id, $courseInfo, $sessionId)
6269
    {
6270
        $document = self::getDeletedDocument($id, $courseInfo, $sessionId);
6271
        if (!empty($document)) {
6272
            $coursePath = api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/document/';
6273
6274
            if (Security::check_abs_path($coursePath.$document['path'], $coursePath)) {
6275
                self::file_send_for_download($coursePath.$document['path']);
6276
                exit;
6277
            }
6278
        }
6279
    }
6280
6281
    /**