fixing regressions from cherrypicking

This commit is contained in:
El RIDO 2015-08-15 21:39:08 +02:00
parent 5f87ea6843
commit e646729b2d
4 changed files with 6 additions and 7 deletions

View file

@ -53,7 +53,6 @@ never = 0
1year = "1 year" 1year = "1 year"
never = "Never" never = "Never"
[traffic] [traffic]
; time limit between calls from the same IP address in seconds ; time limit between calls from the same IP address in seconds
; Set this to 0 to disable rate limiting. ; Set this to 0 to disable rate limiting.

View file

@ -335,7 +335,7 @@ function send_data() {
$('div#pastelink').html('Your paste is <a id="pasteurl" href="' + url + '">' + url + '</a> <span id="copyhint">(Hit CTRL+C to copy)</span>'); $('div#pastelink').html('Your paste is <a id="pasteurl" href="' + url + '">' + url + '</a> <span id="copyhint">(Hit CTRL+C to copy)</span>');
$('div#deletelink').html('<a href="' + deleteUrl + '">Delete link</a>'); $('div#deletelink').html('<a href="' + deleteUrl + '">Delete link</a>');
$('div#pasteresult').show(); $('div#pasteresult').removeClass('hidden');
selectText('pasteurl'); // We pre-select the link so that the user only has to CTRL+C the link. selectText('pasteurl'); // We pre-select the link so that the user only has to CTRL+C the link.
setElementText($('div#cleartext'), $('textarea#message').val()); setElementText($('div#cleartext'), $('textarea#message').val());
@ -409,7 +409,7 @@ function stateExistingPaste() {
else { else {
$('button#clonebutton').removeClass('hidden'); $('button#clonebutton').removeClass('hidden');
} }
$('button#rawtextbutton').show(); $('button#rawtextbutton').removeClass('hidden');
$('div#expiration').addClass('hidden'); $('div#expiration').addClass('hidden');
$('div#burnafterreadingoption').addClass('hidden'); $('div#burnafterreadingoption').addClass('hidden');

View file

@ -372,7 +372,7 @@ class zerobin
private function _read($dataid) private function _read($dataid)
{ {
// Is this a valid paste identifier? // Is this a valid paste identifier?
if (preg_match('\A[a-f\d]{16}\z', $dataid)) if (preg_match('#\A[a-f\d]{16}\z#', $dataid))
{ {
// Check that paste exists. // Check that paste exists.
if ($this->_model()->exists($dataid)) if ($this->_model()->exists($dataid))
@ -452,6 +452,7 @@ class zerobin
$key; $key;
} }
RainTPL::$path_replace = false;
$page = new RainTPL; $page = new RainTPL;
// we escape it here because ENT_NOQUOTES can't be used in RainTPL templates // we escape it here because ENT_NOQUOTES can't be used in RainTPL templates
$page->assign('CIPHERDATA', htmlspecialchars($this->_data, ENT_NOQUOTES)); $page->assign('CIPHERDATA', htmlspecialchars($this->_data, ENT_NOQUOTES));

View file

@ -57,17 +57,16 @@
</select> </select>
</div> </div>
<div id="remainingtime" class="hidden"></div> <div id="remainingtime" class="hidden"></div>
<div id="burnafterreadingoption" class="button" style="display:none;"> <div id="burnafterreadingoption" class="button hidden">
<input type="checkbox" id="burnafterreading" name="burnafterreading" {if="$BURNAFTERREADINGSELECTED"} checked="checked"{/if} /> <input type="checkbox" id="burnafterreading" name="burnafterreading" {if="$BURNAFTERREADINGSELECTED"} checked="checked"{/if} />
<label for="burnafterreading">Burn after reading</label> <label for="burnafterreading">Burn after reading</label>
</div> </div>
<input id="password" value="Optional password..." class="hidden" />
<div id="opendisc" class="button hidden"> <div id="opendisc" class="button hidden">
<input type="checkbox" id="opendiscussion" name="opendiscussion" {if="!$OPENDISCUSSION"} disabled="disabled"{/if} /> <input type="checkbox" id="opendiscussion" name="opendiscussion" {if="!$OPENDISCUSSION"} disabled="disabled"{/if} />
<label for="opendiscussion">Open discussion</label> <label for="opendiscussion">Open discussion</label>
</div> </div>
</div> </div>
<div id="pasteresult" style="display:none;"> <div id="pasteresult" class="hidden">
<div id="deletelink"></div> <div id="deletelink"></div>
<div id="pastelink"></div> <div id="pastelink"></div>
</div> </div>