Skip to content

Commit 0199f68

Browse files
author
Phil Sturgeon
committed
Readded PDO drivers.
1 parent f525f10 commit 0199f68

File tree

5 files changed

+565
-15
lines changed

5 files changed

+565
-15
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<html>
2+
<head>
3+
<title>403 Forbidden</title>
4+
</head>
5+
<body>
6+
7+
<p>Directory access is forbidden.</p>
8+
9+
</body>
10+
</html>

system/database/drivers/pdo/pdo_driver.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
* An open source application development framework for PHP 5.1.6 or newer
66
*
77
* @package CodeIgniter
8-
* @author ExpressionEngine Dev Team
98
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
109
* @license http://codeigniter.com/user_guide/license.html
10+
* @author EllisLab Dev Team
1111
* @link http://codeigniter.com
1212
* @since Version 2.1.0
1313
* @filesource
@@ -25,10 +25,9 @@
2525
* @package CodeIgniter
2626
* @subpackage Drivers
2727
* @category Database
28-
* @author ExpressionEngine Dev Team
28+
* @author EllisLab Dev Team
2929
* @link http://codeigniter.com/user_guide/database/
3030
*/
31-
3231
class CI_DB_pdo_driver extends CI_DB {
3332

3433
var $dbdriver = 'pdo';
@@ -37,7 +36,7 @@ class CI_DB_pdo_driver extends CI_DB {
3736
var $_escape_char = '';
3837
var $_like_escape_str;
3938
var $_like_escape_chr;
40-
39+
4140

4241
/**
4342
* The syntax to count rows is slightly different across different
@@ -52,13 +51,13 @@ class CI_DB_pdo_driver extends CI_DB {
5251
function __construct($params)
5352
{
5453
parent::__construct($params);
55-
54+
5655
// clause and character used for LIKE escape sequences
5756
if (strpos($this->hostname, 'mysql') !== FALSE)
5857
{
5958
$this->_like_escape_str = '';
6059
$this->_like_escape_chr = '';
61-
60+
6261
//Prior to this version, the charset can't be set in the dsn
6362
if(is_php('5.3.6'))
6463
{
@@ -80,6 +79,7 @@ function __construct($params)
8079
}
8180

8281
$this->hostname .= ";dbname=".$this->database;
82+
8383
$this->trans_enabled = FALSE;
8484

8585
$this->_random_keyword = ' RND('.time().')'; // database specific random keyword
@@ -190,7 +190,7 @@ function _execute($sql)
190190
{
191191
$sql = $this->_prep_query($sql);
192192
$result_id = $this->conn_id->query($sql);
193-
193+
194194
if (is_object($result_id))
195195
{
196196
$this->affect_rows = $result_id->rowCount();
@@ -199,7 +199,7 @@ function _execute($sql)
199199
{
200200
$this->affect_rows = 0;
201201
}
202-
202+
203203
return $result_id;
204204
}
205205

@@ -319,16 +319,16 @@ function escape_str($str, $like = FALSE)
319319

320320
return $str;
321321
}
322-
322+
323323
//Escape the string
324324
$str = $this->conn_id->quote($str);
325-
325+
326326
//If there are duplicated quotes, trim them away
327327
if (strpos($str, "'") === 0)
328328
{
329329
$str = substr($str, 1, -1);
330330
}
331-
331+
332332
// escape LIKE condition wildcards
333333
if ($like === TRUE)
334334
{
@@ -530,7 +530,7 @@ function _escape_identifiers($item)
530530
if (strpos($item, '.') !== FALSE)
531531
{
532532
$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;
533-
533+
534534
}
535535
else
536536
{
@@ -580,7 +580,7 @@ function _insert($table, $keys, $values)
580580
{
581581
return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
582582
}
583-
583+
584584
// --------------------------------------------------------------------
585585

586586
/**
@@ -633,7 +633,7 @@ function _update($table, $values, $where, $orderby = array(), $limit = FALSE)
633633

634634
return $sql;
635635
}
636-
636+
637637
// --------------------------------------------------------------------
638638

639639
/**
@@ -775,7 +775,7 @@ function _limit($sql, $limit, $offset)
775775
{
776776
$sql .= " OFFSET ".$offset;
777777
}
778-
778+
779779
return $sql;
780780
}
781781
}

0 commit comments

Comments
 (0)