1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-20 20:51:53 +02:00

some 'new db' removal

This commit is contained in:
CaMer0n 2009-07-23 15:21:41 +00:00
parent 88620a7370
commit f48cdb5e39
6 changed files with 34 additions and 42 deletions

View File

@ -9,9 +9,9 @@
* Administrators Management
*
* $Source: /cvs_backup/e107_0.8/e107_admin/administrator.php,v $
* $Revision: 1.11 $
* $Date: 2009-04-27 08:11:04 $
* $Author: secretr $
* $Revision: 1.12 $
* $Date: 2009-07-23 15:21:41 $
* $Author: e107coders $
*
*/
@ -366,7 +366,7 @@ function renderperms($perm, $id)
{
return ADMSLAN_58;
}
$sql2 = new db;
$sql2 = e107::getDb('sql2');
$lanlist = explode(",",e_LANLIST);

View File

@ -9,9 +9,9 @@
* Administration Area Authorization
*
* $Source: /cvs_backup/e107_0.8/e107_admin/auth.php,v $
* $Revision: 1.9 $
* $Date: 2009-07-18 10:17:56 $
* $Author: marj_nl_fr $
* $Revision: 1.10 $
* $Date: 2009-07-23 15:21:41 $
* $Author: e107coders $
*/
if (!defined('e107_INIT')) { exit; }
@ -200,7 +200,7 @@ class auth
# - scope public
*/
global $tp, $pref;
$sql_auth = new db;
$sql_auth = e107::getDb('sql_auth');
$reason = '';
$user_info = new UserHandler;

View File

@ -9,9 +9,9 @@
* Administration - Database Utilities
*
* $Source: /cvs_backup/e107_0.8/e107_admin/db.php,v $
* $Revision: 1.10 $
* $Date: 2009-07-19 11:44:27 $
* $Author: marj_nl_fr $
* $Revision: 1.11 $
* $Date: 2009-07-23 15:21:41 $
* $Author: e107coders $
*
*/
@ -477,18 +477,9 @@ function verify_sql_record()
{
global $emessage, $sql, $sql2, $sql3, $frm, $e107, $tp;
if(!is_object($sql))
{
$sql = new db();
}
if(!is_object($sql2))
{
$sql2 = new db();
}
if(!is_object($sql3))
{
$sql3 = new db();
}
$sql = e107::getDb();
$sql2 = e107::getDb('sql2');
$sql3 = e107::getDb('sql3');
$tables = array();
$tables[] = 'rate';

View File

@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/footer.php,v $
| $Revision: 1.11 $
| $Date: 2009-07-12 02:29:23 $
| $Revision: 1.12 $
| $Date: 2009-07-23 15:21:41 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@ -45,15 +45,19 @@ global $eTraffic, $error_handler, $db_time, $sql, $mySQLserver, $mySQLuser, $myS
// A Ensure sql and traffic objects exist
//
/*
if(!is_object($sql)){
// reinstigate db connection if another connection from third-party script closed it ...
$sql = new db;
$sql -> db_Connect($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb);
}
if (!is_object($eTraffic)) {
$eTraffic = new e107_traffic;
$eTraffic->Bump('Lost Traffic Counters');
}
*/
$sql = e107::getDb();
$eTraffic = e107::getSingleton('e107_traffic', e_HANDLER.'traffic_class.php');
$eTraffic->Bump('Lost Traffic Counters');
if(varset($e107_popup)!=1){
//

View File

@ -9,8 +9,8 @@
* Administration Area - Site Links
*
* $Source: /cvs_backup/e107_0.8/e107_admin/links.php,v $
* $Revision: 1.25 $
* $Date: 2009-07-17 07:53:13 $
* $Revision: 1.26 $
* $Date: 2009-07-23 15:21:41 $
* $Author: e107coders $
*
*/
@ -78,10 +78,8 @@ if(isset($_POST['generate_sublinks']) && isset($_POST['sublink_type']) && $_POST
{
$subtype = $_POST['sublink_type'];
$sublink = $linkpost->sublink_list($subtype);
if(!is_object($sql2))
{
$sql2 = new db();
}
$sql2 = e107::getDb('sql2');
$sql->db_Select("links", "*", "link_id = '".$_POST['sublink_parent']."'");
$par = $sql->db_Fetch();

View File

@ -10,8 +10,8 @@
* Administration Area - Users
*
* $Source: /cvs_backup/e107_0.8/e107_admin/users.php,v $
* $Revision: 1.44 $
* $Date: 2009-07-23 06:55:39 $
* $Revision: 1.45 $
* $Date: 2009-07-23 15:21:41 $
* $Author: e107coders $
*
*/
@ -978,7 +978,7 @@ class users
function show_batch_options()
{
// Non-working example.
$text = "<span class='f-left' style='padding-left:15px'><img src='".e_IMAGE."generic/branchbottom.gif' alt='' />
<select class='tbox' name='execute_batch' onchange='this.form.submit()'>
<option value=''>With selected...</option>
@ -1360,10 +1360,9 @@ class users
{
$query = 'SELECT * FROM `#user` WHERE user_ban=2';
}
if (!is_object($sql3))
{
$sql3 = new db;
}
$sql3 = e107::getDb('sql3');
$sql3->db_Select_gen($query);
while ($row = $sql3->db_Fetch())
{