From abd8624b08c85d3ae0ad46261b2c92e18934750e Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 9 Sep 2003 15:30:01 +0000 Subject: [PATCH] added script to urldecode discussion comments --- sync/unDecodeComments.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+), 0 deletions(-) create mode 100644 sync/unDecodeComments.php diff --git a/sync/unDecodeComments.php b/sync/unDecodeComments.php new file mode 100644 index 0000000..1537c62 --- /dev/null +++ b/sync/unDecodeComments.php @@ -0,0 +1,29 @@ +db; +$query = "select id, body from discussion_comments"; +$sql->query($query); +echo "
";
+while ($sql->next_record()) {
+	echo "found offending field=" . $sql->f("body") . "
"; + // update it + updateField($sql->f("id"), $sql->f("body")); +} +echo "
"; + +function updateField($id, $value) { + global $default; + $sql = $default->db; + $value = urldecode($value); + $query = "update discussion_comments set body='$value' where id=$id"; + if ($sql->query($query)) { + echo "successful "; + } else { + echo "unsuccessful "; + } + echo "update query=$query
"; +} +?> \ No newline at end of file -- libgit2 0.21.4