use Rose::Object::MakeMethods::Generic
(
+ scalar => [ qw(applying_database_upgrades) ],
'scalar --get_set_init' => [ qw(cgi layout presenter is_ajax type) ],
);
return 'html';
}
+sub is_https {
+ $ENV{HTTPS} && 'on' eq lc $ENV{HTTPS};
+}
+
sub cache {
my ($self, $topic, $default) = @_;
# Workaround for a bug: converting $from->[$idx] directly
# leads to 'undef'. I don't know why. Converting a copy works,
# though.
- $to->[$idx] = $iconv->convert("" . $from->[$idx]);
+ $to->[$idx] = $iconv->convert("" . $from->[$idx]) if defined $from->[$idx] && !defined $to->[$idx];
} else {
$to->[$idx] ||= {} if 'HASH' eq ref $from->[$idx];
$to->[$idx] ||= [] if 'ARRAY' eq ref $from->[$idx];
my $encoding = delete $temp_target->{INPUT_ENCODING} || 'UTF-8';
- _recode_recursively(SL::Iconv->new($encoding, 'UTF-8'), $temp_target => $target) if keys %$target;
+ _recode_recursively(SL::Iconv->new($encoding, 'UTF-8'), $temp_target => $target) if keys %$temp_target;
if ($target->{RESTORE_FORM_FROM_SESSION_ID}) {
my %temp_form;