From 8549ba30ca5045211d2efcf8e1c4f98f8a1e9f25 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Mon, 16 May 2011 22:37:09 -0600 Subject: Stop IE 9 album grid craziness. Thanks floridave. Fixes #1430. --- themes/wind/js/ui.init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index 2c67bf3a..3ee3e32e 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -82,7 +82,7 @@ $(document).ready(function() { } else { var sib_height = $(this).prev().height(); } - if ($.browser.msie && $.browser.version >= 8) { + if ($.browser.msie && $.browser.version <= 8) { sib_height = sib_height + 1; } $(this).css("height", sib_height); -- cgit v1.2.3 From db734130c5fe10408040b2326b28b102f3131271 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Mon, 16 May 2011 21:38:07 -0700 Subject: Automated update of .build_number to 153 for branch master Last update: 9aeb824aa1d15bd94bd7cef0a322c4e8a667e67b (1 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index 1511df3f..190e1781 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=152 +build_number=153 -- cgit v1.2.3 From 784ebe75321304fe3f83cddaf3cb1030410fb5ed Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 22 May 2011 21:24:27 -0700 Subject: Leave the "updated" field alone when importing comments so that if Akismet marks them as spam, we don't immediately flush them out of the database on the next visit to Admin > Content > Comments. Also warn the user about Akismet, and fix up the G2 import code to reimport deleted comments. --- modules/g2_import/controllers/admin_g2_import.php | 5 +++++ modules/g2_import/helpers/g2_import.php | 26 ++++++++++++++++++----- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/modules/g2_import/controllers/admin_g2_import.php b/modules/g2_import/controllers/admin_g2_import.php index 1a705bea..4c8af852 100644 --- a/modules/g2_import/controllers/admin_g2_import.php +++ b/modules/g2_import/controllers/admin_g2_import.php @@ -60,6 +60,11 @@ class Admin_g2_import_Controller extends Admin_Controller { array("url" => url::site("admin/modules"), "module_id" => $module_id))); } } + if (module::is_active("akismet")) { + message::warning( + t("The Akismet module may mark some or all of your imported comments as spam. Deactivate it to avoid that outcome.", + array("url" => url::site("admin/modules")))); + } } else if (g2_import::is_configured()) { $view->content->form->configure_g2_import->embed_path->add_error("invalid", 1); } diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index c79a8d36..5c690da4 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -908,9 +908,14 @@ class g2_import_Core { array("id" => $g2_comment_id, "exception" => (string)$e)); } - if (self::map($g2_comment->getId())) { - // Already imported - return; + if ($id = self::map($g2_comment->getId())) { + if (ORM::factory("comment", $id)->loaded()) { + // Already imported and still exists + return; + } + // This comment was already imported, but now it no longer exists. Import it again, per + // ticket #1736. + self::clear_map($g2_comment_id); } $item_id = self::map($g2_comment->getParentId()); @@ -948,10 +953,11 @@ class g2_import_Core { self::set_map($g2_comment->getId(), $comment->id, "comment"); // Backdate the creation date. We can't do this at creation time because - // Comment_Model::save() will override it. + // Comment_Model::save() will override it. Leave the updated date alone + // so that if the comments get marked as spam, they don't immediately get + // flushed (see ticket #1736) db::update("comments") ->set("created", $g2_comment->getDate()) - ->set("updated", $g2_comment->getDate()) ->where("id", "=", $comment->id) ->execute(); } @@ -1306,6 +1312,16 @@ class g2_import_Core { self::$map[$g2_id] = $g3_id; } + /** + * Remove all map entries associated with the given Gallery 2 id. + */ + static function clear_map($g2_id) { + db::build() + ->delete("g2_maps") + ->where("g2_id", "=", $g2_id) + ->execute(); + } + static function log($msg) { message::warning($msg); Kohana_Log::add("alert", $msg); -- cgit v1.2.3 From f567bdde2817a52afbd436421b61adad8f4a9fd8 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 22 May 2011 21:36:16 -0700 Subject: Clear any existing, matching g2_map rows before mapping new rows. This is an extra query, but should keep duplicate rows out of the database and let new rows supercede old ones. Fixes #1737. --- modules/g2_import/helpers/g2_import.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 5c690da4..8a5d2c5f 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -915,7 +915,6 @@ class g2_import_Core { } // This comment was already imported, but now it no longer exists. Import it again, per // ticket #1736. - self::clear_map($g2_comment_id); } $item_id = self::map($g2_comment->getParentId()); @@ -1298,6 +1297,7 @@ class g2_import_Core { * Associate a Gallery 2 id with a Gallery 3 item id. */ static function set_map($g2_id, $g3_id, $resource_type, $g2_url=null) { + self::clear_map($g2_id, $resource_type); $g2_map = ORM::factory("g2_map"); $g2_map->g3_id = $g3_id; $g2_map->g2_id = $g2_id; @@ -1315,10 +1315,11 @@ class g2_import_Core { /** * Remove all map entries associated with the given Gallery 2 id. */ - static function clear_map($g2_id) { + static function clear_map($g2_id, $resource_type) { db::build() ->delete("g2_maps") ->where("g2_id", "=", $g2_id) + ->where("resource_type", "=", $resource_type) ->execute(); } -- cgit v1.2.3 From 637e56fe45f061bdbcf8c22df257bf85733db115 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Sun, 22 May 2011 21:37:12 -0700 Subject: Automated update of .build_number to 154 for branch master Last update: db734130c5fe10408040b2326b28b102f3131271 (2 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index 190e1781..276589fd 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=153 +build_number=154 -- cgit v1.2.3 From c71bb5418557c4a6ac4ff3101f7dca296a4dced5 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 24 May 2011 20:32:43 -0700 Subject: Reassign the copyright to the standard custodian (Bharat). #1732. --- modules/gallery/tests/System_Helper_Test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gallery/tests/System_Helper_Test.php b/modules/gallery/tests/System_Helper_Test.php index 3d56c516..b6c00f4c 100644 --- a/modules/gallery/tests/System_Helper_Test.php +++ b/modules/gallery/tests/System_Helper_Test.php @@ -1,7 +1,7 @@ Date: Tue, 24 May 2011 20:33:36 -0700 Subject: Checkpoint --- modules/gallery/tests/xss_data.txt | 92 +++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/modules/gallery/tests/xss_data.txt b/modules/gallery/tests/xss_data.txt index 7da79b23..954caf54 100644 --- a/modules/gallery/tests/xss_data.txt +++ b/modules/gallery/tests/xss_data.txt @@ -5,21 +5,22 @@ modules/comment/views/admin_block_recent_comments.html.php 4 DIRTY_ATTR text modules/comment/views/admin_block_recent_comments.html.php 5 DIRTY_ATTR $comment->author()->avatar_url(32,$theme->url(,true)) modules/comment/views/admin_block_recent_comments.html.php 10 DIRTY gallery::date_time($comment->created) modules/comment/views/admin_comments.html.php 5 DIRTY $form -modules/comment/views/admin_manage_comments.html.php 43 DIRTY $menu->render() -modules/comment/views/admin_manage_comments.html.php 107 DIRTY_ATTR $comment->id -modules/comment/views/admin_manage_comments.html.php 107 DIRTY_ATTR text::alternate("g-odd","g-even") -modules/comment/views/admin_manage_comments.html.php 110 DIRTY_ATTR $comment->author()->avatar_url(40,$theme->url(,true)) -modules/comment/views/admin_manage_comments.html.php 123 DIRTY_JS $item->url() -modules/comment/views/admin_manage_comments.html.php 125 DIRTY_ATTR $item->thumb_url() -modules/comment/views/admin_manage_comments.html.php 127 DIRTY photo::img_dimensions($item->thumb_width,$item->thumb_height,75) -modules/comment/views/admin_manage_comments.html.php 135 DIRTY gallery::date($comment->created) -modules/comment/views/admin_manage_comments.html.php 142 DIRTY_JS $comment->id -modules/comment/views/admin_manage_comments.html.php 151 DIRTY_JS $comment->id -modules/comment/views/admin_manage_comments.html.php 160 DIRTY_JS $comment->id -modules/comment/views/admin_manage_comments.html.php 169 DIRTY_JS $comment->id -modules/comment/views/admin_manage_comments.html.php 176 DIRTY_JS $comment->id -modules/comment/views/admin_manage_comments.html.php 184 DIRTY_JS $comment->id -modules/comment/views/admin_manage_comments.html.php 197 DIRTY $pager +modules/comment/views/admin_manage_comments.html.php 45 DIRTY $menu->render() +modules/comment/views/admin_manage_comments_queue.html.php 40 DIRTY $theme->paginator() +modules/comment/views/admin_manage_comments_queue.html.php 55 DIRTY_ATTR $comment->id +modules/comment/views/admin_manage_comments_queue.html.php 55 DIRTY_ATTR text::alternate("g-odd","g-even") +modules/comment/views/admin_manage_comments_queue.html.php 58 DIRTY_ATTR $comment->author()->avatar_url(40,$fallback_avatar_url) +modules/comment/views/admin_manage_comments_queue.html.php 75 DIRTY_JS $item->url() +modules/comment/views/admin_manage_comments_queue.html.php 77 DIRTY_ATTR $item->thumb_url() +modules/comment/views/admin_manage_comments_queue.html.php 79 DIRTY photo::img_dimensions($item->thumb_width,$item->thumb_height,75) +modules/comment/views/admin_manage_comments_queue.html.php 87 DIRTY gallery::date($comment->created) +modules/comment/views/admin_manage_comments_queue.html.php 94 DIRTY_JS $comment->id +modules/comment/views/admin_manage_comments_queue.html.php 103 DIRTY_JS $comment->id +modules/comment/views/admin_manage_comments_queue.html.php 116 DIRTY_JS $comment->id +modules/comment/views/admin_manage_comments_queue.html.php 125 DIRTY_JS $comment->id +modules/comment/views/admin_manage_comments_queue.html.php 132 DIRTY_JS $comment->id +modules/comment/views/admin_manage_comments_queue.html.php 141 DIRTY_JS $comment->id +modules/comment/views/admin_manage_comments_queue.html.php 155 DIRTY $theme->paginator() modules/comment/views/comment.html.php 2 DIRTY_ATTR $comment->id; modules/comment/views/comment.html.php 5 DIRTY_ATTR $comment->author()->avatar_url(40,$theme->url(,true)) modules/comment/views/comment.mrss.php 10 DIRTY $feed->uri @@ -367,7 +368,7 @@ modules/user/views/admin_users.html.php 73 DIRTY_ATTR $use modules/user/views/admin_users.html.php 74 DIRTY_ATTR $user->avatar_url(20,$theme->url(,true)) modules/user/views/admin_users.html.php 88 DIRTY ($user->last_login==0)?"":gallery::date($user->last_login) modules/user/views/admin_users.html.php 91 DIRTY db::build()->from("items")->where("owner_id","=",$user->id)->count_records() -modules/user/views/admin_users.html.php 113 DIRTY $pager +modules/user/views/admin_users.html.php 113 DIRTY $theme->paginator() modules/user/views/admin_users.html.php 132 DIRTY_ATTR $group->id modules/user/views/admin_users.html.php 132 DIRTY_ATTR ($group->special?"g-default-group":"") modules/user/views/admin_users.html.php 134 DIRTY $v @@ -378,31 +379,30 @@ modules/watermark/views/admin_watermarks.html.php 20 DIRTY_ATTR $wid modules/watermark/views/admin_watermarks.html.php 20 DIRTY_ATTR $height modules/watermark/views/admin_watermarks.html.php 20 DIRTY_ATTR $url themes/admin_wind/views/admin.html.php 4 DIRTY $theme->html_attributes() -themes/admin_wind/views/admin.html.php 33 DIRTY $theme->admin_head() -themes/admin_wind/views/admin.html.php 42 DIRTY_JS $theme->url() -themes/admin_wind/views/admin.html.php 47 DIRTY $theme->get_combined("css") -themes/admin_wind/views/admin.html.php 50 DIRTY $theme->get_combined("script") -themes/admin_wind/views/admin.html.php 54 DIRTY $theme->admin_page_top() -themes/admin_wind/views/admin.html.php 62 DIRTY $theme->admin_header_top() -themes/admin_wind/views/admin.html.php 63 DIRTY_JS item::root()->url() -themes/admin_wind/views/admin.html.php 66 DIRTY $theme->user_menu() -themes/admin_wind/views/admin.html.php 69 DIRTY $theme->admin_menu() -themes/admin_wind/views/admin.html.php 72 DIRTY $theme->admin_header_bottom() -themes/admin_wind/views/admin.html.php 79 DIRTY $content -themes/admin_wind/views/admin.html.php 85 DIRTY $sidebar -themes/admin_wind/views/admin.html.php 90 DIRTY $theme->admin_footer() -themes/admin_wind/views/admin.html.php 93 DIRTY $theme->admin_credits() -themes/admin_wind/views/admin.html.php 98 DIRTY $theme->admin_page_bottom() +themes/admin_wind/views/admin.html.php 34 DIRTY $theme->admin_head() +themes/admin_wind/views/admin.html.php 46 DIRTY_JS $theme->url() +themes/admin_wind/views/admin.html.php 51 DIRTY $theme->get_combined("css") +themes/admin_wind/views/admin.html.php 54 DIRTY $theme->get_combined("script") +themes/admin_wind/views/admin.html.php 58 DIRTY $theme->admin_page_top() +themes/admin_wind/views/admin.html.php 66 DIRTY $theme->admin_header_top() +themes/admin_wind/views/admin.html.php 67 DIRTY_JS item::root()->url() +themes/admin_wind/views/admin.html.php 70 DIRTY $theme->user_menu() +themes/admin_wind/views/admin.html.php 73 DIRTY $theme->admin_menu() +themes/admin_wind/views/admin.html.php 76 DIRTY $theme->admin_header_bottom() +themes/admin_wind/views/admin.html.php 83 DIRTY $content +themes/admin_wind/views/admin.html.php 89 DIRTY $sidebar +themes/admin_wind/views/admin.html.php 94 DIRTY $theme->admin_footer() +themes/admin_wind/views/admin.html.php 97 DIRTY $theme->admin_credits() +themes/admin_wind/views/admin.html.php 102 DIRTY $theme->admin_page_bottom() themes/admin_wind/views/block.html.php 3 DIRTY_ATTR $anchor themes/admin_wind/views/block.html.php 5 DIRTY $id themes/admin_wind/views/block.html.php 5 DIRTY_ATTR $css_id themes/admin_wind/views/block.html.php 13 DIRTY $title themes/admin_wind/views/block.html.php 16 DIRTY $content -themes/admin_wind/views/pager.html.php 13 DIRTY_JS str_replace('{page}',1,$url) -themes/admin_wind/views/pager.html.php 20 DIRTY_JS str_replace('{page}',$previous_page,$url) -themes/admin_wind/views/pager.html.php 27 DIRTY $from_to_msg -themes/admin_wind/views/pager.html.php 30 DIRTY_JS str_replace('{page}',$next_page,$url) -themes/admin_wind/views/pager.html.php 37 DIRTY_JS str_replace('{page}',$last_page,$url) +themes/admin_wind/views/paginator.html.php 35 DIRTY_JS $first_page_url +themes/admin_wind/views/paginator.html.php 44 DIRTY_JS $previous_page_url +themes/admin_wind/views/paginator.html.php 70 DIRTY_JS $next_page_url +themes/admin_wind/views/paginator.html.php 79 DIRTY_JS $last_page_url themes/wind/views/album.html.php 16 DIRTY_ATTR $child->id themes/wind/views/album.html.php 16 DIRTY_ATTR $item_class themes/wind/views/album.html.php 18 DIRTY_JS $child->url() @@ -430,16 +430,16 @@ themes/wind/views/page.html.php 17 DIRTY item:: themes/wind/views/page.html.php 32 DIRTY $new_width themes/wind/views/page.html.php 33 DIRTY $new_height themes/wind/views/page.html.php 34 DIRTY $thumb_proportion -themes/wind/views/page.html.php 71 DIRTY_JS $theme->url() -themes/wind/views/page.html.php 76 DIRTY $theme->get_combined("css") -themes/wind/views/page.html.php 79 DIRTY $theme->get_combined("script") -themes/wind/views/page.html.php 89 DIRTY $header_text -themes/wind/views/page.html.php 91 DIRTY_JS item::root()->url() -themes/wind/views/page.html.php 95 DIRTY $theme->user_menu() -themes/wind/views/page.html.php 116 DIRTY_JS $parent->url($parent->id==$theme->item()->parent_id?"show={$theme->item()->id}":null) -themes/wind/views/page.html.php 137 DIRTY $content -themes/wind/views/page.html.php 143 DIRTY newView("sidebar.html") -themes/wind/views/page.html.php 150 DIRTY $footer_text +themes/wind/views/page.html.php 74 DIRTY_JS $theme->url() +themes/wind/views/page.html.php 79 DIRTY $theme->get_combined("css") +themes/wind/views/page.html.php 82 DIRTY $theme->get_combined("script") +themes/wind/views/page.html.php 92 DIRTY $header_text +themes/wind/views/page.html.php 94 DIRTY_JS item::root()->url() +themes/wind/views/page.html.php 98 DIRTY $theme->user_menu() +themes/wind/views/page.html.php 119 DIRTY_JS $parent->url($parent->id==$theme->item()->parent_id?"show={$theme->item()->id}":null) +themes/wind/views/page.html.php 140 DIRTY $content +themes/wind/views/page.html.php 146 DIRTY newView("sidebar.html") +themes/wind/views/page.html.php 153 DIRTY $footer_text themes/wind/views/paginator.html.php 33 DIRTY_JS $first_page_url themes/wind/views/paginator.html.php 42 DIRTY_JS $previous_page_url themes/wind/views/paginator.html.php 70 DIRTY_JS $next_page_url -- cgit v1.2.3 From 4a756a2414e105aa15f7053f8745592b402ff0f5 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Tue, 24 May 2011 20:34:18 -0700 Subject: Automated update of .build_number to 155 for branch master Last update: 637e56fe45f061bdbcf8c22df257bf85733db115 (2 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index 276589fd..3f2c91a1 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=154 +build_number=155 -- cgit v1.2.3 From 44247fb2d1698286e558cd6f5ee5bb87a8612f9b Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 24 May 2011 20:37:51 -0700 Subject: Allow password reset even when we're in maintenance or private gallery mode, otherwise you can't reset your password if you forgot it when the Gallery is locked down. #1735. --- modules/user/controllers/password.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/user/controllers/password.php b/modules/user/controllers/password.php index cd46bbed..ab31c6b4 100644 --- a/modules/user/controllers/password.php +++ b/modules/user/controllers/password.php @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class Password_Controller extends Controller { + const ALLOW_MAINTENANCE_MODE = true; + const ALLOW_PRIVATE_GALLERY = true; + public function reset() { $form = self::_reset_form(); if (request::method() == "post") { -- cgit v1.2.3 From 84c40285276c3d9854a4e61c7f0fa8cf25b6b981 Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Tue, 24 May 2011 20:38:49 -0700 Subject: Automated update of .build_number to 156 for branch master Last update: 637e56fe45f061bdbcf8c22df257bf85733db115 (4 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index 3f2c91a1..91f425a8 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=155 +build_number=156 -- cgit v1.2.3 From 5e6a6d58c2946caf54af9bb4b67f6f9a12d7449f Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 24 May 2011 20:48:23 -0700 Subject: Follow on to c101151616033d53587d1435881dae0fa45aeefa -- delete all tags in setup so that we have a blank slate, otherwise create_tag() will fail because sometimes there'll be other tags in the system. #1628 --- modules/tag/tests/Tag_Test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tag/tests/Tag_Test.php b/modules/tag/tests/Tag_Test.php index 9e10fa4a..52fd4fdd 100644 --- a/modules/tag/tests/Tag_Test.php +++ b/modules/tag/tests/Tag_Test.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class Tag_Test extends Gallery_Unit_Test_Case { - public function teardown() { + public function setup() { ORM::factory("tag")->delete_all(); } -- cgit v1.2.3 From 4a208226edbd3aeb8352b068f6f774ce410a3b3d Mon Sep 17 00:00:00 2001 From: Automatic Build Number Updater Date: Tue, 24 May 2011 20:49:30 -0700 Subject: Automated update of .build_number to 157 for branch master Last update: 84c40285276c3d9854a4e61c7f0fa8cf25b6b981 (1 commits ago) --- .build_number | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build_number b/.build_number index 91f425a8..737f78aa 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=156 +build_number=157 -- cgit v1.2.3