From 14f1fc30b519a49701cbcf49d6df675597cba8d0 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 16 Nov 2009 07:49:17 -0800 Subject: Use some hacky css to get the buttons alighned properly. Fixes ticket #880. --- modules/gallery/views/simple_uploader.html.php | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'modules') diff --git a/modules/gallery/views/simple_uploader.html.php b/modules/gallery/views/simple_uploader.html.php index 10e748b6..80dcc5bc 100644 --- a/modules/gallery/views/simple_uploader.html.php +++ b/modules/gallery/views/simple_uploader.html.php @@ -1,4 +1,17 @@ + @@ -115,7 +123,7 @@
- +
-- cgit v1.2.3 From 2e4d29e7dd59ebd30886285076ad8ec4f8b7adcd Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 16 Nov 2009 14:23:29 -0800 Subject: If an empty array is passed into set method, then make sure the tag value being stored in the database is null, not "Array" --- modules/gallery/libraries/drivers/Cache/Database.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules') diff --git a/modules/gallery/libraries/drivers/Cache/Database.php b/modules/gallery/libraries/drivers/Cache/Database.php index 43f4e38a..7e2aeabc 100644 --- a/modules/gallery/libraries/drivers/Cache/Database.php +++ b/modules/gallery/libraries/drivers/Cache/Database.php @@ -60,6 +60,8 @@ class Cache_Database_Driver implements Cache_Driver { if (!empty($tags)) { // Escape the tags, adding brackets so the tag can be explicitly matched $tags = "<" . implode(">,<", $tags) . ">"; + } else { + $tags = null; } // Cache Database driver expects unix timestamp -- cgit v1.2.3 From bf4c518bb56917b9960c67afe2893da4569a3938 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 16 Nov 2009 14:25:25 -0800 Subject: Store the directory, files and translation cache in the gallery3 cache instead of trying to store it in the task. It is possible with lots of modules and lots of incoming translations to go beyond the 64K limit in the task context. Possible fix for #886. --- modules/gallery/helpers/gallery_task.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'modules') diff --git a/modules/gallery/helpers/gallery_task.php b/modules/gallery/helpers/gallery_task.php index 95216cf0..e0b03682 100644 --- a/modules/gallery/helpers/gallery_task.php +++ b/modules/gallery/helpers/gallery_task.php @@ -120,15 +120,16 @@ class gallery_task_Core { $errors = array(); try { $start = microtime(true); - $dirs = $task->get("dirs"); - $files = $task->get("files"); - $cache = $task->get("cache", array()); + $data = Cache::instance()->get("update_l10n_cache:{$task->id}"); + if ($data) { + list($dirs, $files, $cache) = unserialize($data); + } $i = 0; switch ($task->get("mode", "init")) { case "init": // 0% $dirs = array("gallery", "modules", "themes", "installer"); - $files = array(); + $files = $cache = array(); $task->set("mode", "find_files"); $task->status = t("Finding files"); break; @@ -194,9 +195,12 @@ class gallery_task_Core { $task->percent_complete = 100; } - $task->set("files", $files); - $task->set("dirs", $dirs); - $task->set("cache", $cache); + if ($task->percent_complete < 100) { + Cache::instance()->set("update_l10n_cache:{$task->id}", + serialize(array($dirs, $files, $cache))); + } else { + Cache::instance()->delete("update_l10n_cache:{$task->id}"); + } } catch (Exception $e) { $task->done = true; $task->state = "error"; -- cgit v1.2.3