Merge pull request #5 from erwanlr/master

Few fixes :)
This commit is contained in:
Sébastien SAUVAGE 2012-04-23 13:05:09 -07:00
commit 566dd1d05f
2 changed files with 60 additions and 60 deletions

View file

@ -286,7 +286,7 @@ if (!empty($_SERVER['QUERY_STRING'])) // Display an existing paste.
if ($ERRORMESSAGE=='') // If no error, return the paste. if ($ERRORMESSAGE=='') // If no error, return the paste.
{ {
// We kindly provide the remaining time before expiration (in seconds) // We kindly provide the remaining time before expiration (in seconds)
if ($paste->meta->expire_date) $paste->meta->remaining_time = $paste->meta->expire_date - time(); if (property_exists($paste->meta, 'expire_date')) $paste->meta->remaining_time = $paste->meta->expire_date - time();
$messages = array($paste); // The paste itself is the first in the list of encrypted messages. $messages = array($paste); // The paste itself is the first in the list of encrypted messages.
// If it's a discussion, get all comments. // If it's a discussion, get all comments.

View file

@ -257,7 +257,7 @@ function send_data() {
showStatus(''); showStatus('');
$('div#pastelink').html('Your paste is <a href="' + url + '">' + url + '</a>'); $('div#pastelink').html('Your paste is <a href="' + url + '">' + url + '</a>');
$('div#pastelink') $('div#pastelink')
.append('&nbsp;&nbsp;<button id="shortenbutton" onclick="document.location=\'' + shortenUrl(url) + '\'"><img src="lib/icon_shorten.png" width="13" height="15" />Shorten URL</button>') .append('&nbsp;&nbsp;<button id="shortenbutton" onclick="document.location=\'' + shortenUrl(url) + '\'"><img src="img/icon_shorten.png" width="13" height="15" />Shorten URL</button>')
.show(); .show();
setElementText($('div#cleartext'), $('textarea#message').val()); setElementText($('div#cleartext'), $('textarea#message').val());
urls2links($('div#cleartext')); urls2links($('div#cleartext'));