Fixed action check

Fixed check on action to work with MODX 2.2 and MODX 2.3