Version 2.2.2
This commit is contained in:
1 parent
22f1b963ee
commit
a3bb603c96
858 files changed
+479463
-188140
No files matched your search
@@ -3,15 +3,22 @@
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Services Kernel [DB Abstraction]
|
||||
| Invision Power Board
|
||||
| Invision Power Board 2.2.2
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:55 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| THIS IS NOT FREE / OPEN SOURCE SOFTWARE
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > MySQLi Driver Module
|
||||
@@ -134,11 +141,31 @@ class db_driver_mysql extends db_main
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$this->sql_set_collation_and_cp();
|
||||
mysqli_autocommit( $this->connection_id, TRUE );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function sql_set_collation_and_cp()
|
||||
{
|
||||
$this->sql_get_version();
|
||||
|
||||
if ( $this->mysql_version >= 40101 )
|
||||
{
|
||||
$res = mysqli_query( $this->connection_id, "SHOW CHARSET LIKE '" . $this->obj['mysql_codepage'] . "'");
|
||||
|
||||
$charset = mysqli_fetch_row($res);
|
||||
|
||||
mysqli_query( $this->connection_id, "SET NAMES " . $this->obj['mysql_codepage'] );
|
||||
mysqli_query( $this->connection_id, "SET CHARACTER SET " . $this->obj['mysql_codepage'] );
|
||||
mysqli_query( $this->connection_id, "SET character_set_connection = " . $this->obj['mysql_codepage'] );
|
||||
mysqli_query( $this->connection_id, "SET collation_connection = " . $charset[2] );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function sql_can_subquery()
|
||||
{
|
||||
$this->sql_get_version();
|
||||
@@ -251,7 +278,7 @@ class db_driver_mysql extends db_main
|
||||
// SIMPLE: UPDATE
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function simple_update( $tbl, $set, $where, $low_pro='' )
|
||||
function simple_update( $tbl, $set, $where='', $low_pro='' )
|
||||
{
|
||||
if ( $low_pro )
|
||||
{
|
||||
@@ -270,7 +297,7 @@ class db_driver_mysql extends db_main
|
||||
// SIMPLE: DELETE
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function simple_delete( $tbl, $where )
|
||||
function simple_delete( $tbl, $where='' )
|
||||
{
|
||||
if( !$where )
|
||||
{
|
||||
@@ -516,16 +543,22 @@ class db_driver_mysql extends db_main
|
||||
{
|
||||
$_tmp = strtolower( $this->remove_all_quotes($the_query) );
|
||||
|
||||
if ( preg_match( "#(?:/\*|\*/)#i", $_tmp ) )
|
||||
{
|
||||
$this->fatal_error( "Íàñòðîéêè äðàéâåðà íå äîïóñêàþò èñïîëüçîâàíèå êîììåíòàðèåâ â SQL çàïðîñå.\nÈçìåíèòå àòðèáóò allow_sub_select íà 1 ó îáúåêòà äðàéâåðà äëÿ âûêëþ÷åíèÿ ýòîé ïðîâåðêè." );
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( preg_match( "#[^_a-zA-Z]union[^_a-zA-Z]#s", $_tmp ) )
|
||||
{
|
||||
$this->fatal_error( "UNION query joins are not allowed.\nAdd \$DB->allow_sub_select=1; before any query construct to allow them" );
|
||||
$this->fatal_error( "Íàñòðîéêè äðàéâåðà íå ïîçâîëÿþò èñïîëüçîâàòü UNION-çàïðîñû.\nÈçìåíèòå àòðèáóò allow_sub_select íà 1 ó îáúåêòà äðàéâåðà äëÿ âûêëþ÷åíèÿ ýòîé ïðîâåðêè." );
|
||||
return false;
|
||||
}
|
||||
else if ( preg_match_all( "#[^_a-zA-Z](select)[^_a-zA-Z]#s", $_tmp, $matches ) )
|
||||
{
|
||||
if ( count( $matches ) > 1 )
|
||||
{
|
||||
$this->fatal_error( "SUB SELECT query joins are not allowed.\nAdd \$DB->allow_sub_select=1; before any query construct to allow them" );
|
||||
$this->fatal_error( "Íàñòðîéêè äðàéâåðà íå ïîçâîëÿþò èñïîëüçîâàòü âëîæåííûå SELECT â çàïðîñàõ.\nÈçìåíèòå àòðèáóò allow_sub_select íà 1 ó îáúåêòà äðàéâåðà äëÿ âûêëþ÷åíèÿ ýòîé ïðîâåðêè." );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -547,7 +580,7 @@ class db_driver_mysql extends db_main
|
||||
|
||||
if (! $this->query_id )
|
||||
{
|
||||
$this->fatal_error("mySQL query error: $the_query");
|
||||
$this->fatal_error($the_query);
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -578,6 +611,10 @@ class db_driver_mysql extends db_main
|
||||
|
||||
$this->write_debug_log( $the_query, $_data, $endtime );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->write_debug_log( $the_query, $_data, $endtime );
|
||||
}
|
||||
}
|
||||
else if ($this->obj['debug'])
|
||||
{
|
||||
@@ -672,7 +709,7 @@ class db_driver_mysql extends db_main
|
||||
$query_id = $this->query_id;
|
||||
}
|
||||
|
||||
$this->record_row = mysqli_fetch_array($query_id, MYSQL_ASSOC);
|
||||
$this->record_row = mysqli_fetch_array($query_id, MYSQLI_ASSOC);
|
||||
|
||||
return $this->record_row;
|
||||
}
|
||||
@@ -949,7 +986,7 @@ class db_driver_mysql extends db_main
|
||||
{
|
||||
if( $this->connect_failed )
|
||||
{
|
||||
return mysqli_connect_errno( $this->connection_id );
|
||||
return mysqli_connect_errno( );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -965,7 +1002,7 @@ class db_driver_mysql extends db_main
|
||||
{
|
||||
if( $this->connect_failed )
|
||||
{
|
||||
return mysqli_connect_error( $this->connection_id );
|
||||
return mysqli_connect_error( );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user