Skip to content

Commit

Permalink
use default expiration when expiration is not set via api. fixes #480
Browse files Browse the repository at this point in the history
  • Loading branch information
claudehohl committed Sep 28, 2018
1 parent d5ffd57 commit 83f52c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions htdocs/application/controllers/Api.php
Expand Up @@ -96,6 +96,11 @@ function create()
}
}

if (!$this->input->post('expire'))
{
$_POST['expire'] = config_item('default_expiration');
}

//create paste
$paste_url = $this->pastes->createPaste();
$data['msg'] = base_url() . $paste_url;
Expand Down

0 comments on commit 83f52c2

Please sign in to comment.