phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: setup lang.php,1.30.2.1,1.30.2.2


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: setup lang.php,1.30.2.1,1.30.2.2
Date: Sun, 15 Sep 2002 19:19:15 -0400

Update of /cvsroot/phpgroupware/setup
In directory subversions:/tmp/cvs-serv9288/setup

Modified Files:
      Tag: Version-0_9_14-branch
        lang.php 
Log Message:
Will now stop (error) when inserting bad data.

Index: lang.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/lang.php,v
retrieving revision 1.30.2.1
retrieving revision 1.30.2.2
diff -C2 -r1.30.2.1 -r1.30.2.2
*** lang.php    13 Apr 2002 01:57:56 -0000      1.30.2.1
--- lang.php    15 Sep 2002 23:19:13 -0000      1.30.2.2
***************
*** 61,66 ****
                                if ($upgrademethod == 'addonlynew')
                                {
!                                       //echo "<br>Test: addonlynew - select 
count(*) from lang where lang='$lang'";
!                                       
$GLOBALS['phpgw_setup']->db->query("SELECT COUNT(*) FROM lang WHERE 
lang='$lang'",__LINE__,__FILE__);
                                        
$GLOBALS['phpgw_setup']->db->next_record();
  
--- 61,66 ----
                                if ($upgrademethod == 'addonlynew')
                                {
!                                       //echo "<br>Test: addonlynew - select 
count(*) from lang where lang='".$lang."'";
!                                       
$GLOBALS['phpgw_setup']->db->query("SELECT COUNT(*) FROM lang WHERE 
lang='".$lang."'",__LINE__,__FILE__);
                                        
$GLOBALS['phpgw_setup']->db->next_record();
  
***************
*** 103,107 ****
                                                        {
                                                                //echo 
'<br>Test: addmissing';
!                                                               
$GLOBALS['phpgw_setup']->db->query("SELECT COUNT(*) FROM lang WHERE 
message_id='".$message_id."' and 
lang='".$GLOBALS['phpgw_setup']->db_lang."'",__LINE__,__FILE__);
                                                                
$GLOBALS['phpgw_setup']->db->next_record();
  
--- 103,107 ----
                                                        {
                                                                //echo 
'<br>Test: addmissing';
!                                                               
$GLOBALS['phpgw_setup']->db->query("SELECT COUNT(*) FROM lang WHERE 
message_id='".$message_id."' and lang='".$GLOBALS['phpgw_setup']->db_lang."' 
and (app_name='".$app_name."' or app_name='common')",__LINE__,__FILE__);
                                                                
$GLOBALS['phpgw_setup']->db->next_record();
  
***************
*** 117,122 ****
                                                                if($message_id 
&& $content)
                                                                {
!                                                                       // echo 
"<br>adding - insert into lang values 
('$message_id','$app_name','$GLOBALS['phpgw_setup']->db_lang','$content')";
!                                                                       
$GLOBALS['phpgw_setup']->db->query("INSERT into lang VALUES 
('$message_id','$app_name','".$GLOBALS['phpgw_setup']->db_lang."','$content')",__LINE__,__FILE__);
                                                                }
                                                        }
--- 117,126 ----
                                                                if($message_id 
&& $content)
                                                                {
!                                                                       //echo 
"<br>adding - insert into lang values 
('".$message_id."','".$app_name."','".$GLOBALS['phpgw_setup']->db_lang."','".$content."')";
!                                                                       $result 
= $GLOBALS['phpgw_setup']->db->query("INSERT INTO 
lang(message_id,app_name,lang,content) 
VALUES('".$message_id."','".$app_name."','".$GLOBALS['phpgw_setup']->db_lang."','".$content."')",__LINE__,__FILE__);
!                                                                       if 
(intval($result) <= 0)
!                                                                       {
!                                                                               
echo '<br>Error inserting record: lang values 
('".$message_id."','".$app_name."','".$GLOBALS['phpgw_setup']->db_lang."','".$content."')";
!                                                                       }
                                                                }
                                                        }
***************
*** 136,140 ****
        else
        {
!               if ($HTTP_POST_VARS['cancel'])
                {
                        Header('Location: index.php');
--- 140,144 ----
        else
        {
!               if ($GLOBALS['HTTP_POST_VARS']['cancel'])
                {
                        Header('Location: index.php');





reply via email to

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