From a9b27fb352490a48d4035966b8c8d463c62c7726 Mon Sep 17 00:00:00 2001 From: hiwilson Date: Mon, 29 Jun 2009 22:40:13 -0700 Subject: Let the "Popular tags" sidebar block display on tag or search page. --- modules/tag/helpers/tag_theme.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/tag/helpers/tag_theme.php b/modules/tag/helpers/tag_theme.php index b48ad178..fe30354f 100644 --- a/modules/tag/helpers/tag_theme.php +++ b/modules/tag/helpers/tag_theme.php @@ -28,9 +28,6 @@ class tag_theme_Core { static function sidebar_blocks($theme) { // @todo this needs to be data driven - if (!$theme->item()) { - return; - } $block = new Block(); $block->css_id = "gTag"; @@ -38,7 +35,7 @@ class tag_theme_Core { $block->content = new View("tag_block.html"); $block->content->cloud = tag::cloud(30); - if ($theme->page_type() != "tag" && access::can("edit", $theme->item())) { + if ($theme->item() && $theme->page_type() != "tag" && access::can("edit", $theme->item())) { $controller = new Tags_Controller(); $block->content->form = tag::get_add_form($theme->item()); } else { -- cgit v1.2.3 From 050c5a0383b6b1729dbd828d820d5eb347d1b795 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 30 Jun 2009 17:58:33 -0700 Subject: Unlink the old rewritten path files in var/modules/g2_import when we validate the embed path. This resolves an issue with b1 installs which had versions of the rewritten code that were buggy and can be replaced. --- modules/g2_import/helpers/g2_import.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 91ca1e63..910f9342 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -46,6 +46,10 @@ class g2_import_Core { } static function is_valid_embed_path($embed_path) { + $mod_path = VARPATH . "modules/g2_import/" . md5($embed_path); + if (file_exists($mod_path)) { + dir::unlink($mod_path); + } return file_exists($embed_path) && g2_import::init_embed($embed_path); } -- cgit v1.2.3 From 5e8e3ab6b59731733d830acadd4b218619eb3656 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 30 Jun 2009 18:28:55 -0700 Subject: Rejigger the way we handle "done" status in the upgrader. Now we present the done box if you're done and let you get rid of it if you want. It's not beautiful, by any means, but it gives you an easy link back to your Gallery when you're finished. Fixes ticket #479. --- modules/gallery/controllers/upgrader.php | 11 +++++++++-- modules/gallery/css/upgrader.css | 6 ++++++ modules/gallery/views/upgrader.html.php | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/gallery/controllers/upgrader.php b/modules/gallery/controllers/upgrader.php index 91952fa9..0f6cbc2c 100644 --- a/modules/gallery/controllers/upgrader.php +++ b/modules/gallery/controllers/upgrader.php @@ -32,11 +32,18 @@ class Upgrader_Controller extends Controller { @unlink(TMPPATH . $upgrade_token); } + $available_upgrades = 0; + foreach (module::available() as $module) { + if ($module->version && $module->version != $module->code_version) { + $available_upgrades++; + } + } + $view = new View("upgrader.html"); $view->can_upgrade = user::active()->admin || $session->get("can_upgrade"); $view->upgrade_token = $upgrade_token; $view->available = module::available(); - $view->done = Input::instance()->get("done"); + $view->done = ($available_upgrades == 0); print $view; } @@ -67,7 +74,7 @@ class Upgrader_Controller extends Controller { if (php_sapi_name() == "cli") { print "Upgrade complete\n"; } else { - url::redirect("upgrader?done=1"); + url::redirect("upgrader"); } } } diff --git a/modules/gallery/css/upgrader.css b/modules/gallery/css/upgrader.css index b877df49..7c377817 100644 --- a/modules/gallery/css/upgrader.css +++ b/modules/gallery/css/upgrader.css @@ -99,6 +99,12 @@ div#confirmation { text-align: center; } +div#confirmation a.close { + float: right; + padding: 10px; + text-decoration: none; +} + div#confirmation div { margin: 2px; padding: 20px; diff --git a/modules/gallery/views/upgrader.html.php b/modules/gallery/views/upgrader.html.php index 90b03fce..f9e242a8 100644 --- a/modules/gallery/views/upgrader.html.php +++ b/modules/gallery/views/upgrader.html.php @@ -13,6 +13,7 @@
+ [x]

-- cgit v1.2.3 From d8e776cc88df1314a03b7d4fa95ef677dadaed5b Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 30 Jun 2009 19:12:46 -0700 Subject: Checkpoint. --- modules/gallery/tests/xss_data.txt | 101 ++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 51 deletions(-) diff --git a/modules/gallery/tests/xss_data.txt b/modules/gallery/tests/xss_data.txt index c379dcb5..982343f6 100644 --- a/modules/gallery/tests/xss_data.txt +++ b/modules/gallery/tests/xss_data.txt @@ -212,8 +212,8 @@ modules/gallery/views/l10n_client.html.php 19 DIRTY $string modules/gallery/views/l10n_client.html.php 20 DIRTY $string modules/gallery/views/l10n_client.html.php 22 DIRTY $string modules/gallery/views/l10n_client.html.php 28 DIRTY $l10n_search_form -modules/gallery/views/l10n_client.html.php 70 DIRTY $string_list -modules/gallery/views/l10n_client.html.php 71 DIRTY $plural_forms +modules/gallery/views/l10n_client.html.php 72 DIRTY $string_list +modules/gallery/views/l10n_client.html.php 73 DIRTY $plural_forms modules/gallery/views/move_browse.html.php 4 DIRTY $source->id modules/gallery/views/move_browse.html.php 39 DIRTY $tree modules/gallery/views/move_browse.html.php 42 DIRTY $source->id @@ -229,6 +229,9 @@ modules/gallery/views/move_tree.html.php 13 DIRTY $child->i modules/gallery/views/move_tree.html.php 13 $child->title modules/gallery/views/move_tree.html.php 15 DIRTY $child->id modules/gallery/views/move_tree.html.php 15 $child->title +modules/gallery/views/movieplayer.html.php 2 DIRTY $item->file_url(true) +modules/gallery/views/movieplayer.html.php 2 DIRTY $attrs +modules/gallery/views/movieplayer.html.php 4 DIRTY $attrs modules/gallery/views/permissions_browse.html.php 15 DIRTY $csrf modules/gallery/views/permissions_browse.html.php 37 DIRTY $parent->id modules/gallery/views/permissions_browse.html.php 38 $parent->title @@ -279,14 +282,14 @@ modules/gallery/views/simple_uploader.html.php 29 $parent-> modules/gallery/views/simple_uploader.html.php 31 $item->title modules/gallery/views/simple_uploader.html.php 85 DIRTY $item->id modules/gallery/views/simple_uploader.html.php 89 DIRTY $csrf -modules/gallery/views/upgrader.html.php 43 DIRTY $module->version -modules/gallery/views/upgrader.html.php 43 DIRTY $module->code_version -modules/gallery/views/upgrader.html.php 44 DIRTY $id -modules/gallery/views/upgrader.html.php 45 DIRTY $module->name -modules/gallery/views/upgrader.html.php 48 DIRTY $module->version -modules/gallery/views/upgrader.html.php 51 DIRTY $module->code_version -modules/gallery/views/upgrader.html.php 74 DIRTY $module->name -modules/gallery/views/upgrader.html.php 83 DIRTY $upgrade_token +modules/gallery/views/upgrader.html.php 44 DIRTY $module->version +modules/gallery/views/upgrader.html.php 44 DIRTY $module->code_version +modules/gallery/views/upgrader.html.php 45 DIRTY $id +modules/gallery/views/upgrader.html.php 46 DIRTY $module->name +modules/gallery/views/upgrader.html.php 49 DIRTY $module->version +modules/gallery/views/upgrader.html.php 52 DIRTY $module->code_version +modules/gallery/views/upgrader.html.php 75 DIRTY $module->name +modules/gallery/views/upgrader.html.php 84 DIRTY $upgrade_token modules/image_block/views/image_block_block.html.php 3 DIRTY $item->url() modules/image_block/views/image_block_block.html.php 4 DIRTY $item->thumb_img(array("class" => "gThumbnail")) modules/info/views/info_block.html.php 5 $item->title @@ -488,24 +491,24 @@ themes/admin_default/views/admin.html.php 20 DIRTY $theme->s themes/admin_default/views/admin.html.php 21 DIRTY $theme->script("lib/jquery.form.js") themes/admin_default/views/admin.html.php 22 DIRTY $theme->script("lib/jquery-ui.js") themes/admin_default/views/admin.html.php 23 DIRTY $theme->script("lib/gallery.common.js") -themes/admin_default/views/admin.html.php 24 DIRTY $theme->script("lib/gallery.dialog.js") -themes/admin_default/views/admin.html.php 25 DIRTY $theme->script("lib/superfish/js/superfish.js") -themes/admin_default/views/admin.html.php 26 DIRTY $theme->theme_script("js/jquery.dropshadow.js") -themes/admin_default/views/admin.html.php 27 DIRTY $theme->theme_script("js/ui.init.js") -themes/admin_default/views/admin.html.php 29 DIRTY $theme->admin_head() -themes/admin_default/views/admin.html.php 32 DIRTY $theme->body_attributes() -themes/admin_default/views/admin.html.php 33 DIRTY $theme->admin_page_top() -themes/admin_default/views/admin.html.php 39 DIRTY $theme->site_status() -themes/admin_default/views/admin.html.php 41 DIRTY $theme->admin_header_top() -themes/admin_default/views/admin.html.php 44 DIRTY $csrf -themes/admin_default/views/admin.html.php 48 DIRTY $theme->admin_menu() -themes/admin_default/views/admin.html.php 50 DIRTY $theme->admin_header_bottom() -themes/admin_default/views/admin.html.php 56 DIRTY $theme->messages() -themes/admin_default/views/admin.html.php 57 DIRTY $content -themes/admin_default/views/admin.html.php 63 DIRTY $sidebar -themes/admin_default/views/admin.html.php 68 DIRTY $theme->admin_footer() -themes/admin_default/views/admin.html.php 70 DIRTY $theme->admin_credits() -themes/admin_default/views/admin.html.php 74 DIRTY $theme->admin_page_bottom() +themes/admin_default/views/admin.html.php 28 DIRTY $theme->script("lib/gallery.dialog.js") +themes/admin_default/views/admin.html.php 29 DIRTY $theme->script("lib/superfish/js/superfish.js") +themes/admin_default/views/admin.html.php 30 DIRTY $theme->theme_script("js/jquery.dropshadow.js") +themes/admin_default/views/admin.html.php 31 DIRTY $theme->theme_script("js/ui.init.js") +themes/admin_default/views/admin.html.php 33 DIRTY $theme->admin_head() +themes/admin_default/views/admin.html.php 36 DIRTY $theme->body_attributes() +themes/admin_default/views/admin.html.php 37 DIRTY $theme->admin_page_top() +themes/admin_default/views/admin.html.php 43 DIRTY $theme->site_status() +themes/admin_default/views/admin.html.php 45 DIRTY $theme->admin_header_top() +themes/admin_default/views/admin.html.php 48 DIRTY $csrf +themes/admin_default/views/admin.html.php 52 DIRTY $theme->admin_menu() +themes/admin_default/views/admin.html.php 54 DIRTY $theme->admin_header_bottom() +themes/admin_default/views/admin.html.php 60 DIRTY $theme->messages() +themes/admin_default/views/admin.html.php 61 DIRTY $content +themes/admin_default/views/admin.html.php 67 DIRTY $sidebar +themes/admin_default/views/admin.html.php 72 DIRTY $theme->admin_footer() +themes/admin_default/views/admin.html.php 74 DIRTY $theme->admin_credits() +themes/admin_default/views/admin.html.php 78 DIRTY $theme->admin_page_bottom() themes/admin_default/views/block.html.php 2 DIRTY $id themes/admin_default/views/block.html.php 2 DIRTY $css_id themes/admin_default/views/block.html.php 5 DIRTY $id @@ -571,14 +574,10 @@ themes/default/views/movie.html.php 6 DIRTY $position themes/default/views/movie.html.php 6 DIRTY $sibling_count themes/default/views/movie.html.php 8 DIRTY $previous_item->url() themes/default/views/movie.html.php 11 DIRTY $next_item->url() -themes/default/views/movie.html.php 15 DIRTY $item->id -themes/default/views/movie.html.php 16 DIRTY $item->file_url(true) -themes/default/views/movie.html.php 17 DIRTY $item->width -themes/default/views/movie.html.php 17 DIRTY $item->height -themes/default/views/movie.html.php 20 DIRTY $item->id -themes/default/views/movie.html.php 34 $item->title -themes/default/views/movie.html.php 35 $item->description -themes/default/views/movie.html.php 41 DIRTY $theme->photo_bottom() +themes/default/views/movie.html.php 15 DIRTY $item->movie_img(array("class" => "gMovie", "id" => "gMovieId-{$item->id}")) +themes/default/views/movie.html.php 18 $item->title +themes/default/views/movie.html.php 19 $item->description +themes/default/views/movie.html.php 25 DIRTY $theme->photo_bottom() themes/default/views/page.html.php 9 DIRTY $page_title themes/default/views/page.html.php 13 $theme->item()->title themes/default/views/page.html.php 15 $theme->item()->title @@ -597,21 +596,21 @@ themes/default/views/page.html.php 48 DIRTY $theme->s themes/default/views/page.html.php 49 DIRTY $theme->script("lib/jquery.form.js") themes/default/views/page.html.php 50 DIRTY $theme->script("lib/jquery-ui.js") themes/default/views/page.html.php 51 DIRTY $theme->script("lib/gallery.common.js") -themes/default/views/page.html.php 52 DIRTY $theme->script("lib/gallery.dialog.js") -themes/default/views/page.html.php 53 DIRTY $theme->script("lib/gallery.form.js") -themes/default/views/page.html.php 54 DIRTY $theme->script("lib/superfish/js/superfish.js") -themes/default/views/page.html.php 55 DIRTY $theme->script("lib/jquery.localscroll.js") -themes/default/views/page.html.php 56 DIRTY $theme->theme_script("js/ui.init.js") -themes/default/views/page.html.php 60 DIRTY $theme->script("lib/jquery.scrollTo.js") -themes/default/views/page.html.php 61 DIRTY $theme->script("lib/gallery.show_full_size.js") -themes/default/views/page.html.php 63 DIRTY $theme->script("lib/flowplayer.js") -themes/default/views/page.html.php 66 DIRTY $theme->head() -themes/default/views/page.html.php 69 DIRTY $theme->body_attributes() -themes/default/views/page.html.php 70 DIRTY $theme->page_top() -themes/default/views/page.html.php 72 DIRTY $theme->site_status() -themes/default/views/page.html.php 80 DIRTY $theme->messages() -themes/default/views/page.html.php 81 DIRTY $content -themes/default/views/page.html.php 95 DIRTY $theme->page_bottom() +themes/default/views/page.html.php 56 DIRTY $theme->script("lib/gallery.dialog.js") +themes/default/views/page.html.php 57 DIRTY $theme->script("lib/gallery.form.js") +themes/default/views/page.html.php 58 DIRTY $theme->script("lib/superfish/js/superfish.js") +themes/default/views/page.html.php 59 DIRTY $theme->script("lib/jquery.localscroll.js") +themes/default/views/page.html.php 60 DIRTY $theme->theme_script("js/ui.init.js") +themes/default/views/page.html.php 64 DIRTY $theme->script("lib/jquery.scrollTo.js") +themes/default/views/page.html.php 65 DIRTY $theme->script("lib/gallery.show_full_size.js") +themes/default/views/page.html.php 67 DIRTY $theme->script("lib/flowplayer.js") +themes/default/views/page.html.php 70 DIRTY $theme->head() +themes/default/views/page.html.php 73 DIRTY $theme->body_attributes() +themes/default/views/page.html.php 74 DIRTY $theme->page_top() +themes/default/views/page.html.php 76 DIRTY $theme->site_status() +themes/default/views/page.html.php 84 DIRTY $theme->messages() +themes/default/views/page.html.php 85 DIRTY $content +themes/default/views/page.html.php 99 DIRTY $theme->page_bottom() themes/default/views/pager.html.php 13 DIRTY $url themes/default/views/pager.html.php 20 DIRTY $previous_page themes/default/views/pager.html.php 20 DIRTY $url -- cgit v1.2.3 From 3ef39d457693a6744d468876aa7316b65cd3c9cd Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 30 Jun 2009 19:17:45 -0700 Subject: Update Exif_test to match change made in 4943103700332a11f16319496e485cfd7fd9e36a Get rid of vestigial third column in exif::_keys(). --- modules/exif/helpers/exif.php | 58 ++++++++++++++++++++-------------------- modules/exif/tests/Exif_Test.php | 2 +- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/modules/exif/helpers/exif.php b/modules/exif/helpers/exif.php index 747c3171..b0e7e93f 100644 --- a/modules/exif/helpers/exif.php +++ b/modules/exif/helpers/exif.php @@ -104,35 +104,35 @@ class exif_Core { private static function _keys() { if (!isset(self::$exif_keys)) { self::$exif_keys = array( - "Make" => array("IFD0", "Make", t("Camera Maker"), true), - "Model" => array("IFD0", "Model", t("Camera Model"), true), - "Aperture" => array("SubIFD", "FNumber", t("Aperture"), true), - "ColorSpace" => array("SubIFD", "ColorSpace", t("Color Space"), true), - "ExposureBias" => array("SubIFD", "ExposureBiasValue", t("Exposure Value"), true), - "ExposureProgram" => array("SubIFD", "ExposureProgram", t("Exposure Program"), true), - "ExposureTime" => array("SubIFD", "ExposureTime", t("Exposure Time"), true), - "Flash" => array("SubIFD", "Flash", t("Flash"), true), - "FocalLength" => array("SubIFD", "FocalLength", t("Focal Length"), true), - "ISO" => array("SubIFD", "ISOSpeedRatings", t("ISO"), true), - "MeteringMode" => array("SubIFD", "MeteringMode", t("Metering Mode"), true), - "DateTime" => array("SubIFD", "DateTimeOriginal", t("Date/Time"), true), - "Copyright" => array("IFD0", "Copyright", t("Copyright"), false), - "ImageType" => array("IFD0", "ImageType", t("Image Type"), false), - "Orientation" => array("IFD0", "Orientation", t("Orientation"), false), - "ResolutionUnit" => array("IFD0", "ResolutionUnit", t("Resolution Unit"), false), - "xResolution" => array("IFD0", "xResolution", t("X Resolution"), false), - "yResolution" => array("IFD0", "yResolution", t("Y Resolution"), false), - "Compression" => array("IFD1", "Compression", t("Compression"), false), - "BrightnessValue" => array("SubIFD", "BrightnessValue", t("Brightness Value"), false), - "Contrast" => array("SubIFD", "Contrast", t("Contrast"), false), - "ExposureMode" => array("SubIFD", "ExposureMode", t("Exposure Mode"), false), - "FlashEnergy" => array("SubIFD", "FlashEnergy", t("Flash Energy"), false), - "Saturation" => array("SubIFD", "Saturation", t("Saturation"), false), - "SceneType" => array("SubIFD", "SceneType", t("Scene Type"), false), - "Sharpness" => array("SubIFD", "Sharpness", t("Sharpness"), false), - "SubjectDistance" => array("SubIFD", "SubjectDistance", t("Subject Distance"), false), - "Caption" => array("IPTC", "Caption", t("Caption"), false), - "Keywords" => array("IPTC", "Keywords", t("Keywords"), false) + "Make" => array("IFD0", "Make", t("Camera Maker"), ), + "Model" => array("IFD0", "Model", t("Camera Model"), ), + "Aperture" => array("SubIFD", "FNumber", t("Aperture"), ), + "ColorSpace" => array("SubIFD", "ColorSpace", t("Color Space"), ), + "ExposureBias" => array("SubIFD", "ExposureBiasValue", t("Exposure Value"), ), + "ExposureProgram" => array("SubIFD", "ExposureProgram", t("Exposure Program"), ), + "ExposureTime" => array("SubIFD", "ExposureTime", t("Exposure Time"), ), + "Flash" => array("SubIFD", "Flash", t("Flash"), ), + "FocalLength" => array("SubIFD", "FocalLength", t("Focal Length"), ), + "ISO" => array("SubIFD", "ISOSpeedRatings", t("ISO"), ), + "MeteringMode" => array("SubIFD", "MeteringMode", t("Metering Mode"), ), + "DateTime" => array("SubIFD", "DateTimeOriginal", t("Date/Time"), ), + "Copyright" => array("IFD0", "Copyright", t("Copyright"), ), + "ImageType" => array("IFD0", "ImageType", t("Image Type"), ), + "Orientation" => array("IFD0", "Orientation", t("Orientation"), ), + "ResolutionUnit" => array("IFD0", "ResolutionUnit", t("Resolution Unit"), ), + "xResolution" => array("IFD0", "xResolution", t("X Resolution"), ), + "yResolution" => array("IFD0", "yResolution", t("Y Resolution"), ), + "Compression" => array("IFD1", "Compression", t("Compression"), ), + "BrightnessValue" => array("SubIFD", "BrightnessValue", t("Brightness Value"), ), + "Contrast" => array("SubIFD", "Contrast", t("Contrast"), ), + "ExposureMode" => array("SubIFD", "ExposureMode", t("Exposure Mode"), ), + "FlashEnergy" => array("SubIFD", "FlashEnergy", t("Flash Energy"), ), + "Saturation" => array("SubIFD", "Saturation", t("Saturation"), ), + "SceneType" => array("SubIFD", "SceneType", t("Scene Type"), ), + "Sharpness" => array("SubIFD", "Sharpness", t("Sharpness"), ), + "SubjectDistance" => array("SubIFD", "SubjectDistance", t("Subject Distance"), ), + "Caption" => array("IPTC", "Caption", t("Caption"), ), + "Keywords" => array("IPTC", "Keywords", t("Keywords"), ) ); } return self::$exif_keys; diff --git a/modules/exif/tests/Exif_Test.php b/modules/exif/tests/Exif_Test.php index 312ed535..f94d0357 100644 --- a/modules/exif/tests/Exif_Test.php +++ b/modules/exif/tests/Exif_Test.php @@ -31,11 +31,11 @@ class Exif_Test extends Unit_Test_Case { array("caption" => "Color Space", "value" => "Uncalibrated"), array("caption" => "Exposure Value", "value" => "4294.67 EV"), array("caption" => "Exposure Program", "value" => "Program"), + array("caption" => "Exposure Time", "value" => "833/49979 sec"), array("caption" => "Flash", "value" => "No Flash"), array("caption" => "Focal Length", "value" => "50 mm"), array("caption" => "ISO", "value" => "6553700"), array("caption" => "Metering Mode", "value" => "Multi-Segment"), - array("caption" => "Shutter Speed", "value" => "1/60 sec"), array("caption" => "Date/Time", "value" => "2008:03:17 17:41:25"), array("caption" => "Copyright", "value" => "(C) 2008 - T. Almdal"), array("caption" => "Orientation", "value" => "1: Normal (0 deg)"), -- cgit v1.2.3 From 0b34ec4e8b1f97db0dc6807bdb3a5ece8e1b83e4 Mon Sep 17 00:00:00 2001 From: jhilden Date: Tue, 30 Jun 2009 22:22:29 -0400 Subject: UI enhancement: made the 'back to the Gallery' links a little bit easier to discover --- themes/admin_default/css/screen.css | 20 ++++++++++++++++++-- themes/admin_default/views/admin.html.php | 4 ++-- themes/default/css/fix-ie.css | 2 +- themes/default/css/screen.css | 4 ++-- themes/default/views/header.html.php | 4 ++-- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/themes/admin_default/css/screen.css b/themes/admin_default/css/screen.css index f4173d4b..629d0451 100644 --- a/themes/admin_default/css/screen.css +++ b/themes/admin_default/css/screen.css @@ -98,12 +98,28 @@ * 4) Content blocks in specific layout containers *********************************************************************/ -#gHeader #gLogo { +#gHeader #gLogo img { float: left; margin: -22px 10px 0 0; } -.rtl #gHeader #gLogo { +#gHeader #gLogo { + position: relative; + display: block; + text-decoration: none; +} +#gHeader #gLogo span { + display: none; + position: absolute; + top: -20px; + left: 2px; + color: #FF6600; +} +#gHeader #gLogo:hover span { + display: inline; +} + +.rtl #gHeader #gLogo img { float: left; } diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index 36deea9e..1be454c3 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -44,10 +44,10 @@

admin_header_top() ?> - ">" id="gLogo" alt="" /> + diff --git a/themes/default/css/fix-ie.css b/themes/default/css/fix-ie.css index 0b37acd2..3d9604e6 100644 --- a/themes/default/css/fix-ie.css +++ b/themes/default/css/fix-ie.css @@ -10,7 +10,7 @@ zoom: 1; } -#gHeader #gLogo { +#gHeader #gLogo img { margin-top: 5px; margin-bottom: 0; } diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index e37de70e..48ded542 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -422,7 +422,7 @@ form .gError, /* Header ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -#gHeader #gLogo { +#gHeader #gLogo img { float: left; margin: -4px 10px 0 0; } @@ -1046,7 +1046,7 @@ form .gError, .rtl input[type="submit"], .rtl input[type="reset"], .rtl .gShortForm li, -.rtl #gHeader #gLogo, +.rtl #gHeader #gLogo img, .rtl #gContent #gAlbumGrid .gItem, .rtl #gSiteMenu, .rtl .gBreadcrumbs li, diff --git a/themes/default/views/header.html.php b/themes/default/views/header.html.php index b38cffed..51f55b41 100644 --- a/themes/default/views/header.html.php +++ b/themes/default/views/header.html.php @@ -3,8 +3,8 @@ -"> - " src="theme_url("images/logo.png") ?>" /> + -- cgit v1.2.3 From b541935d6f2dd0a135b923683a41c4488b896f55 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 30 Jun 2009 20:17:48 -0700 Subject: Fix issues with Digibug printing where the preview ws not showing up. --- modules/digibug/controllers/digibug.php | 2 +- modules/digibug/models/digibug_proxy.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/digibug/controllers/digibug.php b/modules/digibug/controllers/digibug.php index c1852009..84e430e2 100644 --- a/modules/digibug/controllers/digibug.php +++ b/modules/digibug/controllers/digibug.php @@ -55,7 +55,7 @@ class Digibug_Controller extends Controller { } public function print_proxy($type, $id) { - $proxy = ORM::factory("digibug_proxy", array("uuid", $id)); + $proxy = ORM::factory("digibug_proxy", array("uuid" => $id)); if (!$proxy->loaded || !$proxy->item->loaded) { Kohana::show_404(); } diff --git a/modules/digibug/models/digibug_proxy.php b/modules/digibug/models/digibug_proxy.php index 036af9c7..c76afdae 100644 --- a/modules/digibug/models/digibug_proxy.php +++ b/modules/digibug/models/digibug_proxy.php @@ -18,4 +18,5 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class Digibug_Proxy_Model extends ORM { + protected $has_one = array("item"); } -- cgit v1.2.3 From 200b78ee59ad54eb18d36334e2302b88511429ba Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 30 Jun 2009 20:32:59 -0700 Subject: Revert the change that removed adding the click handler for the digibug print functionality. Just return false when using javascript:digibug_popup was not enough from having the browser switch pages and show a page with the word false. Using an event handler allows us to call event.preventDefault which cancels the page switch. --- modules/digibug/helpers/digibug_menu.php | 6 ++---- modules/digibug/js/digibug.js | 12 ++++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/modules/digibug/helpers/digibug_menu.php b/modules/digibug/helpers/digibug_menu.php index 4b8db5a2..f1d4fc1d 100644 --- a/modules/digibug/helpers/digibug_menu.php +++ b/modules/digibug/helpers/digibug_menu.php @@ -32,8 +32,7 @@ class digibug_menu { Menu::factory("link") ->id("digibug") ->label(t("Print with Digibug")) - ->url("javascript:digibug_popup('" . - url::site("digibug/print_photo/$item->id?csrf=$theme->csrf") . "')") + ->url(url::site("digibug/print_photo/$item->id?csrf=$theme->csrf")) ->css_id("gDigibugLink")); } @@ -43,8 +42,7 @@ class digibug_menu { Menu::factory("link") ->id("digibug") ->label(t("Print with Digibug")) - ->url("javascript:digibug_popup('" . - url::site("digibug/print_photo/$item->id?csrf=$theme->csrf") . "')") + ->url(url::site("digibug/print_photo/$item->id?csrf=$theme->csrf")) ->css_id("gDigibugLink")); } } diff --git a/modules/digibug/js/digibug.js b/modules/digibug/js/digibug.js index 78ca8cf3..30bff47d 100644 --- a/modules/digibug/js/digibug.js +++ b/modules/digibug/js/digibug.js @@ -1,3 +1,15 @@ +$(document).ready(function() { + $(".gDigibugPrintButton a").click(function(e) { + e.preventDefault(); + return digibug_popup(e.currentTarget.href, { width: 800, height: 600 } ); + }); + + $("#gDigibugLink").click(function(e) { + e.preventDefault(); + return digibug_popup(e.currentTarget.href, { width: 800, height: 600 } ); + }); +}); + function digibug_popup(url, options) { options = $.extend({ /* default options */ -- cgit v1.2.3 From 666c807fccf4f360fac667e9a7ab6b7e560b3a6c Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 30 Jun 2009 20:47:51 -0700 Subject: Revert "Add Session::abort_save() to Kohana." Obsoleted by upstream fix. This reverts commit 06f066164f60fe0babbc7a480e6319a0702e0c46. --- modules/gallery/controllers/file_proxy.php | 3 --- system/libraries/Session.php | 13 ------------- system/libraries/drivers/Session/Database.php | 4 ---- 3 files changed, 20 deletions(-) diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php index 0d64bcd9..1f885e53 100644 --- a/modules/gallery/controllers/file_proxy.php +++ b/modules/gallery/controllers/file_proxy.php @@ -112,9 +112,6 @@ class File_Proxy_Controller extends Controller { kohana::show_404(); } - // We don't need to save the session for this request - Session::abort_save(); - // Dump out the image header("Content-Type: $item->mime_type"); Kohana::close_buffers(false); diff --git a/system/libraries/Session.php b/system/libraries/Session.php index 61a0d403..e03f5dff 100644 --- a/system/libraries/Session.php +++ b/system/libraries/Session.php @@ -27,9 +27,6 @@ class Session_Core { // Input library protected $input; - // Automatically save the session by default - public static $should_save = true; - /** * Singleton instance of Session. */ @@ -458,14 +455,4 @@ class Session_Core { } } - /** - * Do not save this session. - * - * @return void - */ - public function abort_save() { - Session::$should_save = false; - - } - } // End Session Class diff --git a/system/libraries/drivers/Session/Database.php b/system/libraries/drivers/Session/Database.php index b8993a9e..b4144ffb 100644 --- a/system/libraries/drivers/Session/Database.php +++ b/system/libraries/drivers/Session/Database.php @@ -98,10 +98,6 @@ class Session_Database_Driver implements Session_Driver { public function write($id, $data) { - if (!Session::$should_save) { - return true; - } - $data = array ( 'session_id' => $id, -- cgit v1.2.3 From 4e46a6edf69208dc1e6f3d7fac0421a0c07988df Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 30 Jun 2009 20:48:16 -0700 Subject: Updated Kohana to r4434 --- system/libraries/Session.php | 17 ++++++++++++++++- system/libraries/drivers/Session/Cache.php | 5 ++++- system/libraries/drivers/Session/Cookie.php | 5 ++++- system/libraries/drivers/Session/Database.php | 5 ++++- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/system/libraries/Session.php b/system/libraries/Session.php index e03f5dff..670ee6a6 100644 --- a/system/libraries/Session.php +++ b/system/libraries/Session.php @@ -2,7 +2,7 @@ /** * Session library. * - * $Id: Session.php 4073 2009-03-13 17:53:58Z Shadowhand $ + * $Id: Session.php 4433 2009-07-01 03:44:20Z kiall $ * * @package Core * @author Kohana Team @@ -27,6 +27,9 @@ class Session_Core { // Input library protected $input; + // Automatically save the session by default + public static $should_save = true; + /** * Singleton instance of Session. */ @@ -455,4 +458,16 @@ class Session_Core { } } + /** + * Do not save this session. + * This is a performance feature only, if using the native + * session "driver" the save will NOT be aborted. + * + * @return void + */ + public function abort_save() + { + Session::$should_save = FALSE; + } + } // End Session Class diff --git a/system/libraries/drivers/Session/Cache.php b/system/libraries/drivers/Session/Cache.php index 7221c9f2..45e49495 100644 --- a/system/libraries/drivers/Session/Cache.php +++ b/system/libraries/drivers/Session/Cache.php @@ -10,7 +10,7 @@ * Lifetime does not need to be set as it is * overridden by the session expiration setting. * - * $Id: Cache.php 3769 2008-12-15 00:48:56Z zombor $ + * $Id: Cache.php 4431 2009-07-01 03:41:41Z kiall $ * * @package Core * @author Kohana Team @@ -76,6 +76,9 @@ class Session_Cache_Driver implements Session_Driver { public function write($id, $data) { + if ( ! Session::$should_save) + return TRUE; + $id = 'session_'.$id; $data = Kohana::config('session.encryption') ? $this->encrypt->encode($data) : $data; diff --git a/system/libraries/drivers/Session/Cookie.php b/system/libraries/drivers/Session/Cookie.php index 7b791064..4cf18fc2 100644 --- a/system/libraries/drivers/Session/Cookie.php +++ b/system/libraries/drivers/Session/Cookie.php @@ -2,7 +2,7 @@ /** * Session cookie driver. * - * $Id: Cookie.php 3769 2008-12-15 00:48:56Z zombor $ + * $Id: Cookie.php 4431 2009-07-01 03:41:41Z kiall $ * * @package Core * @author Kohana Team @@ -48,6 +48,9 @@ class Session_Cookie_Driver implements Session_Driver { public function write($id, $data) { + if ( ! Session::$should_save) + return TRUE; + $data = empty($this->encrypt) ? base64_encode($data) : $this->encrypt->encode($data); if (strlen($data) > 4048) diff --git a/system/libraries/drivers/Session/Database.php b/system/libraries/drivers/Session/Database.php index b4144ffb..490875a1 100644 --- a/system/libraries/drivers/Session/Database.php +++ b/system/libraries/drivers/Session/Database.php @@ -2,7 +2,7 @@ /** * Session database driver. * - * $Id: Database.php 3769 2008-12-15 00:48:56Z zombor $ + * $Id: Database.php 4431 2009-07-01 03:41:41Z kiall $ * * @package Core * @author Kohana Team @@ -98,6 +98,9 @@ class Session_Database_Driver implements Session_Driver { public function write($id, $data) { + if ( ! Session::$should_save) + return TRUE; + $data = array ( 'session_id' => $id, -- cgit v1.2.3 From 132bd8306e444c46d3e588bdc1b21fa4474f2a98 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 30 Jun 2009 20:51:02 -0700 Subject: Re-add Session::abort_save(). It was reverted as part of the earlier change, but this is the part that we want to keep. --- modules/gallery/controllers/file_proxy.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php index 1f885e53..0d64bcd9 100644 --- a/modules/gallery/controllers/file_proxy.php +++ b/modules/gallery/controllers/file_proxy.php @@ -112,6 +112,9 @@ class File_Proxy_Controller extends Controller { kohana::show_404(); } + // We don't need to save the session for this request + Session::abort_save(); + // Dump out the image header("Content-Type: $item->mime_type"); Kohana::close_buffers(false); -- cgit v1.2.3 From 0d105bcf9dfa0b34b390bd80f49965c563d48534 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Tue, 30 Jun 2009 23:29:53 -0600 Subject: Display owner's full name rather than username, ticket #421. --- modules/info/helpers/info_theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/info/helpers/info_theme.php b/modules/info/helpers/info_theme.php index 151885b7..863317a8 100644 --- a/modules/info/helpers/info_theme.php +++ b/modules/info/helpers/info_theme.php @@ -37,7 +37,7 @@ class info_theme_Core { } if ($item->owner) { $results .= "
  • "; - $results .= t("By: %owner_name", array("owner_name" => "{$item->owner->name}")); + $results .= t("By: %owner_name", array("owner_name" => "{$item->owner->full_name}")); $results .= "
  • "; } return $results; -- cgit v1.2.3 From 979d32759514cdff790b3fd4a5a59764edfb6b02 Mon Sep 17 00:00:00 2001 From: jhilden Date: Wed, 1 Jul 2009 02:17:38 -0400 Subject: change to the 'back to the Gallery' link from the admin. --- themes/admin_default/css/screen.css | 28 +++++++++------------------- themes/admin_default/views/admin.html.php | 4 ++-- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/themes/admin_default/css/screen.css b/themes/admin_default/css/screen.css index 629d0451..98e0905e 100644 --- a/themes/admin_default/css/screen.css +++ b/themes/admin_default/css/screen.css @@ -98,30 +98,20 @@ * 4) Content blocks in specific layout containers *********************************************************************/ -#gHeader #gLogo img { +#gHeader #gLogo { float: left; margin: -22px 10px 0 0; -} - -#gHeader #gLogo { - position: relative; display: block; + padding-left: 2px; + width: 105px; /* 107px - padding-left */ + height: 48px; + background-image: url('../../default/images/logo.png'); + color: gray ! important; +} +#gHeader #gLogo:hover { + color: #FF6600 ! important; text-decoration: none; } -#gHeader #gLogo span { - display: none; - position: absolute; - top: -20px; - left: 2px; - color: #FF6600; -} -#gHeader #gLogo:hover span { - display: inline; -} - -.rtl #gHeader #gLogo img { - float: left; -} #gHeader #gLoginMenu { float: none; diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index 1be454c3..76f59d4a 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -47,8 +47,8 @@
  • - -