]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - actions/publicxrds.php
Remove unnecessary require lines and definitions
[quix0rs-gnu-social.git] / actions / publicxrds.php
1 <?php
2 /**
3  * Public XRDS for OpenID
4  *
5  * PHP version 5
6  *
7  * @category Action
8  * @package  StatusNet
9  * @author   Evan Prodromou <evan@status.net>
10  * @author   Craig Andrews <candrews@integralblue.com>
11  * @author   Robin Millette <millette@status.net>
12  * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org
13  * @license  http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
14  * @link     http://status.net/
15  *
16  * StatusNet - the distributed open-source microblogging tool
17  * Copyright (C) 2008, 2009, StatusNet, Inc.
18  *
19  * This program is free software: you can redistribute it and/or modify
20  * it under the terms of the GNU Affero General Public License as published by
21  * the Free Software Foundation, either version 3 of the License, or
22  * (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27  * GNU Affero General Public License for more details.
28  *
29  * You should have received a copy of the GNU Affero General Public License
30  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
31  */
32
33 if (!defined('STATUSNET') && !defined('LACONICA')) {
34     exit(1);
35 }
36
37 require_once INSTALLDIR.'/plugins/OpenID/openid.php';
38 require_once INSTALLDIR.'/lib/xrdsoutputter.php';
39
40 /**
41  * Public XRDS
42  *
43  * @category Action
44  * @package  StatusNet
45  * @author   Evan Prodromou <evan@status.net>
46  * @author   Robin Millette <millette@status.net>
47  * @author   Craig Andrews <candrews@integralblue.com>
48  * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org
49  * @license  http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
50  * @link     http://status.net/
51  *
52  * @todo factor out similarities with XrdsAction
53  */
54 class PublicxrdsAction extends Action
55 {
56     /**
57      * Is read only?
58      *
59      * @return boolean true
60      */
61     function isReadOnly($args)
62     {
63         return true;
64     }
65
66     /**
67      * Class handler.
68      *
69      * @param array $args array of arguments
70      *
71      * @return nothing
72      */
73     function handle($args)
74     {
75         parent::handle($args);
76         $xrdsOutputter = new XRDSOutputter();
77         $xrdsOutputter->startXRDS();
78         Event::handle('StartPublicXRDS', array($this,&$xrdsOutputter));
79         Event::handle('EndPublicXRDS', array($this,&$xrdsOutputter));
80         $xrdsOutputter->endXRDS();
81     }
82 }
83