[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: developer_tools/inc class.bolangfile.inc.php,1.8
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: developer_tools/inc class.bolangfile.inc.php,1.8.2.2.2.3,1.8.2.2.2.4 class.solangfile.inc.php,1.9.2.4.2.6,1.9.2.4.2.7 |
Date: |
Thu, 01 May 2003 21:15:13 -0400 |
Update of /cvsroot/phpgroupware/developer_tools/inc
In directory subversions:/tmp/cvs-serv4127/inc
Modified Files:
Tag: Version-0_9_16-branch
class.bolangfile.inc.php class.solangfile.inc.php
Log Message:
some small fixes:
- api messages go under 'comon' not 'phpgwapi'
- destination language selectbox send the form now on change
- create_notify() added to the array of lang-functions
- quoted all db-querys
Index: class.bolangfile.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/developer_tools/inc/class.bolangfile.inc.php,v
retrieving revision 1.8.2.2.2.3
retrieving revision 1.8.2.2.2.4
diff -C2 -r1.8.2.2.2.3 -r1.8.2.2.2.4
*** class.bolangfile.inc.php 7 Apr 2003 00:32:22 -0000 1.8.2.2.2.3
--- class.bolangfile.inc.php 2 May 2003 01:15:10 -0000 1.8.2.2.2.4
***************
*** 99,103 ****
'message_id' => $mess_id,
'content' => $entry['content'],
! 'app_name' => $entry['app_name'],
'lang' => 'en'
);
--- 99,103 ----
'message_id' => $mess_id,
'content' => $entry['content'],
! 'app_name' => $entry['app_name'] ==
'phpgwapi' ? 'common' : $entry['app_name'],
'lang' => 'en'
);
***************
*** 135,139 ****
$this->common_langarray =
$this->so->add_app('phpgwapi',$userlang);
}
! $plist = $this->so->missing_app($app,$userlang);
foreach($plist as $p => $loc)
{
--- 135,144 ----
$this->common_langarray =
$this->so->add_app('phpgwapi',$userlang);
}
! $plist = $this->so->missing_app($app =
trim($app),$userlang);
!
! if ($app == 'phpgwapi') // phpgwapi is not used ==>
common
! {
! $app = 'common';
! }
foreach($plist as $p => $loc)
{
***************
*** 142,146 ****
{
$this->missing_langarray[$_mess_id]['message_id'] = $_mess_id;
!
$this->missing_langarray[$_mess_id]['app_name'] = trim($app);
$this->missing_langarray[$_mess_id]['content'] = $p;
}
--- 147,151 ----
{
$this->missing_langarray[$_mess_id]['message_id'] = $_mess_id;
!
$this->missing_langarray[$_mess_id]['app_name'] = $app;
$this->missing_langarray[$_mess_id]['content'] = $p;
}
Index: class.solangfile.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/developer_tools/inc/class.solangfile.inc.php,v
retrieving revision 1.9.2.4.2.6
retrieving revision 1.9.2.4.2.7
diff -C2 -r1.9.2.4.2.6 -r1.9.2.4.2.7
*** class.solangfile.inc.php 19 Apr 2003 18:40:10 -0000 1.9.2.4.2.6
--- class.solangfile.inc.php 2 May 2003 01:15:10 -0000 1.9.2.4.2.7
***************
*** 25,33 ****
var $functions = array( // functions containing phrases
to translate and param#
! 'lang' => array(1),
! 'create_input_box' => array(1,3),
! 'create_check_box' => array(1,3),
! 'create_select_box' => array(1,4),
! 'create_text_area' => array(1,5),
'create_password_box' => array(1,3)
);
--- 25,34 ----
var $functions = array( // functions containing phrases
to translate and param#
! 'lang' => array(1),
! 'create_input_box' => array(1,3),
! 'create_check_box' => array(1,3),
! 'create_select_box' => array(1,4),
! 'create_text_area' => array(1,5),
! 'create_notify' => array(1,5),
'create_password_box' => array(1,3)
);
***************
*** 188,191 ****
--- 189,193 ----
define('SEP',filesystem_separator());
+ $langarray = array();
$fd = PHPGW_SERVER_ROOT . SEP . $app . SEP . 'setup';
$fn = $fd . SEP . 'phpgw_' . $userlang . '.lang';
***************
*** 272,293 ****
function loaddb($app_name,$userlang)
{
- $this->db->transaction_begin();
-
$langarray = $this->load_app($app_name,$userlang);
! @reset($langarray);
! while (list($x,$data) = @each($langarray))
{
! if (strlen($data['message_id']) >
MAX_MESSAGE_ID_LENGTH)
! {
! $data['message_id'] =
substr($data['message_id'],0,MAX_MESSAGE_ID_LENGTH);
! }
!
! $message_id =
$this->db->db_addslashes(substr($data['message_id'],0,MAX_MESSAGE_ID_LENGTH));
$addit = False;
/*echo '<br><br><pre> checking ' .
$data['message_id'] . "\t" . $data['app_name'] . "\t" . $userlang . "\t" .
$data['content'];*/
$this->db->query("SELECT COUNT(*) FROM
phpgw_lang"
! ." WHERE message_id='$message_id' AND
lang='$userlang' AND app_name='$app_name'",__LINE__,__FILE__);
$this->db->next_record();
--- 274,296 ----
function loaddb($app_name,$userlang)
{
$langarray = $this->load_app($app_name,$userlang);
+ if (!is_array($langarray))
+ {
+ return False;
+ }
! $this->db->transaction_begin();
!
! $userlang = $this->db->db_addslashes($userlang);
! foreach($langarray as $x => $data)
{
! $message_id =
$this->db->db_addslashes(trim(substr($data['message_id'],0,MAX_MESSAGE_ID_LENGTH)));
! $app =
$this->db->db_addslashes($data['app_name']);
! $content =
$this->db->db_addslashes($data['content']);
$addit = False;
/*echo '<br><br><pre> checking ' .
$data['message_id'] . "\t" . $data['app_name'] . "\t" . $userlang . "\t" .
$data['content'];*/
$this->db->query("SELECT COUNT(*) FROM
phpgw_lang"
! ." WHERE message_id='$message_id' AND
lang='$userlang' AND app_name='$app'",__LINE__,__FILE__);
$this->db->next_record();
***************
*** 307,312 ****
{
/* echo "<br>adding - insert
into lang values ('" . $data['message_id'] . "','$app_name','$userlang','" .
$data['content'] . "')"; */
! $this->db->query("INSERT into
phpgw_lang VALUES ('$message_id','$app_name','$userlang','"
! .
$this->db->db_addslashes($data['content']) . "')",__LINE__,__FILE__);
}
}
--- 310,314 ----
{
/* echo "<br>adding - insert
into lang values ('" . $data['message_id'] . "','$app_name','$userlang','" .
$data['content'] . "')"; */
! $this->db->query("INSERT into
phpgw_lang VALUES
('$message_id','$app','$userlang','$content'')",__LINE__,__FILE__);
}
}
***************
*** 315,321 ****
if($data['message_id'] &&
$data['content'])
{
! $this->db->query("UPDATE
phpgw_lang SET content='". $this->db->db_addslashes($data['content']) . "'"
. " WHERE
message_id='message_id'"
! . " AND
app_name='$app_name' AND lang='$userlang'",__LINE__,__FILE__);
if ($this->db->affected_rows()
> 0)
{
--- 317,323 ----
if($data['message_id'] &&
$data['content'])
{
! $this->db->query("UPDATE
phpgw_lang SET content='$content'"
. " WHERE
message_id='message_id'"
! . " AND app_name='$app'
AND lang='$userlang'",__LINE__,__FILE__);
if ($this->db->affected_rows()
> 0)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: developer_tools/inc class.bolangfile.inc.php,1.8.2.2.2.3,1.8.2.2.2.4 class.solangfile.inc.php,1.9.2.4.2.6,1.9.2.4.2.7,
Ralf Becker <address@hidden> <=