git.cweiske.de
/
grauphel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Get rid of deprecated API usage:
[grauphel.git]
/
controller
/
apicontroller.php
diff --git
a/controller/apicontroller.php
b/controller/apicontroller.php
index 90c036f39ae8c2a4091ecd0cc98dd4076f131575..23a47e796abc0fff201ccde79bb046561137edd0 100644
(file)
--- a/
controller/apicontroller.php
+++ b/
controller/apicontroller.php
@@
-287,7
+287,8
@@
class ApiController extends Controller
}
//update
}
//update
- \OC_DB::beginTransaction();
+ $db = \OC::$server->getDatabaseConnection();
+ $db->beginTransaction();
try {
++$syncdata->latestSyncRevision;
foreach ($arPut['note-changes'] as $noteUpdate) {
try {
++$syncdata->latestSyncRevision;
foreach ($arPut['note-changes'] as $noteUpdate) {
@@
-306,9
+307,9
@@
class ApiController extends Controller
}
$this->notes->saveSyncData($syncdata);
}
$this->notes->saveSyncData($syncdata);
-
\OC_DB::
commit();
+
$db->
commit();
} catch (\DatabaseException $e) {
} catch (\DatabaseException $e) {
-
\OC_DB::getConnection()
->rollBack();
+
$db
->rollBack();
throw $e;
}
}
throw $e;
}
}