summaryrefslogtreecommitdiff
path: root/lib/notes/source.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/notes/source.php')
-rw-r--r--lib/notes/source.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/notes/source.php b/lib/notes/source.php
index d032d33..091ab8c 100644
--- a/lib/notes/source.php
+++ b/lib/notes/source.php
@@ -3,7 +3,7 @@
assert_redir(count($args) == 3, 'notes');
$noteid = intval($args[2]);
-$note = mysql_fetch_assoc(sql("SELECT id, title, text, public, owner FROM notes WHERE id = $noteid"));
+$note = sql("SELECT id, title, text, public, owner FROM notes WHERE id = $noteid")->fetch();
assert_error($note && ($note['public'] != 0 || $note['owner'] == $user['id']),
"This note does not exist, or you are not allowed to see it.");
@@ -15,8 +15,8 @@ assert_error($note && ($note['public'] != 0 || $note['owner'] == $user['id']),
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
-<pre><? echo htmlspecialchars($note['text']); ?></pre>
+<pre><?php echo htmlspecialchars($note['text']); ?></pre>
</body>
</html>
-<?
+<?php
die();