Server IP : 127.0.0.2 / Your IP : 3.144.81.47 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/perl5/Debconf/Element/Teletype/ |
Upload File : |
#!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Teletype::Multiselect; use strict; use Debconf::Gettext; use Debconf::Config; use base qw(Debconf::Element::Multiselect Debconf::Element::Teletype::Select); sub show { my $this=shift; my @selected; my $none_of_the_above=gettext("none of the above"); my @choices=$this->question->choices_split; my %value = map { $_ => 1 } $this->translate_default; if ($this->frontend->promptdefault && $this->question->value ne '') { push @choices, $none_of_the_above; } my @completions=@choices; my $i=1; my %choicenum=map { $_ => $i++ } @choices; $this->frontend->display($this->question->extended_description."\n"); my $default; if (Debconf::Config->terse eq 'false') { $this->printlist(@choices); $this->frontend->display("\n(".gettext("Enter the items you want to select, separated by spaces.").")\n"); push @completions, 1..@choices; $default=join(" ", map { $choicenum{$_} } grep { $value{$_} } @choices); } else { $default=join(" ", grep { $value{$_} } @choices); } while (1) { $_=$this->frontend->prompt( prompt => $this->question->description, default => $default, completions => [@completions], completion_append_character => " ", question => $this->question, ); return unless defined $_; @selected=split(/[ ,]+/, $_); @selected=map { $this->expandabbrev($_, @choices) } @selected; next if grep { $_ eq '' } @selected; if ($#selected > 0) { map { next if $_ eq $none_of_the_above } @selected; } last; } $this->frontend->display("\n"); if (defined $selected[0] && $selected[0] eq $none_of_the_above) { $this->value(''); } else { my %selected=map { $_ => 1 } @selected; $this->value(join(', ', $this->order_values( map { $this->translate_to_C($_) } keys %selected))); } } 1