Rename Html_Uploader to just Uploader; that's the new, simpler method for
overriding the uploader.
This commit is contained in:
parent
a76e7187f7
commit
f9536374c8
@ -1,26 +0,0 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.");
|
|
||||||
/**
|
|
||||||
* Gallery - a web based photo album viewer and editor
|
|
||||||
* Copyright (C) 2000-2010 Bharat Mediratta
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or (at
|
|
||||||
* your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* 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) {
|
|
||||||
// Override the Flash uploader in case anybody goes to it directly
|
|
||||||
// (the Wind theme has a direct link) in empty albums
|
|
||||||
url::redirect("html_uploader/app/$id");
|
|
||||||
}
|
|
||||||
}
|
|
@ -17,8 +17,8 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
class Html_Uploader_Controller extends Controller {
|
class Uploader_Controller extends Controller {
|
||||||
public function app($id) {
|
public function index($id) {
|
||||||
$album = ORM::factory("item", $id);
|
$album = ORM::factory("item", $id);
|
||||||
access::required("view", $album);
|
access::required("view", $album);
|
||||||
access::required("add", $album);
|
access::required("add", $album);
|
||||||
@ -90,7 +90,7 @@ class Html_Uploader_Controller extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function _get_add_form($album) {
|
private function _get_add_form($album) {
|
||||||
$form = new Forge("html_uploader/add/{$album->id}", "", "post", array("id" => "g-add-photos-form"));
|
$form = new Forge("uploader/add/{$album->id}", "", "post", array("id" => "g-add-photos-form"));
|
||||||
$group = $form->group("add_photos")
|
$group = $form->group("add_photos")
|
||||||
->label(t("Add photos to %album_title", array("album_title" => html::purify($album->title))));
|
->label(t("Add photos to %album_title", array("album_title" => html::purify($album->title))));
|
||||||
$group->upload("file1")->add_rule("foo");
|
$group->upload("file1")->add_rule("foo");
|
@ -1,29 +0,0 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.");
|
|
||||||
/**
|
|
||||||
* Gallery - a web based photo album viewer and editor
|
|
||||||
* Copyright (C) 2000-2010 Bharat Mediratta
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or (at
|
|
||||||
* your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
class html_uploader_event_Core {
|
|
||||||
static function site_menu($menu, $theme, $item_css_selector) {
|
|
||||||
$add_menu = $menu->get("add_menu");
|
|
||||||
$item = $theme->item();
|
|
||||||
if ($add_menu && $item) {
|
|
||||||
$add_menu->get("add_photos_item")
|
|
||||||
->url(url::site("html_uploader/app/$item->id"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user