Crap, broke page editing. Fixed it.
authorDan
Sat, 12 Dec 2009 16:44:38 -0500
changeset 1162 daa091452877
parent 1161 9c0c519066ac
child 1163 1b90f6c41d9c
Crap, broke page editing. Fixed it.
ajax.php
--- a/ajax.php	Sat Dec 12 16:23:47 2009 -0500
+++ b/ajax.php	Sat Dec 12 16:44:38 2009 -0500
@@ -34,11 +34,8 @@
       
       $have_draft = false;
       // Kinda hacky fix for issue 7: draft restore not offered for nonexistent pages
-      if ( $src = $page->fetch_source() || !$page->exists() )
+      if ( ($src = $page->fetch_source()) || !$page->exists() )
       {
-        if ( !$page->exists() )
-          $src = '';
-        
         $allowed = true;
         $q = $db->sql_query('SELECT author, time_id, page_text, edit_summary, page_format FROM ' . table_prefix . 'logs WHERE log_type = \'page\' AND action = \'edit\'
                                AND page_id = \'' . $db->escape($paths->page_id) . '\'