Fix to simplify linkage to PHP.net

This commit is contained in:
iliajie
2023-07-16 13:13:08 +03:00
parent deb172ca82
commit fb0b6b4044
3 changed files with 9 additions and 13 deletions

View File

@@ -13,13 +13,13 @@ print &ui_hidden("file", $in{'file'}),"\n";
print &ui_table_start($text{'errors_header'}, "width=100%", 4);
# Show and log errors
print &ui_table_row($text{'errors_display'},
print &ui_table_row(&opt_help($text{'errors_display'}, 'display_errors'),
&onoff_radio("display_errors"));
print &ui_table_row($text{'errors_log'},
print &ui_table_row(&opt_help($text{'errors_log'}, 'log_errors'),
&onoff_radio("log_errors"));
# Ignore repeated
print &ui_table_row($text{'errors_ignore'},
print &ui_table_row(&opt_help($text{'errors_ignore'}, 'ignore_repeated_errors'),
&onoff_radio("ignore_repeated_errors"));
print &ui_table_row($text{'errors_source'},
&onoff_radio("ignore_repeated_source"));

View File

@@ -31,19 +31,19 @@ print &ui_table_row(&opt_help($text{'limits_upload'}, 'upload_max_filesize'),
8, $text{'default'}));
# Max run time
print &ui_table_row(&opt_help($text{'limits_exec'}, 'max_execution_time', 'info'),
print &ui_table_row(&opt_help($text{'limits_exec'}, 'max_execution_time'),
&ui_opt_textbox("max_execution_time",
&find_value("max_execution_time", $conf),
8, $text{'default'})." ".$text{'db_s'});
# Max parsing time
print &ui_table_row(&opt_help($text{'limits_input'}, 'max_input_time', 'info'),
print &ui_table_row(&opt_help($text{'limits_input'}, 'max_input_time'),
&ui_opt_textbox("max_input_time",
&find_value("max_input_time", $conf),
8, $text{'default'})." ".$text{'db_s'});
# Max parsing time
print &ui_table_row(&opt_help($text{'limits_vars'}, 'max_input_vars', 'info'),
print &ui_table_row(&opt_help($text{'limits_vars'}, 'max_input_vars'),
&ui_opt_textbox("max_input_vars",
&find_value("max_input_vars", $conf),
8, $text{'default'}));

View File

@@ -506,21 +506,17 @@ if ($binary) {
return undef;
}
# opt_help(text, php-opt-name, doc-type)
# opt_help(text, php-opt-name)
# Returns the link to the PHP manual for some option
sub opt_help
{
my ($text, $opt, $type) = @_;
my ($text, $opt) = @_;
my $opt_name = $opt;
$opt_name =~ s/_/-/g;
my $php_opt_default = &list_default_value($in{'file'}, $opt);
$php_opt_default = &text('opt_default', "<br>$opt = $php_opt_default")
if (defined($php_opt_default));
$type ||= "ini.core.php#ini.";
if ($type eq 'info') {
$type = "$type.configuration.php#ini.";
}
my $link = "https://www.php.net/manual/en/$type$opt_name";
my $link = "https://www.php.net/$opt_name";
return "@{[&ui_text_wrap($text)]}".&ui_link($link, &ui_help($php_opt_default), 'ui_link_help', 'target="_blank"');
}