Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/amfphp/README.txt,v
retrieving revision 1.5
diff -u -p -r1.5 README.txt
--- README.txt 12 Apr 2008 01:09:53 -0000 1.5
+++ README.txt 26 Oct 2008 21:05:49 -0000
@@ -6,7 +6,27 @@ This module provides AMFPHP support to t
INSTALLATION
------------
-- Place entire amfphp folder in the Drupal modules directory, or relevant site module directory
-- Download AMFPHP 1.9 beta 2 from You must dowload http://downloads.sourceforge.net/amfphp/amfphp-1.9.beta.20080120.zip?modtime=1200844138
-- Extract AMFPHP 1.9 beta 2 modules/amfphp/amfphp inside of the amfphp module directory
-- Enable the module in the admin
\ No newline at end of file
+- Place entire amfphp folder in the Drupal sites/all/modules directory.
+- Download AMFPHP 1.9 beta 2 from http://downloads.sourceforge.net/amfphp/amfphp-1.9.beta.20080120.zip?modtime=1200844138
+- Extract AMFPHP 1.9 beta 2 to sites/all/modules/amfphp/amfphp
+- Enable the module in the admin
+
+The correct directory structure will be:
+sites
+ all
+ modules
+ amfphp
+ README
+ amfphp.module
+ amfphp.info
+ amfphp.install
+ overrides
+ amfphp
+ browser
+ core
+ gateway.php
+ globals.php
+ json.php
+ phpinfo.php
+ services
+ xmlrpc.php
\ No newline at end of file
Index: amfphp.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/amfphp/amfphp.module,v
retrieving revision 1.9
diff -u -p -r1.9 amfphp.module
--- amfphp.module 12 Apr 2008 01:09:53 -0000 1.9
+++ amfphp.module 26 Oct 2008 21:05:50 -0000
@@ -1,29 +1,15 @@
$t('AMFPHP'),
- 'value' => $t('1.9 Beta 2'),
- );
-
- if (!file_exists(realpath(dirname(__FILE__) . '/amfphp/globals.php'))) {
- $requirements['amfphp']['value'] = $t('Not found or wrong version');
- $requirements['amfphp']['description'] = $t('You must dowload AMFPHP 1.9 beta 2, and extract to modules/amfphp/amfphp, or respective site modules directory.');
- $requirements['amfphp']['severity'] = REQUIREMENT_ERROR;
- }
-
- return $requirements;
-}
+/**
+ * @file
+ *
+ * This module provides AMFPHP support to the Services module.
+ * This module overrides AMFPHP classes to provide support for services defined in the service api.
+ */
-/*
- * Implementation of hook_server_info()
+/**
+ * Implementation of hook_server_info().
*/
function amfphp_server_info() {
return array(
@@ -32,33 +18,32 @@ function amfphp_server_info() {
);
}
-/*
- * Implementation of hook_server()
- * here we include the contents of a gateway.php
+/**
+ * Implementation of hook_server().
+ * here we include the contents of a gateway.php.
*/
function amfphp_server() {
- $path = drupal_get_path('module', 'amfphp');
+ $path = './' . drupal_get_path('module', 'amfphp');
define("PRODUCTION_SERVER", !variable_get('services_debug', FALSE));
-
- require_once $path . "/amfphp/globals.php";
- require_once $path . "/overrides/AmfphpGateway.php";
-
- $gateway = new AmfphpGateway();
- $gateway->setClassPath($servicesPath);
- $gateway->setClassMappingsPath($voPath);
- $gateway->setCharsetHandler("utf8_decode", "ISO-8859-1", "ISO-8859-1");
- $gateway->setErrorHandling(E_ALL ^ E_NOTICE);
-
- if(PRODUCTION_SERVER)
- {
- $gateway->disableDebug();
- }
- $gateway->enableGzipCompression(25*1024);
- $gateway->service();
+ require_once $path . "/amfphp/globals.php";
+ require_once $path . "/overrides/AmfphpGateway.php";
+
+ $gateway = new AmfphpGateway();
+ $gateway->setClassPath($servicesPath);
+ $gateway->setClassMappingsPath($voPath);
+ $gateway->setCharsetHandler("utf8_decode", "ISO-8859-1", "ISO-8859-1");
+ $gateway->setErrorHandling(E_ALL ^ E_NOTICE);
+
+ if (PRODUCTION_SERVER) {
+ $gateway->disableDebug();
+ }
+
+ $gateway->enableGzipCompression(25*1024);
+ $gateway->service();
}
-/*
+/**
* ugly! ugly! ugly!
* we need to use a method call wrapper here to convert all 'uid' values in the result
* to 'userid'. this is because flex uses the property 'uid' in objects and will overwrite
@@ -77,15 +62,15 @@ function amfphp_method_call($method_name
return $result;
}
-/*
- * ugly! ugly! ugly!
+/**
+ * See amfphp_method_call().
*/
function amfphp_fix_uid($data, $direction = 1) {
- $uid = 's:3:"uid";';
+ $uid = 's:3:"uid";';
$userid = 's:6:"userid";';
$from = ($direction) ? $uid : $userid;
- $to = (!$direction) ? $uid : $userid;
+ $to = (!$direction) ? $uid : $userid;
$data = serialize($data);
$data = str_replace($from, $to, $data);
@@ -94,7 +79,7 @@ function amfphp_fix_uid($data, $directio
return $data;
}
-/*
+/**
* Implementation of hook_server_error()
*/
function amfphp_server_error($message) {
Index: overrides/AmfphpGateway.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/amfphp/overrides/AmfphpGateway.php,v
retrieving revision 1.2
diff -u -p -r1.2 AmfphpGateway.php
--- overrides/AmfphpGateway.php 16 Jan 2007 19:43:11 -0000 1.2
+++ overrides/AmfphpGateway.php 26 Oct 2008 21:05:50 -0000
@@ -4,12 +4,12 @@
require_once drupal_get_path('module', 'amfphp') . "/amfphp/core/amf/app/Gateway.php";
class AmfphpGateway extends Gateway {
-
+
/**
- * Override the Gateway() method
+ * Override the Gateway() method.
*/
function AmfphpGateway() {
- if(AMFPHP_PHP5) {
+ if (AMFPHP_PHP5) {
include_once(drupal_get_path('module', 'amfphp') . "/overrides/php5Executive.php");
include_once(AMFPHP_BASE . "shared/exception/php5Exception.php");
}
@@ -26,10 +26,9 @@ class AmfphpGateway extends Gateway {
}
/**
- * remove redundant actions
+ * Remove redundant actions.
*/
- function registerActionChain()
- {
+ function registerActionChain() {
$this->actions['adapter'] = 'adapterAction';
// we are not using class files, and security checking is done in drupal
Index: amfphp.install
===================================================================
RCS file: amfphp.install
diff -N amfphp.install
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ amfphp.install 26 Oct 2008 20:28:04 -0000
@@ -0,0 +1,23 @@
+ $t('AMFPHP'),
+ 'value' => $t('1.9 Beta 2'),
+ );
+
+ if (!file_exists(drupal_get_path('module', 'amfphp') . '/amfphp/globals.php')) {
+ $requirements['amfphp']['value'] = $t('Not found or wrong version');
+ $requirements['amfphp']['description'] = $t('You must dowload AMFPHP 1.9 beta 2, and extract to !path.', array('!path' => drupal_get_path('module', 'amfphp') . '/amfphp'));
+ $requirements['amfphp']['severity'] = REQUIREMENT_ERROR;
+ }
+
+ return $requirements;
+}
\ No newline at end of file