mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
Get rid of direct mysql calls
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* $Id: admin_shortcodes_class.php,v 1.36 2010-01-03 14:46:16 e107steved Exp $
|
||||
* $Id: admin_shortcodes_class.php,v 1.37 2010-01-07 21:05:14 e107steved Exp $
|
||||
*
|
||||
* Admin shortcode batch - class
|
||||
*/
|
||||
/**
|
||||
* @package e107
|
||||
* @subpackage shortcodes
|
||||
* @version $Id: admin_shortcodes_class.php,v 1.37 2010-01-07 21:05:14 e107steved Exp $;
|
||||
*
|
||||
* Shortcodes for admin items
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
class admin_shortcodes
|
||||
@@ -805,7 +813,7 @@ class admin_shortcodes
|
||||
<br /><br />
|
||||
<b>".FOOTLAN_12."</b>
|
||||
<br />
|
||||
".mysql_get_server_info().
|
||||
".e107::getDB()->mySqlServerInfo.
|
||||
"<br />
|
||||
".FOOTLAN_16.": ".$mySQLdefaultdb."
|
||||
<br /><br />
|
||||
|
@@ -9,8 +9,8 @@
|
||||
* mySQL Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $
|
||||
* $Revision: 1.74 $
|
||||
* $Date: 2010-01-05 22:00:41 $
|
||||
* $Revision: 1.75 $
|
||||
* $Date: 2010-01-07 21:05:24 $
|
||||
* $Author: e107steved $
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*
|
||||
* @package e107
|
||||
* @subpackage e107_handlers
|
||||
* @version $Id: mysql_class.php,v 1.74 2010-01-05 22:00:41 e107steved Exp $;
|
||||
* @version $Id: mysql_class.php,v 1.75 2010-01-07 21:05:24 e107steved Exp $;
|
||||
*
|
||||
* @todo separate cache for db type tables
|
||||
*/
|
||||
@@ -94,6 +94,7 @@ class e_db_mysql
|
||||
* @var string
|
||||
*/
|
||||
public $mySQLcharset;
|
||||
public $mySqlServerInfo = '?'; // Server info - needed for various things
|
||||
|
||||
public $total_results = false; // Total number of results
|
||||
|
||||
@@ -170,6 +171,8 @@ class e_db_mysql
|
||||
}
|
||||
}
|
||||
|
||||
$this->mySqlServerInfo = mysql_get_server_info(); // We always need this for db_Set_Charset() - so make generally available
|
||||
|
||||
// Set utf8 connection?
|
||||
//@TODO: simplify when yet undiscovered side-effects will be fixed
|
||||
$this->db_Set_Charset();
|
||||
@@ -1507,7 +1510,7 @@ class e_db_mysql
|
||||
else
|
||||
{
|
||||
// Check if MySQL version is utf8 compatible
|
||||
preg_match('/^(.*?)($|-)/', mysql_get_server_info(), $mysql_version);
|
||||
preg_match('/^(.*?)($|-)/', $this->mySqlServerInfo, $mysql_version);
|
||||
if (version_compare($mysql_version[1], '4.1.2', '<'))
|
||||
{
|
||||
// reset utf8
|
||||
|
Reference in New Issue
Block a user