Package: egroupware
Version: 1.0.0.009.dfsg-3-4
Severity: normal
Tags: patch
Hi,
I tried to connect Kontact to egroupware via XMLRPC but Kontact kept
complaining:
kontact: ERROR: Server send error -1: Ungültige XML Markierungen
empfangen: unexpected end of file bei 1:1
I found out that this problem was due to some (incomplete) variable
renaming within several scripts. I hope the patch is useful for you.
Regards,
Marek
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-1-386
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Versions of packages egroupware depends on:
ii egroupware-addressboo 1.0.0.009.dfsg-3-4 eGroupWare addressbook
management
ii egroupware-bookmarks 1.0.0.009.dfsg-3-4 eGroupWare bookmark
management app
ii egroupware-calendar 1.0.0.009.dfsg-3-4 eGroupWare calendar
management app
ii egroupware-comic 1.0.0.009.dfsg-3-4 eGroupWare comic strip
application
ii egroupware-core 1.0.0.009.dfsg-3-4 eGroupWare core modules
ii egroupware-developer- 1.0.0.009.dfsg-3-4 eGroupWare developer tools
ii egroupware-email 1.0.0.009.dfsg-3-4 eGroupWare E-mail client
applicati
ii egroupware-emailadmin 1.0.0.009.dfsg-3-4 eGroupWare E-mail user
administrat
ii egroupware-etemplate 1.0.0.009.dfsg-3-4 widget-based template
system for e
ii egroupware-felamimail 1.0.0.009.dfsg-3-4 eGroupWare FeLaMiMail
application
ii egroupware-filemanage 1.0.0.009.dfsg-3-4 eGroupWare file manager
applicatio
ii egroupware-forum 1.0.0.009.dfsg-3-4 eGroupWare forum application
ii egroupware-ftp 1.0.0.009.dfsg-3-4 eGroupWare FTP application
ii egroupware-fudforum 1.0.0.009.dfsg-3-4 eGroupWare FUDforum application
ii egroupware-headlines 1.0.0.009.dfsg-3-4 eGroupWare headlines
catcher appli
ii egroupware-infolog 1.0.0.009.dfsg-3-4 eGroupWare infolog application
ii egroupware-jinn 1.0.0.009.dfsg-3-4 content management system
for eGro
ii egroupware-manual 1.0.0.009.dfsg-3-4 eGroupWare manual
ii egroupware-messenger 1.0.0.009.dfsg-3-4 eGroupWare messenger
application
ii egroupware-news-admin 1.0.0.009.dfsg-3-4 eGroupWare news
administration int
ii egroupware-phpbrain 1.0.0.009.dfsg-3-4 eGroupWare phpbrain application
ii egroupware-phpldapadm 1.0.0.009.dfsg-3-4 eGroupWare phpLDAPadmin
applicatio
ii egroupware-phpsysinfo 1.0.0.009.dfsg-3-4 eGroupWare phpSysInfo
application
ii egroupware-polls 1.0.0.009.dfsg-3-4 eGroupWare polling application
ii egroupware-projects 1.0.0.009.dfsg-3-4 eGroupWare projects
management app
ii egroupware-registrati 1.0.0.009.dfsg-3-4 eGroupWare registration
applicatio
ii egroupware-sitemgr 1.0.0.009.dfsg-3-4 eGroupWare site manager
applicatio
ii egroupware-stocks 1.0.0.009.dfsg-3-4 eGroupWare stock management
applic
ii egroupware-tts 1.0.0.009.dfsg-3-4 eGroupWare trouble ticket
system a
ii egroupware-wiki 1.0.0.009.dfsg-3-4 eGroupWare wiki application
egroupware recommends no packages.
diff -ru inc-old/class.xmlrpc_server_epi.inc.php inc/class.xmlrpc_server_epi.inc.php
--- inc-old/class.xmlrpc_server_epi.inc.php 2006-03-08 23:36:07.038076176 +0100
+++ inc/class.xmlrpc_server_epi.inc.php 2006-03-08 22:21:04.377584616 +0100
@@ -202,7 +202,7 @@
case 'server':
case 'phpgwapi':
/* Server role functions only - api access */
- if($GLOBALS['egw']->acl->get_role() >= EGW_ACL_SERVER)
+ if($GLOBALS['phpgw']->acl->get_role() >= EGW_ACL_SERVER)
{
$dmap = ExecMethod(sprintf('%s.%s.%s','phpgwapi',$class,'list_methods'),'xmlrpc');
}
@@ -214,7 +214,7 @@
break;
default:
/* User-level application access */
- if($GLOBALS['egw']->acl->check('run',EGW_ACL_READ,$app))
+ if($GLOBALS['phpgw']->acl->check('run',EGW_ACL_READ,$app))
{
$dmap = ExecMethod(sprintf('',$app,$class,'list_methods'),'xmlrpc');
}
diff -ru inc-old/class.xmlrpc_server.inc.php inc/class.xmlrpc_server.inc.php
--- inc-old/class.xmlrpc_server.inc.php 2006-03-08 23:36:07.129062344 +0100
+++ inc/class.xmlrpc_server.inc.php 2006-03-08 23:41:49.220056608 +0100
@@ -77,16 +77,16 @@
// translate cat-ids to array with id-name pairs
function cats2xmlrpc($cats)
{
- if (!is_object($GLOBALS['egw']->categories))
+ if (!is_object($GLOBALS['phpgw']->categories))
{
- $GLOBALS['egw']->categories = CreateObject('phpgwapi.categories');
+ $GLOBALS['phpgw']->categories = CreateObject('phpgwapi.categories');
}
$xcats = array();
foreach($cats as $cat)
{
if ($cat)
{
- $xcats[$cat] = stripslashes($GLOBALS['egw']->categories->id2name($cat));
+ $xcats[$cat] = stripslashes($GLOBALS['phpgw']->categories->id2name($cat));
}
}
return $xcats;
@@ -99,29 +99,29 @@
{
$xcats = array();
}
- elseif (!is_object($GLOBALS['egw']->categories))
+ elseif (!is_object($GLOBALS['phpgw']->categories))
{
- $GLOBALS['egw']->categories = CreateObject('phpgwapi.categories');
+ $GLOBALS['phpgw']->categories = CreateObject('phpgwapi.categories');
}
$cats = array();
foreach($xcats as $cat => $name)
{
- if ($id = $GLOBALS['egw']->categories->name2id($name))
+ if ($id = $GLOBALS['phpgw']->categories->name2id($name))
{
// existing cat-name use the id
$cat = $id;
}
- elseif (!($org_name = stripslashes($GLOBALS['egw']->categories->id2name($cat))) || $org_name == '--')
+ elseif (!($org_name = stripslashes($GLOBALS['phpgw']->categories->id2name($cat))) || $org_name == '--')
{
// new cat
- $cat = $GLOBALS['egw']->categories->add(array('name' => $name,'parent' => 0));
+ $cat = $GLOBALS['phpgw']->categories->add(array('name' => $name,'parent' => 0));
}
elseif ($org_name != $name)
{
// cat-name edited
- list($cat_vals) =$GLOBALS['egw']->categories->return_single($cat);
+ list($cat_vals) =$GLOBALS['phpgw']->categories->return_single($cat);
$cat_vals['name'] = $name;
- $GLOBALS['egw']->categories->edit($cat_vals);
+ $GLOBALS['phpgw']->categories->edit($cat_vals);
}
$cats[] = (int)$cat;
}
@@ -140,15 +140,15 @@
list($app) = explode('.',$this->last_method);
}
- if (!is_object($GLOBALS['egw']->categories))
+ if (!is_object($GLOBALS['phpgw']->categories))
{
- $GLOBALS['egw']->categories = CreateObject('phpgwapi.categories');
+ $GLOBALS['phpgw']->categories = CreateObject('phpgwapi.categories');
}
- if ($GLOBALS['egw']->categories->app_name != $app)
+ if ($GLOBALS['phpgw']->categories->app_name != $app)
{
- $GLOBALS['egw']->categories->categories('',$app);
+ $GLOBALS['phpgw']->categories->categories('',$app);
}
- $cats_arr = $GLOBALS['egw']->categories->return_sorted_array(0,False,'','','',True);
+ $cats_arr = $GLOBALS['phpgw']->categories->return_sorted_array(0,False,'','','',True);
$cats = array();
if (is_array($cats_arr))
{
@@ -174,4 +174,4 @@
{
$GLOBALS['egw_info']['server']['xmlrpc_type'] = 'php';
}
- include_once(EGW_API_INC.SEP.'class.xmlrpc_server_' . $GLOBALS['egw_info']['server']['xmlrpc_type'] . '.inc.php');
+ include_once('/usr/share/egroupware/phpgwapi/inc/class.xmlrpc_server_' . $GLOBALS['egw_info']['server']['xmlrpc_type'] . '.inc.php');
\ Kein Zeilenumbruch am Dateiende.
diff -ru inc-old/class.xmlrpc_server_php.inc.php inc/class.xmlrpc_server_php.inc.php
--- inc-old/class.xmlrpc_server_php.inc.php 2006-03-08 23:36:07.159057784 +0100
+++ inc/class.xmlrpc_server_php.inc.php 2006-03-08 22:24:50.897148408 +0100
@@ -93,8 +93,8 @@
else
{
$payload = "<?xml version=\"1.0\"?>\n" . $this->serializeDebug() . $r->serialize();
- Header("Content-type: text/xml\r\nContent-length: " . strlen($payload));
- echo $GLOBALS['egw']->translation->convert($payload,$GLOBALS['egw']->translation->charset(),'utf-8');
+ Header("Content-type: text/xml\rContent-length: " . strlen($payload));
+ echo $GLOBALS['phpgw']->translation->convert($payload,$GLOBALS['phpgw']->translation->charset(),'utf-8');
}
if ($this->log)
@@ -349,7 +349,7 @@
$t = 'phpgwapi.' . $class . '.exec';
$dmap = ExecMethod($t,array($service,'list_methods','xmlrpc'));
}
- elseif($GLOBALS['egw']->acl->check('run',1,$class))
+ elseif($GLOBALS['phpgw']->acl->check('run',1,$class))
{
/* This only happens if they have app access. If not, we will
* return a fault below.
@@ -416,7 +416,7 @@
// _debug_array($params);
$this->reqtoarray($params);
// decode from utf-8 to our charset
- $this->req_array = $GLOBALS['egw']->translation->convert($this->req_array,'utf-8');
+ $this->req_array = $GLOBALS['phpgw']->translation->convert($this->req_array,'utf-8');
//_debug_array($this->req_array);
if (ereg('^service',$method))
{
diff -ru inc-old/xml_functions.inc.php inc/xml_functions.inc.php
--- inc-old/xml_functions.inc.php 2006-03-08 23:36:07.022078608 +0100
+++ inc/xml_functions.inc.php 2006-03-08 22:20:11.968552000 +0100
@@ -169,7 +169,7 @@
Header('Content-type: text/xml');
Header('Content-length: ' . strlen($payload));
print $payload;
- $GLOBALS['egw']->common->phpgw_exit(False);
+ $GLOBALS['phpgw']->common->phpgw_exit(False);
}
// used to store state during parsing
@@ -833,7 +833,7 @@
if($server_name)
{
- list($sessionid,$kp3) = $GLOBALS['egw']->session->create_server($username.'@'.$server_name,$password,"text");
+ list($sessionid,$kp3) = $GLOBALS['phpgw']->session->create_server($username.'@'.$server_name,$password,"text");
}
else
{
@@ -847,9 +847,9 @@
}
$GLOBALS['login'] = $user;
- $sessionid = $GLOBALS['egw']->session->create($user,$password,"text");
- $kp3 = $GLOBALS['egw']->session->kp3;
- $domain = $GLOBALS['egw']->session->account_domain;
+ $sessionid = $GLOBALS['phpgw']->session->create($user,$password,"text");
+ $kp3 = $GLOBALS['phpgw']->session->kp3;
+ $domain = $GLOBALS['phpgw']->session->account_domain;
}
if($sessionid && $kp3)
@@ -875,7 +875,7 @@
$sessionid = $data['sessionid']->scalarval();
$kp3 = $data['kp3']->scalarval();
- $later = $GLOBALS['egw']->session->destroy($sessionid,$kp3);
+ $later = $GLOBALS['phpgw']->session->destroy($sessionid,$kp3);
if ($later)
{
@@ -904,15 +904,15 @@
function _xmlrpcs_listApps($server,$m)
{
$m->getParam(0);
- $GLOBALS['egw']->db->query("SELECT * FROM phpgw_applications WHERE app_enabled<3",__LINE__,__FILE__);
- if($GLOBALS['egw']->db->num_rows())
+ $GLOBALS['phpgw']->db->query("SELECT * FROM phpgw_applications WHERE app_enabled<3",__LINE__,__FILE__);
+ if($GLOBALS['phpgw']->db->num_rows())
{
- while($GLOBALS['egw']->db->next_record())
+ while($GLOBALS['phpgw']->db->next_record())
{
- $name = $GLOBALS['egw']->db->f('app_name');
- $title = $GLOBALS['egw']->db->f('app_title');
- $status = $GLOBALS['egw']->db->f('app_enabled');
- $version= $GLOBALS['egw']->db->f('app_version');
+ $name = $GLOBALS['phpgw']->db->f('app_name');
+ $title = $GLOBALS['phpgw']->db->f('app_title');
+ $status = $GLOBALS['phpgw']->db->f('app_enabled');
+ $version= $GLOBALS['phpgw']->db->f('app_version');
$apps[$name] = CreateObject('phpgwapi.xmlrpcval',
array(
'title' => CreateObject('phpgwapi.xmlrpcval',$title,'string'),