Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 425886d

Browse files
committed
Update CodeIgniter 3.1.9
1 parent ed1eab2 commit 425886d

15 files changed

Lines changed: 155 additions & 19 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ It should work on 5.4.8 as well, but we strongly advise you NOT to run such old
4343
## Dependencies
4444
| NAME | VERSION | WEB | REPO |
4545
| :--- | :---: | :---: | :---: |
46-
| CodeIgniter | 3.1.8 | [Website](https://codeigniter.com) | [Github](https://github.com/bcit-ci/CodeIgniter/)
46+
| CodeIgniter | 3.1.9 | [Website](https://codeigniter.com) | [Github](https://github.com/bcit-ci/CodeIgniter/)
4747
| AdminLTE | 2.3.11 | [Website](https://adminlte.io) | [Github](https://github.com/almasaeed2010/AdminLTE/)
4848
| Bootstrap | 3.3.7 | [Website](https://getbootstrap.com/docs/3.3) | [Github](https://github.com/twbs/bootstrap)
4949
| Ion Auth | 2.6.0 | [Website](http://benedmunds.com/ion_auth) | [Github](https://github.com/benedmunds/CodeIgniter-Ion-Auth)

application/config/mimes.php

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@
7777
'jpeg' => array('image/jpeg', 'image/pjpeg'),
7878
'jpg' => array('image/jpeg', 'image/pjpeg'),
7979
'jpe' => array('image/jpeg', 'image/pjpeg'),
80+
'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
81+
'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
82+
'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
83+
'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
84+
'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
85+
'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
86+
'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
87+
'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
8088
'png' => array('image/png', 'image/x-png'),
8189
'tiff' => 'image/tiff',
8290
'tif' => 'image/tiff',
@@ -129,7 +137,8 @@
129137
'3gp' => array('video/3gp', 'video/3gpp'),
130138
'mp4' => 'video/mp4',
131139
'm4a' => 'audio/x-m4a',
132-
'f4v' => 'video/mp4',
140+
'f4v' => array('video/mp4', 'video/x-f4v'),
141+
'flv' => 'video/x-flv',
133142
'webm' => 'video/webm',
134143
'aac' => 'audio/x-acc',
135144
'm4u' => 'application/vnd.mpegurl',
@@ -140,19 +149,36 @@
140149
'au' => 'audio/x-au',
141150
'ac3' => 'audio/ac3',
142151
'flac' => 'audio/x-flac',
143-
'ogg' => 'audio/ogg',
152+
'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'),
144153
'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
145154
'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
146155
'ics' => 'text/calendar',
147156
'ical' => 'text/calendar',
148157
'zsh' => 'text/x-scriptzsh',
149-
'7zip' => array('application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
158+
'7z' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
159+
'7zip' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
150160
'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
151161
'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'),
152162
'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
153163
'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
154164
'vcf' => 'text/x-vcard',
155165
'srt' => array('text/srt', 'text/plain'),
156166
'vtt' => array('text/vtt', 'text/plain'),
157-
'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon')
167+
'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'),
168+
'odc' => 'application/vnd.oasis.opendocument.chart',
169+
'otc' => 'application/vnd.oasis.opendocument.chart-template',
170+
'odf' => 'application/vnd.oasis.opendocument.formula',
171+
'otf' => 'application/vnd.oasis.opendocument.formula-template',
172+
'odg' => 'application/vnd.oasis.opendocument.graphics',
173+
'otg' => 'application/vnd.oasis.opendocument.graphics-template',
174+
'odi' => 'application/vnd.oasis.opendocument.image',
175+
'oti' => 'application/vnd.oasis.opendocument.image-template',
176+
'odp' => 'application/vnd.oasis.opendocument.presentation',
177+
'otp' => 'application/vnd.oasis.opendocument.presentation-template',
178+
'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
179+
'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
180+
'odt' => 'application/vnd.oasis.opendocument.text',
181+
'odm' => 'application/vnd.oasis.opendocument.text-master',
182+
'ott' => 'application/vnd.oasis.opendocument.text-template',
183+
'oth' => 'application/vnd.oasis.opendocument.text-web'
158184
);

system/core/CodeIgniter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
* @var string
5656
*
5757
*/
58-
const CI_VERSION = '3.1.8';
58+
const CI_VERSION = '3.1.9';
5959

6060
/*
6161
* ------------------------------------------------------

system/database/DB_driver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,7 @@ protected function _update($table, $values)
15281528
return 'UPDATE '.$table.' SET '.implode(', ', $valstr)
15291529
.$this->_compile_wh('qb_where')
15301530
.$this->_compile_order_by()
1531-
.($this->qb_limit ? ' LIMIT '.$this->qb_limit : '');
1531+
.($this->qb_limit !== FALSE ? ' LIMIT '.$this->qb_limit : '');
15321532
}
15331533

15341534
// --------------------------------------------------------------------

system/database/DB_query_builder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ protected function _like($field, $match = '', $type = 'AND ', $side = 'both', $n
970970
$v = "'{$v}'";
971971
break;
972972
case 'before':
973-
$v = "%'{$v}'";
973+
$v = "'%{$v}'";
974974
break;
975975
case 'after':
976976
$v = "'{$v}%'";
@@ -987,7 +987,7 @@ protected function _like($field, $match = '', $type = 'AND ', $side = 'both', $n
987987
$v .= sprintf($this->_like_escape_str, $this->_like_escape_chr);
988988
}
989989

990-
$qb_where = array('condition' => "{$prefix} {$k} {$not} LIKE", 'value' => $v, 'escape' => $escape);
990+
$qb_where = array('condition' => "{$prefix} {$k} {$not} LIKE {$v}", 'value' => NULL, 'escape' => $escape);
991991
$this->qb_where[] = $qb_where;
992992
if ($this->qb_caching === TRUE)
993993
{
@@ -2215,7 +2215,7 @@ public function delete($table = '', $where = '', $limit = NULL, $reset_data = TR
22152215
protected function _delete($table)
22162216
{
22172217
return 'DELETE FROM '.$table.$this->_compile_wh('qb_where')
2218-
.($this->qb_limit ? ' LIMIT '.$this->qb_limit : '');
2218+
.($this->qb_limit !== FALSE ? ' LIMIT '.$this->qb_limit : '');
22192219
}
22202220

22212221
// --------------------------------------------------------------------
@@ -2365,7 +2365,7 @@ protected function _compile_select($select_override = FALSE)
23652365
.$this->_compile_order_by(); // ORDER BY
23662366

23672367
// LIMIT
2368-
if ($this->qb_limit OR $this->qb_offset)
2368+
if ($this->qb_limit !== FALSE OR $this->qb_offset)
23692369
{
23702370
return $this->_limit($sql."\n");
23712371
}

system/helpers/html_helper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function img($src = '', $index_page = FALSE, $attributes = '')
200200
}
201201
else
202202
{
203-
$img .= ' src="'.get_instance()->config->slash_item('base_url').$v.'"';
203+
$img .= ' src="'.get_instance()->config->base_url($v).'"';
204204
}
205205
}
206206
else
@@ -292,7 +292,7 @@ function link_tag($href = '', $rel = 'stylesheet', $type = 'text/css', $title =
292292
}
293293
else
294294
{
295-
$link .= 'href="'.$CI->config->slash_item('base_url').$v.'" ';
295+
$link .= 'href="'.$CI->config->base_url($v).'" ';
296296
}
297297
}
298298
else
@@ -313,7 +313,7 @@ function link_tag($href = '', $rel = 'stylesheet', $type = 'text/css', $title =
313313
}
314314
else
315315
{
316-
$link .= 'href="'.$CI->config->slash_item('base_url').$href.'" ';
316+
$link .= 'href="'.$CI->config->base_url($href).'" ';
317317
}
318318

319319
$link .= 'rel="'.$rel.'" type="'.$type.'" ';

system/helpers/url_helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ function auto_link($str, $type = 'both', $popup = FALSE)
396396
if ($type !== 'email' && preg_match_all('#(\w*://|www\.)[a-z0-9]+(-+[a-z0-9]+)*(\.[a-z0-9]+(-+[a-z0-9]+)*)+(/([^\s()<>;]+\w)?/?)?#i', $str, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER))
397397
{
398398
// Set our target HTML if using popup links.
399-
$target = ($popup) ? ' target="_blank"' : '';
399+
$target = ($popup) ? ' target="_blank" rel="noopener"' : '';
400400

401401
// We process the links in reverse order (last -> first) so that
402402
// the returned string offsets from preg_match_all() are not

system/libraries/Email.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,11 @@ public function valid_email($email)
10381038
$domain = defined('INTL_IDNA_VARIANT_UTS46')
10391039
? idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46)
10401040
: idn_to_ascii($domain);
1041-
$email = $account.'@'.$domain;
1041+
1042+
if ($domain !== FALSE)
1043+
{
1044+
$email = $account.'@'.$domain;
1045+
}
10421046
}
10431047

10441048
return (bool) filter_var($email, FILTER_VALIDATE_EMAIL);
@@ -1859,7 +1863,11 @@ protected function _validate_email_for_shell(&$email)
18591863
$domain = defined('INTL_IDNA_VARIANT_UTS46')
18601864
? idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46)
18611865
: idn_to_ascii($domain);
1862-
$email = $account.'@'.$domain;
1866+
1867+
if ($domain !== FALSE)
1868+
{
1869+
$email = $account.'@'.$domain;
1870+
}
18631871
}
18641872

18651873
return (filter_var($email, FILTER_VALIDATE_EMAIL) === $email && preg_match('#\A[a-z0-9._+-]+@[a-z0-9.-]{1,253}\z#i', $email));

system/libraries/Form_validation.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,11 @@ public function valid_email($str)
12341234
$domain = defined('INTL_IDNA_VARIANT_UTS46')
12351235
? idn_to_ascii($matches[2], 0, INTL_IDNA_VARIANT_UTS46)
12361236
: idn_to_ascii($matches[2]);
1237-
$str = $matches[1].'@'.$domain;
1237+
1238+
if ($domain !== FALSE)
1239+
{
1240+
$str = $matches[1].'@'.$domain;
1241+
}
12381242
}
12391243

12401244
return (bool) filter_var($str, FILTER_VALIDATE_EMAIL);

system/libraries/Session/Session.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ public function get_temp_keys()
604604
// ------------------------------------------------------------------------
605605

606606
/**
607-
* Unmark flash
607+
* Unmark temp
608608
*
609609
* @param mixed $key Session data key(s)
610610
* @return void

0 commit comments

Comments
 (0)