[dev] Diff for horde/lib/Prefs/sql.php
Joel Vandal
jvandal@subi.to
Thu, 15 Aug 2002 12:53:20 -0400
This is a multi-part message in MIME format.
---------------------- multipart/alternative attachment
Hi,
I'm not sure if it's really a bug but with the default query of =
Prefs->getPref, I don't get only preferences for the $user, but from =
all...
--
Joel
Index: sql.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /repository/horde/lib/Prefs/sql.php,v
retrieving revision 1.46
diff -r1.46 sql.php
193c193
< return $this->_db->getAssoc('SELECT pref_name, pref_value =
FROM ' . $this->_params['table'] . ' WHERE pref_uid=3D' . =
$this->_db->quote($user) . ' AND (' . $where . ') AND pref_scope=3D' . =
$scope);
---
> return $this->_db->getAssoc('SELECT pref_name, pref_value =
FROM ' . $this->_params['table'] . ' WHERE pref_uid=3D' . =
$this->_db->quote($user) . ' AND (' . $where . ') AND (pref_scope=3D' . =
$scope . ')');
195c195
< return $this->_db->getOne('SELECT pref_value FROM ' . =
$this->_params['table'] . ' WHERE pref_uid=3D' . =
$this->_db->quote($user) . ' AND pref_name=3D' . =
$this->_db->quote($retrieve) . ' AND pref_scope=3D' . $scope);
---
> return $this->_db->getOne('SELECT pref_value FROM ' . =
$this->_params['table'] . ' WHERE pref_uid=3D' . =
$this->_db->quote($user) . ' AND pref_name=3D' . =
$this->_db->quote($retrieve) . ' AND (pref_scope=3D' . $scope . ')');
314a315
>=20
---------------------- multipart/alternative attachment
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial =
size=3D2>Hi,</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I'm not sure if it's really a bug but =
with the=20
default query of Prefs->getPref, I don't get only preferences for the =
$user,=20
but from all...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>--</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Joel</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3>Index:=20
sql.php<BR>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>RCS=20
file: /repository/horde/lib/Prefs/sql.php,v<BR>retrieving revision =
1.46<BR>diff=20
-r1.46=20
sql.php<BR>193c193<BR><  =
; =20
return $this->_db->getAssoc('SELECT pref_name, pref_value FROM ' . =
$this->_params['table'] . ' WHERE pref_uid=3D' . =
$this->_db->quote($user)=20
. ' AND (' . $where . ') AND pref_scope=3D' .=20
$scope);<BR>---<BR>> &n=
bsp; =20
return $this->_db->getAssoc('SELECT pref_name, pref_value FROM ' . =
$this->_params['table'] . ' WHERE pref_uid=3D' . =
$this->_db->quote($user)=20
. ' AND (' . $where . ') AND (pref_scope=3D' . $scope .=20
')');<BR>195c195<BR>< &=
nbsp; =20
return $this->_db->getOne('SELECT pref_value FROM ' .=20
$this->_params['table'] . ' WHERE pref_uid=3D' . =
$this->_db->quote($user)=20
. ' AND pref_name=3D' . $this->_db->quote($retrieve) . ' AND =
pref_scope=3D' .=20
$scope);<BR>---<BR>> &n=
bsp; =20
return $this->_db->getOne('SELECT pref_value FROM ' .=20
$this->_params['table'] . ' WHERE pref_uid=3D' . =
$this->_db->quote($user)=20
. ' AND pref_name=3D' . $this->_db->quote($retrieve) . ' AND =
(pref_scope=3D' .=20
$scope . ')');<BR>314a315<BR>> </FONT><BR></DIV></FONT></BODY></HTML>
---------------------- multipart/alternative attachment--