From 61691fdf713950f704427640bc30776990768d98 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 5 Jun 2011 17:16:07 -0700 Subject: Use the strict form of mb_detect_encoding for best results. Thanks to guthy in https://github.com/gallery/gallery3/commit/fa6f233603267505c216abc4f12663d245cd23e7#commitcomment-403145 Fixes #1745. --- modules/gallery/helpers/encoding.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/modules/gallery/helpers/encoding.php b/modules/gallery/helpers/encoding.php index c5928634..7d5add34 100644 --- a/modules/gallery/helpers/encoding.php +++ b/modules/gallery/helpers/encoding.php @@ -19,13 +19,16 @@ */ class encoding_Core { static function convert_to_utf8($value) { - if (function_exists("mb_detect_encoding") && - function_exists("mb_convert_encoding") && - mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { - $value = mb_convert_encoding($value, "UTF-8", mb_detect_encoding($value)); - } else if (function_exists("mb_detect_encoding") && - mb_detect_encoding($value, "ISO-8859-1, UTF-8") != "UTF-8") { - $value = utf8_encode($value); + if (function_exists("mb_detect_encoding")) { + // Rely on mb_detect_encoding()'s strict mode + $src_encoding = mb_detect_encoding($value, mb_detect_order(), true); + if ($src_encoding != "UTF-8") { + if (function_exists("mb_convert_encoding") && $src_encoding) { + $value = mb_convert_encoding($value, "UTF-8", $src_encoding); + } else { + $value = utf8_encode($value); + } + } } return $value; } -- cgit v1.2.3 From a19554f96cbec458fb8a009ba4e126bf50cd7a52 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Sun, 5 Jun 2011 18:13:42 -0700 Subject: Automated update of .build_number to 158 for branch master Last update: 4a208226edbd3aeb8352b068f6f774ce410a3b3d (1 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index 737f78aa..51f3b688 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=157 +build_number=158 -- cgit v1.2.3 From 142088a6353dfd051e0dc72e1e30fa51fb6d7f2b Mon Sep 17 00:00:00 2001 From: Chad Parry Date: Wed, 15 Jun 2011 20:46:23 -0600 Subject: Gracefully handle rule failures with a broken image icon. This will be especially useful as third-party modules start supporting a larger variety of image types, and as errors creep into their image processing. --- modules/gallery/helpers/graphics.php | 22 ++++++++++++++++++---- modules/gallery/images/missing_photo.png | Bin 0 -> 1570 bytes 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 modules/gallery/images/missing_photo.png diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index acb11bfb..39c87fbd 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -170,23 +170,37 @@ class graphics_Core { foreach (self::_get_rules($target) as $rule) { $args = array($working_file, $output_file, unserialize($rule->args), $item); - call_user_func_array($rule->operation, $args); - $working_file = $output_file; + try { + call_user_func_array($rule->operation, $args); + $working_file = $output_file; + } catch (Exception $e) { + // Ignore this rule and move on. + Kohana_Log::add("error", "Caught exception processing image: {$item->title}\n" . + $e->getMessage() . "\n" . $e->getTraceAsString()); + } } } if (!empty($ops["thumb"])) { + if (file_exists($item->thumb_path())) { + $item->thumb_dirty = 0; + } else { + copy(MODPATH . "gallery/images/missing_photo.png", $item->thumb_path()); + } $dims = getimagesize($item->thumb_path()); $item->thumb_width = $dims[0]; $item->thumb_height = $dims[1]; - $item->thumb_dirty = 0; } if (!empty($ops["resize"])) { + if (file_exists($item->resize_path())) { + $item->resize_dirty = 0; + } else { + copy(MODPATH . "gallery/images/missing_photo.png", $item->resize_path()); + } $dims = getimagesize($item->resize_path()); $item->resize_width = $dims[0]; $item->resize_height = $dims[1]; - $item->resize_dirty = 0; } $item->save(); } catch (Exception $e) { diff --git a/modules/gallery/images/missing_photo.png b/modules/gallery/images/missing_photo.png new file mode 100644 index 00000000..67786275 Binary files /dev/null and b/modules/gallery/images/missing_photo.png differ -- cgit v1.2.3 From 4650347a672296e4d1ac3d1a992945e36920303d Mon Sep 17 00:00:00 2001 From: mamouneyya Date: Thu, 23 Jun 2011 00:10:31 +0300 Subject: RTLing the tabs of admin comment section --- themes/wind/css/screen-rtl.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/themes/wind/css/screen-rtl.css b/themes/wind/css/screen-rtl.css index 914a19dd..64a563ec 100644 --- a/themes/wind/css/screen-rtl.css +++ b/themes/wind/css/screen-rtl.css @@ -275,6 +275,9 @@ ul.sf-menu li li li.sfHover ul { right: auto; } +.ui-tabs .ui-tabs-nav li { + float: right; +} /* RTL paginator ~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -- cgit v1.2.3 From 76551d7bfefe1acdd8b90e7126a84497bac7c7a8 Mon Sep 17 00:00:00 2001 From: mamouneyya Date: Thu, 23 Jun 2011 00:27:50 +0300 Subject: Add RTL paginator for Admin Wind (copied from Wind CSS) --- themes/admin_wind/css/screen-rtl.css | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/themes/admin_wind/css/screen-rtl.css b/themes/admin_wind/css/screen-rtl.css index 0809c1b5..5a91d9fd 100644 --- a/themes/admin_wind/css/screen-rtl.css +++ b/themes/admin_wind/css/screen-rtl.css @@ -316,3 +316,60 @@ li.g-group, .g-available .g-block img { margin: 0 0 1em 1em; } + +/* RTL paginator ~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +.g-paginator .g-info { + width: 35%; +} + +.g-paginator .g-text-right { + margin-left: 0; +} + +.g-paginator .ui-icon-seek-end { + background-position: -80px -160px; +} + +.g-paginator .ui-icon-seek-next { + background-position: -48px -160px; +} + +.g-paginator .ui-icon-seek-prev { + background-position: -32px -160px; +} + +.g-paginator .ui-icon-seek-first { + background-position: -64px -160px; +} + +#g-header #g-login-menu, +#g-header #g-quick-search-form { + clear: left; + float: left; +} + +#g-header #g-login-menu li { + margin-left: 0; + padding-left: 0; + padding-right: 1.2em; +} + +#g-site-menu { + left: auto; + right: 240px; +} + +#g-view-menu #g-slideshow-link { + background-image: url('../images/ico-view-slideshow-rtl.png'); +} + +#g-sidebar .g-block-content { + padding-right: 1em; + padding-left: 0; +} + +#g-footer #g-credits li { + padding-left: 1.2em !important; + padding-right: 0; +} -- cgit v1.2.3 From 017251c33a2c9986af6aa1c64c4b82852651c618 Mon Sep 17 00:00:00 2001 From: mamouneyya Date: Thu, 23 Jun 2011 01:04:24 +0300 Subject: revert 4650347a672296e4d1ac, it sould be applied to the admin theme --- themes/wind/css/screen-rtl.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/themes/wind/css/screen-rtl.css b/themes/wind/css/screen-rtl.css index 64a563ec..e79f2c06 100644 --- a/themes/wind/css/screen-rtl.css +++ b/themes/wind/css/screen-rtl.css @@ -275,10 +275,6 @@ ul.sf-menu li li li.sfHover ul { right: auto; } -.ui-tabs .ui-tabs-nav li { - float: right; -} - /* RTL paginator ~~~~~~~~~~~~~~~~~~~~~~~~~~ */ .g-paginator .g-info { -- cgit v1.2.3 From e2cdd769029d48e96af5418b6c0df39a216bc54a Mon Sep 17 00:00:00 2001 From: mamouneyya Date: Thu, 23 Jun 2011 01:05:39 +0300 Subject: RTLing the comment admin section tabs (the right one) --- themes/admin_wind/css/screen-rtl.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/themes/admin_wind/css/screen-rtl.css b/themes/admin_wind/css/screen-rtl.css index 5a91d9fd..b645d99b 100644 --- a/themes/admin_wind/css/screen-rtl.css +++ b/themes/admin_wind/css/screen-rtl.css @@ -275,6 +275,10 @@ ul.sf-menu li li li.sfHover ul { right: auto; } +.ui-tabs .ui-tabs-nav li { + float: right; +} + #g-content #g-album-grid .g-item, #g-site-theme, #g-admin-theme, -- cgit v1.2.3 From 1889e6d3cb4eb0d3f268710a18084709b2f2295f Mon Sep 17 00:00:00 2001 From: mamouneyya Date: Thu, 23 Jun 2011 01:35:50 +0300 Subject: Yet another RTL review for the admin theme --- themes/admin_wind/css/screen-rtl.css | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/themes/admin_wind/css/screen-rtl.css b/themes/admin_wind/css/screen-rtl.css index b645d99b..79afabb3 100644 --- a/themes/admin_wind/css/screen-rtl.css +++ b/themes/admin_wind/css/screen-rtl.css @@ -92,7 +92,11 @@ input[type=radio] { padding-right: 0; } -input.checkbox { +input.checkbox, +input[type="checkbox"], +input.radio, +input[type="radio"] { + margin-right: 0; margin-left: .4em; } @@ -109,6 +113,14 @@ input.checkbox { margin-right: .2em; } +.g-group h4 { + padding: .5em .5em .5em 0; +} + +.g-group .g-user { + padding: .2em .5em 0 0; +} + /* RTL Corner radius ~~~~~~~~~~~~~~~~~~~~~~ */ .g-buttonset .ui-corner-tl { @@ -290,6 +302,11 @@ li.g-group, float: right; } +#g-site-theme { + margin-right: 0; + margin-left: 1em; +} + #g-admin-graphics .g-available .g-block { float: right; margin-left: 1em; @@ -321,6 +338,10 @@ li.g-group, margin: 0 0 1em 1em; } +.g-button { + margin: 0 0 0 4px; +} + /* RTL paginator ~~~~~~~~~~~~~~~~~~~~~~~~~~ */ .g-paginator .g-info { -- cgit v1.2.3 From 71b5412627662ee04d34844b0f90ded712ad2ec7 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Wed, 22 Jun 2011 19:04:23 -0700 Subject: Automated update of .build_number to 159 for branch master Last update: a19554f96cbec458fb8a009ba4e126bf50cd7a52 (1 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index 51f3b688..3ebefc24 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=158 +build_number=159 -- cgit v1.2.3 From 771de0a3746ac0d780cb5dce2a14aa5a6ddf06d7 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Sat, 25 Jun 2011 10:28:13 -0700 Subject: Automated update of .build_number to 160 for branch master Last update: 71b5412627662ee04d34844b0f90ded712ad2ec7 (1 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index 3ebefc24..e627526e 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=159 +build_number=160 -- cgit v1.2.3 From 784c429070db54e183feb3e0ea6f2726b6507081 Mon Sep 17 00:00:00 2001 From: Andy Lindeman Date: Mon, 27 Jun 2011 07:24:37 -0400 Subject: [Fixes #1757] Redirect to root album if path comes in as main.php or index.php --- modules/g2_import/controllers/g2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/g2_import/controllers/g2.php b/modules/g2_import/controllers/g2.php index 90984e84..1252014f 100644 --- a/modules/g2_import/controllers/g2.php +++ b/modules/g2_import/controllers/g2.php @@ -34,7 +34,7 @@ class G2_Controller extends Controller { $path = $input->get("path"); $id = $input->get("g2_itemId"); - if ($path || $id) { + if (($path && $path != 'index.php' && $path != 'main.php') || $id) { if ($id) { // Requests by id are either core.DownloadItem or core.ShowItem requests. Later versions of // Gallery 2 don't specify g2_view if it's the default (core.ShowItem). And in some cases -- cgit v1.2.3 From fc6c1390d3d5f3d99d75b04acf208ae3729c11ce Mon Sep 17 00:00:00 2001 From: Andy Lindeman Date: Mon, 27 Jun 2011 08:25:50 -0400 Subject: [Fixes #1758] Link to themes codex page instead of modules codex page --- modules/gallery/views/admin_themes.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php index 7d947b28..9d53779f 100644 --- a/modules/gallery/views/admin_themes.html.php +++ b/modules/gallery/views/admin_themes.html.php @@ -48,7 +48,7 @@

- Download one now!", array("url" => "http://codex.gallery2.org/Category:Gallery_3:Modules")) ?> + Download one now!", array("url" => "http://codex.gallery2.org/Category:Gallery_3:Themes")) ?>

@@ -88,7 +88,7 @@

- Download one now!", array("url" => "http://codex.gallery2.org/Category:Gallery_3:Modules")) ?> + Download one now!", array("url" => "http://codex.gallery2.org/Category:Gallery_3:Themes")) ?>

-- cgit v1.2.3 From 40cda7fa3fa8d9ede1f24bfa8460aab1ac681c34 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Mon, 27 Jun 2011 22:25:54 -0700 Subject: Automated update of .build_number to 161 for branch master Last update: 771de0a3746ac0d780cb5dce2a14aa5a6ddf06d7 (1 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index e627526e..c874ff9a 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=160 +build_number=161 -- cgit v1.2.3 From e8382b960a3c19bb28140833e348e6c9c9db8a8a Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Mon, 27 Jun 2011 22:27:04 -0700 Subject: Automated update of .build_number to 162 for branch master Last update: 40cda7fa3fa8d9ede1f24bfa8460aab1ac681c34 (1 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index c874ff9a..79e7274f 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=161 +build_number=162 -- cgit v1.2.3