aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggSite.php2
-rw-r--r--engine/classes/XMLRPCArrayParameter.php56
-rw-r--r--engine/classes/XMLRPCBase64Parameter.php28
-rw-r--r--engine/classes/XMLRPCBoolParameter.php30
-rw-r--r--engine/classes/XMLRPCDateParameter.php33
-rw-r--r--engine/classes/XMLRPCDoubleParameter.php29
-rw-r--r--engine/classes/XMLRPCErrorResponse.php36
-rw-r--r--engine/classes/XMLRPCIntParameter.php29
-rw-r--r--engine/classes/XMLRPCParameter.php16
-rw-r--r--engine/classes/XMLRPCResponse.php71
-rw-r--r--engine/classes/XMLRPCStringParameter.php30
-rw-r--r--engine/classes/XMLRPCStructParameter.php55
-rw-r--r--engine/classes/XMLRPCSuccessResponse.php22
13 files changed, 0 insertions, 437 deletions
diff --git a/engine/classes/ElggSite.php b/engine/classes/ElggSite.php
index b13683a56..ac0c87bf7 100644
--- a/engine/classes/ElggSite.php
+++ b/engine/classes/ElggSite.php
@@ -427,8 +427,6 @@ class ElggSite extends ElggEntity {
'action/security/refreshtoken',
'ajax/view/js/languages',
'upgrade\.php',
- 'xml-rpc\.php',
- 'mt/mt-xmlrpc\.cgi',
'css/.*',
'js/.*',
'cache/css/.*',
diff --git a/engine/classes/XMLRPCArrayParameter.php b/engine/classes/XMLRPCArrayParameter.php
deleted file mode 100644
index a8edccba7..000000000
--- a/engine/classes/XMLRPCArrayParameter.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-
-/**
- * An array containing other XMLRPCParameter objects.
- *
- * @package Elgg.Core
- * @subpackage XMLRPC
- *
- */
-class XMLRPCArrayParameter extends XMLRPCParameter
-{
- /**
- * Construct an array.
- *
- * @param array $parameters Optional array of parameters, if not provided
- * then addField must be used.
- */
- function __construct($parameters = NULL) {
- parent::__construct();
-
- if (is_array($parameters)) {
- foreach ($parameters as $v) {
- $this->addField($v);
- }
- }
- }
-
- /**
- * Add a field to the container.
- *
- * @param XMLRPCParameter $value The value.
- *
- * @return void
- */
- public function addField(XMLRPCParameter $value) {
- if (!is_array($this->value)) {
- $this->value = array();
- }
-
- $this->value[] = $value;
- }
-
- /**
- * Converts XML array to string
- *
- * @return string
- */
- function __toString() {
- $params = "";
- foreach ($this->value as $value) {
- $params .= "$value";
- }
-
- return "<array><data>$params</data></array>";
- }
-}
diff --git a/engine/classes/XMLRPCBase64Parameter.php b/engine/classes/XMLRPCBase64Parameter.php
deleted file mode 100644
index 7db0a761c..000000000
--- a/engine/classes/XMLRPCBase64Parameter.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/**
- * A base 64 encoded blob of binary.
- *
- * @package Elgg.Core
- * @subpackage XMLRPC
- */
-class XMLRPCBase64Parameter extends XMLRPCParameter {
- /**
- * Construct a base64 encoded block
- *
- * @param string $blob Unencoded binary blob
- */
- function __construct($blob) {
- parent::__construct();
-
- $this->value = base64_encode($blob);
- }
-
- /**
- * Convert to string
- *
- * @return string
- */
- function __toString() {
- return "<value><base64>{$value}</base64></value>";
- }
-}
diff --git a/engine/classes/XMLRPCBoolParameter.php b/engine/classes/XMLRPCBoolParameter.php
deleted file mode 100644
index 607841cb8..000000000
--- a/engine/classes/XMLRPCBoolParameter.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-/**
- * A boolean.
- *
- * @package Elgg.Core
- * @subpackage XMLRPC
- */
-class XMLRPCBoolParameter extends XMLRPCParameter {
-
- /**
- * New bool parameter
- *
- * @param bool $value Value
- */
- function __construct($value) {
- parent::__construct();
-
- $this->value = (bool)$value;
- }
-
- /**
- * Convert to string
- *
- * @return string
- */
- function __toString() {
- $code = ($this->value) ? "1" : "0";
- return "<value><boolean>{$code}</boolean></value>";
- }
-}
diff --git a/engine/classes/XMLRPCDateParameter.php b/engine/classes/XMLRPCDateParameter.php
deleted file mode 100644
index 93bbbd8f5..000000000
--- a/engine/classes/XMLRPCDateParameter.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-/**
- * An ISO8601 data and time.
- *
- * @package Elgg.Core
- * @subpackage XMLRPC
- */
-class XMLRPCDateParameter extends XMLRPCParameter {
- /**
- * Construct a date
- *
- * @param int $timestamp The unix timestamp, or blank for "now".
- */
- function __construct($timestamp = 0) {
- parent::__construct();
-
- $this->value = $timestamp;
-
- if (!$timestamp) {
- $this->value = time();
- }
- }
-
- /**
- * Convert to string
- *
- * @return string
- */
- function __toString() {
- $value = date('c', $this->value);
- return "<value><dateTime.iso8601>{$value}</dateTime.iso8601></value>";
- }
-}
diff --git a/engine/classes/XMLRPCDoubleParameter.php b/engine/classes/XMLRPCDoubleParameter.php
deleted file mode 100644
index b7834650e..000000000
--- a/engine/classes/XMLRPCDoubleParameter.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/**
- * A double precision signed floating point number.
- *
- * @package Elgg.Core
- * @subpackage XMLRPC
- */
-class XMLRPCDoubleParameter extends XMLRPCParameter {
-
- /**
- * New XML Double
- *
- * @param int $value Value
- */
- function __construct($value) {
- parent::__construct();
-
- $this->value = (float)$value;
- }
-
- /**
- * Convert to string
- *
- * @return string
- */
- function __toString() {
- return "<value><double>{$this->value}</double></value>";
- }
-}
diff --git a/engine/classes/XMLRPCErrorResponse.php b/engine/classes/XMLRPCErrorResponse.php
deleted file mode 100644
index 425c075cc..000000000
--- a/engine/classes/XMLRPCErrorResponse.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/**
- * XMLRPC Error Response
- *
- * @package Elgg.Core
- * @subpackage XMLRPC
- */
-class XMLRPCErrorResponse extends XMLRPCResponse {
- /**
- * Set the error response and error code.
- *
- * @param string $message The message
- * @param int $code Error code (default = system error as defined by
- * http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php)
- */
- function __construct($message, $code = -32400) {
- $this->addParameter(
- new XMLRPCStructParameter(
- array (
- 'faultCode' => new XMLRPCIntParameter($code),
- 'faultString' => new XMLRPCStringParameter($message)
- )
- )
- );
- }
-
- /**
- * Output to XML.
- *
- * @return string
- */
- public function __toString() {
- return "<methodResponse><fault><value>{$this->parameters[0]}</value></fault></methodResponse>";
- }
-}
diff --git a/engine/classes/XMLRPCIntParameter.php b/engine/classes/XMLRPCIntParameter.php
deleted file mode 100644
index 0fc146165..000000000
--- a/engine/classes/XMLRPCIntParameter.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/**
- * An Integer.
- *
- * @package Elgg.Core
- * @subpackage XMLRPC
- */
-class XMLRPCIntParameter extends XMLRPCParameter {
-
- /**
- * A new XML int
- *
- * @param int $value Value
- */
- function __construct($value) {
- parent::__construct();
-
- $this->value = (int)$value;
- }
-
- /**
- * Convert to string
- *
- * @return string
- */
- function __toString() {
- return "<value><i4>{$this->value}</i4></value>";
- }
-}
diff --git a/engine/classes/XMLRPCParameter.php b/engine/classes/XMLRPCParameter.php
deleted file mode 100644
index ffbad8082..000000000
--- a/engine/classes/XMLRPCParameter.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-/**
- * Superclass for all RPC parameters.
- *
- * @package Elgg.Core
- * @subpackage XMLRPC
- */
-abstract class XMLRPCParameter {
- protected $value;
-
- /**
- * Set initial values
- */
- function __construct() { }
-
-}
diff --git a/engine/classes/XMLRPCResponse.php b/engine/classes/XMLRPCResponse.php
deleted file mode 100644
index a6256d385..000000000
--- a/engine/classes/XMLRPCResponse.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-
-/**
- * XML-RPC Response.
- *
- * @package Elgg.Core
- * @subpackage XMLRPC
- */
-abstract class XMLRPCResponse {
- /** An array of parameters */
- protected $parameters = array();
-
- /**
- * Add a parameter here.
- *
- * @param XMLRPCParameter $param The parameter.
- *
- * @return void
- */
- public function addParameter(XMLRPCParameter $param) {
- if (!is_array($this->parameters)) {
- $this->parameters = array();
- }
-
- $this->parameters[] = $param;
- }
-
- /**
- * Add an integer
- *
- * @param int $value Value
- *
- * @return void
- */
- public function addInt($value) {
- $this->addParameter(new XMLRPCIntParameter($value));
- }
-
- /**
- * Add a string
- *
- * @param string $value Value
- *
- * @return void
- */
- public function addString($value) {
- $this->addParameter(new XMLRPCStringParameter($value));
- }
-
- /**
- * Add a double
- *
- * @param int $value Value
- *
- * @return void
- */
- public function addDouble($value) {
- $this->addParameter(new XMLRPCDoubleParameter($value));
- }
-
- /**
- * Add a boolean
- *
- * @param bool $value Value
- *
- * @return void
- */
- public function addBoolean($value) {
- $this->addParameter(new XMLRPCBoolParameter($value));
- }
-}
diff --git a/engine/classes/XMLRPCStringParameter.php b/engine/classes/XMLRPCStringParameter.php
deleted file mode 100644
index 35b28214b..000000000
--- a/engine/classes/XMLRPCStringParameter.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-/**
- * A string.
- *
- * @package Elgg.Core
- * @subpackage XMLRPC
- */
-class XMLRPCStringParameter extends XMLRPCParameter {
-
- /**
- * A new XML string
- *
- * @param string $value Value
- */
- function __construct($value) {
- parent::__construct();
-
- $this->value = $value;
- }
-
- /**
- * Convert to XML string
- *
- * @return string
- */
- function __toString() {
- $value = htmlentities($this->value);
- return "<value><string>{$value}</string></value>";
- }
-}
diff --git a/engine/classes/XMLRPCStructParameter.php b/engine/classes/XMLRPCStructParameter.php
deleted file mode 100644
index 694ddf5df..000000000
--- a/engine/classes/XMLRPCStructParameter.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-/**
- * A structure containing other XMLRPCParameter objects.
- *
- * @package Elgg.Core
- * @subpackage XMLRPC
- */
-class XMLRPCStructParameter extends XMLRPCParameter {
- /**
- * Construct a struct.
- *
- * @param array $parameters Optional associated array of parameters, if
- * not provided then addField must be used.
- */
- function __construct($parameters = NULL) {
- parent::__construct();
-
- if (is_array($parameters)) {
- foreach ($parameters as $k => $v) {
- $this->addField($k, $v);
- }
- }
- }
-
- /**
- * Add a field to the container.
- *
- * @param string $name The name of the field.
- * @param XMLRPCParameter $value The value.
- *
- * @return void
- */
- public function addField($name, XMLRPCParameter $value) {
- if (!is_array($this->value)) {
- $this->value = array();
- }
-
- $this->value[$name] = $value;
- }
-
- /**
- * Convert to string
- *
- * @return string
- */
- function __toString() {
- $params = "";
- foreach ($this->value as $k => $v) {
- $params .= "<member><name>$k</name>$v</member>";
- }
-
- return "<value><struct>$params</struct></value>";
- }
-}
diff --git a/engine/classes/XMLRPCSuccessResponse.php b/engine/classes/XMLRPCSuccessResponse.php
deleted file mode 100644
index e02e82c5c..000000000
--- a/engine/classes/XMLRPCSuccessResponse.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-/**
- * Success Response
- *
- * @package Elgg.Core
- * @subpackage XMLRPC
- */
-class XMLRPCSuccessResponse extends XMLRPCResponse {
- /**
- * Output to XML.
- *
- * @return string
- */
- public function __toString() {
- $params = "";
- foreach ($this->parameters as $param) {
- $params .= "<param>$param</param>\n";
- }
-
- return "<methodResponse><params>$params</params></methodResponse>";
- }
-}