From c91408d4a8b56730fde39df5e12d32111ace28b4 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 28 Feb 2010 15:39:39 -0800 Subject: Its not apppropriate to make changes to the Kohana system files. Please find another way. Revert "Fix Kohana's internal cache for Gallery's usage pattern. Instead of deleting the whole find_files cache when ever include_paths (=core.modules) change, keep a separate find_files cache for each set of include_paths." This reverts commit fd94f4bec21a7deaa86d468da704a048d2be751e. --- system/core/Kohana.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/system/core/Kohana.php b/system/core/Kohana.php index f7f6b326..ae056d0e 100644 --- a/system/core/Kohana.php +++ b/system/core/Kohana.php @@ -32,7 +32,6 @@ abstract class Kohana_Core { // Include paths protected static $include_paths; - protected static $include_paths_hash = ''; // Cache lifetime protected static $cache_lifetime; @@ -366,7 +365,14 @@ abstract class Kohana_Core { // Add SYSPATH as the last path Kohana::$include_paths[] = SYSPATH; - Kohana::$include_paths_hash = md5(serialize(Kohana::$include_paths)); + // Clear cached include paths + self::$internal_cache['find_file_paths'] = array(); + if ( ! isset(self::$write_cache['find_file_paths'])) + { + // Write cache at shutdown + self::$write_cache['find_file_paths'] = TRUE; + } + } return Kohana::$include_paths; @@ -760,8 +766,8 @@ abstract class Kohana_Core { // Search path $search = $directory.'/'.$filename.$ext; - if (isset(Kohana::$internal_cache['find_file_paths'][Kohana::$include_paths_hash][$search])) - return Kohana::$internal_cache['find_file_paths'][Kohana::$include_paths_hash][$search]; + if (isset(Kohana::$internal_cache['find_file_paths'][$search])) + return Kohana::$internal_cache['find_file_paths'][$search]; // Load include paths $paths = Kohana::$include_paths; @@ -818,7 +824,7 @@ abstract class Kohana_Core { Kohana::$write_cache['find_file_paths'] = TRUE; } - return Kohana::$internal_cache['find_file_paths'][Kohana::$include_paths_hash][$search] = $found; + return Kohana::$internal_cache['find_file_paths'][$search] = $found; } /** -- cgit v1.2.3 From 835027bdb6e5646250d29529168359ad40e9d5f1 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 28 Feb 2010 16:04:47 -0800 Subject: The vendor branch is being updated, so this reverts the revert of commit c91408d4a8b56730fde39df5e12d32111ace28b4. --- system/core/Kohana.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/system/core/Kohana.php b/system/core/Kohana.php index ae056d0e..f7f6b326 100644 --- a/system/core/Kohana.php +++ b/system/core/Kohana.php @@ -32,6 +32,7 @@ abstract class Kohana_Core { // Include paths protected static $include_paths; + protected static $include_paths_hash = ''; // Cache lifetime protected static $cache_lifetime; @@ -365,14 +366,7 @@ abstract class Kohana_Core { // Add SYSPATH as the last path Kohana::$include_paths[] = SYSPATH; - // Clear cached include paths - self::$internal_cache['find_file_paths'] = array(); - if ( ! isset(self::$write_cache['find_file_paths'])) - { - // Write cache at shutdown - self::$write_cache['find_file_paths'] = TRUE; - } - + Kohana::$include_paths_hash = md5(serialize(Kohana::$include_paths)); } return Kohana::$include_paths; @@ -766,8 +760,8 @@ abstract class Kohana_Core { // Search path $search = $directory.'/'.$filename.$ext; - if (isset(Kohana::$internal_cache['find_file_paths'][$search])) - return Kohana::$internal_cache['find_file_paths'][$search]; + if (isset(Kohana::$internal_cache['find_file_paths'][Kohana::$include_paths_hash][$search])) + return Kohana::$internal_cache['find_file_paths'][Kohana::$include_paths_hash][$search]; // Load include paths $paths = Kohana::$include_paths; @@ -824,7 +818,7 @@ abstract class Kohana_Core { Kohana::$write_cache['find_file_paths'] = TRUE; } - return Kohana::$internal_cache['find_file_paths'][$search] = $found; + return Kohana::$internal_cache['find_file_paths'][Kohana::$include_paths_hash][$search] = $found; } /** -- cgit v1.2.3 From 5f985b3e2aa404d9b1145796dff8bc4c1e48b3f0 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 28 Feb 2010 18:46:43 -0700 Subject: Updates to upload CSS to make it themeable and RTL compatible. Use absolute positioning to handle upload button positioning. Remove color definitions to allow jQuery UI theme to set button colors. Consolidate upload dialog CSS to modules/css/gallery.css. Closes #885. --- lib/gallery.common.css | 66 ++++---------------------- modules/gallery/css/gallery.css | 68 +++++++++++++++++++++++++++ modules/gallery/views/form_uploadify.html.php | 29 ++---------- 3 files changed, 80 insertions(+), 83 deletions(-) diff --git a/lib/gallery.common.css b/lib/gallery.common.css index 98b4ee40..31988b67 100644 --- a/lib/gallery.common.css +++ b/lib/gallery.common.css @@ -273,7 +273,7 @@ form li.g-warning { } .g-short-form li.g-error { - padding: .3em 0 .3em 0; + padding: .3em 0; } form.g-error input[type="text"], @@ -294,7 +294,8 @@ li.g-error select { .g-error, .g-denied, -tr.g-error td.g-error { +tr.g-error td.g-error, +#g-add-photos-status .g-error { background: #f6cbca url('images/ico-error.png') no-repeat .4em 50%; color: #f00; } @@ -304,7 +305,8 @@ tr.g-error td.g-error { } .g-success, -.g-allowed { +.g-allowed, +#g-add-photos-status .g-success { background: #d9efc2 url('images/ico-success.png') no-repeat .4em 50%; } @@ -603,60 +605,6 @@ div#g-action-status { margin-left: 0; } -/* Simple uploader ~~~~~~~~~~~~~~~~~~~~~~~ */ - -#g-add-photos-canvas { - border: 1px solid #ccc; - height: 200px; - margin: .5em 0; - overflow: auto; - width: 469px; -} - -#g-add-photos-status { - border: 1px solid #ccc; - height: 125px; - margin: .5em 0; - overflow: auto; - width: 469px; -} - -#g-add-photos button { - float: right; - margin-bottom: .5em; - margin-left: .5em; -} - -#g-add-photos-status li { - text-align: left; - padding-left: 2em; -} - -#g-add-photos-status li.g-success { - background: #d9efc2 url('images/ico-success.png') no-repeat .4em 50%; - width: 429px; -} - -#g-add-photos-status li.g-error { - background: #f6cbca url('images/ico-error.png') no-repeat .4em 50%; - width: 429px; -/* color: #f00;*/ -} - -#g-add-photos-button { - background: #DFEFFC; - border: 1px solid #C5DBEC; - color: #2E6E9E -} - -#g-add-photos p { - margin: 0 -} - -#g-add-photos .g-breadcrumbs li { - padding-top: .5em; -} - /** ******************************************************************* * 7) Right to left language styles **********************************************************************/ @@ -685,7 +633,9 @@ div#g-action-status { .rtl .g-error, .rtl .g-info, .rtl .g-success, -.rtl .g-warning { +.rtl .g-warning, +.rtl #g-add-photos-status .g-success, +.rtl #g-add-photos-status .g-error { background-position: center right; padding-right: 30px !important; } diff --git a/modules/gallery/css/gallery.css b/modules/gallery/css/gallery.css index f3e5ec6d..ed9986bf 100644 --- a/modules/gallery/css/gallery.css +++ b/modules/gallery/css/gallery.css @@ -11,6 +11,70 @@ * 1) End-user **********************************************************************/ +/* Uploader ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +#g-add-photos-canvas, +#g-add-photos-status { + width: 469px; +} + +#g-add-photos-canvas { + border: 1px solid #ccc; + height: 200px; + margin: .5em 0; + padding: 1.8em 0 0 0; + overflow: auto; + position: relative; +} + +#g-add-photos-canvas object, +#g-add-photos-button { + left: 137px; + margin: 0 0 .5em 0; + padding: .4em 1em; + position: absolute; + top: 0; + width: 175px; +} + +#g-add-photos-canvas object { + margin: 0; + z-index: 100; +} + +#g-add-photos-canvas .uploadifyQueueItem { + margin: 0; +} + +#g-add-photos-button { + z-index: 1; +} + +#g-add-photos-status { + border: 1px solid #ccc; + height: 125px; + margin: .4em 0; + overflow: auto; +} + +#g-add-photos-status .g-message-block { + border: none; +} + +#g-add-photos-status #g-action-status li { + margin: 0 0 1px 0; + padding-top: .7em; + width: 433px; +} + +#g-add-photos-form .g-breadcrumbs { + margin: 0; +} + +#g-add-photos-form p { + margin-bottom: 0 +} + /* Permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #g-edit-permissions-form { @@ -121,6 +185,10 @@ * 3) Right to left language styles **********************************************************************/ +.rtl #g-add-photos-status #g-action-status li { + width: 407px; +} + .rtl #g-block-admin .g-left { margin-left: 1em; margin-right: 0; diff --git a/modules/gallery/views/form_uploadify.html.php b/modules/gallery/views/form_uploadify.html.php index 137cb353..2cb690ea 100644 --- a/modules/gallery/views/form_uploadify.html.php +++ b/modules/gallery/views/form_uploadify.html.php @@ -1,25 +1,4 @@ -