mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 12:31:06 -05:00
possibility to set default expiration time
This commit is contained in:
parent
5a6415de48
commit
b1affc5932
@ -79,6 +79,21 @@ $config['blocked_words'] = '';
|
||||
$config['spamadmin_user'] = '';
|
||||
$config['spamadmin_pass'] = '';
|
||||
|
||||
/**
|
||||
* Default paste expiration time (minutes)
|
||||
*
|
||||
* Possible values:
|
||||
* 0 (keep forever)
|
||||
* 30 (30 minutes)
|
||||
* 60 (1 hour)
|
||||
* 360 (6 hours)
|
||||
* 720 (12 hours)
|
||||
* 1440 (1 day)
|
||||
* 10080 (1 week)
|
||||
* 40320 (4 weeks)
|
||||
**/
|
||||
$config['default_expiration'] = 0;
|
||||
|
||||
/**
|
||||
* Default language
|
||||
*
|
||||
|
@ -267,6 +267,12 @@ class Main extends CI_Controller
|
||||
if (!$this->input->post('submit'))
|
||||
{
|
||||
|
||||
if (!$this->db_session->userdata('expire'))
|
||||
{
|
||||
$default_expiration = $this->config->item('default_expiration');
|
||||
$this->db_session->set_userdata('expire', $default_expiration);
|
||||
}
|
||||
|
||||
if ($this->db_session->flashdata('settings_changed'))
|
||||
{
|
||||
$data['status_message'] = 'Settings successfully changed';
|
||||
|
Loading…
x
Reference in New Issue
Block a user