ichikaway/cakephp-mongodb — pull request #37 by seguer (2011-11-16 05:53:29+00:00)
Title: Allow slaveOkay setting to be set outside of the replica set options

Previously the connection's slaveOkay setting was dependent on the replicaset config option, however this doesn't work when in a sharded environment as you connect to a mongos instance which routes stuff to the different shards/replica sets for you.

Setting the slaveOkay method outside of all the connection conditions allows for reading from slaves in either a sharded or a replicaset environment.