diff options
author | Chad Kieffer <ckieffer@gmail.com> | 2009-11-15 20:43:48 -0700 |
---|---|---|
committer | Chad Kieffer <ckieffer@gmail.com> | 2009-11-15 20:43:48 -0700 |
commit | dcfa74e2d9084a4dd9ac56333c47d6fdbee46707 (patch) | |
tree | da6885b8bd689705c4695f8c809ddc0c1bb486eb /modules/comment | |
parent | de3bfac2ecff4108517e61213926de64a8046610 (diff) | |
parent | 9379308f91a476f790fb8d444536719535c584e4 (diff) |
Merge branch 'master' of github.com:gallery/gallery3
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/tests/Comment_Helper_Test.php | 2 | ||||
-rw-r--r-- | modules/comment/views/admin_block_recent_comments.html.php | 4 | ||||
-rw-r--r-- | modules/comment/views/admin_comments.html.php | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/modules/comment/tests/Comment_Helper_Test.php b/modules/comment/tests/Comment_Helper_Test.php index 9a8c83f1..82b7ebd2 100644 --- a/modules/comment/tests/Comment_Helper_Test.php +++ b/modules/comment/tests/Comment_Helper_Test.php @@ -24,6 +24,7 @@ class Comment_Helper_Test extends Unit_Test_Case { public function setup() { $this->_ip_address = Input::instance()->ip_address; $this->_user_agent = Kohana::$user_agent; + $this->_save = $_SERVER; $_SERVER["HTTP_ACCEPT"] = "HTTP_ACCEPT"; $_SERVER["HTTP_ACCEPT_CHARSET"] = "HTTP_ACCEPT_CHARSET"; @@ -42,6 +43,7 @@ class Comment_Helper_Test extends Unit_Test_Case { public function teardown() { Input::instance()->ip_address = $this->_ip_address; Kohana::$user_agent = $this->_user_agent; + $_SERVER = $this->_save; } public function create_comment_for_guest_test() { diff --git a/modules/comment/views/admin_block_recent_comments.html.php b/modules/comment/views/admin_block_recent_comments.html.php index 7941e02d..d9776def 100644 --- a/modules/comment/views/admin_block_recent_comments.html.php +++ b/modules/comment/views/admin_block_recent_comments.html.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <ul> - <? foreach ($comments as $i => $comment): ?> - <li class="<?= ($i % 2 == 0) ? "g-even" : "g-odd" ?>"> + <? foreach ($comments as $comment): ?> + <li class="<?= text::alternate("g-even", "g-odd") ?>"> <img src="<?= $comment->author()->avatar_url(32, $theme->url("images/avatar.jpg", true)) ?>" class="g-avatar" alt="<?= html::clean_attribute($comment->author_name()) ?>" diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index b138702c..20236a7a 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -103,8 +103,8 @@ <?= t("Actions") ?> </th> </tr> - <? foreach ($comments as $i => $comment): ?> - <tr id="g-comment-<?= $comment->id ?>" class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?>"> + <? foreach ($comments as $comment): ?> + <tr id="g-comment-<?= $comment->id ?>" class="<?= text::alternate("g-odd", "g-even") ?>"> <td> <a href="#"> <img src="<?= $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>" |