[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: setup/inc class.setup_detection.inc.php,1.11,1.1
From: |
Miles Lott <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: setup/inc class.setup_detection.inc.php,1.11,1.12 class.setup_lang.inc.php,1.7,1.8 |
Date: |
Sun, 17 Feb 2002 14:31:52 -0500 |
Update of /cvsroot/phpgroupware/setup/inc
In directory subversions:/tmp/cvs-serv18183/setup/inc
Modified Files:
class.setup_detection.inc.php class.setup_lang.inc.php
Log Message:
Change lang/languages tables to phpgw_lang/phpgw_languages
Index: class.setup_detection.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/inc/class.setup_detection.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.setup_detection.inc.php 3 Feb 2002 17:02:56 -0000 1.11
--- class.setup_detection.inc.php 17 Feb 2002 19:31:50 -0000 1.12
***************
*** 317,326 ****
{
$this->db->Halt_On_Error = 'no';
! if ($GLOBALS['phpgw_info']['setup']['stage']['db'] !=
10)
{
return '';
}
! $this->db->query("select distinct lang from lang;");
if ($this->db->num_rows() == 0)
{
--- 317,337 ----
{
$this->db->Halt_On_Error = 'no';
! if($GLOBALS['phpgw_info']['setup']['stage']['db'] != 10)
{
return '';
}
!
if($this->alessthanb($GLOBALS['setup_info']['phpgwapi']['currentver'],
'0.9.15.002'))
! {
! $langtbl = 'lang';
! $langstbl = 'languages';
! }
! else
! {
! $langtbl = 'phpgw_lang';
! $langstbl = 'phpgw_languages';
! }
!
! $this->db->query("SELECT DISTINCT lang FROM
$langtbl",__LINE__,__FILE__);
if ($this->db->num_rows() == 0)
{
***************
*** 330,341 ****
else
{
! while (@$this->db->next_record())
{
$GLOBALS['phpgw_info']['setup']['installed_langs'][$this->db->f('lang')] =
$this->db->f('lang');
}
! reset
($GLOBALS['phpgw_info']['setup']['installed_langs']);
! while (list ($key, $value) = each
($GLOBALS['phpgw_info']['setup']['installed_langs']))
{
! $sql = "select lang_name from languages
where lang_id = '".$value."';";
$this->db->query($sql);
$this->db->next_record();
--- 341,352 ----
else
{
! while(@$this->db->next_record())
{
$GLOBALS['phpgw_info']['setup']['installed_langs'][$this->db->f('lang')] =
$this->db->f('lang');
}
!
reset($GLOBALS['phpgw_info']['setup']['installed_langs']);
! while(list($key, $value) =
each($GLOBALS['phpgw_info']['setup']['installed_langs']))
{
! $sql = "SELECT lang_name FROM $langstbl
WHERE lang_id = '".$value."';";
$this->db->query($sql);
$this->db->next_record();
Index: class.setup_lang.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/inc/class.setup_lang.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.setup_lang.inc.php 14 Jan 2002 12:14:40 -0000 1.7
--- class.setup_lang.inc.php 17 Feb 2002 19:31:50 -0000 1.8
***************
*** 27,30 ****
--- 27,31 ----
{
var $langarray;
+ var $langtbl = 'phpgw_lang';
/*!
***************
*** 37,40 ****
--- 38,46 ----
$ConfigLang =
@$GLOBALS['HTTP_COOKIE_VARS']['ConfigLang'] ?
@$GLOBALS['HTTP_COOKIE_VARS']['ConfigLang'] :
@$GLOBALS['HTTP_POST_VARS']['ConfigLang'];
+
if($this->alessthanb($GLOBALS['setup_info']['phpgwapi']['currentver'],
'0.9.15.002'))
+ {
+ $this->langtbl = 'lang';
+ }
+
if(!$ConfigLang)
{
***************
*** 120,124 ****
echo '<br>get_langs(): checking db...' . "\n";
}
! $GLOBALS['phpgw_setup']->db->query("SELECT
DISTINCT(lang) FROM lang",__LINE__,__FILE__);
$langs = array();
--- 126,130 ----
echo '<br>get_langs(): checking db...' . "\n";
}
! $GLOBALS['phpgw_setup']->db->query("SELECT
DISTINCT(lang) FROM $this->langtbl",__LINE__,__FILE__);
$langs = array();
***************
*** 145,153 ****
echo '<br>drop_langs(): Working on: ' .
$appname;
}
! $GLOBALS['phpgw_setup']->db->query("SELECT
COUNT(message_id) FROM lang WHERE app_name='$appname'",__LINE__,__FILE__);
$GLOBALS['phpgw_setup']->db->next_record();
if($GLOBALS['phpgw_setup']->db->f(0))
{
! $GLOBALS['phpgw_setup']->db->query("DELETE FROM
lang WHERE app_name='$appname'",__LINE__,__FILE__);
return True;
}
--- 151,159 ----
echo '<br>drop_langs(): Working on: ' .
$appname;
}
! $GLOBALS['phpgw_setup']->db->query("SELECT
COUNT(message_id) FROM $this->langtbl WHERE
app_name='$appname'",__LINE__,__FILE__);
$GLOBALS['phpgw_setup']->db->next_record();
if($GLOBALS['phpgw_setup']->db->f(0))
{
! $GLOBALS['phpgw_setup']->db->query("DELETE FROM
$this->langtbl WHERE app_name='$appname'",__LINE__,__FILE__);
return True;
}
***************
*** 200,204 ****
$content =
$GLOBALS['phpgw_setup']->db->db_addslashes(chop($content));
!
$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();
--- 206,210 ----
$content =
$GLOBALS['phpgw_setup']->db->db_addslashes(chop($content));
!
$GLOBALS['phpgw_setup']->db->query("SELECT COUNT(*) FROM $this->langtbl WHERE
message_id='$message_id' and lang='"
.
$GLOBALS['phpgw_setup']->db_lang . "'",__LINE__,__FILE__);
$GLOBALS['phpgw_setup']->db->next_record();
***************
*** 210,216 ****
if($DEBUG)
{
! echo
"<br>add_langs(): adding - INSERT INTO lang VALUES
('$message_id','$app_name','$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__);
}
--- 216,222 ----
if($DEBUG)
{
! echo
"<br>add_langs(): adding - INSERT INTO $this->langtbl VALUES
('$message_id','$app_name','$phpgw_setup->db_lang','$content')";
}
!
$GLOBALS['phpgw_setup']->db->query("INSERT INTO $this->langtbl VALUES
('$message_id','$app_name','"
.
$GLOBALS['phpgw_setup']->db_lang . "','$content')",__LINE__,__FILE__);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: setup/inc class.setup_detection.inc.php,1.11,1.12 class.setup_lang.inc.php,1.7,1.8,
Miles Lott <address@hidden> <=