/[phpgroupware]/setup/inc/class.setup.inc.php
ViewVC logotype

Diff of /setup/inc/class.setup.inc.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by milosch, Tue Sep 18 12:38:26 2001 UTC revision 1.10 by milosch, Wed Oct 17 18:42:18 2001 UTC
# Line 223  Line 223 
223                          else                          else
224                          {                          {
225                                  $appstbl = 'phpgw_applications';                                  $appstbl = 'phpgw_applications';
226                                    if($this->amorethanb($setup_info['phpgwapi']['currentver'],'0.9.13.014'))
227                                    {
228                                            $use_appid = True;
229                                    }
230                          }                          }
231    
232                          if($DEBUG)                          if($DEBUG)
# Line 237  Line 241 
241                                  {                                  {
242                                          $tables = implode(',',$setup_info[$appname]['tables']);                                          $tables = implode(',',$setup_info[$appname]['tables']);
243                                  }                                  }
244                                    if($use_appid)
245                                    {
246                                            $this->db->query("SELECT MAX(app_id) FROM $appstbl");
247                                            $this->db->next_record();
248                                            if($this->db->f(0))
249                                            {
250                                                    $app_id = ($this->db->f(0) + 1) . ',';
251                                                    $app_idstr = 'app_id,';
252                                            }
253                                            else
254                                            {
255                                                    srand(100000);
256                                                    $app_id = rand(1,100000) . ',';
257                                                    $app_idstr = 'app_id,';
258                                            }
259                                    }
260                                  $this->db->query("INSERT INTO $appstbl "                                  $this->db->query("INSERT INTO $appstbl "
261                                          . "(app_name,app_title,app_enabled,app_order,app_tables,app_version) "                                          . "($app_idstr app_name,app_title,app_enabled,app_order,app_tables,app_version) "
262                                          . "VALUES ("                                          . "VALUES ("
263                                            . $app_id
264                                          . "'" . $setup_info[$appname]['name'] . "',"                                          . "'" . $setup_info[$appname]['name'] . "',"
265                                          . "'" . $setup_info[$appname]['title'] . "',"                                          . "'" . $setup_info[$appname]['title'] . "',"
266                                          . $enable . ","                                          . $enable . ","

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26