diff options
author | Andy Staudacher <andy.st@gmail.com> | 2009-08-31 21:53:17 -0700 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2009-08-31 21:53:17 -0700 |
commit | 5ca13fe5e83ec7d6dcc1f5d2ac19a3f4ebfc782c (patch) | |
tree | 97af25c2c15606e371d690459c7c0eb9d222b7bf | |
parent | 2bc73e2e36fefc3c1ee1b8e97e686c6729e58dcb (diff) | |
parent | e648ea4dbdb423e80d79ba9e4c9f3ebde6ed22a0 (diff) |
Merge commit 'upstream/master'
-rw-r--r-- | installer/database_config.php | 2 | ||||
-rw-r--r-- | installer/installer.php | 2 | ||||
-rw-r--r-- | modules/gallery/controllers/albums.php | 3 | ||||
-rw-r--r-- | modules/gallery/controllers/movies.php | 3 | ||||
-rw-r--r-- | modules/gallery/controllers/photos.php | 3 | ||||
-rw-r--r-- | modules/organize/helpers/organize_event.php | 14 |
6 files changed, 18 insertions, 9 deletions
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' => '<?php print $type ?>', 'user' => '<?php print $user ?>', - 'pass' => '<?php print $password ?>', + 'pass' => '<?php print str_replace("'", "\\'", $password) ?>', 'host' => '<?php print $host ?>', 'port' => false, 'socket' => false, 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) { 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", 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}"))); + } + } + } |