root/branches/release-41/mt-xmlrpc.cgi

Revision 1174, 1.0 kB (checked in by bchoate, 1 year ago)

Updated copyright year for source.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1 #!/usr/bin/perl -w
2
3 # Movable Type (r) Open Source (C) 2001-2008 Six Apart, Ltd.
4 # This program is distributed under the terms of the
5 # GNU General Public License, version 2.
6 #
7 # $Id$
8
9 use strict;
10 my $MT_DIR;
11 sub BEGIN {
12     require File::Spec;
13     if (!($MT_DIR = $ENV{MT_HOME})) {
14         if ($0 =~ m!(.*[/\\])!) {
15             $MT_DIR = $1;
16         } else {
17             $MT_DIR = './';
18         }
19         $ENV{MT_HOME} = $MT_DIR;
20     }
21     unshift @INC, File::Spec->catdir($MT_DIR, 'lib');
22     unshift @INC, File::Spec->catdir($MT_DIR, 'extlib');
23 }
24
25 use XMLRPC::Transport::HTTP;
26 use MT::XMLRPCServer;
27
28 $MT::XMLRPCServer::MT_DIR = $MT_DIR;
29
30 use vars qw($server);
31 {
32     ## Shut off warnings, because SOAP::Lite 0.55 causes some
33     ## unitialized value warnings that seem to be connected to
34     ## the soap->action
35     local $SIG{__WARN__} = sub { };
36     $server = XMLRPC::Transport::HTTP::CGI->new;
37     $server->dispatch_to('blogger', 'metaWeblog', 'mt', 'wp');
38     $server->handle;
39 }
Note: See TracBrowser for help on using the browser.