forked from extern/egroupware
Yet another change for compat
This commit is contained in:
parent
4d53018b08
commit
a23f8f23e9
@ -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))
|
||||
{
|
||||
|
@ -202,7 +202,7 @@
|
||||
case 'server':
|
||||
case 'phpgwapi':
|
||||
/* Server role functions only - api access */
|
||||
if($GLOBALS['egw']->acl->get_role() >= PHPGW_ACL_SERVER)
|
||||
if($GLOBALS['phpgw']->acl->get_role() >= PHPGW_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',PHPGW_ACL_READ,$app))
|
||||
if($GLOBALS['phpgw']->acl->check('run',PHPGW_ACL_READ,$app))
|
||||
{
|
||||
$dmap = ExecMethod(sprintf('',$app,$class,'list_methods'),'xmlrpc');
|
||||
}
|
||||
|
@ -94,7 +94,7 @@
|
||||
{
|
||||
$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');
|
||||
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))
|
||||
{
|
||||
|
@ -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'),
|
||||
|
Loading…
Reference in New Issue
Block a user