diff --git a/edit-page.php b/edit-page.php
index d1c9bf9..0653133 100644
--- a/edit-page.php
+++ b/edit-page.php
@@ -59,8 +59,6 @@ if( $_POST ) {
adminhead('Edit Page');
adminmenu('manage-pages.php');
-
-
?>
@@ -80,7 +78,7 @@ tinyMCE.init({
theme_advanced_blockformats : "p,h3,h4,h5,h6",
theme_advanced_resizing : true,
theme_advanced_styles : "Spoiler=spoiler"
-
+
});
diff --git a/edit-rant.php b/edit-rant.php
index 68289a7..f262891 100644
--- a/edit-rant.php
+++ b/edit-rant.php
@@ -118,7 +118,7 @@ if( $_POST ) {
foreach($_POST['delete_attachment'] as $attachment)
deleteattachment($attachment);
- $existing_attachments = $mtdb->getAll('SELECT ra.id AS id, extension FROM rant_attachment ra JOIN media_t ON ra.media = media_t.id WHERE ra.rant = '.$rant->id.' ORDER BY id');
+ $existing_attachments = $dbConnection->fetchAll('SELECT ra.id AS id, extension FROM rant_attachment ra JOIN media_t ON ra.media = media_t.id WHERE ra.rant = ? ORDER BY id', array($rant->id));
for($i = 0; $i < count($existing_attachments); $i++) {
$rant->body = preg_replace('/(href|src)=\"([^\"]*?)\\{'.($i+1).'\\}(.*?)\"/', '\1="'.get_rantattachment_filename($existing_attachments[$i]->id).'"', $rant->body);
}
@@ -218,7 +218,7 @@ tinyMCE.init({