merged branch Wotre/master (PR #4640)
Commits -------81d0552
Adding the database to the DSN we are sending to the MongoDB server Discussion ---------- Adding the database to the DSN we are sending to the MongoDB server Adding the database to the DSN we are sending to the MongoDB server. According to the [documentation from PHP](http://be2.php.net/manual/en/mongo.construct.php) the database will default to admin if it isn't specified in this DSN. Unfortunately the username we're trying to login with shouldn't have access to this database. --------------------------------------------------------------------------- by travisbot at 2012-06-23T13:54:28Z This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1688817) (merged 2251be90 into0d4b02e4
). --------------------------------------------------------------------------- by travisbot at 2012-06-25T11:34:17Z This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1700214) (merged 45d0748b into0d4b02e4
). --------------------------------------------------------------------------- by Wotre at 2012-06-25T12:16:49Z It looks to me like travisbot failed because of an error in the routing system that was fixed inc67cf8b56b
, not because of the code I altered. --------------------------------------------------------------------------- by travisbot at 2012-06-25T16:45:12Z This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1702410) (merged aa659463 into0d4b02e4
). --------------------------------------------------------------------------- by fabpot at 2012-06-26T05:07:37Z Can you squash your commits before I merge? Thanks. --------------------------------------------------------------------------- by Wotre at 2012-06-26T12:02:02Z I think I've managed to do that, but correct me if I've done something wrong :) --------------------------------------------------------------------------- by travisbot at 2012-06-26T12:05:19Z This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1710220) (merged dcb79089 into0d4b02e4
). --------------------------------------------------------------------------- by fabpot at 2012-06-26T12:14:28Z @Wotre Unfortunately, that's wrong. You can read how to do that in the contrib docs: http://symfony.com/doc/current/contributing/code/patches.html#rework-your-patch --------------------------------------------------------------------------- by Wotre at 2012-06-26T12:37:59Z Thanks for the help, looks like I forgot the -f when pushing. It should be okay now
This commit is contained in:
commit
c4a8feb68b
@ -114,7 +114,7 @@ class MongoDbProfilerStorage implements ProfilerStorageInterface
|
||||
{
|
||||
if ($this->mongo === null) {
|
||||
if (preg_match('#^(mongodb://.*)/(.*)/(.*)$#', $this->dsn, $matches)) {
|
||||
$mongo = new \Mongo($matches[1]);
|
||||
$mongo = new \Mongo($matches[1] . (!empty($matches[2]) ? '/' . $matches[2] : ''));
|
||||
$database = $matches[2];
|
||||
$collection = $matches[3];
|
||||
$this->mongo = $mongo->selectCollection($database, $collection);
|
||||
|
Reference in New Issue
Block a user