Alternative GridFS collection names issue fix.[dev] #766

Merged
merged 1 commit into from Jan 8, 2013

Conversation

Projects
None yet
2 participants
Contributor

3d0c commented Dec 23, 2012

There is a problem in source/MongoDb.php, it doesn't work with GridFS collections which is named different to defaults.

This call doesn't pass prefix to the getGridFS and defaults "fs.files" will be used, here it is:

$collection = $self->connection->getGridFS();

This PR has a fix for this issue.

But there is one more problem — unable to use different sources for gridfs collection, because of this:

if ($source == "{$_config['gridPrefix']}.files")

I'm afraid It's a wrong way to determine the type of collection — is it gridfs or not.

I'm working now on the solution.

Owner

nateabele commented Dec 26, 2012

Hi, thanks for the patch. Can you show me a test that demonstrates the issue? Also, it looks as though your editor added an extra newline at the end of the patch.

@3d0c 3d0c added a commit to 3d0c/lithium that referenced this pull request Jan 8, 2013

@3d0c 3d0c Fixes for issue #766 0524db2
Owner

nateabele commented Jan 8, 2013

Since we're working out the details of the test, I'm just gonna go ahead and merge this. Please do me a favor and clean up the trailing newline in the test PR though. :-) Thanks!

@nateabele nateabele added a commit that referenced this pull request Jan 8, 2013

@nateabele nateabele Merge pull request #766 from 3d0c/dev
Alternative GridFS collection names issue fix.[dev]
215faf8

@nateabele nateabele merged commit 215faf8 into UnionOfRAD:dev Jan 8, 2013

1 check passed

default The Travis build passed
Details

@nateabele nateabele added a commit that referenced this pull request Jan 9, 2013

@nateabele nateabele Merge pull request #778 from jails/dev/grid-fs
Tests for #766.
b2bf24c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment