Committer: gariev
LJSUP-9363: Modify editjournal.bml pageU trunk/cgi-bin/ljprotocol.pl U trunk/htdocs/editjournal.bml U trunk/htdocs/editjournal.bml.text
Modified: trunk/cgi-bin/ljprotocol.pl =================================================================== --- trunk/cgi-bin/ljprotocol.pl 2011-08-01 02:32:16 UTC (rev 19547) +++ trunk/cgi-bin/ljprotocol.pl 2011-08-01 05:53:22 UTC (rev 19548) @@ -3134,6 +3134,10 @@ return fail($err,200,"Invalid selecttype."); } + if (my $posterid = int($req->{'posterid'})) { + $where .= " AND posterid=$posterid"; + } + # common SQL template: unless ($sql) { $sql = "SELECT jitemid, eventtime, security, allowmask, anum, posterid, replycount, UNIX_TIMESTAMP(eventtime) ". Modified: trunk/htdocs/editjournal.bml =================================================================== --- trunk/htdocs/editjournal.bml 2011-08-01 02:32:16 UTC (rev 19547) +++ trunk/htdocs/editjournal.bml 2011-08-01 05:53:22 UTC (rev 19548) @@ -100,7 +100,9 @@ my $event = LJ::ehtml(LJ::durl($res{"events_${i}_event"})); $event =~ s!\n!<br />!g; $ret .= $event; - + if (my $taglist = $props{$itemid}{'taglist'}) { + $ret .= "<br/><b>Tags:</b> " . LJ::ehtml($taglist); + } $ret .= "</td></tr></table>\n"; } $ret .= "</td>"; @@ -144,7 +146,9 @@ 'ver' => $LJ::PROTOCOL_VER, 'user' => $u->{'user'}, 'usejournal' => $usejournal, - 'itemid' => $itemid }, + 'itemid' => $itemid, + ($POST{'my_posts_only'}) ? ('posterid' => $u->{'userid'}) : (), + }, \%res, { "noauth" => 1, 'u' => $u } @@ -446,7 +450,7 @@ 'user' => $u->{'user'}, 'usejournal' => $usejournal, 'truncate' => 300, - 'noprops' => 1, + ($POST{'my_posts_only'}) ? ('posterid' => $u->{'userid'}) : (), ); # last 1 @@ -548,7 +552,10 @@ # use journal $ret .= "<tr valign=\"top\"><td align='right'>$ML{'.in'}</td>\n<td>\n"; $ret .= LJ::html_text({ 'name' => 'usejournal', 'size' => '20', 'maxlength' => '15', 'value' => $GET{'usejournal'} }) . " "; - $ret .= " (optional)</td></tr>"; + $ret .= " (optional)</br>"; + $ret .= LJ::html_check({ 'name' => 'my_posts_only', 'value' => 1 }); + $ret .= " $ML{'.my_posts_only'}"; + $ret .= "</td></tr>"; # submit button $ret .= "<tr><td> </td><td>" . LJ::html_submit(undef, $ML{'.btn.proceed'}) . "</td></tr>\n"; @@ -563,9 +570,9 @@ user => $u->user, usejournal => $usejournal, truncate => 300, - noprops => 1, selecttype => 'lastn', howmany => 5, + ($POST{'my_posts_only'}) ? ('posterid' => $u->{'userid'}) : (), ); # do getevents request Modified: trunk/htdocs/editjournal.bml.text =================================================================== --- trunk/htdocs/editjournal.bml.text 2011-08-01 02:32:16 UTC (rev 19547) +++ trunk/htdocs/editjournal.bml.text 2011-08-01 05:53:22 UTC (rev 19548) @@ -9,6 +9,8 @@ .in=In community: +.my_posts_only=Posted by me only + .recententries=most recent entries .recententry=Most recent entry