adapt files to cakephp 2
adapt files to cakephp 2