From 0513713fde119bd50978237506cd6e21df001e61 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 31 Aug 2009 21:05:21 -0700 Subject: Add 'organize album' to the context menu. --- modules/organize/helpers/organize_event.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php index 7d6b3e24..79077db3 100644 --- a/modules/organize/helpers/organize_event.php +++ b/modules/organize/helpers/organize_event.php @@ -21,7 +21,7 @@ class organize_event_Core { static function site_menu($menu, $theme) { $item = $theme->item(); - if ($item && access::can("edit", $item) && $item->is_album()) { + if ($item && $item->is_album() && access::can("edit", $item)) { $menu->get("options_menu") ->append(Menu::factory("dialog") ->id("organize") @@ -30,4 +30,16 @@ class organize_event_Core { ->url(url::site("organize/dialog/{$item->id}"))); } } + + static function context_menu($menu, $theme, $item) { + if ($item->is_album() && access::can("edit", $item)) { + $menu->get("options_menu") + ->append(Menu::factory("dialog") + ->id("organize") + ->label(t("Organize album")) + ->css_id("gOrganizeLink") + ->url(url::site("organize/dialog/{$item->id}"))); + } + } + } -- cgit v1.2.3 From c8871705550914f295f887d4a05bdec6a42a8d9e Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 31 Aug 2009 21:10:22 -0700 Subject: Stay on the same page when editing albums/movies/photos. Fixes ticket --- modules/gallery/controllers/albums.php | 3 +-- modules/gallery/controllers/movies.php | 3 +-- modules/gallery/controllers/photos.php | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index 78f12c80..8ceff0f9 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -197,8 +197,7 @@ array("album_title" => html::purify($album->title)))); print json_encode( - array("result" => "success", - "location" => url::site("albums/$album->id"))); + array("result" => "success")); } else { print json_encode( array("result" => "error", diff --git a/modules/gallery/controllers/movies.php b/modules/gallery/controllers/movies.php index 09b16759..c40cde9e 100644 --- a/modules/gallery/controllers/movies.php +++ b/modules/gallery/controllers/movies.php @@ -96,8 +96,7 @@ class Movies_Controller extends Items_Controller { t("Saved photo %photo_title", array("photo_title" => $photo->title))); print json_encode( - array("result" => "success", - "location" => url::site("photos/$photo->id"))); + array("result" => "success")); } else { print json_encode( array("result" => "error", diff --git a/modules/gallery/controllers/photos.php b/modules/gallery/controllers/photos.php index 3b9662c7..dd6d3ab5 100644 --- a/modules/gallery/controllers/photos.php +++ b/modules/gallery/controllers/photos.php @@ -90,8 +90,7 @@ class Photos_Controller extends Items_Controller { array("photo_title" => html::purify($photo->title)))); print json_encode( - array("result" => "success", - "location" => url::site("photos/$photo->id"))); + array("result" => "success")); } else { print json_encode( array("result" => "error", -- cgit v1.2.3 From b3cac5c17320af380b18552a40ff809e598668cd Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 31 Aug 2009 21:26:14 -0700 Subject: Suppress errors to mysql_connect(). We had this before, but it appears to have been accidentally removed in 177a854d --- installer/installer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/installer.php b/installer/installer.php index fedb4251..7173a7ee 100644 --- a/installer/installer.php +++ b/installer/installer.php @@ -92,7 +92,7 @@ class installer { } } - return mysql_connect($config["host"], $config["user"], $config["password"]); + return @mysql_connect($config["host"], $config["user"], $config["password"]); } static function select_db($config) { -- cgit v1.2.3 From e648ea4dbdb423e80d79ba9e4c9f3ebde6ed22a0 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 31 Aug 2009 21:45:34 -0700 Subject: Escape single quotes in the password so that we don't break our config syntax. Related to (but unclear that it fixes) ticket #650. --- installer/database_config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/database_config.php b/installer/database_config.php index a31119ac..0f04b95c 100644 --- a/installer/database_config.php +++ b/installer/database_config.php @@ -31,7 +31,7 @@ $config['default'] = array( 'connection' => array( 'type' => '', 'user' => '', - 'pass' => '', + 'pass' => '', 'host' => '', 'port' => false, 'socket' => false, -- cgit v1.2.3