Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 18ac9009

Přidáno uživatelem Ondřej Fibich před asi 9 roky(ů)

Fix merge issue that removed all staff from developer branch :-).

Zobrazit rozdíly:

application/controllers/settings.php
'name' => 'sms_enabled',
'dependencies' => array()
),
'api' => array
(
'name' => 'api_enabled',
'dependencies' => array()
),
'snmp' => array
(
'name' => 'snmp_enabled',
......
->options(arr::bool())
->default(Settings::get('grid_hide_on_first_load'))
->help('grid_hide_on_first_load');
$upload_filesize = file::shortened_size_to_bytes(ini_get('upload_max_filesize'));
$post_size = file::shortened_size_to_bytes(ini_get('post_max_size'));
if ($upload_filesize > $post_size)
{
$upload_filesize = $post_size;
}
$this->form->input('upload_max_filesize')
->label('Max size of uploaded files')
->rules('valid_file_size')
->help('upload_max_filesize')
->value(network::speed($upload_filesize));
$form_modules = array();
......
->options(arr::bool())
->default(Settings::get('networks_enabled'));
// API
$form_modules['api'] = $this->form->radio('api_enabled')
->label('API')
->options(arr::bool())
->default(Settings::get('api_enabled'));
// SNMP
$form_modules['snmp'] = $this->form->radio('snmp_enabled')
->label('SNMP')
......
if ($htaccessFile)
{
$upload_max_filesize_changed = FALSE;
$post_max_size_changed = FALSE;
$max_filesize = $form_data['upload_max_filesize'];
if (network::str2bytes($max_filesize) < 1024*1024) // If less than 1M, set to 1M
{
$max_filesize = network::speed(1024*1024);
}
// do not save to DB, it's useless
unset($form_data['upload_max_filesize']);
foreach ($htaccessFile as $line_num => $line)
{
// find line with RewriteBase
......
'${1}/'.trim($form_data['suffix'], " /").'/', $line
);
}
else if (preg_match("/^php_value upload_max_filesize (.+)/", $line))
{
$htaccessFile[$line_num] = preg_replace(
"/^(php_value upload_max_filesize )(.+)/",
'${1}'.$max_filesize, $line
);
$upload_max_filesize_changed = TRUE;
}
else if (preg_match("/^php_value post_max_size (.+)/", $line))
{
$htaccessFile[$line_num] = preg_replace(
"/^(php_value post_max_size )(.+)/",
'${1}'.$max_filesize, $line
);
$post_max_size_changed = TRUE;
}
}
if (!$upload_max_filesize_changed)
{
$htaccessFile[] = "\nphp_value upload_max_filesize ".$max_filesize."\n";
}
if (!$post_max_size_changed)
{
$htaccessFile[] = "\nphp_value post_max_size ".$max_filesize."\n";
}
$handle = @fopen('.htaccess', 'w');
......
$this->form->checkbox('user_email_duplicities_enabled')
->label('Enable multiple users to have assigned same e-mail contact')
->checked(Settings::get('user_email_duplicities_enabled'));
$this->form->group('Members - date of born');
$this->form->checkbox('users_birthday_empty_enabled')
->label('Users birthday can be empty')
->checked(Settings::get('users_birthday_empty_enabled'));
$this->form->input('members_age_min_limit')
->label('Minimum age of main user')
->rules('valid_digit')
->class('increase_decrease_buttons')
->style('width:30px')
->value(Settings::get('members_age_min_limit'));
$this->form->group('Security');
$this->form->input('security_password_length')
->label('Minimal password length')
->rules('required|valid_numeric')
->rules('required|valid_digit')
->class('increase_decrease_buttons')
->style('width:30px')
->value(Settings::get('security_password_length'));
......
$this->form->input('membership_interrupt_minimum')
->label('Minimum membership interrupt period (months)')
->rules('valid_numeric')
->rules('valid_digit')
->class('increase_decrease_buttons')
->style('width:35px')
->value(Settings::get('membership_interrupt_minimum'));
$this->form->input('membership_interrupt_maximum')
->label('Maximum membership interrupt period (months)')
->rules('valid_numeric')
->rules('valid_digit')
->class('increase_decrease_buttons')
->style('width:35px')
->value(Settings::get('membership_interrupt_maximum'));
}
......
->label('Enable additional member fee during the approval of membership')
->checked(Settings::get('self_registration_enable_additional_payment'));
}
$this->form->group('Registration form');
$this->form->checkbox('self_registration_applicant_email_not_required')
->label('Applicant e-mail is not required')
->checked(Settings::get('self_registration_applicant_email_not_required'));
$this->form->html_textarea('registration_form_info')
->label('Info')
->rows(5)
->cols(100)
->value(Settings::get('registration_form_info'));
}
$this->form->group('Export of registration');
......
{
$additional_info = '';
$logo = Settings::get('registration_logo');
$document = Settings::get('registration_document');
if (file_exists($logo))
{
......
->new_name('registration_logo.jpg')
->help(help::hint('registration_logo'))
->additional_info($additional_info);
if (file_exists($document))
{
$additional_info = '<img src="'. url::base().'media/images/icons/activate.png" style="margin-left:10%;vertical-align:middle"/>';
}
else
{
$additional_info = '';
}
$this->form->upload('registration_document')
->label('Attached document')
->rules('allow[pdf]')
->new_name('registration_document.pdf')
->help(help::hint('registration_document'))
->additional_info($additional_info);
}
$this->form->html_textarea('registration_info')
......
foreach ($form_data as $name => $value)
{
$issaved = $issaved && Settings::set($name, $value);
if ((is_a($this->form->$name, "Form_Upload") && $value !== '') ||
!is_a($this->form->$name, "Form_Upload")
)
{
$issaved = $issaved && Settings::set($name, $value);
}
}
if ($issaved)
......
->style('width:50px')
->help('dhcp_server_reload_timeout');
$this->form->input('dns_server_reload_timeout')
->label('DNS server maximal timeout')
->rules('required|valid_numeric')
->class('increase_decrease_buttons')
->value(Settings::get('dns_server_reload_timeout'))
->style('width:50px')
->help('dns_server_reload_timeout');
if (Settings::get('connection_request_enable'))
{
$this->form->group('Connection requests');
......
foreach ($form_data as $name => $value)
{
$issaved = $issaved && Settings::set($name, $value);
if ((is_a($this->form->$name, "Form_Upload") && $value !== '') ||
!is_a($this->form->$name, "Form_Upload")
)
{
$issaved = $issaved && Settings::set($name, $value);
}
}
if ($issaved)
......
$this->form->checkbox('syslog_ng_mysql_api_enabled')
->value('1')
->label('Enable');
->label('Turn on');
if (Settings::get('syslog_ng_mysql_api_enabled') == 1)
$this->form->syslog_ng_mysql_api_enabled->checked('checked');
......
}
// parse interval to array of VoIP numbers
$numbers = explode(';', $value);
$numbers = explode(';', $input->value);
// check if count of numbers is smaller or longer than 2
// (123456789, 987654321; NOT 123456,654321,987654)

Také k dispozici: Unified diff