mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
FeedReader: Added check for forum author.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8404 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
465e057c13
commit
ceb2825f83
@ -397,7 +397,7 @@ void AddFeedDialog::loadForumGroups(const uint32_t &token)
|
||||
const RsGxsForumGroup &group = *it;
|
||||
|
||||
/* show only own forums */
|
||||
if (IS_GROUP_PUBLISHER(group.mMeta.mSubscribeFlags) && IS_GROUP_ADMIN(group.mMeta.mSubscribeFlags)) {
|
||||
if (IS_GROUP_PUBLISHER(group.mMeta.mSubscribeFlags) && IS_GROUP_ADMIN(group.mMeta.mSubscribeFlags) && !group.mMeta.mAuthorId.isNull()) {
|
||||
ui->forumComboBox->addItem(QString::fromUtf8(group.mMeta.mGroupName.c_str()), QString::fromStdString(group.mMeta.mGroupId.toStdString()));
|
||||
}
|
||||
}
|
||||
|
@ -119,6 +119,9 @@ QString FeedReaderStringDefs::errorString(RsFeedReaderErrorState errorState, con
|
||||
case RS_FEED_ERRORSTATE_PROCESS_FORUM_NO_ADMIN:
|
||||
errorText = QApplication::translate("FeedReaderStringDefs", "You are not admin of the forum");
|
||||
break;
|
||||
case RS_FEED_ERRORSTATE_PROCESS_FORUM_NO_AUTHOR:
|
||||
errorText = QApplication::translate("FeedReaderStringDefs", "Forum has no author");
|
||||
break;
|
||||
|
||||
case RS_FEED_ERRORSTATE_PROCESS_HTML_ERROR:
|
||||
errorText = QApplication::translate("FeedReaderStringDefs", "Can't read html");
|
||||
|
@ -45,6 +45,7 @@ enum RsFeedReaderErrorState {
|
||||
RS_FEED_ERRORSTATE_PROCESS_FORUM_CREATE = 100,
|
||||
RS_FEED_ERRORSTATE_PROCESS_FORUM_NOT_FOUND = 101,
|
||||
RS_FEED_ERRORSTATE_PROCESS_FORUM_NO_ADMIN = 102,
|
||||
RS_FEED_ERRORSTATE_PROCESS_FORUM_NO_AUTHOR = 103,
|
||||
|
||||
RS_FEED_ERRORSTATE_PROCESS_HTML_ERROR = 150,
|
||||
RS_FEED_ERRORSTATE_PROCESS_XPATH_INTERNAL_ERROR = 151,
|
||||
|
@ -659,7 +659,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="74"/>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="167"/>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="170"/>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@ -714,57 +714,62 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="124"/>
|
||||
<source>Can't read html</source>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="123"/>
|
||||
<source>Forum has no author</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="127"/>
|
||||
<source>Internal XPath error</source>
|
||||
<source>Can't read html</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="130"/>
|
||||
<source>Wrong XPath expression</source>
|
||||
<source>Internal XPath error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="133"/>
|
||||
<source>Empty XPath result</source>
|
||||
<source>Wrong XPath expression</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="136"/>
|
||||
<source>XSLT format error</source>
|
||||
<source>Empty XPath result</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="139"/>
|
||||
<source>XSLT transformation error</source>
|
||||
<source>XSLT format error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="142"/>
|
||||
<source>XSLT transformation error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="145"/>
|
||||
<source>Empty XSLT result</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="146"/>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="149"/>
|
||||
<source>Unknown error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="160"/>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="163"/>
|
||||
<source>No transformation</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="162"/>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="165"/>
|
||||
<source>XPath</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="164"/>
|
||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="167"/>
|
||||
<source>XSLT</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -1920,6 +1920,10 @@ void p3FeedReader::onProcessSuccess_addMsgs(const std::string &feedId, std::list
|
||||
if (IS_GROUP_PUBLISHER(forumGroup.mMeta.mSubscribeFlags) && IS_GROUP_ADMIN(forumGroup.mMeta.mSubscribeFlags)) {
|
||||
forumId = fi->forumId;
|
||||
authorId = forumGroup.mMeta.mAuthorId;
|
||||
|
||||
if (authorId.isNull()) {
|
||||
errorState = RS_FEED_ERRORSTATE_PROCESS_FORUM_NO_AUTHOR;
|
||||
}
|
||||
} else {
|
||||
errorState = RS_FEED_ERRORSTATE_PROCESS_FORUM_NO_ADMIN;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user