Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

Commit

Permalink
fixing regressions from cherrypicking
Browse files Browse the repository at this point in the history
  • Loading branch information
elrido committed Aug 15, 2015
1 parent 5f87ea6 commit e646729
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion cfg/conf.ini
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ never = 0
1year = "1 year"
never = "Never"


[traffic]
; time limit between calls from the same IP address in seconds
; Set this to 0 to disable rate limiting.
Expand Down
4 changes: 2 additions & 2 deletions js/zerobin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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#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.

setElementText($('div#cleartext'), $('textarea#message').val());
Expand Down Expand Up @@ -409,7 +409,7 @@ function stateExistingPaste() {
else {
$('button#clonebutton').removeClass('hidden');
}
$('button#rawtextbutton').show();
$('button#rawtextbutton').removeClass('hidden');

$('div#expiration').addClass('hidden');
$('div#burnafterreadingoption').addClass('hidden');
Expand Down
3 changes: 2 additions & 1 deletion lib/zerobin.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ private function _delete($dataid, $deletetoken)
private function _read($dataid)
{
// 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.
if ($this->_model()->exists($dataid))
Expand Down Expand Up @@ -452,6 +452,7 @@ private function _view()
$key;
}

RainTPL::$path_replace = false;
$page = new RainTPL;
// we escape it here because ENT_NOQUOTES can't be used in RainTPL templates
$page->assign('CIPHERDATA', htmlspecialchars($this->_data, ENT_NOQUOTES));
Expand Down
5 changes: 2 additions & 3 deletions tpl/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,16 @@ <h3>{$VERSION}</h3>
</select>
</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} />
<label for="burnafterreading">Burn after reading</label>
</div>
<input id="password" value="Optional password..." class="hidden" />
<div id="opendisc" class="button hidden">
<input type="checkbox" id="opendiscussion" name="opendiscussion" {if="!$OPENDISCUSSION"} disabled="disabled"{/if} />
<label for="opendiscussion">Open discussion</label>
</div>
</div>
<div id="pasteresult" style="display:none;">
<div id="pasteresult" class="hidden">
<div id="deletelink"></div>
<div id="pastelink"></div>
</div>
Expand Down

0 comments on commit e646729

Please sign in to comment.