* Removed "static" db layer typelist to prevent accidental over-

writes of referenced return values (garvinhicking)
This commit is contained in:
Garvin Hicking 2009-07-27 09:52:13 +00:00
parent 6d90049416
commit ee102b4402
8 changed files with 10 additions and 7 deletions

View File

@ -9,6 +9,9 @@ Version 1.5 ()
you can overwrite the plugins and buttons of all Xinha instances.
See the mentioned default file for usage. (garvinhicking)
* Removed "static" db layer typelist to prevent accidental over-
writes of referenced return values (garvinhicking)
* Upgrade to Smarty 2.6.26
* Removed inline styles of the s9y media insertion, they will now

View File

@ -60,7 +60,7 @@ function serendipity_db_in_sql($col, &$search_ids, $type = ' OR ') {
*/
function &serendipity_db_query($sql, $single = false, $result_type = "both", $reportErr = false, $assocKey = false, $assocVal = false, $expectError = false) {
global $serendipity;
static $type_map = array(
$type_map = array(
'assoc' => MYSQL_ASSOC,
'num' => MYSQL_NUM,
'both' => MYSQL_BOTH,

View File

@ -60,7 +60,7 @@ function serendipity_db_in_sql($col, &$search_ids, $type = ' OR ') {
*/
function &serendipity_db_query($sql, $single = false, $result_type = "both", $reportErr = false, $assocKey = false, $assocVal = false, $expectError = false) {
global $serendipity;
static $type_map = array('assoc' => MYSQLI_ASSOC, 'num' => MYSQLI_NUM, 'both' => MYSQLI_BOTH, 'true' => true, 'false' => false);
$type_map = array('assoc' => MYSQLI_ASSOC, 'num' => MYSQLI_NUM, 'both' => MYSQLI_BOTH, 'true' => true, 'false' => false);
if ($expectError) {
$c = @mysqli_query($serendipity['dbConn'], $sql);

View File

@ -187,7 +187,7 @@ function serendipity_db_insert_id($table = '', $id = '') {
*/
function &serendipity_db_query($sql, $single = false, $result_type = "both", $reportErr = false, $assocKey = false, $assocVal = false, $expectError = false) {
global $serendipity;
static $type_map = array(
$type_map = array(
'assoc' => PDO::FETCH_ASSOC,
'num' => PDO::FETCH_NUM,
'both' => PDO::FETCH_BOTH,

View File

@ -193,7 +193,7 @@ function serendipity_db_insert_id($table = '', $id = '') {
*/
function &serendipity_db_query($sql, $single = false, $result_type = "both", $reportErr = false, $assocKey = false, $assocVal = false, $expectError = false) {
global $serendipity;
static $type_map = array(
$type_map = array(
'assoc' => PGSQL_ASSOC,
'num' => PGSQL_NUM,
'both' => PGSQL_BOTH,

View File

@ -212,7 +212,7 @@ function serendipity_db_in_sql($col, &$search_ids, $type = ' OR ') {
function &serendipity_db_query($sql, $single = false, $result_type = "both", $reportErr = true, $assocKey = false, $assocVal = false, $expectError = false)
{
global $serendipity;
static $type_map = array(
$type_map = array(
'assoc' => SQLITE_ASSOC,
'num' => SQLITE_NUM,
'both' => SQLITE_BOTH,

View File

@ -220,7 +220,7 @@ function serendipity_db_in_sql($col, &$search_ids, $type = ' OR ') {
function &serendipity_db_query($sql, $single = false, $result_type = "both", $reportErr = true, $assocKey = false, $assocVal = false, $expectError = false)
{
global $serendipity;
static $type_map = array(
$type_map = array(
'assoc' => SQLITE3_ASSOC,
'num' => SQLITE3_NUM,
'both' => SQLITE3_BOTH,

View File

@ -115,7 +115,7 @@ function generate_resultset($cursor, $result_type = 'sqlr_BOTH') {
function &serendipity_db_query($sql, $single = false, $result_type = "both", $reportErr = false, $assocKey = false, $assocVal = false, $expectError = false) {
global $serendipity;
static $type_map = array(
$type_map = array(
'assoc' => sqlr_ASSOC,
'num' => sqlr_NUM,
'both' => sqlr_BOTH,