public function recoverEmployeeTree($verify = true) {
		set_time_limit(RECOVER_TREE_EMPLOYEE_TIME_LIMIT);
		if ($verify && ($this->verify() === true)) {
			return true;
		}

		$dataSource = $this->getDataSource();
		$dataSource->begin();
		$result = $this->recover('parent');
		if ($result) {
			$dataSource->commit();
			$event = new CakeEvent('Model.afterUpdateTree', $this);
			$this->getEventManager()->dispatch($event);
		} else {
			$dataSource->rollback();
		}

		return $result;
	}
public function recoverEmployeeTree($verify = true) {
		set_time_limit(RECOVER_TREE_EMPLOYEE_TIME_LIMIT);
		if ($verify && ($this->verify() === true)) {
			return true;
		}

		$dataSource = $this->getDataSource();
		$dataSource->begin();
		$result = $this->recover('parent');
		if ($result) {
			$dataSource->commit();
			$event = new CakeEvent('Model.afterUpdateTree', $this);
			$this->getEventManager()->dispatch($event);
		} else {
			$dataSource->rollback();
		}

		return $result;
	}
public function recoverEmployeeTree ( $ verify = true ) { set_time_limit ( RECOVER_TREE_EMPLOYEE_TIME_LIMIT ) ; if ( $ verify && ( $ this -> verify ( ) === true ) ) { return true ; } $ dataSource = $ this -> getDataSource ( ) ; $ dataSource -> begin ( ) ; $ result = $ this -> recover ( 'parent' ) ; if ( $ result ) { $ dataSource -> commit ( ) ; $ event = new CakeEvent ( 'Model.afterUpdateTree' , $ this ) ; $ this -> getEventManager ( ) -> dispatch ( $ event ) ; } else { $ dataSource -> rollback ( ) ; } return $ result ; }
Recover a corrupted tree

@param bool $verify Whether or not to verify the tree before recover.
@return bool true on success, false on failure
Recover a corrupted tree