From: Sangpyo Kim Date: Wed, 29 Aug 2012 09:58:47 +0000 (+0900) Subject: [Title] comparing title length when get an availble folder name X-Git-Tag: 2.0_alpha~48^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d3c94f997b99207fe4176332e023729955f871a5;p=profile%2Fcommon%2Fapps%2Fweb%2Fbrowser.git [Title] comparing title length when get an availble folder name [Issue#] N_SE-8134 [Problem] wrong folder name is appeared when add a new folder if there is folder name edited as short than default length. [Cause] checking routine was not check the text length. [Solution] put a checking routine for title length [Team] Browser UI [Developer] sangpyo7.kim [Request] N/A Change-Id: I558cc5ee2c4cb5c7ff67147094c3c230436a913c --- diff --git a/src/database/browser-bookmark-db.cpp b/src/database/browser-bookmark-db.cpp index 3f1acbc3..59753859 100755 --- a/src/database/browser-bookmark-db.cpp +++ b/src/database/browser-bookmark-db.cpp @@ -659,7 +659,7 @@ Eina_Bool Browser_Bookmark_DB::get_untitled_folder_count(int *count) return EINA_FALSE; sqlite3_stmt *sqlite3_stmt = NULL; - std::string statement = "select title from bookmarks where type=1 and title like '%Folder_%' order by length(title), title"; + std::string statement = "select title from bookmarks where type=1 and length(title)>8 and title like '%Folder_%' order by length(title), title"; int error = sqlite3_prepare_v2(m_db_descriptor, statement.c_str(), -1, &sqlite3_stmt, NULL); if (error != SQLITE_OK) { BROWSER_LOGD("SQL error=%d", error); @@ -677,7 +677,7 @@ Eina_Bool Browser_Bookmark_DB::get_untitled_folder_count(int *count) error = sqlite3_step(sqlite3_stmt); if (error == SQLITE_ROW) { snprintf(buf, sizeof(buf)-1, "Folder_%02d", i); - title = buf; + title = buf; title_from_db = reinterpret_cast(sqlite3_column_text(sqlite3_stmt,0)); if (title_from_db != title) break;