public function hostingService_db_mysql::context_import in Hostmaster (Aegir) 6
Overrides hostingService::context_import
File
- modules/
hosting/ db_server/ hosting_db_server.service.inc, line 101 - Provide the hosting serivce classes for database integration.
Class
- hostingService_db_mysql
- A MySQL specific db service implementation class.
Code
public function context_import($context) {
parent::context_import($context);
$matches = array();
preg_match("+^mysql://(.*):(.*)@.*\$+", stripslashes($context->master_db), $matches);
$this->db_user = urldecode($matches[1]);
$this->db_passwd = urldecode($matches[2]);
}