Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 74a7dbca

Přidáno uživatelem Michal Kliment před více než 9 roky(ů)

Merge from SVN branch 1.2.

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;
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}'.$form_data['upload_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}'.$form_data['upload_max_filesize'], $line
);
$post_max_size_changed = TRUE;
}
}
if (!$upload_max_filesize_changed)
{
$htaccessFile[] = "\nphp_value upload_max_filesize ".$form_data['upload_max_filesize']."\n";
}
if (!$post_max_size_changed)
{
$htaccessFile[] = "\nphp_value post_max_size ".$form_data['upload_max_filesize']."\n";
}
$handle = @fopen('.htaccess', 'w');
......
->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