Dotclear

source: admin/xmlrpc.php @ 3730:5c45a5df9a59

Revision 3730:5c45a5df9a59, 957 bytes checked in by franck <carnet.franck.paul@…>, 8 years ago (diff)

Code formatting (PSR-2)

Line 
1<?php
2# -- BEGIN LICENSE BLOCK ---------------------------------------
3#
4# This file is part of Dotclear 2.
5#
6# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
7# Licensed under the GPL version 2.0 license.
8# See LICENSE file or
9# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10#
11# -- END LICENSE BLOCK -----------------------------------------
12
13require dirname(__FILE__) . '/../inc/prepend.php';
14
15if (isset($_SERVER['PATH_INFO'])) {
16    $blog_id = trim($_SERVER['PATH_INFO']);
17    $blog_id = preg_replace('#^/#', '', $blog_id);
18} elseif (!empty($_GET['b'])) {
19    $blog_id = $_GET['b'];
20}
21
22if (empty($blog_id)) {
23    header('Content-Type: text/plain');
24    http::head(412);
25    echo 'No blog ID given';
26    exit;
27}
28
29# Avoid plugins warnings, set a default blog
30$core->setBlog($blog_id);
31
32# Loading plugins
33$core->plugins->loadModules(DC_PLUGINS_ROOT);
34
35# Start XML-RPC server
36$server = new dcXmlRpc($core, $blog_id);
37$server->serve();
Note: See TracBrowser for help on using the repository browser.

Sites map