1
0

Use the item_created event instead of add_photos_form_completed. Also, fix up the installer to upgrade the module to version 2.

This commit is contained in:
Bharat Mediratta 2010-09-16 23:43:30 -07:00
parent daf1d8a66c
commit 8161f72f6b
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ class autorotate_event_Core {
// The assumption is that the exception was logged at a lower level, but we
// don't want to screw up the processing that was generating the notification
// so we don't pass the exception up the call stack
static function add_photos_form_completed($item, $form) {
static function item_created($item) {
try {
autorotate::rotate_item($item);
} catch (Exception $e) {

View File

@ -19,12 +19,12 @@
*/
class autorotate_installer {
static function install() {
module::set_version("autorotate", 1);
module::set_version("autorotate", 2);
}
static function upgrade($version) {
if ($version == 1) {
module::set_version("autorotate", $version = 1);
module::set_version("autorotate", $version = 2);
}
}