Bug 135945 - Tags with spaces are exported as multible tags
Summary: Tags with spaces are exported as multible tags
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-WebService-Flickr (show other bugs)
Version: 5.6.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-19 08:28 UTC by Birkir A. Barkarson
Modified: 2018-03-23 12:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.1.0


Attachments
Patch (754 bytes, patch)
2007-05-24 15:18 UTC, Andrew Wilkinson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Birkir A. Barkarson 2006-10-19 08:28:38 UTC
Version:            (using KDE KDE 3.5.4)
Installed from:    Fedora RPMs
OS:                Linux

Tags with names such as "Person/John" and "Person/James Williams" would result in three flickr tags, John, James and Williams.  This is different from the expected tags (corresponding to the ones in digikam) of John and "James Williams".
Comment 1 Andrew Wilkinson 2007-05-24 15:18:48 UTC
Created attachment 20685 [details]
Patch

This patch applies cleanly to SVN head, and fixes this problem for me.
Comment 2 caulier.gilles 2007-05-24 15:31:00 UTC
Birkir,

Thanks for the patch. I have take a look, and it sound fine for me.

I will apply it to svn...

Gilles
Comment 3 caulier.gilles 2007-05-24 15:34:49 UTC
SVN commit 667926 by cgilles:

kipi-plugins from trunk : patch from Andrew Wilkinson to prevent multiple Tags creation with Flickr Export plugin when Tags strings include spaces. 
CCMAIL: ajw140@york.ac.uk
BUG: 135945



 M  +9 -1      flickrtalker.cpp  


--- trunk/extragear/libs/kipi-plugins/flickrexport/flickrtalker.cpp #667925:667926
@@ -300,7 +300,15 @@
 		form.addPair("is_friend",isfriend);
 		headers.append("is_friend="+ isfriend);
 
-		QString tags=info.tags.join(" ");
+		QStringList taglist;
+		for(QStringList::Iterator iter = info.tags.begin(); iter != info.tags.end(); iter++) {
+			if((*iter).find(' ') != -1) {
+				taglist.append('"' + *iter + '"');
+			} else {
+				taglist.append(*iter);
+				}
+		}
+		QString tags=taglist.join(" ");
 		if(tags.length()>0){	
 			form.addPair("tags",tags);
 			headers.append("tags="+ tags);