X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Ffoaf.php;h=997be9c735780700fbe057ca478cac45e69cf5f1;hb=d063afe10ecf85b31cc49a454ec8e664927c9e26;hp=a17962b97e49d70f04d525fb82e3ccb06f717f3f;hpb=b22acbb42e2cefa4c3d94f192b735519b1182f07;p=quix0rs-gnu-social.git diff --git a/actions/foaf.php b/actions/foaf.php index a17962b97e..997be9c735 100644 --- a/actions/foaf.php +++ b/actions/foaf.php @@ -17,24 +17,22 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('GNUSOCIAL')) { exit(1); } define('LISTENER', 1); define('LISTENEE', -1); define('BOTH', 0); // @todo XXX: Documentation missing. -class FoafAction extends Action +class FoafAction extends ManagedAction { function isReadOnly(array $args=array()) { return true; } - function prepare(array $args=array()) + protected function doPreparation() { - parent::prepare($args); - $nickname_arg = $this->arg('nickname'); if (empty($nickname_arg)) { @@ -69,10 +67,8 @@ class FoafAction extends Action return true; } - function handle(array $args=array()) + public function showPage() { - parent::handle($args); - header('Content-Type: application/rdf+xml'); $this->startXML(); @@ -94,7 +90,7 @@ class FoafAction extends Action // Would be nice to tell if they were a Person or not (e.g. a #person usertag?) $this->elementStart('Agent', array('rdf:about' => $this->user->getUri())); - if ($this->user->email) { + if (common_config('foaf', 'mbox_sha1sum') && $this->user->email) { $this->element('mbox_sha1sum', null, sha1('mailto:' . $this->user->email)); } if ($this->profile->fullname) {