mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -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
5 changed files with 26 additions and 13 deletions
|
@ -397,7 +397,7 @@ void AddFeedDialog::loadForumGroups(const uint32_t &token)
|
||||||
const RsGxsForumGroup &group = *it;
|
const RsGxsForumGroup &group = *it;
|
||||||
|
|
||||||
/* show only own forums */
|
/* 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()));
|
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:
|
case RS_FEED_ERRORSTATE_PROCESS_FORUM_NO_ADMIN:
|
||||||
errorText = QApplication::translate("FeedReaderStringDefs", "You are not admin of the forum");
|
errorText = QApplication::translate("FeedReaderStringDefs", "You are not admin of the forum");
|
||||||
break;
|
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:
|
case RS_FEED_ERRORSTATE_PROCESS_HTML_ERROR:
|
||||||
errorText = QApplication::translate("FeedReaderStringDefs", "Can't read html");
|
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_CREATE = 100,
|
||||||
RS_FEED_ERRORSTATE_PROCESS_FORUM_NOT_FOUND = 101,
|
RS_FEED_ERRORSTATE_PROCESS_FORUM_NOT_FOUND = 101,
|
||||||
RS_FEED_ERRORSTATE_PROCESS_FORUM_NO_ADMIN = 102,
|
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_HTML_ERROR = 150,
|
||||||
RS_FEED_ERRORSTATE_PROCESS_XPATH_INTERNAL_ERROR = 151,
|
RS_FEED_ERRORSTATE_PROCESS_XPATH_INTERNAL_ERROR = 151,
|
||||||
|
|
|
@ -659,7 +659,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="74"/>
|
<location filename="../gui/FeedReaderStringDefs.cpp" line="74"/>
|
||||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="167"/>
|
<location filename="../gui/FeedReaderStringDefs.cpp" line="170"/>
|
||||||
<source>Unknown</source>
|
<source>Unknown</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -714,57 +714,62 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="124"/>
|
<location filename="../gui/FeedReaderStringDefs.cpp" line="123"/>
|
||||||
<source>Can't read html</source>
|
<source>Forum has no author</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="127"/>
|
<location filename="../gui/FeedReaderStringDefs.cpp" line="127"/>
|
||||||
<source>Internal XPath error</source>
|
<source>Can't read html</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="130"/>
|
<location filename="../gui/FeedReaderStringDefs.cpp" line="130"/>
|
||||||
<source>Wrong XPath expression</source>
|
<source>Internal XPath error</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="133"/>
|
<location filename="../gui/FeedReaderStringDefs.cpp" line="133"/>
|
||||||
<source>Empty XPath result</source>
|
<source>Wrong XPath expression</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="136"/>
|
<location filename="../gui/FeedReaderStringDefs.cpp" line="136"/>
|
||||||
<source>XSLT format error</source>
|
<source>Empty XPath result</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="139"/>
|
<location filename="../gui/FeedReaderStringDefs.cpp" line="139"/>
|
||||||
<source>XSLT transformation error</source>
|
<source>XSLT format error</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="142"/>
|
<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>
|
<source>Empty XSLT result</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="146"/>
|
<location filename="../gui/FeedReaderStringDefs.cpp" line="149"/>
|
||||||
<source>Unknown error</source>
|
<source>Unknown error</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="160"/>
|
<location filename="../gui/FeedReaderStringDefs.cpp" line="163"/>
|
||||||
<source>No transformation</source>
|
<source>No transformation</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="162"/>
|
<location filename="../gui/FeedReaderStringDefs.cpp" line="165"/>
|
||||||
<source>XPath</source>
|
<source>XPath</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../gui/FeedReaderStringDefs.cpp" line="164"/>
|
<location filename="../gui/FeedReaderStringDefs.cpp" line="167"/>
|
||||||
<source>XSLT</source>
|
<source>XSLT</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</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)) {
|
if (IS_GROUP_PUBLISHER(forumGroup.mMeta.mSubscribeFlags) && IS_GROUP_ADMIN(forumGroup.mMeta.mSubscribeFlags)) {
|
||||||
forumId = fi->forumId;
|
forumId = fi->forumId;
|
||||||
authorId = forumGroup.mMeta.mAuthorId;
|
authorId = forumGroup.mMeta.mAuthorId;
|
||||||
|
|
||||||
|
if (authorId.isNull()) {
|
||||||
|
errorState = RS_FEED_ERRORSTATE_PROCESS_FORUM_NO_AUTHOR;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
errorState = RS_FEED_ERRORSTATE_PROCESS_FORUM_NO_ADMIN;
|
errorState = RS_FEED_ERRORSTATE_PROCESS_FORUM_NO_ADMIN;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue