diff options
author | Claude <longneck@scratchbook.ch> | 2017-09-29 13:36:05 +0200 |
---|---|---|
committer | Claude <longneck@scratchbook.ch> | 2017-09-29 13:36:05 +0200 |
commit | 6bf8243634ef7855d266a35b07dfaa117ebbeead (patch) | |
tree | c9c788ae9deef16930fe09bae53095d8efb5a0c7 | |
parent | 09fb70092320fb88f90fb5511f43d79161fd4878 (diff) | |
download | stikked-fit-6bf8243634ef7855d266a35b07dfaa117ebbeead.tar.gz stikked-fit-6bf8243634ef7855d266a35b07dfaa117ebbeead.tar.bz2 stikked-fit-6bf8243634ef7855d266a35b07dfaa117ebbeead.zip |
unlink url for burn on reading, handle it in js
-rw-r--r-- | htdocs/application/models/Pastes.php | 4 | ||||
-rw-r--r-- | htdocs/themes/bootstrap/js/stikked.js | 2 | ||||
-rw-r--r-- | htdocs/themes/default/js/stikked.js | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/htdocs/application/models/Pastes.php b/htdocs/application/models/Pastes.php index 1b9e7fc..28bbf4d 100644 --- a/htdocs/application/models/Pastes.php +++ b/htdocs/application/models/Pastes.php @@ -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; } diff --git a/htdocs/themes/bootstrap/js/stikked.js b/htdocs/themes/bootstrap/js/stikked.js index edec093..b89e601 100644 --- a/htdocs/themes/bootstrap/js/stikked.js +++ b/htdocs/themes/bootstrap/js/stikked.js @@ -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; } diff --git a/htdocs/themes/default/js/stikked.js b/htdocs/themes/default/js/stikked.js index 00a2434..eda19d8 100644 --- a/htdocs/themes/default/js/stikked.js +++ b/htdocs/themes/default/js/stikked.js @@ -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; } |