Dubai posts second weekly gain, Abu Dhabi inches higher