diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-01-25 19:49:17 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-25 19:49:17 -0800 |
commit | 1606961153fca681895a4f0145f7794000337539 (patch) | |
tree | 30a8fc8ed2dfcafe1c1aea13432ccd4b5a26be40 /modules/comment/helpers | |
parent | cc912935731c216a57e4c291548ec503a0c1607e (diff) | |
parent | 6023f2bb46598f9da096d63f7ab1dfb914eab6f7 (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
modules/gallery/libraries/MY_ORM.php
Diffstat (limited to 'modules/comment/helpers')
-rw-r--r-- | modules/comment/helpers/comment_event.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/comment/helpers/comment_event.php b/modules/comment/helpers/comment_event.php index bd336cda..12e8d73f 100644 --- a/modules/comment/helpers/comment_event.php +++ b/modules/comment/helpers/comment_event.php @@ -76,4 +76,16 @@ class comment_event_Core { $data[] = $row->text; } } + + static function show_user_profile($data) { + $view = new View("user_profile_comments.html"); + $view->comments = ORM::factory("comment") + ->order_by("created", "DESC") + ->where("state", "=", "published") + ->where("author_id", "=", $data->user->id) + ->find_all(); + if ($view->comments->count()) { + $data->content[] = (object)array("title" => t("Comments"), "view" => $view); + } + } } |