unlink url for burn on reading, handle it in js

This commit is contained in:
Claude 2017-09-29 13:36:05 +02:00
parent 09fb700923
commit 6bf8243634
3 changed files with 6 additions and 2 deletions

View File

@ -141,10 +141,10 @@ class Pastes extends CI_Model
if ($burn)
{
echo 'copy this URL, it will become invalid on visit: <a href="' . site_url('view/' . $data['pid']) . '">' . site_url('view/' . $data['pid']) . '</a>';
echo 'copy this URL, it will become invalid on visit: ' . site_url('view/' . $data['pid']);
if ($data['snipurl'] !== false)
{
echo '<br>Shorturl: <a href="' . $shorturl . '">' . $shorturl . '</a><br>';
echo '<br>Shorturl: ' . $shorturl . '">' . $shorturl . '<br>';
}
exit;
}

View File

@ -151,6 +151,8 @@ ST.crypto = function() {
if (redirect_url.indexOf('E_CAPTCHA') > -1) {
$('.container .message').remove();
$('.container:eq(1)').prepend('<div class="message error"><div class="container">The captcha is incorrect.</div></div>');
} else if (redirect_url.indexOf('invalid') > -1) {
$('#create_encrypted').parent().html('<p>' + redirect_url + '#' + key + '</p>');
} else {
window.location.href = base_url + redirect_url + '#' + key;
}

View File

@ -180,6 +180,8 @@ ST.crypto = function() {
if (redirect_url.indexOf('E_CAPTCHA') > -1) {
$('.content .container .message').remove();
$('.content .container').prepend('<div class="message error"><div class="container">The captcha is incorrect.</div></div>');
} else if (redirect_url.indexOf('invalid') > -1) {
$('#create_encrypted').parent().html('<p>' + redirect_url + '#' + key + '</p>');
} else {
window.location.href = base_url + redirect_url + '#' + key;
}