Fixed issue #08847: Viewing quotas after having de-activated a survey shows internal server error.
Dev: use tableExist, but think there are better way
Dev: see http://bugs.limesurvey.org/view.php?id=8847#c29233