summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/controllers')
-rw-r--r--modules/gallery/controllers/albums.php2
-rw-r--r--modules/gallery/controllers/file_proxy.php1
-rw-r--r--modules/gallery/controllers/movies.php4
-rw-r--r--modules/gallery/controllers/packager.php2
-rw-r--r--modules/gallery/controllers/photos.php4
5 files changed, 7 insertions, 6 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php
index 25df0da7..3435465c 100644
--- a/modules/gallery/controllers/albums.php
+++ b/modules/gallery/controllers/albums.php
@@ -37,7 +37,7 @@ class Albums_Controller extends Items_Controller {
if ($show) {
$child = ORM::factory("item", $show);
- $index = $album->get_position($child);
+ $index = item::get_position($child);
if ($index) {
$page = ceil($index / $page_size);
if ($page == 1) {
diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php
index 22854fbd..c6051dfd 100644
--- a/modules/gallery/controllers/file_proxy.php
+++ b/modules/gallery/controllers/file_proxy.php
@@ -27,6 +27,7 @@
* input is sanitized against the database before we perform any file I/O.
*/
class File_Proxy_Controller extends Controller {
+ const ALLOW_PRIVATE_GALLERY = true;
public function __call($function, $args) {
// request_uri: gallery3/var/trunk/albums/foo/bar.jpg
$request_uri = rawurldecode(Input::instance()->server("REQUEST_URI"));
diff --git a/modules/gallery/controllers/movies.php b/modules/gallery/controllers/movies.php
index bf50abd5..7c85dd98 100644
--- a/modules/gallery/controllers/movies.php
+++ b/modules/gallery/controllers/movies.php
@@ -28,10 +28,10 @@ class Movies_Controller extends Items_Controller {
access::required("view", $movie);
$where = array(array("type", "!=", "album"));
- $position = $movie->parent()->get_position($movie, $where);
+ $position = item::get_position($movie, $where);
if ($position > 1) {
list ($previous_item, $ignore, $next_item) =
- $movie->parent()->children(3, $position - 2, $where);
+ $movie->parent()->viewable()->children(3, $position - 2, $where);
} else {
$previous_item = null;
list ($next_item) = $movie->parent()->viewable()->children(1, $position, $where);
diff --git a/modules/gallery/controllers/packager.php b/modules/gallery/controllers/packager.php
index bd51b93c..9da34f9c 100644
--- a/modules/gallery/controllers/packager.php
+++ b/modules/gallery/controllers/packager.php
@@ -59,7 +59,7 @@ class Packager_Controller extends Controller {
// numbers, keeping our install.sql file more stable.
srand(0);
- foreach (array("gallery", "user", "comment", "organize", "info", "rest",
+ foreach (array("gallery", "user", "comment", "organize", "info",
"rss", "search", "slideshow", "tag") as $module_name) {
module::install($module_name);
module::activate($module_name);
diff --git a/modules/gallery/controllers/photos.php b/modules/gallery/controllers/photos.php
index d500a92e..4578747d 100644
--- a/modules/gallery/controllers/photos.php
+++ b/modules/gallery/controllers/photos.php
@@ -28,10 +28,10 @@ class Photos_Controller extends Items_Controller {
access::required("view", $photo);
$where = array(array("type", "!=", "album"));
- $position = $photo->parent()->get_position($photo, $where);
+ $position = item::get_position($photo, $where);
if ($position > 1) {
list ($previous_item, $ignore, $next_item) =
- $photo->parent()->children(3, $position - 2, $where);
+ $photo->parent()->viewable()->children(3, $position - 2, $where);
} else {
$previous_item = null;
list ($next_item) = $photo->parent()->viewable()->children(1, $position, $where);