phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpgwapi/inc class.app_registry.inc.php,1.3,1.4


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.app_registry.inc.php,1.3,1.4
Date: Sat, 23 Feb 2002 08:40:34 -0500

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv29389/phpgwapi/inc

Modified Files:
        class.app_registry.inc.php 
Log Message:
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().

Index: class.app_registry.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.app_registry.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.app_registry.inc.php  23 Feb 2002 13:22:59 -0000      1.3
--- class.app_registry.inc.php  23 Feb 2002 13:40:31 -0000      1.4
***************
*** 37,41 ****
                        'get_appbyid'           => True,
                        'get_appbyname'         => True,
!                       'find_new_app'          => True
                );
  
--- 37,42 ----
                        'get_appbyid'           => True,
                        'get_appbyname'         => True,
!                       'find_new_app'          => True,
!                       'package_app'           => True
                );
  
***************
*** 130,135 ****
                                                        'docstring' => 
lang('compare an array of apps/versions against the repository and return 
new/updated list of apps.')
                                                ),
!                                               'package_app_byid' => Array(
!                                                       'function'  => 
'package_app_byid',
                                                        'signature' => Array(
                                                                Array(
--- 131,136 ----
                                                        'docstring' => 
lang('compare an array of apps/versions against the repository and return 
new/updated list of apps.')
                                                ),
!                                               'package_app' => Array(
!                                                       'function'  => 
'package_app',
                                                        'signature' => Array(
                                                                Array(
***************
*** 220,224 ****
                        {
                                $application = 
$this->is->send('system.package_app_byid',$app_id,$this->is->server['server_url']);
- 
  // comment from here down to stop the actual install
                                // This is where I need to install the 
application
--- 221,224 ----
***************
*** 375,379 ****
                                        if($entry != '.' && $entry != '..' && 
$entry != 'CVS')
                                        {
- //                                            
$this->dir_file[$dir_prefix.$entry] = 
CreateObject('phpgwapi.xmlrpcval',$new_filename,'string');
                                                $dir_path[$dir_prefix.$entry] = 
$new_filename;
                                        }
--- 375,378 ----
***************
*** 388,399 ****
                }
  
!               function package_app_byid($appid)
                {
                        // 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
!                       if(is_int($appid) && $appid)
                        {
                        }
!                       $this->db->query('SELECT * FROM phpgw_applications 
WHERE app_id='.$appid,__LINE__,__FILE__);
                        if(!$this->db->num_rows())
                        {
--- 387,403 ----
                }
  
!               function package_app($appid)
                {
                        // 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
!                       if(is_int(intval($appid)) && intval($appid))
!                       {
!                               $where_clause = 'WHERE app_id='.$appid;
!                       }
!                       else
                        {
+                               $where_clause = "WHERE app_name='".$appid."'"
                        }
!                       $this->db->query('SELECT * FROM phpgw_applications 
'.$where_clause,__LINE__,__FILE__);
                        if(!$this->db->num_rows())
                        {
***************
*** 402,409 ****
                        $this->dir_file = Array();
                        $this->db->next_record();
!                       $this->dir_file[$appid] = 
CreateObject('phpgwapi.xmlrpcval',
                                Array(
!                                       'id'      => 
CreateObject('phpgwapi.xmlrpcval',$appid,'int'),
!                                       'name'    => 
CreateObject('phpgwapi.xmlrpcval',$this->db->f('app_name'),'string'),
                                        'title'   => 
CreateObject('phpgwapi.xmlrpcval',$this->db->f('app_title'),'string'),
                                        'version' => 
CreateObject('phpgwapi.xmlrpcval',$this->db->f('app_version'),'string'),
--- 406,414 ----
                        $this->dir_file = Array();
                        $this->db->next_record();
!                       $app_name = $this->db->f('app_name')
!                       $this->dir_file[$this->db->f('app_id')] = 
CreateObject('phpgwapi.xmlrpcval',
                                Array(
!                                       'id'      => 
CreateObject('phpgwapi.xmlrpcval',$this->db->f('app_id'),'int'),
!                                       'name'    => 
CreateObject('phpgwapi.xmlrpcval',$app_name,'string'),
                                        'title'   => 
CreateObject('phpgwapi.xmlrpcval',$this->db->f('app_title'),'string'),
                                        'version' => 
CreateObject('phpgwapi.xmlrpcval',$this->db->f('app_version'),'string'),
***************
*** 412,417 ****
                                'struct'
                        );
!                       $path_prefix = 
PHPGW_SERVER_ROOT.filesystem_separator().$this->db->f('app_name');
!                       $this->pack_dir($path_prefix,$this->db->f('app_name'));
                        return 
CreateObject('phpgwapi.xmlrpcresp',CreateObject('phpgwapi.xmlrpcval',$this->dir_file,'struct'));
                }
--- 417,422 ----
                                'struct'
                        );
!                       $path_prefix = 
PHPGW_SERVER_ROOT.filesystem_separator().$app_name;
!                       $this->pack_dir($path_prefix,$app_name);
                        return 
CreateObject('phpgwapi.xmlrpcresp',CreateObject('phpgwapi.xmlrpcval',$this->dir_file,'struct'));
                }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]