Skip to content
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.

Commit

Permalink
Fix #19
Browse files Browse the repository at this point in the history
  • Loading branch information
kimbtech committed Sep 1, 2020
1 parent 1a63270 commit 0330316
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
latest
1
1.1
1.1.7
1.1.8
5 changes: 4 additions & 1 deletion system/php/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,15 @@
}
}

$is_encrypted = substr($newNote->getValue(['content']), 0, 6) === '"{\"iv';

//neue Notiz dem User zuordnen
// ganz oben
$activeNotesList->setValue( [null], array(
'name' => $newNote->getValue(['name']),
'noteid' => $noteid,
'position' => $pos + 1
'position' => $pos + 1,
'enc' => $is_encrypted
));
}
else{
Expand Down
2 changes: 1 addition & 1 deletion system/php/systemInit.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ abstract class SystemInit{

//Sytemversion
// [ Hauptversionsnummer, Unternummer, Patch, Zusatz (Alpha, Beta, Final) ] => [1, 23, 5, 'B'] -> 1.23.5 Beta
const SYSTEMVERSION = [ 1, 1, 7, 'Final' ];
const SYSTEMVERSION = [ 1, 1, 8, 'Final' ];

/*
Auslesen der Konfiguration
Expand Down
5 changes: 4 additions & 1 deletion system/php/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,16 @@
//aktuelle Notiz
$now = $note->getValue(['content']);

$is_encrypted = substr($now, 0, 6) === '"{\"iv';

//Diffs in Array
$difflist = array();
$diffLimit = count($allHistory) - 15;
//erstellen
foreach( $allHistory as $key => $hist ){

$difflist[] = array(
'diff' => KIMBNotesGenerateDiff( $now, $hist[0] ),
'diff' => $is_encrypted ? 'Kein Diff. bei verschlüsselten Notizen!' : ( $key < $diffLimit ? 'Kein Diff. für alte Versionen!' : KIMBNotesGenerateDiff( $now, $hist[0] ) ),
'time' => $hist[1],
'text' => $hist[0]
);
Expand Down

0 comments on commit 0330316

Please sign in to comment.