From c0022dc3c35024ecfc101171bdccfc3b07227ebb Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 1 Oct 2010 21:17:08 -0700 Subject: Fix a bug in the way we set the mime type for protected image renders. Also whitelist the digibug controller so that it's accessible when the gallery is private, and don't expire old proxies right away since Digibug may request the full size multiple times for different preview operations. Fixes ticket #1410. --- modules/gallery/helpers/gallery.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/gallery/helpers/gallery.php') diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index 3cf0eacd..d7d3d9ad 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -25,6 +25,10 @@ class gallery_Core { * down for maintenance" page. */ static function maintenance_mode() { + // @todo: we need a mechanism here to identify controllers that are still legally accessible + // when the entire Gallery is in maintenance mode. Perhaps a controller class function or + // method? + // https://sourceforge.net/apps/trac/gallery/ticket/1411 if (Router::$controller != "login" && Router::$controller != "combined" && module::get_var("gallery", "maintenance_mode", 0) && @@ -41,8 +45,12 @@ class gallery_Core { * the login page. */ static function private_gallery() { + // @todo: we need a mechanism here to identify controllers that are still legally accessible + // when the entire Gallery is private. Perhaps a controller class function or method? + // https://sourceforge.net/apps/trac/gallery/ticket/1411 if (Router::$controller != "login" && Router::$controller != "combined" && + Router::$controller != "digibug" && identity::active_user()->guest && !access::user_can(identity::guest(), "view", item::root()) && php_sapi_name() != "cli") { -- cgit v1.2.3 From 4b4a2f8d8d170e2c42b202865bc4050ac92694cd Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 4 Oct 2010 23:55:19 -0700 Subject: Set the version to 3.0 final (woot!). --- modules/gallery/helpers/gallery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/helpers/gallery.php') diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index d7d3d9ad..b016f436 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class gallery_Core { - const VERSION = "3.0 RC2 (Santa Fe)"; + const VERSION = "3.0 (Santa Fe)"; /** * If Gallery is in maintenance mode, then force all non-admins to get routed to a "This site is -- cgit v1.2.3 From 349071f5019581185a62cdd82a9f59455f453b94 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 7 Oct 2010 22:16:18 -0700 Subject: Change version to "3.0+ (git)". --- modules/gallery/helpers/gallery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/helpers/gallery.php') diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index b016f436..e2b74b89 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class gallery_Core { - const VERSION = "3.0 (Santa Fe)"; + const VERSION = "3.0+ (git)"; /** * If Gallery is in maintenance mode, then force all non-admins to get routed to a "This site is -- cgit v1.2.3 From 84731437a7b8cac4a5e3b2c382a20f67f563b04f Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 9 Oct 2010 16:24:58 -0700 Subject: Identify robots and don't let them save sessions. --- modules/gallery/helpers/gallery.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/gallery/helpers/gallery.php') diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index e2b74b89..ac51e2a6 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -74,6 +74,11 @@ class gallery_Core { * request should implement the _event::gallery_ready() handler. */ static function ready() { + // Don't keep a session for robots; it's a waste of database space. + if (request::user_agent("robot")) { + Session::instance()->abort_save(); + } + module::event("gallery_ready"); } -- cgit v1.2.3 From 4dc451629cc46e24b086d500182e4b053ec80b04 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 24 Oct 2010 17:03:40 -0700 Subject: Allow access to the rest module when the gallery is wholly private. Fixes ticket #1452. --- modules/gallery/helpers/gallery.php | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/gallery/helpers/gallery.php') diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index ac51e2a6..2bb55ccb 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -51,6 +51,7 @@ class gallery_Core { if (Router::$controller != "login" && Router::$controller != "combined" && Router::$controller != "digibug" && + Router::$controller != "rest" && identity::active_user()->guest && !access::user_can(identity::guest(), "view", item::root()) && php_sapi_name() != "cli") { -- cgit v1.2.3