Model/Behavior/SoftDeleteBehavior.php
public function undelete($model, $id) {
		$runtime = $this->runtime[$model->alias];
		$this->softDelete($model, false);

		$data = array();
		$fields = $this->_normalizeFields($model);
		foreach ($fields as $flag => $date) {
			if (true === $runtime || $flag === $runtime) {
				$data[$flag] = false;
				if ($date) {
					$data[$date] = null;
				}
				if ($flag === $runtime) {
					break;
				}
			}
		}

		$model->create();
		$model->set($model->primaryKey, $id);
		$result = $model->save(array($model->alias => $data), false, array_keys($data));
		$this->softDelete($model, $runtime);
		return $result;
	}
public function undelete($model, $id) {
		$runtime = $this->runtime[$model->alias];
		$this->softDelete($model, false);

		$data = array();
		$fields = $this->_normalizeFields($model);
		foreach ($fields as $flag => $date) {
			if (true === $runtime || $flag === $runtime) {
				$data[$flag] = false;
				if ($date) {
					$data[$date] = null;
				}
				if ($flag === $runtime) {
					break;
				}
			}
		}

		$model->create();
		$model->set($model->primaryKey, $id);
		$result = $model->save(array($model->alias => $data), false, array_keys($data));
		$this->softDelete($model, $runtime);
		return $result;
	}
public function undelete ( $ model , $ id ) { $ runtime = $ this -> runtime [ $ model -> alias ] ; $ this -> softDelete ( $ model , false ) ; $ data = array ( ) ; $ fields = $ this -> _normalizeFields ( $ model ) ; foreach ( $ fields as $ flag => $ date ) { if ( true === $ runtime || $ flag === $ runtime ) { $ data [ $ flag ] = false ; if ( $ date ) { $ data [ $ date ] = null ; } if ( $ flag === $ runtime ) { break ; } } } $ model -> create ( ) ; $ model -> set ( $ model -> primaryKey , $ id ) ; $ result = $ model -> save ( array ( $ model -> alias => $ data ) , false , array_keys ( $ data ) ) ; $ this -> softDelete ( $ model , $ runtime ) ; return $ result ; }
Mark record as not deleted

@param object $model
@param integer $id
@return boolean
Mark record as not deleted