added if to prevent breaking owncloud when appframwork is not enabled