fixed a bug

don't include author name if it's empty, otherwise stikked has some problems rendering it
This commit is contained in:
Petr Bena 2014-05-25 16:16:18 +02:00
parent 53dc1e75fc
commit 0583ceb282
2 changed files with 6 additions and 3 deletions

View File

@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT(stikkit, 1.0.0, benapetr@gmail.com)
AC_INIT(stikkit, 1.0.1, benapetr@gmail.com)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([configuration.cpp])

View File

@ -89,8 +89,11 @@ int main(int argc, char *argv[])
readBuffer.clear();
string post = "text=";
post += curl_easy_escape(curl, Stikkit::Configuration::Source.c_str(), Stikkit::Configuration::Source.length());
post += "&name=";
post += curl_easy_escape(curl, Stikkit::Configuration::Author.c_str(), Stikkit::Configuration::Author.length());
if (Stikkit::Configuration::Author.length() > 0)
{
post += "&name=";
post += curl_easy_escape(curl, Stikkit::Configuration::Author.c_str(), Stikkit::Configuration::Author.length());
}
if (Stikkit::Configuration::Title.length() > 0)
{
post += "&title=";