tanghus / journal

Journal/Notes app for ownCloud
GNU Affero General Public License v3.0
15 stars 6 forks source link

SQL error with PostgreSQL #29

Open sciurius opened 10 years ago

sciurius commented 10 years ago

When OC is run with PostgreSQL ad database, journal yields a fatal error. The cause of the error is line 38 in lib/vjournal.php. The string "VJOURNAL" should be 'VJOURNAL' (single quotes).

Fix is trivial: change line 38 $stmt = \OCP\DB::prepare('SELECT * FROM _PREFIX_clndr_objects WHERE calendarid = ? AND objecttype = "VJOURNAL"');

to $stmt = \OCP\DB::prepare('SELECT * FROM _PREFIX_clndr_objects WHERE calendarid = ? AND objecttype = \'VJOURNAL\'');

nialldaley commented 10 years ago

I can confirm the error and the fix for postgres.