X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/5bb706e8ac0a729989c52641558dcb2314929ab9..a99f74bd9e09ed9acc74b0fe276ed030b91fc85d:/src/com/owncloud/android/db/DbHandler.java diff --git a/src/com/owncloud/android/db/DbHandler.java b/src/com/owncloud/android/db/DbHandler.java index ecc40980..bd0fcd17 100644 --- a/src/com/owncloud/android/db/DbHandler.java +++ b/src/com/owncloud/android/db/DbHandler.java @@ -3,7 +3,7 @@ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or + * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -31,14 +31,14 @@ import android.database.sqlite.SQLiteOpenHelper; */ public class DbHandler { private SQLiteDatabase mDB; - private OpenerHepler mHelper; + private OpenerHelper mHelper; private final String mDatabaseName = "ownCloud"; private final int mDatabaseVersion = 1; private final String TABLE_INSTANT_UPLOAD = "instant_upload"; public DbHandler(Context context) { - mHelper = new OpenerHepler(context); + mHelper = new OpenerHelper(context); mDB = mHelper.getWritableDatabase(); } @@ -69,20 +69,20 @@ public class DbHandler { */ public boolean removeIUPendingFile(String localPath, String accountName) { return mDB.delete(TABLE_INSTANT_UPLOAD, - "path = ? and account = ?", - new String[]{ localPath, accountName }) != 0; + "path = ?", + new String[]{ localPath }) != 0; } - private class OpenerHepler extends SQLiteOpenHelper { - public OpenerHepler(Context context) { + private class OpenerHelper extends SQLiteOpenHelper { + public OpenerHelper(Context context) { super(context, mDatabaseName, null, mDatabaseVersion); } @Override public void onCreate(SQLiteDatabase db) { db.execSQL("CREATE TABLE " + TABLE_INSTANT_UPLOAD + " (" - + " _id INTEGET PRIMARY KEY, " + + " _id INTEGER PRIMARY KEY, " + " path TEXT," + " account TEXT);"); }