wshyang Posted May 14, 2013 Posted May 14, 2013 (edited) Hi guys I've been wanting to create a add-on cron script that utilises Prestashop's DB class instead of instantiating the database handle directly, but I can't seem to figure out where did the "Db" class commonly referenced by "Db::getInstance()" calls get defined. Before I get accused of not searching, I did actually read the other thread However, as bizarre as it is, that file does not exist on our installation: [/home/xxxx/www/shop]# find . | grep Db.php ./classes/Db.php ./admin1234/tabs/AdminDb.php And even better: [/home/xxxx/www/shop/classes]# grep -r "extends Db" ../ ../classes/MySQL.php:class MySQLCore extends Db And most intriguing! [/home/xxxx/www/shop/override]# cd ../override/ [/home/xxxx/www/shop/override]# ls ./ ../ classes/ controllers/ [/home/xxxx/www/shop/override]# cd classes/ [/home/xxxx/www/shop/override/classes]# ls ./ ../ _FrontController.php* _Module.php* _MySQL.php* Our shop is working, so obviously I am missing something. We are running Prestashop 1.4.1. Edit: One more grep through the code base found nothing: grep -rwI "Db" . | grep -v "::" ./modules/productcomments/productcommentscriterion.php:require_once(dirname(__FILE__).'/../../classes/Db.php'); ./classes/MySQL.php:class MySQLCore extends Db ./classes/Db.php: * Get Db object instance (Singleton) ./classes/Db.php: * @return object Db instance ./classes/Db.php: * Build a Db object Edited May 14, 2013 by wshyang (see edit history) Share this post Link to post Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now