From fe2881a22aabd0ab5cb971809db6f325c3ce22d3 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 15 Jul 2010 12:37:44 -0700 Subject: [PATCH] Rename Flash_Uploader to just Uploader. Modules that want to replace this will just replace the controller. This makes overriding that much easier in the future. --- .../controllers/{flash_uploader.php => uploader.php} | 6 +++--- modules/gallery/helpers/gallery_event.php | 4 ++-- modules/gallery/views/form_uploadify.html.php | 2 +- themes/wind/views/album.html.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename modules/gallery/controllers/{flash_uploader.php => uploader.php} (96%) diff --git a/modules/gallery/controllers/flash_uploader.php b/modules/gallery/controllers/uploader.php similarity index 96% rename from modules/gallery/controllers/flash_uploader.php rename to modules/gallery/controllers/uploader.php index 6bfdd851..38e22cee 100644 --- a/modules/gallery/controllers/flash_uploader.php +++ b/modules/gallery/controllers/uploader.php @@ -17,8 +17,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class Flash_Uploader_Controller extends Controller { - public function app($id) { +class Uploader_Controller extends Controller { + public function index($id) { $item = ORM::factory("item", $id); access::required("view", $item); access::required("add", $item); @@ -110,7 +110,7 @@ class Flash_Uploader_Controller extends Controller { } private function _get_add_form($album) { - $form = new Forge("flash_uploader/finish", "", "post", array("id" => "g-add-photos-form")); + $form = new Forge("uploader/finish", "", "post", array("id" => "g-add-photos-form")); $group = $form->group("add_photos") ->label(t("Add photos to %album_title", array("album_title" => html::purify($album->title)))); $group->uploadify("uploadify")->album($album); diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index 76bd9ee7..f90f8843 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -237,7 +237,7 @@ class gallery_event_Core { $add_menu->append(Menu::factory("dialog") ->id("add_photos_item") ->label(t("Add photos")) - ->url(url::site("flash_uploader/app/$item->id"))); + ->url(url::site("uploader/index/$item->id"))); if ($item->is_album()) { $add_menu->append(Menu::factory("dialog") ->id("add_album_item") @@ -508,7 +508,7 @@ class gallery_event_Core { ->id("add_item") ->label(t("Add a photo")) ->css_class("ui-icon-plus") - ->url(url::site("flash_uploader/app/$item->id"))) + ->url(url::site("uploader/index/$item->id"))) ->append(Menu::factory("dialog") ->id("add_album") ->label(t("Add an album")) diff --git a/modules/gallery/views/form_uploadify.html.php b/modules/gallery/views/form_uploadify.html.php index 937a37b6..6e18a85c 100644 --- a/modules/gallery/views/form_uploadify.html.php +++ b/modules/gallery/views/form_uploadify.html.php @@ -7,7 +7,7 @@ width: 150, height: 33, uploader: "", - script: "id}") ?>", + script: "id}") ?>", scriptData: , fileExt: "*.gif;*.jpg;*.jpeg;*.png;*.flv;*.mp4;*.m4v;*.GIF;*.JPG;*.JPEG;*.PNG;*.FLV;*.MP4;*.M4V", fileDesc: for_js() ?>, diff --git a/themes/wind/views/album.html.php b/themes/wind/views/album.html.php index b9072e2b..de196be0 100644 --- a/themes/wind/views/album.html.php +++ b/themes/wind/views/album.html.php @@ -29,7 +29,7 @@ admin || access::can("add", $item)): ?> - id") ?> + id") ?>
  • Add some.", array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialog-link\""))) ?>