diff options
Diffstat (limited to 'tpl/notes')
-rw-r--r-- | tpl/notes/inc_relativestree.php | 6 | ||||
-rw-r--r-- | tpl/notes/view.php | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tpl/notes/inc_relativestree.php b/tpl/notes/inc_relativestree.php index fd47ab4..295e552 100644 --- a/tpl/notes/inc_relativestree.php +++ b/tpl/notes/inc_relativestree.php @@ -4,10 +4,10 @@ $notes_tree = array(); $notes_parents = array(); $n = sql("SELECT id, parent, title FROM notes ". - "WHERE owner = " . $note['owner'] . + "WHERE owner = ?" . ($note['owner'] == $user['id'] ? " " : " AND public != 0 ") . - "ORDER BY title ASC"); -while ($nn = mysql_fetch_assoc($n)) { + "ORDER BY title ASC", $note['owner']); +while ($nn = $n->fetch()) { $notes_parents[$nn['id']] = $nn['parent']; if (isset($notes_tree[$nn['parent']])) { $notes_tree[$nn['parent']][] = $nn; diff --git a/tpl/notes/view.php b/tpl/notes/view.php index 7615fe3..559c39e 100644 --- a/tpl/notes/view.php +++ b/tpl/notes/view.php @@ -10,7 +10,7 @@ if ($can_edit) $t[] = '<a href="edit-notes-' . $note['id'] . '">modifier</a>'; $t[] = '<a href="source-notes-' . $note['id'] . '">code source</a>'; if ($can_move) $t[] = '<a href="move-notes-' . $note['id'] . '">déplacer</a>'; if ($can_delete) $t[] = '<a href="delete-notes-' . $note['id'] . '">supprimer</a>'; -echo '<div class="small_right">' . implode(' | ', $t) . '</div>'; +echo '<div class="small_align_right">' . implode(' | ', $t) . '</div>'; echo $note['html']; require("tpl/notes/inc_relativestree.php"); |