@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | // Load the mime types |
75 | - $mimes =& get_mimes(); |
|
75 | + $mimes = & get_mimes(); |
|
76 | 76 | |
77 | 77 | // Only change the default MIME if we can find one |
78 | 78 | if (isset($mimes[$extension])) |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | if (TestCase::isTestingEnv()) |
119 | 119 | { |
120 | - $CI =& get_instance(); |
|
120 | + $CI = & get_instance(); |
|
121 | 121 | $CI->output->set_header('Content-Type: '.$mime); |
122 | 122 | $CI->output->set_header('Content-Disposition: attachment; filename="'.$filename.'"'); |
123 | 123 | $CI->output->set_header('Expires: 0'); |
@@ -38,8 +38,7 @@ discard block |
||
38 | 38 | if ($filename === '' OR $data === '') |
39 | 39 | { |
40 | 40 | return; |
41 | - } |
|
42 | - elseif ($data === NULL) |
|
41 | + } elseif ($data === NULL) |
|
43 | 42 | { |
44 | 43 | if ( ! @is_file($filename) OR ($filesize = @filesize($filename)) === FALSE) |
45 | 44 | { |
@@ -49,8 +48,7 @@ discard block |
||
49 | 48 | $filepath = $filename; |
50 | 49 | $filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename)); |
51 | 50 | $filename = end($filename); |
52 | - } |
|
53 | - else |
|
51 | + } else |
|
54 | 52 | { |
55 | 53 | $filesize = strlen($data); |
56 | 54 | } |
@@ -137,8 +135,7 @@ discard block |
||
137 | 135 | if ( ! TestCase::isTestingEnv()) |
138 | 136 | { |
139 | 137 | exit($data); |
140 | - } |
|
141 | - else |
|
138 | + } else |
|
142 | 139 | { |
143 | 140 | echo($data); |
144 | 141 | throw new CIPHPUnitTestExitException('exit() from force_download()'); |
@@ -155,8 +152,7 @@ discard block |
||
155 | 152 | if ( ! TestCase::isTestingEnv()) |
156 | 153 | { |
157 | 154 | exit; |
158 | - } |
|
159 | - else |
|
155 | + } else |
|
160 | 156 | { |
161 | 157 | throw new CIPHPUnitTestExitException('exit() from force_download()'); |
162 | 158 | } |