[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: etemplate/inc class.soetemplate.inc.php, 1.25, 1
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: etemplate/inc class.soetemplate.inc.php, 1.25, 1.26 |
Date: |
Tue, 08 Jul 2003 20:00:40 -0400 |
Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv28153
Modified Files:
class.soetemplate.inc.php
Log Message:
fix for pgsql 7.3
Index: class.soetemplate.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.soetemplate.inc.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** class.soetemplate.inc.php 27 Mar 2003 23:43:37 -0000 1.25
--- class.soetemplate.inc.php 9 Jul 2003 00:00:37 -0000 1.26
***************
*** 202,206 ****
$pref_templ =
$GLOBALS['phpgw_info']['server']['template_set'];
! $sql = "SELECT * FROM $this->db_name WHERE
et_name='$this->name' AND ";
if (is_array($name))
{
--- 202,206 ----
$pref_templ =
$GLOBALS['phpgw_info']['server']['template_set'];
! $sql = "SELECT * FROM $this->db_name WHERE
et_name='".$this->db->db_addslashes($this->name)."' AND ";
if (is_array($name))
{
***************
*** 209,217 ****
if ($template == 'default')
{
! $sql .= "(et_template='$pref_templ' OR
et_template='')";
}
else
{
! $sql .= "et_template='$this->template'";
}
$sql .= ' AND ';
--- 209,217 ----
if ($template == 'default')
{
! $sql .=
"(et_template='".$this->db->db_addslashes($pref_templ)."' OR et_template='')";
}
else
{
! $sql .=
"et_template='".$this->db->db_addslashes($this->template)."'";
}
$sql .= ' AND ';
***************
*** 222,234 ****
if ($lang == 'default' || $name['lang'] == 'default')
{
! $sql .= "(et_lang='$pref_lang' OR et_lang='')";
}
else
{
! $sql .= "et_lang='$this->lang'";
}
if ($this->version != '')
{
! $sql .= "AND et_version='$this->version'";
}
$sql .= " ORDER BY et_lang DESC,et_template
DESC,et_version DESC";
--- 222,234 ----
if ($lang == 'default' || $name['lang'] == 'default')
{
! $sql .=
"(et_lang='".$this->db->db_addslashes($pref_lang)."' OR et_lang='')";
}
else
{
! $sql .=
"et_lang='".$this->db->db_addslashes($this->lang)."'";
}
if ($this->version != '')
{
! $sql .= "AND
et_version='".$this->db->db_addslashes($this->version)."'";
}
$sql .= " ORDER BY et_lang DESC,et_template
DESC,et_version DESC";
***************
*** 353,369 ****
$name = $name['name'];
}
! $sql = "SELECT
et_name,et_template,et_lang,et_group,et_version FROM $this->db_name WHERE
et_name LIKE '$name%'";
if ($template != '' && $template != 'default')
{
! $sql .= " AND et_template LIKE '$template%'";
}
if ($lang != '' && $lang != 'default')
{
! $sql .= " AND et_lang LIKE '$lang%'";
}
if ($this->version != '')
{
! $sql .= " AND et_version LIKE '$version%'";
}
$sql .= " ORDER BY et_name DESC,et_lang
DESC,et_template DESC,et_version DESC";
--- 353,369 ----
$name = $name['name'];
}
! $sql = "SELECT
et_name,et_template,et_lang,et_group,et_version FROM $this->db_name WHERE
et_name LIKE '".$this->db->db_addslashes($name)."%'";
if ($template != '' && $template != 'default')
{
! $sql .= " AND et_template LIKE
'".$this->db->db_addslashes($template)."%'";
}
if ($lang != '' && $lang != 'default')
{
! $sql .= " AND et_lang LIKE
'".$this->db->db_addslashes($lang)."%'";
}
if ($this->version != '')
{
! $sql .= " AND et_version LIKE
'".$this->db->db_addslashes($version)."%'";
}
$sql .= " ORDER BY et_name DESC,et_lang
DESC,et_template DESC,et_version DESC";
***************
*** 558,565 ****
$sql = "INSERT INTO $this->db_name (";
! for (reset($this->db_cols); list($db_col,$col) =
each($this->db_cols); )
{
$sql .= $db_col . ',';
! $vals .= "'" . addslashes($data[$col]) . "',";
}
$sql[strlen($sql)-1] = ')';
--- 558,565 ----
$sql = "INSERT INTO $this->db_name (";
! foreach ($this->db_cols as $db_col => $col)
{
$sql .= $db_col . ',';
! $vals .= $db_col == 'et_group' ?
intval($data[$col]).',' : "'" . addslashes($data[$col]) . "',";
}
$sql[strlen($sql)-1] = ')';
***************
*** 580,586 ****
function delete()
{
! for (reset($this->db_key_cols); list($db_col,$col) =
each($this->db_key_cols); )
{
! $vals .= ($vals ? ' AND ' : '') . $db_col .
"='" . $this->$col . "'";
}
$this->db->query("DELETE FROM $this->db_name WHERE
$vals",__LINE__,__FILE__);
--- 580,586 ----
function delete()
{
! foreach ($this->db_key_cols as $db_col => $col)
{
! $vals .= ($vals ? ' AND ' : '') . $db_col . '='
. ($db_col == 'et_group' ? intval($this->$col) : "'".$this->$col."'");
}
$this->db->query("DELETE FROM $this->db_name WHERE
$vals",__LINE__,__FILE__);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: etemplate/inc class.soetemplate.inc.php, 1.25, 1.26,
Ralf Becker <address@hidden> <=