|
Revision 941, 1.2 KB
(checked in by bradfitz, 11 years ago)
|
|
mart was right: having the scheme set the content type is lame.
so i moved it up a layer so all schemes benefit.
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | #!/usr/bin/perl |
|---|
| 2 | # |
|---|
| 3 | |
|---|
| 4 | require 'ljconfig.pl'; |
|---|
| 5 | |
|---|
| 6 | BML::register_block("DOMAIN", "S", $LJ::DOMAIN); |
|---|
| 7 | BML::register_block("IMGPREFIX", "S", $LJ::IMGPREFIX); |
|---|
| 8 | BML::register_block("SITEROOT", "S", $LJ::SITEROOT); |
|---|
| 9 | BML::register_block("SITENAME", "S", $LJ::SITENAME); |
|---|
| 10 | BML::register_block("ADMIN_EMAIL", "S", $LJ::ADMIN_EMAIL); |
|---|
| 11 | BML::register_block("SUPPORT_EMAIL", "S", $LJ::SUPPORT_EMAIL); |
|---|
| 12 | |
|---|
| 13 | { |
|---|
| 14 | my $dl = "<a href=\"$LJ::SITEROOT/files/%%DATA%%\">HTTP</a>"; |
|---|
| 15 | if ($LJ::FTPPREFIX) { |
|---|
| 16 | $dl .= " - <a href=\"$LJ::FTPPREFIX/%%DATA%%\">FTP</a>"; |
|---|
| 17 | } |
|---|
| 18 | BML::register_block("DL", "DS", $dl); |
|---|
| 19 | } |
|---|
| 20 | |
|---|
| 21 | BML::register_hook("startup", sub { LJ::start_request() }); |
|---|
| 22 | |
|---|
| 23 | if ($LJ::UNICODE) { |
|---|
| 24 | BML::set_default_content_type("text/html; charset=utf-8"); |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | # pre-load common libraries so we don't have to load them in BML files (slow) |
|---|
| 28 | package BMLCodeBlock; |
|---|
| 29 | use LJ::TextMessage; |
|---|
| 30 | use LJ::TagGenerator ':html4'; |
|---|
| 31 | use Digest::MD5 qw(md5_hex); |
|---|
| 32 | require 'imageconf.pl'; |
|---|
| 33 | require 'propparse.pl'; |
|---|
| 34 | require 'supportlib.pl'; |
|---|
| 35 | require 'ljlib.pl'; |
|---|
| 36 | require 'ljprotocol.pl'; |
|---|
| 37 | require 'cleanhtml.pl'; |
|---|
| 38 | require 'emailcheck.pl'; |
|---|
| 39 | require 'portal.pl'; |
|---|
| 40 | require 'talklib.pl'; |
|---|
| 41 | require 'topiclib.pl'; |
|---|
| 42 | require 'ljtodo.pl'; |
|---|
| 43 | require 'directorylib.pl'; |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | 1; |
|---|