From 1988d77039b67c34521b5f8a1cec200d35249745 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 28 May 2009 00:06:09 -0700 Subject: Remove unnecessary (and broken)
--- modules/gallery/views/permissions_form.html.php | 155 ++++++++++++------------ 1 file changed, 76 insertions(+), 79 deletions(-) (limited to 'modules') diff --git a/modules/gallery/views/permissions_form.html.php b/modules/gallery/views/permissions_form.html.php index 3dbd0d98..94103705 100644 --- a/modules/gallery/views/permissions_form.html.php +++ b/modules/gallery/views/permissions_form.html.php @@ -1,94 +1,91 @@ - - -
- +
+ - - - - - - - - - - - - - name, $item) ?> - name, $item) ?> - name, $item) ?> +
name ?>
display_name) ?>
+ + + + + + - - - - - - - - - + + + + + name, $item) ?> + name, $item) ?> + name, $item) ?> - + + + + + + + - - + + + + + - - - + + -
name ?>
- <?= t('denied icon') ?> - - <?= t('locked icon') ?> - - - - <?= t('passive allowed icon') ?> - - - <?= t('inactive denied icon') ?> - - - - <?= t('inactive allowed icon') ?> - - - <?= t('passive denied icon') ?> - -
display_name) ?> + <?= t('denied icon') ?> + + <?= t('locked icon') ?> + + + + <?= t('passive allowed icon') ?> + + + <?= t('inactive denied icon') ?> + + <?= t('inactive allowed icon') ?> - id == 1): ?> - <?= t('denied icon') ?> - - - <?= t('denied icon') ?> - - - - id == 1): ?> - <?= t('allowed icon') ?> - - - <?= t('allowed icon') ?> - - - <?= t('inactive denied icon') ?> + title=""> + <?= t('passive denied icon') ?> + + <?= t('inactive allowed icon') ?> + + id == 1): ?> + <?= t('denied icon') ?> + + + <?= t('denied icon') ?> + + + + id == 1): ?> + <?= t('allowed icon') ?> + + + <?= t('allowed icon') ?> + + + + <?= t('inactive denied icon') ?> + +
-
- + + + +
-- cgit v1.2.3 From df51ea7fa4977922a73af8b7219fff62031f52d4 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 28 May 2009 00:06:38 -0700 Subject: Fix broken html::script() and url::file() references to the newly moved gallery module. --- modules/gallery/controllers/albums.php | 7 ++++--- modules/gallery/helpers/gallery_theme.php | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) (limited to 'modules') diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index 03a64f43..5ccadb37 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -113,8 +113,9 @@ class Albums_Controller extends Items_Controller { "resource" => url::site("albums/$new_album->id"))); } else { print json_encode( - array("result" => "error", - "form" => $form->__toString() . html::script("gallery/js/albums_form_add.js"))); + array( + "result" => "error", + "form" => $form->__toString() . html::script("modules/gallery/js/albums_form_add.js"))); } } @@ -206,7 +207,7 @@ class Albums_Controller extends Items_Controller { switch ($this->input->get("type")) { case "album": print album::get_add_form($album) . - html::script("gallery/js/albums_form_add.js"); + html::script("modules/gallery/js/albums_form_add.js"); break; case "photo": diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php index 0acccb45..d45e1b98 100644 --- a/modules/gallery/helpers/gallery_theme.php +++ b/modules/gallery/helpers/gallery_theme.php @@ -23,30 +23,30 @@ class gallery_theme_Core { $buf = ""; if ($session->get("debug")) { $buf .= ""; + url::file("modules/gallery/css/debug.css") . "\" />"; } if (($theme->page_type == "album" || $theme->page_type == "photo") && access::can("edit", $theme->item())) { $buf .= ""; - $buf .= html::script("gallery/js/quick.js"); + url::file("modules/gallery/css/quick.css") . "\" />"; + $buf .= html::script("modules/gallery/js/quick.js"); } if ($theme->page_type == "photo" && access::can("view_full", $theme->item())) { $buf .= ""; - $buf .= html::script("gallery/js/fullsize.js"); + $buf .= html::script("modules/gallery/js/fullsize.js"); } if ($session->get("l10n_mode", false)) { $buf .= ""; + url::file("modules/gallery/css/l10n_client.css") . "\" />"; $buf .= html::script("lib/jquery.cookie.js"); - $buf .= html::script("gallery/js/l10n_client.js"); + $buf .= html::script("modules/gallery/js/l10n_client.js"); } return $buf; @@ -83,14 +83,14 @@ class gallery_theme_Core { $buf = ""; if ($session->get("debug")) { $buf .= ""; + url::file("modules/gallery/css/debug.css") . "\" />"; } if ($session->get("l10n_mode", false)) { $buf .= ""; + url::file("modules/gallery/css/l10n_client.css") . "\" />"; $buf .= html::script("lib/jquery.cookie.js"); - $buf .= html::script("gallery/js/l10n_client.js"); + $buf .= html::script("modules/gallery/js/l10n_client.js"); } return $buf; -- cgit v1.2.3 From ebb0761b8dd10e804c017e8a0d25413796916d72 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 28 May 2009 00:32:24 -0700 Subject: Label the tag input field according to the item type. Fixes ticket #176. --- modules/tag/helpers/tag.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php index 0ca02b42..7c4b56ba 100644 --- a/modules/tag/helpers/tag.php +++ b/modules/tag/helpers/tag.php @@ -81,8 +81,12 @@ class tag_Core { static function get_add_form($item) { $form = new Forge("tags", "", "post", array("id" => "gAddTagForm")); - $group = $form->group("add_tag")->label(t("Add Tag")); - $group->input("name")->label(t("Add tag"))->rules("required|length[1,64]"); + $label = $item->is_album() ? + t("Add tag to album") : + ($item->is_photo() ? t("Add tag to photo") : t("Add tag to movie")); + + $group = $form->group("add_tag")->label("Add Tag"); + $group->input("name")->label($label)->rules("required|length[1,64]"); $group->hidden("item_id")->value($item->id); $group->submit("")->value(t("Add Tag")); return $form; -- cgit v1.2.3 From 8d2782ad1df10679b302ab6c4fafdd2f5535be4a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 28 May 2009 00:45:00 -0700 Subject: Flush the model cache as appropriate every time we call ORM::save(). Fixes ticket #301 --- modules/gallery/libraries/MY_ORM.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules') diff --git a/modules/gallery/libraries/MY_ORM.php b/modules/gallery/libraries/MY_ORM.php index fb2f80a7..2bd9b4eb 100644 --- a/modules/gallery/libraries/MY_ORM.php +++ b/modules/gallery/libraries/MY_ORM.php @@ -27,6 +27,11 @@ class ORM extends ORM_Core { $this->db->close_paren(); return $this; } + + public function save() { + model_cache::clear($this->object_name, $this->{$this->primary_key}, $this->primary_key); + return parent::save(); + } } /** -- cgit v1.2.3