summaryrefslogtreecommitdiff
path: root/lib/notes/source.php
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2017-01-18 19:12:01 +0100
committerAlex Auvolat <alex@adnab.me>2017-01-18 19:12:01 +0100
commitcb727d392892ba2b6199a918f320dc6423d74d4c (patch)
tree8f451bfa89c1d85c404e2f16be37705c89eb2fb6 /lib/notes/source.php
parent77048675abf5fad43e8b5371c35e1c86b3be59c2 (diff)
downloadBits-cb727d392892ba2b6199a918f320dc6423d74d4c.tar.gz
Bits-cb727d392892ba2b6199a918f320dc6423d74d4c.zip
Start update to PDO instead of old mysql_ functions
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();