Merge commit 'gallery3-contrib/master'
Conflicts: modules/downloadfullsize/controllers/admin_downloadfullsize.php modules/downloadfullsize/controllers/downloadfullsize.php modules/downloadfullsize/helpers/downloadfullsize_installer.php modules/downloadfullsize/helpers/downloadfullsize_menu.php modules/downloadfullsize/helpers/downloadfullsize_theme.php modules/downloadfullsize/views/downloadfullsize_block.html.php
This commit is contained in:
commit
a74d58d6db
@ -28,6 +28,7 @@ class Admin_DownloadFullsize_Controller extends Admin_Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function saveprefs() {
|
public function saveprefs() {
|
||||||
|
<<<<<<< HEAD:modules/downloadfullsize/controllers/admin_downloadfullsize.php
|
||||||
// This probably does something important.
|
// This probably does something important.
|
||||||
access::verify_csrf();
|
access::verify_csrf();
|
||||||
|
|
||||||
@ -36,6 +37,16 @@ class Admin_DownloadFullsize_Controller extends Admin_Controller {
|
|||||||
$tButton = false;
|
$tButton = false;
|
||||||
$fButton = false;
|
$fButton = false;
|
||||||
for ($i=0; $i<count($dlLinks_array); $i++) {
|
for ($i=0; $i<count($dlLinks_array); $i++) {
|
||||||
|
=======
|
||||||
|
// Prevent Cross Site Request Forgery
|
||||||
|
access::verify_csrf();
|
||||||
|
|
||||||
|
// Figure out which boxes where checked
|
||||||
|
$dlLinks_array = Input::instance()->post("DownloadLinkOptions");
|
||||||
|
$tButton = false;
|
||||||
|
$fButton = false;
|
||||||
|
for ($i = 0; $i < count($dlLinks_array); $i++) {
|
||||||
|
>>>>>>> gallery3-contrib/master:modules/downloadfullsize/controllers/admin_downloadfullsize.php
|
||||||
if ($dlLinks_array[$i] == "tButton") {
|
if ($dlLinks_array[$i] == "tButton") {
|
||||||
$tButton = true;
|
$tButton = true;
|
||||||
}
|
}
|
||||||
|
@ -18,11 +18,18 @@
|
|||||||
* 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 downloadfullsize_Controller extends Controller {
|
class downloadfullsize_Controller extends Controller {
|
||||||
|
<<<<<<< HEAD:modules/downloadfullsize/controllers/downloadfullsize.php
|
||||||
|
|
||||||
|
=======
|
||||||
|
|
||||||
|
>>>>>>> gallery3-contrib/master:modules/downloadfullsize/controllers/downloadfullsize.php
|
||||||
public function send($id) {
|
public function send($id) {
|
||||||
$item = ORM::factory("item", $id);
|
$item = ORM::factory("item", $id);
|
||||||
access::required("view_full", $item);
|
access::required("view_full", $item);
|
||||||
download::force($item->file_path());
|
download::force($item->file_path());
|
||||||
|
<<<<<<< HEAD:modules/downloadfullsize/controllers/downloadfullsize.php
|
||||||
return ;
|
return ;
|
||||||
|
=======
|
||||||
|
>>>>>>> gallery3-contrib/master:modules/downloadfullsize/controllers/downloadfullsize.php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,13 +20,19 @@ class downloadfullsize_installer {
|
|||||||
static function install() {
|
static function install() {
|
||||||
$version = module::get_version("downloadfullsize");
|
$version = module::get_version("downloadfullsize");
|
||||||
if ($version == 0) {
|
if ($version == 0) {
|
||||||
|
<<<<<<< HEAD:modules/downloadfullsize/helpers/downloadfullsize_installer.php
|
||||||
/* @todo Put database creation here */
|
/* @todo Put database creation here */
|
||||||
|
=======
|
||||||
|
>>>>>>> gallery3-contrib/master:modules/downloadfullsize/helpers/downloadfullsize_installer.php
|
||||||
module::set_version("downloadfullsize", 1);
|
module::set_version("downloadfullsize", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static function uninstall() {
|
static function uninstall() {
|
||||||
|
<<<<<<< HEAD:modules/downloadfullsize/helpers/downloadfullsize_installer.php
|
||||||
/* @todo Put database table drops here */
|
/* @todo Put database table drops here */
|
||||||
|
=======
|
||||||
|
>>>>>>> gallery3-contrib/master:modules/downloadfullsize/helpers/downloadfullsize_installer.php
|
||||||
module::delete("downloadfullsize");
|
module::delete("downloadfullsize");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,10 @@ class downloadfullsize_menu_Core {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
<<<<<<< HEAD:modules/downloadfullsize/helpers/downloadfullsize_menu.php
|
||||||
|
=======
|
||||||
|
|
||||||
|
>>>>>>> gallery3-contrib/master:modules/downloadfullsize/helpers/downloadfullsize_menu.php
|
||||||
static function admin($menu, $theme) {
|
static function admin($menu, $theme) {
|
||||||
$menu->get("settings_menu")
|
$menu->get("settings_menu")
|
||||||
->append(Menu::factory("link")
|
->append(Menu::factory("link")
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
|
<<<<<<< HEAD:modules/downloadfullsize/helpers/downloadfullsize_theme.php
|
||||||
<?php defined("SYSPATH") or die("No direct script access.");/**
|
<?php defined("SYSPATH") or die("No direct script access.");/**
|
||||||
|
=======
|
||||||
|
<?php defined("SYSPATH") or die("No direct script access.");
|
||||||
|
/**
|
||||||
|
>>>>>>> gallery3-contrib/master:modules/downloadfullsize/helpers/downloadfullsize_theme.php
|
||||||
* Gallery - a web based photo album viewer and editor
|
* Gallery - a web based photo album viewer and editor
|
||||||
* Copyright (C) 2000-2009 Bharat Mediratta
|
* Copyright (C) 2000-2009 Bharat Mediratta
|
||||||
*
|
*
|
||||||
@ -18,6 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
class downloadfullsize_theme {
|
class downloadfullsize_theme {
|
||||||
static function sidebar_blocks($theme) {
|
static function sidebar_blocks($theme) {
|
||||||
|
<<<<<<< HEAD:modules/downloadfullsize/helpers/downloadfullsize_theme.php
|
||||||
if ($theme->item()->is_photo()) {
|
if ($theme->item()->is_photo()) {
|
||||||
if (access::can("view_full", $theme->item)) {
|
if (access::can("view_full", $theme->item)) {
|
||||||
if (module::get_var("downloadfullsize", "tButton")) {
|
if (module::get_var("downloadfullsize", "tButton")) {
|
||||||
@ -33,4 +39,20 @@ class downloadfullsize_theme {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
=======
|
||||||
|
$item = $theme->item();
|
||||||
|
if ($item && $item->is_photo() && access::can("view_full", $item)) {
|
||||||
|
if (module::get_var("downloadfullsize", "tButton")) {
|
||||||
|
$block = new Block();
|
||||||
|
$block->css_id = "gDownloadFullsize";
|
||||||
|
$block->title = t("Download");
|
||||||
|
$block->content = new View("downloadfullsize_block.html");
|
||||||
|
|
||||||
|
$block->content->item = ORM::factory("item", 1);
|
||||||
|
|
||||||
|
return $block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>>>>>>> gallery3-contrib/master:modules/downloadfullsize/helpers/downloadfullsize_theme.php
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||||
|
|
||||||
<div class="gDownloadFullsizeBlock">
|
<div class="gDownloadFullsizeBlock">
|
||||||
|
<<<<<<< HEAD:modules/downloadfullsize/views/downloadfullsize_block.html.php
|
||||||
<a href="<?= url::site("downloadfullsize/send/$theme->item")
|
<a href="<?= url::site("downloadfullsize/send/$theme->item")
|
||||||
?>" title="<?= t("Download Photo") ?>"
|
?>" title="<?= t("Download Photo") ?>"
|
||||||
|
=======
|
||||||
|
<a href="<?= url::site("downloadfullsize/send/$theme->item") ?>"
|
||||||
|
title="<?= t("Download Photo") ?>"
|
||||||
|
>>>>>>> gallery3-contrib/master:modules/downloadfullsize/views/downloadfullsize_block.html.php
|
||||||
class="gButtonLink ui-icon-left ui-state-default ui-corner-all"><?= t("Download Fullsize Image") ?></a>
|
class="gButtonLink ui-icon-left ui-state-default ui-corner-all"><?= t("Download Fullsize Image") ?></a>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user