1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 12:48:26 +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 * Administrators Management
* *
* $Source: /cvs_backup/e107_0.8/e107_admin/administrator.php,v $ * $Source: /cvs_backup/e107_0.8/e107_admin/administrator.php,v $
* $Revision: 1.11 $ * $Revision: 1.12 $
* $Date: 2009-04-27 08:11:04 $ * $Date: 2009-07-23 15:21:41 $
* $Author: secretr $ * $Author: e107coders $
* *
*/ */
@@ -366,7 +366,7 @@ function renderperms($perm, $id)
{ {
return ADMSLAN_58; return ADMSLAN_58;
} }
$sql2 = new db; $sql2 = e107::getDb('sql2');
$lanlist = explode(",",e_LANLIST); $lanlist = explode(",",e_LANLIST);

View File

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

View File

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

View File

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

View File

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

View File

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