code/VersionedFileExtension.php
public function savePreviousVersion($version)
    {
        if (!is_numeric($version)) {
            return;
        }

        try {
            $this->setVersionNumber($version);
            $this->owner->write();
        } catch (Exception $e) {
            throw new ValidationException(new ValidationResult(
                false,
                "Could not replace file #{$this->owner->ID} with version #$version."
            ));
        }
    }
public function savePreviousVersion($version)
    {
        if (!is_numeric($version)) {
            return;
        }

        try {
            $this->setVersionNumber($version);
            $this->owner->write();
        } catch (Exception $e) {
            throw new ValidationException(new ValidationResult(
                false,
                "Could not replace file #{$this->owner->ID} with version #$version."
            ));
        }
    }
public function savePreviousVersion ( $ version ) { if ( ! is_numeric ( $ version ) ) { return ; } try { $ this -> setVersionNumber ( $ version ) ; $ this -> owner -> write ( ) ; } catch ( Exception $ e ) { throw new ValidationException ( new ValidationResult ( false , "Could not replace file #{$this->owner->ID} with version #$version." ) ) ; } }
Handles rolling back to a selected version on save.

@param int $version
Handles rolling back to a selected version on save .