allow php class_exists in smarty security and better 0ffd02c

Rferences #245