Remove minimal style

We don't configure this in production and I don't plan to, so let's
remove this.
This commit is contained in:
Mark Smith 2021-08-23 04:51:12 +00:00
parent 07f9aa4189
commit 8137971286
4 changed files with 0 additions and 41 deletions

View File

@ -457,16 +457,6 @@ sub trans {
}
}
# see if we should setup a minimal scheme based on the initial part of the
# user-agent string; FIXME: maybe this should do more than just look at the
# initial letters?
if ( my $ua = $apache_r->headers_in->{'User-Agent'} ) {
if ( ( $ua =~ /^([a-z]+)/i ) && $LJ::MINIMAL_USERAGENT{$1} ) {
$apache_r->notes->{use_minimal_scheme} = 1;
$apache_r->notes->{bml_use_scheme} = $LJ::MINIMAL_BML_SCHEME;
}
}
# See if this is a concatenated static file request. If so, the args will start with a '?'
# which means the original URL was of the form '/foo/??bar'.
if ( $args =~ /^\?/ ) {

View File

@ -189,11 +189,6 @@ no strict "vars";
$ARCH32 = $arch;
}
# setup default minimal style information
$MINIMAL_USERAGENT{$_} ||= 1 foreach qw(Links Lynx w BlackBerry WebTV); # w is for w3m
$MINIMAL_BML_SCHEME ||= 'lynx';
$MINIMAL_STYLE{'core'} ||= 'core1';
# maximum size to cache s2compiled data
$MAX_S2COMPILED_CACHE_SIZE ||= 7500; # bytes

View File

@ -814,20 +814,7 @@ sub s2_context {
my $remote = $opts{remote} || LJ::get_remote();
my $style_u = $opts{style_u} || $u;
# but it doesn't matter if we're using the minimal style ...
my %style;
eval {
if ( $r->note('use_minimal_scheme') ) {
my $public = get_public_layers();
while ( my ( $layer, $name ) = each %LJ::MINIMAL_STYLE ) {
next unless $name ne "";
next unless $public->{$name};
my $id = $public->{$name}->{'s2lid'};
$style{$layer} = $id if $id;
}
}
};
if ( $styleid && $styleid eq "siteviews" ) {
%style = siteviews_style( $u, $remote, $opts{mode} );
}

View File

@ -467,19 +467,6 @@
# the following line. Default is 5000.
#$MAX_BANS = 5000;
# Some people on portable devices may have troubles viewing the nice site
# scheme you've setup, so you can specify that some user-agent prefixes
# should instead use fallback presentation information.
%MINIMAL_USERAGENT = (
#'Foo' => 1, # if the user-agent field starts with "Foo" ...
# note you can only put text here; no numbers, spaces, or symbols.
);
$MINIMAL_BML_SCHEME = 'lynx';
%MINIMAL_STYLE = (
'core' => 'core1', # default, but you can add more layers and styles... note
# that they must be public styles
);
# if you know that your installation is behind a proxy or other fence that inserts
# X-Forwarded-For headers that you can trust (eg Perlbal), enable this. otherwise, don't!
# $TRUST_X_HEADERS = 1;