From 26f8240e3478802a505f6f5355741d30130c65c5 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 9 Nov 2009 11:52:43 -0800 Subject: Revert "Try an new approach to extending forms. Create an extend_form event. For the first attempt replace the comment_add_form and item_add_form events." This reverts commit 809e738536b6639bb42ecae8eb1e183543fed93c. --- modules/gallery/helpers/album.php | 4 +--- modules/gallery/helpers/movie.php | 5 ++--- modules/gallery/helpers/photo.php | 4 +--- 3 files changed, 4 insertions(+), 9 deletions(-) (limited to 'modules/gallery') diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php index c9c6e2c9..72a79a75 100644 --- a/modules/gallery/helpers/album.php +++ b/modules/gallery/helpers/album.php @@ -154,9 +154,7 @@ class album_Core { "DESC" => t("Descending"))) ->selected($parent->sort_order); - $extend_form = (object)array("data" => $parent, "form" => $form, "id" => "g-edit-album-form", - "append_to" => $group); - module::event("extend_form", $extend_form); + module::event("item_edit_form", $parent, $form); $group = $form->group("buttons")->label(""); $group->hidden("type")->value("album"); diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php index 9e663d1f..e84e8ea6 100644 --- a/modules/gallery/helpers/movie.php +++ b/modules/gallery/helpers/movie.php @@ -151,9 +151,7 @@ class movie_Core { "not_url_safe", t("The internet address should contain only letters, numbers, hyphens and underscores")); - $extend_form = (object)array("data" => $parent, "form" => $form, "id" => "g-edit-movie-form", - "append_to" => $group); - module::event("extend_form", $extend_form); + module::event("item_edit_form", $movie, $form); $group = $form->group("buttons")->label(""); $group->submit("")->value(t("Modify")); @@ -161,6 +159,7 @@ class movie_Core { return $form; } + static function getmoviesize($filename) { $ffmpeg = self::find_ffmpeg(); if (empty($ffmpeg)) { diff --git a/modules/gallery/helpers/photo.php b/modules/gallery/helpers/photo.php index f5e1e1dc..01cf5278 100644 --- a/modules/gallery/helpers/photo.php +++ b/modules/gallery/helpers/photo.php @@ -179,9 +179,7 @@ class photo_Core { "not_url_safe", t("The internet address should contain only letters, numbers, hyphens and underscores")); - $extend_form = (object)array("data" => $photo, "form" => $form, "id" => "g-edit-photo-form", - "append_to" => $group); - module::event("extend_form", $extend_form); + module::event("item_edit_form", $photo, $form); $group = $form->group("buttons")->label(""); $group->submit("")->value(t("Modify")); -- cgit v1.2.3