Index: amfphp.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/amfphp/amfphp.module,v retrieving revision 1.10 diff -u -r1.10 amfphp.module --- amfphp.module 14 Feb 2009 20:26:21 -0000 1.10 +++ amfphp.module 15 Oct 2009 14:52:11 -0000 @@ -46,7 +46,7 @@ $gateway = new AmfphpGateway(); $gateway->setClassPath($servicesPath); $gateway->setClassMappingsPath($voPath); - $gateway->setCharsetHandler("utf8_decode", "ISO-8859-1", "ISO-8859-1"); + $gateway->setCharsetHandler(variable_get('amfphp_charset_mode', 'iconv'), variable_get('amfphp_charset_phpCharset', 'UTF-8'), variable_get('amfphp_charset_sqlCharset', 'UTF-8')); $gateway->setErrorHandling(E_ALL ^ E_NOTICE); if(PRODUCTION_SERVER) @@ -104,4 +104,20 @@ // we must throw an error here as it is caught by AMFPHP to send faults back // to the client trigger_error($message, E_USER_ERROR); +} + +/** + * Implementation of hook_menu(). + */ +function amfphp_menu() { + $items['admin/settings/amfphp'] = array( + 'title' => 'AMFPHP settings', + 'description' => 'Change AMFPHP Charset Handler Settings.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('amfphp_admin_settings'), + 'access arguments' => array('administer site configuration'), + 'type' => MENU_NORMAL_ITEM, + 'file' => 'amfphp.admin.inc', + ); + return $items; } \ No newline at end of file Index: amfphp.admin.inc =================================================================== RCS file: amfphp.admin.inc diff -N amfphp.admin.inc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ amfphp.admin.inc 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,39 @@ + 'textfield', + '#title' => t('AMFPHP Charset mode'), + '#size' => 15, + '#default_value' => variable_get('amfphp_charset_mode', 'iconv'), + '#description' => t('Set AMFPHP Charset mode.'), + ); + $form['amfphp_charset_phpCharset'] = array( + '#type' => 'textfield', + '#title' => t('AMFPHP phpCharset'), + '#size' => 15, + '#default_value' => variable_get('amfphp_charset_phpCharset', 'UTF-8'), + '#description' => t('Set AMFPHP PHP Charset.'), + ); + $form['amfphp_charset_sqlCharset'] = array( + '#type' => 'textfield', + '#title' => t('AMFPHP phpCharset'), + '#size' => 15, + '#default_value' => variable_get('amfphp_charset_sqlCharset', 'UTF-8'), + '#description' => t('Set AMFPHP SQL Charset.'), + ); + return system_settings_form($form); +} \ No newline at end of file