1058 $db->_die('The current page text could not be selected; as a result, creating the backup of the page failed. Please make a backup copy of the page by clicking Edit this page and then clicking Save Changes.'); |
1058 $db->_die('The current page text could not be selected; as a result, creating the backup of the page failed. Please make a backup copy of the page by clicking Edit this page and then clicking Save Changes.'); |
1059 $row = $db->fetchrow(); |
1059 $row = $db->fetchrow(); |
1060 $db->free_result(); |
1060 $db->free_result(); |
1061 $minor_edit = ( ENANO_DBLAYER == 'MYSQL' ) ? 'false' : '0'; |
1061 $minor_edit = ( ENANO_DBLAYER == 'MYSQL' ) ? 'false' : '0'; |
1062 $username = $db->escape($session->username); |
1062 $username = $db->escape($session->username); |
1063 $q = 'INSERT INTO ' . table_prefix . "logs ( log_type, action, time_id, date_string, page_id, namespace, page_text, char_tag, author, edit_summary, minor_edit ) VALUES\n" |
1063 $q = 'INSERT INTO ' . table_prefix . "logs ( log_type, action, time_id, date_string, page_id, namespace, page_text, char_tag, author, author_uid, edit_summary, minor_edit ) VALUES\n" |
1064 . " ('page', 'edit', " . time() . ", 'DEPRECATED', '$page_id', '$namespace', '" . $db->escape($row['page_text']) . "', '', '{$username}', '" . $lang->get('page_flushlogs_backup_summary') . "', $minor_edit);"; |
1064 . " ('page', 'edit', " . time() . ", 'DEPRECATED', '$page_id', '$namespace', '" . $db->escape($row['page_text']) . "', '', '{$username}', $session->user_id, '" . $lang->get('page_flushlogs_backup_summary') . "', $minor_edit);"; |
1065 if ( !$db->sql_query($q) ) |
1065 if ( !$db->sql_query($q) ) |
1066 $db->_die('The history (log) entry could not be inserted into the logs table.'); |
1066 $db->_die('The history (log) entry could not be inserted into the logs table.'); |
1067 } |
1067 } |
1068 |
1068 |
1069 return $lang->get('ajax_clearlogs_success'); |
1069 return $lang->get('ajax_clearlogs_success'); |
1272 $delvote_ips = $db->escape($delvote_ips); |
1272 $delvote_ips = $db->escape($delvote_ips); |
1273 $username = $db->escape($session->username); |
1273 $username = $db->escape($session->username); |
1274 |
1274 |
1275 // log action |
1275 // log action |
1276 $time = time(); |
1276 $time = time(); |
1277 $q = $db->sql_query('INSERT INTO ' . table_prefix . "logs (time_id, log_type, action, edit_summary, page_text, author, page_id, namespace) VALUES\n" |
1277 $q = $db->sql_query('INSERT INTO ' . table_prefix . "logs (time_id, log_type, action, edit_summary, page_text, author, author_uid, page_id, namespace) VALUES\n" |
1278 . " ( $time, 'page', 'votereset', '$delvotes', '$delvote_ips', '$username', '$page_id', '$namespace' )"); |
1278 . " ( $time, 'page', 'votereset', '$delvotes', '$delvote_ips', '$username', $session->user_id, '$page_id', '$namespace' )"); |
1279 if ( !$q ) |
1279 if ( !$q ) |
1280 $db->_die(); |
1280 $db->_die(); |
1281 |
1281 |
1282 // reset votes |
1282 // reset votes |
1283 $empty_vote_record = $db->escape(serialize(array('ip'=>array(),'u'=>array()))); |
1283 $empty_vote_record = $db->escape(serialize(array('ip'=>array(),'u'=>array()))); |