Update general.php

Function isAjaxReq() updated for simpler code.
Merge pull request #1 from x7d/patch-1

Update general.php