ajax.php
changeset 472 bc4b58034f4d
parent 468 194a19711346
child 481 07bf15b066bc
equal deleted inserted replaced
471:7906fb190fc1 472:bc4b58034f4d
   359           }
   359           }
   360         }
   360         }
   361       }
   361       }
   362       
   362       
   363       // If this is based on a draft version, delete the draft - we no longer need it.
   363       // If this is based on a draft version, delete the draft - we no longer need it.
   364       if ( @$request['used_draft'] )
   364       if ( @$request['used_draft'] && !$request['draft'] )
   365       {
   365       {
   366         $q = $db->sql_query('DELETE FROM ' . table_prefix . 'logs WHERE log_type = \'page\' AND action = \'edit\'
   366         $q = $db->sql_query('DELETE FROM ' . table_prefix . 'logs WHERE log_type = \'page\' AND action = \'edit\'
   367                                AND page_id = \'' . $db->escape($paths->page_id) . '\'
   367                                AND page_id = \'' . $db->escape($paths->page_id) . '\'
   368                                AND namespace = \'' . $db->escape($paths->namespace) . '\'
   368                                AND namespace = \'' . $db->escape($paths->namespace) . '\'
   369                                AND is_draft = 1;');
   369                                AND is_draft = 1;');