Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
1 + 6 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: Xoops core database $GLOBALS
by Catzwolf on 2009/3/31 6:13:47

The correct call to the database should be the following:

le="color: #000000"><?php $this->db = &XoopsDatabaseFactory::getDatabaseConnection();


As far as I am concerned, all $GLOBALS calls should be removed the core and people should be made aware of the correct methods of accessing class instances etc.

Catz
Xoops core database $GLOBALS
by TheFinni on 2009/3/31 5:32:12

Would anyone be able to explain why several XOOPS core class files have been edited with a different way to associate to the Database class and connection?

In the newest core 2.3.3 the database connection is now defined as:

$this->db = $GLOBALS['xoopsDB'];

It used to be:

$this->db =& Database::getInstance();

I've read somewhere it's better security wise to avoid $GLOBALS. Is this at all a concern in the new XOOPS core?

Who's Online

588 user(s) are online (529 user(s) are browsing Support Forums)


Members: 0


Guests: 588


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits