該項目使用CakePHP,1.3不能升級項目的CakePHP-2.0
現在我想要升級到CakePHP的-2.0
我已經改名爲所有控制器和模式CakePHP的開發-2.0公約。
現在,如果我重新載入我的錯誤是這樣的頁面:
Indirect modification of overloaded property PostsController::$Auth has no effect [APP/Controller/PostsController.php, line 11]
代碼:
PostsController:
$this->Auth->allowedActions =
array('index','view','archive','listarchive','viewfromcategory','tags','aboutme','contact','polls');
的AppController:
class AppController extends Controller {
var $components = array('Acl', 'Session', 'Auth','RequestHandler');
//var $helpers = array('Html', 'Form','Js','Session','Cache');
var $helpers = array('Html', 'Form','Js','Session');
function beforeFilter() {
//Configure AuthComponent
$this->Auth->actionPath = 'controllers/';
$this->Auth->allowedActions = array('display');
//$this->Auth->authorize = 'actions';
$this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
$this->Auth->logoutRedirect = array('controller' => 'posts', 'action' => 'index');
$this->Auth->loginRedirect = array('controller' => 'posts', 'action' => 'index');
}
哪有我修復這個公關oblem?