mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
This is a few after the fact cleanups. I think this will now handle passing either the app_id or the app_name to package_app().
This commit is contained in:
parent
a3c1738bec
commit
ce5d0d62e9
@ -36,7 +36,8 @@
|
|||||||
'request_packaged_app' => True,
|
'request_packaged_app' => True,
|
||||||
'get_appbyid' => True,
|
'get_appbyid' => True,
|
||||||
'get_appbyname' => True,
|
'get_appbyname' => True,
|
||||||
'find_new_app' => True
|
'find_new_app' => True,
|
||||||
|
'package_app' => True
|
||||||
);
|
);
|
||||||
|
|
||||||
var $soap_functions = array();
|
var $soap_functions = array();
|
||||||
@ -129,8 +130,8 @@
|
|||||||
),
|
),
|
||||||
'docstring' => lang('compare an array of apps/versions against the repository and return new/updated list of apps.')
|
'docstring' => lang('compare an array of apps/versions against the repository and return new/updated list of apps.')
|
||||||
),
|
),
|
||||||
'package_app_byid' => Array(
|
'package_app' => Array(
|
||||||
'function' => 'package_app_byid',
|
'function' => 'package_app',
|
||||||
'signature' => Array(
|
'signature' => Array(
|
||||||
Array(
|
Array(
|
||||||
xmlrpcStruct,
|
xmlrpcStruct,
|
||||||
@ -219,7 +220,6 @@
|
|||||||
if(is_object($this->is))
|
if(is_object($this->is))
|
||||||
{
|
{
|
||||||
$application = $this->is->send('system.package_app_byid',$app_id,$this->is->server['server_url']);
|
$application = $this->is->send('system.package_app_byid',$app_id,$this->is->server['server_url']);
|
||||||
|
|
||||||
// comment from here down to stop the actual install
|
// comment from here down to stop the actual install
|
||||||
// This is where I need to install the application
|
// This is where I need to install the application
|
||||||
$sep = filesystem_separator();
|
$sep = filesystem_separator();
|
||||||
@ -374,7 +374,6 @@
|
|||||||
{
|
{
|
||||||
if($entry != '.' && $entry != '..' && $entry != 'CVS')
|
if($entry != '.' && $entry != '..' && $entry != 'CVS')
|
||||||
{
|
{
|
||||||
// $this->dir_file[$dir_prefix.$entry] = CreateObject('phpgwapi.xmlrpcval',$new_filename,'string');
|
|
||||||
$dir_path[$dir_prefix.$entry] = $new_filename;
|
$dir_path[$dir_prefix.$entry] = $new_filename;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -387,32 +386,38 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function package_app_byid($appid)
|
function package_app($appid)
|
||||||
{
|
{
|
||||||
// Need to find a way to validate that the value in this string is an
|
// Need to find a way to validate that the value in this string is an
|
||||||
// app_id, if not, then it is an app_name
|
// app_id, if not, then it is an app_name
|
||||||
if(is_int($appid) && $appid)
|
if(is_int(intval($appid)) && intval($appid))
|
||||||
{
|
{
|
||||||
|
$where_clause = 'WHERE app_id='.$appid;
|
||||||
}
|
}
|
||||||
$this->db->query('SELECT * FROM phpgw_applications WHERE app_id='.$appid,__LINE__,__FILE__);
|
else
|
||||||
|
{
|
||||||
|
$where_clause = "WHERE app_name='".$appid."'"
|
||||||
|
}
|
||||||
|
$this->db->query('SELECT * FROM phpgw_applications '.$where_clause,__LINE__,__FILE__);
|
||||||
if(!$this->db->num_rows())
|
if(!$this->db->num_rows())
|
||||||
{
|
{
|
||||||
return CreateObject('phpgwapi.xmlrpcresp',CreateObject('phpgwapi.xmlrpcval',False,'boolean'),'boolean');
|
return CreateObject('phpgwapi.xmlrpcresp',CreateObject('phpgwapi.xmlrpcval',False,'boolean'),'boolean');
|
||||||
}
|
}
|
||||||
$this->dir_file = Array();
|
$this->dir_file = Array();
|
||||||
$this->db->next_record();
|
$this->db->next_record();
|
||||||
$this->dir_file[$appid] = CreateObject('phpgwapi.xmlrpcval',
|
$app_name = $this->db->f('app_name')
|
||||||
|
$this->dir_file[$this->db->f('app_id')] = CreateObject('phpgwapi.xmlrpcval',
|
||||||
Array(
|
Array(
|
||||||
'id' => CreateObject('phpgwapi.xmlrpcval',$appid,'int'),
|
'id' => CreateObject('phpgwapi.xmlrpcval',$this->db->f('app_id'),'int'),
|
||||||
'name' => CreateObject('phpgwapi.xmlrpcval',$this->db->f('app_name'),'string'),
|
'name' => CreateObject('phpgwapi.xmlrpcval',$app_name,'string'),
|
||||||
'title' => CreateObject('phpgwapi.xmlrpcval',$this->db->f('app_title'),'string'),
|
'title' => CreateObject('phpgwapi.xmlrpcval',$this->db->f('app_title'),'string'),
|
||||||
'version' => CreateObject('phpgwapi.xmlrpcval',$this->db->f('app_version'),'string'),
|
'version' => CreateObject('phpgwapi.xmlrpcval',$this->db->f('app_version'),'string'),
|
||||||
'tables' => CreateObject('phpgwapi.xmlrpcval',$this->db->f('app_tables'),'string')
|
'tables' => CreateObject('phpgwapi.xmlrpcval',$this->db->f('app_tables'),'string')
|
||||||
),
|
),
|
||||||
'struct'
|
'struct'
|
||||||
);
|
);
|
||||||
$path_prefix = PHPGW_SERVER_ROOT.filesystem_separator().$this->db->f('app_name');
|
$path_prefix = PHPGW_SERVER_ROOT.filesystem_separator().$app_name;
|
||||||
$this->pack_dir($path_prefix,$this->db->f('app_name'));
|
$this->pack_dir($path_prefix,$app_name);
|
||||||
return CreateObject('phpgwapi.xmlrpcresp',CreateObject('phpgwapi.xmlrpcval',$this->dir_file,'struct'));
|
return CreateObject('phpgwapi.xmlrpcresp',CreateObject('phpgwapi.xmlrpcval',$this->dir_file,'struct'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user