Fix Call to undefined method Block::infinity()
Method Block::infinity() was deprecated since 1.18 and removed in 1.23
Replaced calls to Block::infinity() with wfGetDB( DB_SLAVE )->getInfinity();
which was the implementation of that method in 1.22
Change-Id: Ife3dd30ed33dcf57b28b0d24eeca2026eee78ce4