Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 into 0d4b02e).

---------------------------------------------------------------------------

by travisbot at 2012-06-25T11:34:17Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1700214) (merged 45d0748b into 0d4b02e).

---------------------------------------------------------------------------

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 in c67cf8b, 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 into 0d4b02e).

---------------------------------------------------------------------------

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 into 0d4b02e).

---------------------------------------------------------------------------

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
  • Loading branch information
fabpot committed Jun 26, 2012
2 parents 4221239 + 81d0552 commit c4a8feb
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -114,7 +114,7 @@ protected function getMongo()
{
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);
Expand Down

0 comments on commit c4a8feb

Please sign in to comment.