git.cweiske.de
/
grauphel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
show some statistics on the index page
[grauphel.git]
/
lib
/
notestorage.php
diff --git
a/lib/notestorage.php
b/lib/notestorage.php
index 121f5cb201a6c3335cab56fc015a89718463a113..63e1516f896c9a72af8d096adb06b66986c9895d 100644
(file)
--- a/
lib/notestorage.php
+++ b/
lib/notestorage.php
@@
-262,8
+262,8
@@
class NoteStorage
\OC_DB::executeAudited(
'DELETE FROM `*PREFIX*grauphel_notes`'
. ' WHERE `note_user` = ? AND `note_guid` = ?',
\OC_DB::executeAudited(
'DELETE FROM `*PREFIX*grauphel_notes`'
. ' WHERE `note_user` = ? AND `note_guid` = ?',
-
array($username, $guid)
-
);
+ array($username, $guid)
+ );
}
/**
}
/**
@@
-277,15
+277,15
@@
class NoteStorage
*/
public function loadNotesOverview($username, $since = null)
{
*/
public function loadNotesOverview($username, $since = null)
{
-
$result = \OC_DB::executeAudited(
+ $result = \OC_DB::executeAudited(
'SELECT `note_guid`, `note_title`, `note_last_sync_revision`'
. ' FROM `*PREFIX*grauphel_notes`'
. ' WHERE note_user = ?',
'SELECT `note_guid`, `note_title`, `note_last_sync_revision`'
. ' FROM `*PREFIX*grauphel_notes`'
. ' WHERE note_user = ?',
-
array($username)
-
);
+ array($username)
+ );
-
$notes = array();
-
while ($row = $result->fetchRow()) {
+ $notes = array();
+ while ($row = $result->fetchRow()) {
if ($since !== null && $row['note_last_sync_revision'] <= $since) {
continue;
}
if ($since !== null && $row['note_last_sync_revision'] <= $since) {
continue;
}
@@
-305,7
+305,7
@@
class NoteStorage
),
'title' => $row['note_title'],
);
),
'title' => $row['note_title'],
);
-
}
+ }
return $notes;
}
return $notes;
}
@@
-321,19
+321,19
@@
class NoteStorage
*/
public function loadNotesFull($username, $since = null)
{
*/
public function loadNotesFull($username, $since = null)
{
-
$result = \OC_DB::executeAudited(
+ $result = \OC_DB::executeAudited(
'SELECT * FROM `*PREFIX*grauphel_notes`'
. ' WHERE note_user = ?',
'SELECT * FROM `*PREFIX*grauphel_notes`'
. ' WHERE note_user = ?',
-
array($username)
-
);
+ array($username)
+ );
-
$notes = array();
-
while ($row = $result->fetchRow()) {
+ $notes = array();
+ while ($row = $result->fetchRow()) {
if ($since !== null && $row['note_last_sync_revision'] <= $since) {
continue;
}
$notes[] = $this->noteFromRow($row);
if ($since !== null && $row['note_last_sync_revision'] <= $since) {
continue;
}
$notes[] = $this->noteFromRow($row);
-
}
+ }
return $notes;
}
return $notes;
}
@@
-351,11
+351,11
@@
class NoteStorage
'note-content' => $row['note_content'],
'note-content-version' => $row['note_content_version'],
'note-content' => $row['note_content'],
'note-content-version' => $row['note_content_version'],
- 'open-on-startup' => $row['note_open_on_startup'],
- 'pinned' => $row['note_pinned'],
+ 'open-on-startup' =>
(bool)
$row['note_open_on_startup'],
+ 'pinned' =>
(bool)
$row['note_pinned'],
'tags' => json_decode($row['note_tags']),
'tags' => json_decode($row['note_tags']),
- 'last-sync-revision' => $row['note_last_sync_revision'],
+ 'last-sync-revision' =>
(int)
$row['note_last_sync_revision'],
);
}
);
}