...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<<?php class MyPluginPlugin { public function __construct() { Loader::loadComponents($this, array("Input")); } ... public function upgrade($current_version) { // Ensure new version is greater than installed version if (version_compare($this->version, $current_version) < 0) { $this->Input->setErrors(array( 'version' => array( 'invalid' => "Downgrades are not allowed." ) ); return; } } } ?> |