Code Duplication    Length = 5-5 lines in 8 locations

main/exercice/exercise_result.class.php 1 location

@@ 382-386 (lines=5) @@
379
		header('Content-type: application/octet-stream');
380
		header('Content-Type: application/force-download');
381
		header('Content-length: '.$len);
382
		if (preg_match("/MSIE 5.5/", $_SERVER['HTTP_USER_AGENT'])) {
383
			header('Content-Disposition: filename= '.$filename);
384
		} else {
385
			header('Content-Disposition: attachment; filename= '.$filename);
386
		}
387
		if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
388
			header('Pragma: ');
389
			header('Cache-Control: ');

main/gradebook/lib/gradebook_result.class.php 1 location

@@ 61-65 (lines=5) @@
58
        header('Content-type: application/octet-stream');
59
        header('Content-Type: application/force-download');
60
        header('Content-length: '.$len);
61
        if (preg_match("/MSIE 5.5/", $_SERVER['HTTP_USER_AGENT'])) {
62
            header('Content-Disposition: filename= '.$filename);
63
        } else {
64
            header('Content-Disposition: attachment; filename= '.$filename);
65
        } if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
66
            header('Pragma: ');
67
            header('Cache-Control: ');
68
            header('Cache-Control: public'); // IE cannot download from sessions without a cache

main/survey/reporting.php 1 location

@@ 46-50 (lines=5) @@
43
            header('Content-type: application/octet-stream');
44
            header('Content-Type: application/force-download');
45
46
            if (preg_match("/MSIE 5.5/", $_SERVER['HTTP_USER_AGENT'])) {
47
                header('Content-Disposition: filename= '.$filename);
48
            } else {
49
                header('Content-Disposition: attachment; filename= '.$filename);
50
            }
51
            if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
52
                header('Pragma: ');
53
                header('Cache-Control: ');

main/tracking/courseLogCSV.php 1 location

@@ 386-390 (lines=5) @@
383
    header('Content-length: ' . $len);
384
    $filename = api_html_entity_decode(str_replace(":", "", str_replace(" ", "_", $title[0] . '_' . $title[1] . '.csv')));
385
    $filename = api_replace_dangerous_char($filename);
386
    if (preg_match("/MSIE 5.5/", $_SERVER['HTTP_USER_AGENT'])) {
387
        header('Content-Disposition: filename= ' . $filename);
388
    } else {
389
        header('Content-Disposition: attachment; filename= ' . $filename);
390
    }
391
    if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
392
        header('Pragma: ');
393
        header('Cache-Control: ');

main/tracking/userlogCSV.php 1 location

@@ 325-329 (lines=5) @@
322
        )
323
    );
324
    $filename = api_replace_dangerous_char($filename);
325
    if (preg_match("/MSIE 5.5/", $_SERVER['HTTP_USER_AGENT'])) {
326
        header('Content-Disposition: filename= ' . $filename);
327
    } else {
328
        header('Content-Disposition: attachment; filename= ' . $filename);
329
    }
330
    if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
331
        header('Pragma: ');
332
        header('Cache-Control: ');

main/inc/lib/document.lib.php 2 locations

@@ 344-348 (lines=5) @@
341
342
            header('Content-type: application/octet-stream');
343
            header('Content-length: ' . $len);
344
            if (preg_match("/MSIE 5.5/", $_SERVER['HTTP_USER_AGENT'])) {
345
                header('Content-Disposition: filename= ' . $filename);
346
            } else {
347
                header('Content-Disposition: attachment; filename= ' . $filename);
348
            }
349
            if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
350
                header('Pragma: ');
351
                header('Cache-Control: ');
@@ 446-450 (lines=5) @@
443
            header('Content-type: application/octet-stream');
444
            //header('Content-Type: application/force-download');
445
            header('Content-length: ' . $len);
446
            if (preg_match("/MSIE 5.5/", $_SERVER['HTTP_USER_AGENT'])) {
447
                header('Content-Disposition: filename= ' . $filename);
448
            } else {
449
                header('Content-Disposition: attachment; filename= ' . $filename);
450
            }
451
            if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
452
                header('Pragma: ');
453
                header('Cache-Control: ');

main/exercice/hotpotatoes_exercise_result.class.php 1 location

@@ 198-202 (lines=5) @@
195
		header('Content-type: application/octet-stream');
196
		header('Content-Type: application/force-download');
197
		header('Content-length: '.$len);
198
		if (preg_match("/MSIE 5.5/", $_SERVER['HTTP_USER_AGENT'])) {
199
			header('Content-Disposition: filename= '.$filename);
200
		} else {
201
			header('Content-Disposition: attachment; filename= '.$filename);
202
		}
203
		if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
204
			header('Pragma: ');
205
			header('Cache-Control: ');