Don't save dimensions unless it's actually a movie.
This commit is contained in:
parent
f522643d70
commit
2b00e0a4e9
@ -30,8 +30,10 @@ class videodimensions_event_Core {
|
|||||||
|
|
||||||
static function item_edit_form_completed($item, $form) {
|
static function item_edit_form_completed($item, $form) {
|
||||||
// Save the new height and width to the database.
|
// Save the new height and width to the database.
|
||||||
|
if ($item->is_movie()) {
|
||||||
$item->height = $form->edit_item->vidheight->value;
|
$item->height = $form->edit_item->vidheight->value;
|
||||||
$item->width = $form->edit_item->vidwidth->value;
|
$item->width = $form->edit_item->vidwidth->value;
|
||||||
$item->save();
|
$item->save();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user