- web RPC: tweak to forum_get_data.php

svn path=/trunk/boinc/; revision=18415
This commit is contained in:
David Anderson 2009-06-15 03:39:27 +00:00
parent fa48965196
commit d4a43f05eb
2 changed files with 14 additions and 4 deletions

View File

@ -5660,3 +5660,9 @@ Rom 14 June 2009
acct_mgr_url.xml acct_mgr_url.xml
win_build/installerv2/redist/progress/ win_build/installerv2/redist/progress/
acct_mgr_url.xml acct_mgr_url.xml
David 14 June 2009
- web RPC: tweak to forum_get_data.php
html/user/
forum_get_data.php

View File

@ -38,13 +38,17 @@ if (!$user) {
if ($method == "user_posts") { if ($method == "user_posts") {
$count = get_int("count", true); $count = get_int("count", true);
if (!$count || $count <= 0 || $count > 50) { $count = 10; } if (!$count || $count <= 0 || $count > 50) {
$count = 10;
}
$length = get_int("contentlength", true); $length = get_int("contentlength", true);
if (($length == null) || ($length <= 0)) { $length = 0; } if (($length == null) || ($length <= 0)) {
$length = 0;
}
$posts = BoincPost::enum("user=$userid ORDER BY timestamp DESC LIMIT $count"); $posts = BoincPost::enum("user=$userid ORDER BY timestamp DESC LIMIT $count");
$count = count($posts); $realcount = BoincPost::count("user=$userid");
echo "<rpc_response>\n"; echo "<rpc_response>\n";
echo "<count>$count</count>\n"; echo "<count>$realcount</count>\n";
echo "<posts>\n"; echo "<posts>\n";
foreach ($posts as $post) { foreach ($posts as $post) {