浏览代码

Remove recursive property calls.

euromark 10 年之前
父节点
当前提交
a15b7054e2
共有 3 个文件被更改,包括 1 次插入5 次删除
  1. 1 1
      .travis.yml
  2. 0 3
      Console/Command/ResetShell.php
  3. 0 1
      Model/Behavior/LogableBehavior.php

+ 1 - 1
.travis.yml

@@ -31,7 +31,7 @@ before_script:
   - echo "<?php App::uses('BaseEmailConfig', 'Tools.Config'); class EmailConfig extends BaseEmailConfig {}" > Config/email.php
   - echo "Configure::write('Config.adminEmail', 'example@example.org');" >> Config/bootstrap.php
   - cd ..
-  
+
 script:
   - ../travis/script.sh
 

+ 0 - 3
Console/Command/ResetShell.php

@@ -44,8 +44,6 @@ class ResetShell extends AppShell {
 
 		$this->hr();
 		$this->out('resetting...');
-		Configure::write('debug', 2);
-		$this->User->recursive = -1;
 		$this->User->updateAll(['User.email' => '\'' . $email . '\''], ['User.email !=' => $email]);
 		$count = $this->User->getAffectedRows();
 		$this->out($count . ' emails resetted - DONE');
@@ -104,7 +102,6 @@ class ResetShell extends AppShell {
 		}
 
 		$newPwd = '\'' . $pw . '\'';
-		$this->User->recursive = -1;
 		$this->User->updateAll(['password' => $newPwd], ['password !=' => $pw]);
 		$count = $this->User->getAffectedRows();
 		$this->out($count . ' pwds resetted - DONE');

+ 0 - 1
Model/Behavior/LogableBehavior.php

@@ -367,7 +367,6 @@ class LogableBehavior extends ModelBehavior {
 		if (isset($this->settings[$Model->alias]['skip']['delete']) && $this->settings[$Model->alias]['skip']['delete']) {
 			return true;
 		}
-		$Model->recursive = -1;
 		$Model->read();
 		return true;
 	}