summaryrefslogtreecommitdiff
path: root/src/client/Client.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-02-12 16:47:01 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-02-12 16:47:01 (GMT)
commitafe9e061e1d173731d8a5122c397a2caf4fe61ab (patch)
treef045221d8718c44b8af516cb58bdb45c3c74114b /src/client/Client.cpp
parentd25384c36c427d4afd71f87f8282b1a981c4b563 (diff)
downloadpowder-afe9e061e1d173731d8a5122c397a2caf4fe61ab.zip
powder-afe9e061e1d173731d8a5122c397a2caf4fe61ab.tar.gz
Better names for sort, allow showing own saves
Diffstat (limited to 'src/client/Client.cpp')
-rw-r--r--src/client/Client.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/Client.cpp b/src/client/Client.cpp
index 112bdf1..1fbff93 100644
--- a/src/client/Client.cpp
+++ b/src/client/Client.cpp
@@ -469,7 +469,7 @@ std::vector<Comment*> * Client::GetComments(int saveID, int start, int count)
return commentArray;
}
-std::vector<Save*> * Client::SearchSaves(int start, int count, string query, string sort, int & resultCount)
+std::vector<Save*> * Client::SearchSaves(int start, int count, string query, string sort, bool showOwn, int & resultCount)
{
lastError = "";
resultCount = 0;
@@ -489,6 +489,12 @@ std::vector<Save*> * Client::SearchSaves(int start, int count, string query, str
urlStream << URLEscape(" ");
urlStream << URLEscape("sort:") << URLEscape(sort);
}
+ if(showOwn && authUser.ID)
+ {
+ if(query.length())
+ urlStream << URLEscape(" ");
+ urlStream << URLEscape("user:") << URLEscape(authUser.Username);
+ }
}
data = http_simple_get((char *)urlStream.str().c_str(), &dataStatus, &dataLength);