@@ -51,14 +51,14 @@ |
||
| 51 | 51 | * |
| 52 | 52 | * @var bool|array |
| 53 | 53 | */ |
| 54 | - protected $_unsigned = FALSE; |
|
| 54 | + protected $_unsigned = FALSE; |
|
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * NULL value representation in CREATE/ALTER TABLE statements |
| 58 | 58 | * |
| 59 | 59 | * @var string |
| 60 | 60 | */ |
| 61 | - protected $_null = 'NULL'; |
|
| 61 | + protected $_null = 'NULL'; |
|
| 62 | 62 | |
| 63 | 63 | // -------------------------------------------------------------------- |
| 64 | 64 | |
@@ -112,8 +112,7 @@ |
||
| 112 | 112 | if ( ! @unlink($this->db->database)) |
| 113 | 113 | { |
| 114 | 114 | return $this->db->db_debug ? $this->db->display_error('db_unable_to_drop') : FALSE; |
| 115 | - } |
|
| 116 | - elseif ( ! empty($this->db->data_cache['db_names'])) |
|
| 115 | + } elseif ( ! empty($this->db->data_cache['db_names'])) |
|
| 117 | 116 | { |
| 118 | 117 | $key = array_search(strtolower($this->db->database), array_map('strtolower', $this->db->data_cache['db_names']), TRUE); |
| 119 | 118 | if ($key !== FALSE) |
@@ -100,13 +100,13 @@ |
||
| 100 | 100 | $retval = array(); |
| 101 | 101 | for ($i = 0, $c = $this->num_fields(); $i < $c; $i++) |
| 102 | 102 | { |
| 103 | - $retval[$i] = new stdClass(); |
|
| 103 | + $retval[$i] = new stdClass(); |
|
| 104 | 104 | $retval[$i]->name = $this->result_id->columnName($i); |
| 105 | 105 | |
| 106 | 106 | $type = $this->result_id->columnType($i); |
| 107 | 107 | $retval[$i]->type = isset($data_types[$type]) ? $data_types[$type] : $type; |
| 108 | 108 | |
| 109 | - $retval[$i]->max_length = NULL; |
|
| 109 | + $retval[$i]->max_length = NULL; |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | return $retval; |
@@ -158,8 +158,7 @@ |
||
| 158 | 158 | if (($row = $this->result_id->fetchArray(SQLITE3_ASSOC)) === FALSE) |
| 159 | 159 | { |
| 160 | 160 | return FALSE; |
| 161 | - } |
|
| 162 | - elseif ($class_name === 'stdClass') |
|
| 161 | + } elseif ($class_name === 'stdClass') |
|
| 163 | 162 | { |
| 164 | 163 | return (object) $row; |
| 165 | 164 | } |
@@ -341,11 +341,11 @@ discard block |
||
| 341 | 341 | $retval = array(); |
| 342 | 342 | for ($i = 0, $c = count($query); $i < $c; $i++) |
| 343 | 343 | { |
| 344 | - $retval[$i] = new stdClass(); |
|
| 344 | + $retval[$i] = new stdClass(); |
|
| 345 | 345 | $retval[$i]->name = $query[$i]->COLUMN_NAME; |
| 346 | 346 | $retval[$i]->type = $query[$i]->DATA_TYPE; |
| 347 | - $retval[$i]->max_length = ($query[$i]->CHARACTER_MAXIMUM_LENGTH > 0) ? $query[$i]->CHARACTER_MAXIMUM_LENGTH : $query[$i]->NUMERIC_PRECISION; |
|
| 348 | - $retval[$i]->default = $query[$i]->COLUMN_DEFAULT; |
|
| 347 | + $retval[$i]->max_length = ($query[$i]->CHARACTER_MAXIMUM_LENGTH > 0) ? $query[$i]->CHARACTER_MAXIMUM_LENGTH : $query[$i]->NUMERIC_PRECISION; |
|
| 348 | + $retval[$i]->default = $query[$i]->COLUMN_DEFAULT; |
|
| 349 | 349 | } |
| 350 | 350 | |
| 351 | 351 | return $retval; |
@@ -501,7 +501,7 @@ discard block |
||
| 501 | 501 | ."\nWHERE ".$this->escape_identifiers('CI_rownum').' BETWEEN '.($this->qb_offset + 1).' AND '.$limit; |
| 502 | 502 | } |
| 503 | 503 | |
| 504 | - return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$limit.' ', $sql); |
|
| 504 | + return preg_replace('/(^\SELECT (DISTINCT)?)/i', '\\1 TOP '.$limit.' ', $sql); |
|
| 505 | 505 | } |
| 506 | 506 | |
| 507 | 507 | // -------------------------------------------------------------------- |
@@ -375,8 +375,7 @@ discard block |
||
| 375 | 375 | if (isset($sqlsrv_error['SQLSTATE'])) |
| 376 | 376 | { |
| 377 | 377 | $error['code'] = isset($sqlsrv_error['code']) ? $sqlsrv_error['SQLSTATE'].'/'.$sqlsrv_error['code'] : $sqlsrv_error['SQLSTATE']; |
| 378 | - } |
|
| 379 | - elseif (isset($sqlsrv_error['code'])) |
|
| 378 | + } elseif (isset($sqlsrv_error['code'])) |
|
| 380 | 379 | { |
| 381 | 380 | $error['code'] = $sqlsrv_error['code']; |
| 382 | 381 | } |
@@ -480,8 +479,7 @@ discard block |
||
| 480 | 479 | if (count($this->qb_select) === 0) |
| 481 | 480 | { |
| 482 | 481 | $select = '*'; // Inevitable |
| 483 | - } |
|
| 484 | - else |
|
| 482 | + } else |
|
| 485 | 483 | { |
| 486 | 484 | // Use only field names and their aliases, everything else is out of our scope. |
| 487 | 485 | $select = array(); |
@@ -51,21 +51,21 @@ |
||
| 51 | 51 | * |
| 52 | 52 | * @var string |
| 53 | 53 | */ |
| 54 | - protected $_create_table_if = "IF NOT EXISTS (SELECT * FROM sysobjects WHERE ID = object_id(N'%s') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)\nCREATE TABLE"; |
|
| 54 | + protected $_create_table_if = "IF NOT EXISTS (SELECT * FROM sysobjects WHERE ID = object_id(N'%s') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)\nCREATE TABLE"; |
|
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * DROP TABLE IF statement |
| 58 | 58 | * |
| 59 | 59 | * @var string |
| 60 | 60 | */ |
| 61 | - protected $_drop_table_if = "IF EXISTS (SELECT * FROM sysobjects WHERE ID = object_id(N'%s') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)\nDROP TABLE"; |
|
| 61 | + protected $_drop_table_if = "IF EXISTS (SELECT * FROM sysobjects WHERE ID = object_id(N'%s') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)\nDROP TABLE"; |
|
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * UNSIGNED support |
| 65 | 65 | * |
| 66 | 66 | * @var array |
| 67 | 67 | */ |
| 68 | - protected $_unsigned = array( |
|
| 68 | + protected $_unsigned = array( |
|
| 69 | 69 | 'TINYINT' => 'SMALLINT', |
| 70 | 70 | 'SMALLINT' => 'INT', |
| 71 | 71 | 'INT' => 'BIGINT', |
@@ -136,10 +136,10 @@ |
||
| 136 | 136 | $retval = array(); |
| 137 | 137 | foreach (sqlsrv_field_metadata($this->result_id) as $i => $field) |
| 138 | 138 | { |
| 139 | - $retval[$i] = new stdClass(); |
|
| 139 | + $retval[$i] = new stdClass(); |
|
| 140 | 140 | $retval[$i]->name = $field['Name']; |
| 141 | 141 | $retval[$i]->type = $field['Type']; |
| 142 | - $retval[$i]->max_length = $field['Size']; |
|
| 142 | + $retval[$i]->max_length = $field['Size']; |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | return $retval; |
@@ -51,14 +51,14 @@ |
||
| 51 | 51 | * |
| 52 | 52 | * @var string |
| 53 | 53 | */ |
| 54 | - protected $_list_databases = 'EXEC sp_helpdb'; // Can also be: EXEC sp_databases |
|
| 54 | + protected $_list_databases = 'EXEC sp_helpdb'; // Can also be: EXEC sp_databases |
|
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * OPTIMIZE TABLE statement |
| 58 | 58 | * |
| 59 | 59 | * @var string |
| 60 | 60 | */ |
| 61 | - protected $_optimize_table = 'ALTER INDEX all ON %s REORGANIZE'; |
|
| 61 | + protected $_optimize_table = 'ALTER INDEX all ON %s REORGANIZE'; |
|
| 62 | 62 | |
| 63 | 63 | // -------------------------------------------------------------------- |
| 64 | 64 | |
@@ -75,10 +75,10 @@ discard block |
||
| 75 | 75 | 'img_id' => '', |
| 76 | 76 | 'pool' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', |
| 77 | 77 | 'colors' => array( |
| 78 | - 'background' => array(255,255,255), |
|
| 79 | - 'border' => array(153,102,102), |
|
| 80 | - 'text' => array(204,153,153), |
|
| 81 | - 'grid' => array(255,182,182) |
|
| 78 | + 'background' => array(255, 255, 255), |
|
| 79 | + 'border' => array(153, 102, 102), |
|
| 80 | + 'text' => array(204, 153, 153), |
|
| 81 | + 'grid' => array(255, 182, 182) |
|
| 82 | 82 | ) |
| 83 | 83 | ); |
| 84 | 84 | |
@@ -225,8 +225,8 @@ discard block |
||
| 225 | 225 | // Determine angle and position |
| 226 | 226 | // ----------------------------------- |
| 227 | 227 | $length = strlen($word); |
| 228 | - $angle = ($length >= 6) ? mt_rand(-($length-6), ($length-6)) : 0; |
|
| 229 | - $x_axis = mt_rand(6, (360/$length)-16); |
|
| 228 | + $angle = ($length >= 6) ? mt_rand(-($length - 6), ($length - 6)) : 0; |
|
| 229 | + $x_axis = mt_rand(6, (360 / $length) - 16); |
|
| 230 | 230 | $y_axis = ($angle >= 0) ? mt_rand($img_height, $img_width) : mt_rand(6, $img_height); |
| 231 | 231 | |
| 232 | 232 | // Create image |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | // ----------------------------------- |
| 255 | 255 | // Create the spiral pattern |
| 256 | 256 | // ----------------------------------- |
| 257 | - $theta = 1; |
|
| 257 | + $theta = 1; |
|
| 258 | 258 | $thetac = 7; |
| 259 | 259 | $radius = 16; |
| 260 | 260 | $circles = 20; |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | { |
| 297 | 297 | if ($use_font === FALSE) |
| 298 | 298 | { |
| 299 | - $y = mt_rand(0 , $img_height / 2); |
|
| 299 | + $y = mt_rand(0, $img_height / 2); |
|
| 300 | 300 | imagestring($im, $font_size, $x, $y, $word[$i], $colors['text']); |
| 301 | 301 | $x += ($font_size * 2); |
| 302 | 302 | } |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | return FALSE; |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | - $img = '<img '.($img_id === '' ? '' : 'id="'.$img_id.'"').' src="'.$img_url.$img_filename.'" style="width: '.$img_width.'; height: '.$img_height .'; border: 0;" alt=" " />'; |
|
| 334 | + $img = '<img '.($img_id === '' ? '' : 'id="'.$img_id.'"').' src="'.$img_url.$img_filename.'" style="width: '.$img_width.'; height: '.$img_height.'; border: 0;" alt=" " />'; |
|
| 335 | 335 | ImageDestroy($im); |
| 336 | 336 | |
| 337 | 337 | return array('word' => $word, 'time' => $now, 'image' => $img, 'filename' => $img_filename); |
@@ -87,8 +87,7 @@ discard block |
||
| 87 | 87 | if ( ! is_array($data) && empty($$key)) |
| 88 | 88 | { |
| 89 | 89 | $$key = $val; |
| 90 | - } |
|
| 91 | - else |
|
| 90 | + } else |
|
| 92 | 91 | { |
| 93 | 92 | $$key = isset($data[$key]) ? $data[$key] : $val; |
| 94 | 93 | } |
@@ -137,8 +136,7 @@ discard block |
||
| 137 | 136 | { |
| 138 | 137 | $word .= $pool[random_int(0, $rand_max)]; |
| 139 | 138 | } |
| 140 | - } |
|
| 141 | - catch (Exception $e) |
|
| 139 | + } catch (Exception $e) |
|
| 142 | 140 | { |
| 143 | 141 | // This means fallback to the next possible |
| 144 | 142 | // alternative to random_int() |
@@ -215,8 +213,7 @@ discard block |
||
| 215 | 213 | { |
| 216 | 214 | $word .= $pool[mt_rand(0, $rand_max)]; |
| 217 | 215 | } |
| 218 | - } |
|
| 219 | - elseif ( ! is_string($word)) |
|
| 216 | + } elseif ( ! is_string($word)) |
|
| 220 | 217 | { |
| 221 | 218 | $word = (string) $word; |
| 222 | 219 | } |
@@ -284,8 +281,7 @@ discard block |
||
| 284 | 281 | ($font_size > 5) && $font_size = 5; |
| 285 | 282 | $x = mt_rand(0, $img_width / ($length / 3)); |
| 286 | 283 | $y = 0; |
| 287 | - } |
|
| 288 | - else |
|
| 284 | + } else |
|
| 289 | 285 | { |
| 290 | 286 | ($font_size > 30) && $font_size = 30; |
| 291 | 287 | $x = mt_rand(0, $img_width / ($length / 1.5)); |
@@ -299,8 +295,7 @@ discard block |
||
| 299 | 295 | $y = mt_rand(0 , $img_height / 2); |
| 300 | 296 | imagestring($im, $font_size, $x, $y, $word[$i], $colors['text']); |
| 301 | 297 | $x += ($font_size * 2); |
| 302 | - } |
|
| 303 | - else |
|
| 298 | + } else |
|
| 304 | 299 | { |
| 305 | 300 | $y = mt_rand($img_height / 2, $img_height - 3); |
| 306 | 301 | imagettftext($im, $font_size, $angle, $x, $y, $colors['text'], $font_path, $word[$i]); |
@@ -320,13 +315,11 @@ discard block |
||
| 320 | 315 | { |
| 321 | 316 | $img_filename = $now.'.jpg'; |
| 322 | 317 | imagejpeg($im, $img_path.$img_filename); |
| 323 | - } |
|
| 324 | - elseif (function_exists('imagepng')) |
|
| 318 | + } elseif (function_exists('imagepng')) |
|
| 325 | 319 | { |
| 326 | 320 | $img_filename = $now.'.png'; |
| 327 | 321 | imagepng($im, $img_path.$img_filename); |
| 328 | - } |
|
| 329 | - else |
|
| 322 | + } else |
|
| 330 | 323 | { |
| 331 | 324 | return FALSE; |
| 332 | 325 | } |
@@ -1,40 +1,40 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * CodeIgniter |
|
| 4 | - * |
|
| 5 | - * An open source application development framework for PHP |
|
| 6 | - * |
|
| 7 | - * This content is released under the MIT License (MIT) |
|
| 8 | - * |
|
| 9 | - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology |
|
| 10 | - * |
|
| 11 | - * Permission is hereby granted, free of charge, to any person obtaining a copy |
|
| 12 | - * of this software and associated documentation files (the "Software"), to deal |
|
| 13 | - * in the Software without restriction, including without limitation the rights |
|
| 14 | - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
| 15 | - * copies of the Software, and to permit persons to whom the Software is |
|
| 16 | - * furnished to do so, subject to the following conditions: |
|
| 17 | - * |
|
| 18 | - * The above copyright notice and this permission notice shall be included in |
|
| 19 | - * all copies or substantial portions of the Software. |
|
| 20 | - * |
|
| 21 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 22 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 23 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
| 24 | - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 25 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
| 26 | - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
| 27 | - * THE SOFTWARE. |
|
| 28 | - * |
|
| 29 | - * @package CodeIgniter |
|
| 30 | - * @author EllisLab Dev Team |
|
| 31 | - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
|
| 32 | - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) |
|
| 33 | - * @license http://opensource.org/licenses/MIT MIT License |
|
| 34 | - * @link http://codeigniter.com |
|
| 35 | - * @since Version 1.0.0 |
|
| 36 | - * @filesource |
|
| 37 | - */ |
|
| 3 | + * CodeIgniter |
|
| 4 | + * |
|
| 5 | + * An open source application development framework for PHP |
|
| 6 | + * |
|
| 7 | + * This content is released under the MIT License (MIT) |
|
| 8 | + * |
|
| 9 | + * Copyright (c) 2014 - 2015, British Columbia Institute of Technology |
|
| 10 | + * |
|
| 11 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
|
| 12 | + * of this software and associated documentation files (the "Software"), to deal |
|
| 13 | + * in the Software without restriction, including without limitation the rights |
|
| 14 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
| 15 | + * copies of the Software, and to permit persons to whom the Software is |
|
| 16 | + * furnished to do so, subject to the following conditions: |
|
| 17 | + * |
|
| 18 | + * The above copyright notice and this permission notice shall be included in |
|
| 19 | + * all copies or substantial portions of the Software. |
|
| 20 | + * |
|
| 21 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 22 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 23 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
| 24 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 25 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
| 26 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
| 27 | + * THE SOFTWARE. |
|
| 28 | + * |
|
| 29 | + * @package CodeIgniter |
|
| 30 | + * @author EllisLab Dev Team |
|
| 31 | + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
|
| 32 | + * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) |
|
| 33 | + * @license http://opensource.org/licenses/MIT MIT License |
|
| 34 | + * @link http://codeigniter.com |
|
| 35 | + * @since Version 1.0.0 |
|
| 36 | + * @filesource |
|
| 37 | + */ |
|
| 38 | 38 | defined('BASEPATH') OR exit('No direct script access allowed'); |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -68,9 +68,9 @@ |
||
| 68 | 68 | { |
| 69 | 69 | if ($fp = @opendir($source_dir)) |
| 70 | 70 | { |
| 71 | - $filedata = array(); |
|
| 72 | - $new_depth = $directory_depth - 1; |
|
| 73 | - $source_dir = rtrim($source_dir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; |
|
| 71 | + $filedata = array(); |
|
| 72 | + $new_depth = $directory_depth - 1; |
|
| 73 | + $source_dir = rtrim($source_dir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; |
|
| 74 | 74 | |
| 75 | 75 | while (FALSE !== ($file = readdir($fp))) |
| 76 | 76 | { |
@@ -85,8 +85,7 @@ |
||
| 85 | 85 | if (($directory_depth < 1 OR $new_depth > 0) && is_dir($source_dir.$file)) |
| 86 | 86 | { |
| 87 | 87 | $filedata[$file] = directory_map($source_dir.$file, $new_depth, $hidden); |
| 88 | - } |
|
| 89 | - else |
|
| 88 | + } else |
|
| 90 | 89 | { |
| 91 | 90 | $filedata[] = $file; |
| 92 | 91 | } |
@@ -1,40 +1,40 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * CodeIgniter |
|
| 4 | - * |
|
| 5 | - * An open source application development framework for PHP |
|
| 6 | - * |
|
| 7 | - * This content is released under the MIT License (MIT) |
|
| 8 | - * |
|
| 9 | - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology |
|
| 10 | - * |
|
| 11 | - * Permission is hereby granted, free of charge, to any person obtaining a copy |
|
| 12 | - * of this software and associated documentation files (the "Software"), to deal |
|
| 13 | - * in the Software without restriction, including without limitation the rights |
|
| 14 | - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
| 15 | - * copies of the Software, and to permit persons to whom the Software is |
|
| 16 | - * furnished to do so, subject to the following conditions: |
|
| 17 | - * |
|
| 18 | - * The above copyright notice and this permission notice shall be included in |
|
| 19 | - * all copies or substantial portions of the Software. |
|
| 20 | - * |
|
| 21 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 22 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 23 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
| 24 | - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 25 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
| 26 | - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
| 27 | - * THE SOFTWARE. |
|
| 28 | - * |
|
| 29 | - * @package CodeIgniter |
|
| 30 | - * @author EllisLab Dev Team |
|
| 31 | - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
|
| 32 | - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) |
|
| 33 | - * @license http://opensource.org/licenses/MIT MIT License |
|
| 34 | - * @link http://codeigniter.com |
|
| 35 | - * @since Version 1.0.0 |
|
| 36 | - * @filesource |
|
| 37 | - */ |
|
| 3 | + * CodeIgniter |
|
| 4 | + * |
|
| 5 | + * An open source application development framework for PHP |
|
| 6 | + * |
|
| 7 | + * This content is released under the MIT License (MIT) |
|
| 8 | + * |
|
| 9 | + * Copyright (c) 2014 - 2015, British Columbia Institute of Technology |
|
| 10 | + * |
|
| 11 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
|
| 12 | + * of this software and associated documentation files (the "Software"), to deal |
|
| 13 | + * in the Software without restriction, including without limitation the rights |
|
| 14 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
| 15 | + * copies of the Software, and to permit persons to whom the Software is |
|
| 16 | + * furnished to do so, subject to the following conditions: |
|
| 17 | + * |
|
| 18 | + * The above copyright notice and this permission notice shall be included in |
|
| 19 | + * all copies or substantial portions of the Software. |
|
| 20 | + * |
|
| 21 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 22 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 23 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
| 24 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 25 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
| 26 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
| 27 | + * THE SOFTWARE. |
|
| 28 | + * |
|
| 29 | + * @package CodeIgniter |
|
| 30 | + * @author EllisLab Dev Team |
|
| 31 | + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
|
| 32 | + * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) |
|
| 33 | + * @license http://opensource.org/licenses/MIT MIT License |
|
| 34 | + * @link http://codeigniter.com |
|
| 35 | + * @since Version 1.0.0 |
|
| 36 | + * @filesource |
|
| 37 | + */ |
|
| 38 | 38 | defined('BASEPATH') OR exit('No direct script access allowed'); |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | // Load the mime types |
| 103 | - $mimes =& get_mimes(); |
|
| 103 | + $mimes = & get_mimes(); |
|
| 104 | 104 | |
| 105 | 105 | // Only change the default MIME if we can find one |
| 106 | 106 | if (isset($mimes[$extension])) |
@@ -66,8 +66,7 @@ discard block |
||
| 66 | 66 | if ($filename === '' OR $data === '') |
| 67 | 67 | { |
| 68 | 68 | return; |
| 69 | - } |
|
| 70 | - elseif ($data === NULL) |
|
| 69 | + } elseif ($data === NULL) |
|
| 71 | 70 | { |
| 72 | 71 | if ( ! @is_file($filename) OR ($filesize = @filesize($filename)) === FALSE) |
| 73 | 72 | { |
@@ -77,8 +76,7 @@ discard block |
||
| 77 | 76 | $filepath = $filename; |
| 78 | 77 | $filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename)); |
| 79 | 78 | $filename = end($filename); |
| 80 | - } |
|
| 81 | - else |
|
| 79 | + } else |
|
| 82 | 80 | { |
| 83 | 81 | $filesize = strlen($data); |
| 84 | 82 | } |
@@ -1,40 +1,40 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * CodeIgniter |
|
| 4 | - * |
|
| 5 | - * An open source application development framework for PHP |
|
| 6 | - * |
|
| 7 | - * This content is released under the MIT License (MIT) |
|
| 8 | - * |
|
| 9 | - * Copyright (c) 2014 - 2015, British Columbia Institute of Technology |
|
| 10 | - * |
|
| 11 | - * Permission is hereby granted, free of charge, to any person obtaining a copy |
|
| 12 | - * of this software and associated documentation files (the "Software"), to deal |
|
| 13 | - * in the Software without restriction, including without limitation the rights |
|
| 14 | - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
| 15 | - * copies of the Software, and to permit persons to whom the Software is |
|
| 16 | - * furnished to do so, subject to the following conditions: |
|
| 17 | - * |
|
| 18 | - * The above copyright notice and this permission notice shall be included in |
|
| 19 | - * all copies or substantial portions of the Software. |
|
| 20 | - * |
|
| 21 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 22 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 23 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
| 24 | - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 25 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
| 26 | - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
| 27 | - * THE SOFTWARE. |
|
| 28 | - * |
|
| 29 | - * @package CodeIgniter |
|
| 30 | - * @author EllisLab Dev Team |
|
| 31 | - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
|
| 32 | - * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) |
|
| 33 | - * @license http://opensource.org/licenses/MIT MIT License |
|
| 34 | - * @link http://codeigniter.com |
|
| 35 | - * @since Version 1.0.0 |
|
| 36 | - * @filesource |
|
| 37 | - */ |
|
| 3 | + * CodeIgniter |
|
| 4 | + * |
|
| 5 | + * An open source application development framework for PHP |
|
| 6 | + * |
|
| 7 | + * This content is released under the MIT License (MIT) |
|
| 8 | + * |
|
| 9 | + * Copyright (c) 2014 - 2015, British Columbia Institute of Technology |
|
| 10 | + * |
|
| 11 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
|
| 12 | + * of this software and associated documentation files (the "Software"), to deal |
|
| 13 | + * in the Software without restriction, including without limitation the rights |
|
| 14 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
| 15 | + * copies of the Software, and to permit persons to whom the Software is |
|
| 16 | + * furnished to do so, subject to the following conditions: |
|
| 17 | + * |
|
| 18 | + * The above copyright notice and this permission notice shall be included in |
|
| 19 | + * all copies or substantial portions of the Software. |
|
| 20 | + * |
|
| 21 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 22 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 23 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
| 24 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 25 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
| 26 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
| 27 | + * THE SOFTWARE. |
|
| 28 | + * |
|
| 29 | + * @package CodeIgniter |
|
| 30 | + * @author EllisLab Dev Team |
|
| 31 | + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) |
|
| 32 | + * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) |
|
| 33 | + * @license http://opensource.org/licenses/MIT MIT License |
|
| 34 | + * @link http://codeigniter.com |
|
| 35 | + * @since Version 1.0.0 |
|
| 36 | + * @filesource |
|
| 37 | + */ |
|
| 38 | 38 | defined('BASEPATH') OR exit('No direct script access allowed'); |
| 39 | 39 | |
| 40 | 40 | /** |