Merge lp:~joehillen/do-plugins/Firefox-bugfix-489648 into lp:do-plugins

Proposed by JoE
Status: Needs review
Proposed branch: lp:~joehillen/do-plugins/Firefox-bugfix-489648
Merge into: lp:do-plugins
Diff against target: 43 lines (+8/-8)
1 file modified
Firefox/src/PlacesItemSource.cs (+8/-8)
To merge this branch: bzr merge lp:~joehillen/do-plugins/Firefox-bugfix-489648
Reviewer Review Type Date Requested Status
Do Plugins Team Pending
Review via email: mp+15352@code.launchpad.net
To post a comment you must log in.
Revision history for this message
JoE (joehillen) wrote :

This is a bugfix for Bug #489648

Unmerged revisions

675. By JoE

Fix for type error from queries.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Firefox/src/PlacesItemSource.cs'
2--- Firefox/src/PlacesItemSource.cs 2009-09-05 02:06:59 +0000
3+++ Firefox/src/PlacesItemSource.cs 2009-11-28 18:25:20 +0000
4@@ -239,9 +239,9 @@
5 using (IDataReader reader = dbcmd.ExecuteReader ())
6 {
7 while (reader.Read ()) {
8- string title = reader.GetString (0);
9- int id = reader.GetInt32 (1);
10- int parent = reader.GetInt32 (2);
11+ string title = (string)reader.GetValue (0);
12+ int id = (int)reader.GetValue (1);
13+ int parent = (int)reader.GetValue (2);
14
15 /* Firefox's parent system uses the field with ID 1 as a
16 * parent for all other directories. It doesn't have a name,
17@@ -283,15 +283,15 @@
18
19 using (IDataReader reader = dbcmd.ExecuteReader ()) {
20 while (reader.Read () ) {
21- string title = reader.GetString (0);
22- string url = reader.GetString (1);
23+ string title = (string)reader.GetValue (0);
24+ string url = (string)reader.GetValue (1);
25
26 // Firefox stores some interesting non-url places. Ignore them.
27 if (url [0] != 'p') {
28 // If the place is a bookmark, use the title stored in Bookmarks.
29 if (!reader.IsDBNull (2)) {
30- int parent = reader.GetInt32 (2);
31- string bookmarkTitle = reader.GetString (3);
32+ int parent = (int)reader.GetValue (2);
33+ string bookmarkTitle = (string)reader.GetValue (3);
34
35 yield return new PlaceItem (bookmarkTitle, url, parent);
36 } else if (string.IsNullOrEmpty (title)) {
37@@ -309,4 +309,4 @@
38 }
39 }
40 }
41-}
42\ No newline at end of file
43+}

Subscribers

People subscribed via source and target branches