mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-11 16:38:52 +01:00
Remove the session->loginid references
This commit is contained in:
parent
5b8a879df7
commit
ade3d1ab28
@ -35,7 +35,7 @@
|
||||
|
||||
$sql = "insert into addressbook (owner,access,firstname,lastname,email,"
|
||||
. "hphone,wphone,fax,pager,mphone,ophone,street,city,state,zip,bday,"
|
||||
. "notes,company) values ('" . $phpgw->session->loginid . "','$access','"
|
||||
. "notes,company) values ('" . $phpgw_info["user"]["userid"] . "','$access','"
|
||||
. addslashes($firstname). "','"
|
||||
. addslashes($lastname) . "','"
|
||||
. addslashes($email) . "','"
|
||||
|
@ -27,7 +27,7 @@
|
||||
$phpgw->db->query("select owner from addressbook where con='$con'");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
if ($phpgw->db->f("owner") != $phpgw->session->loginid)
|
||||
if ($phpgw->db->f("owner") != $phpgw_info["user"]["userid"])
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
|
||||
|
||||
?>
|
||||
@ -45,10 +45,10 @@
|
||||
//exit;
|
||||
} else {
|
||||
|
||||
$phpgw->db->query("delete from addressbook where owner='" . $phpgw->session->loginid
|
||||
. "' and con='$con'");
|
||||
$phpgw->db->query("delete from addressbook where owner='" . $phpgw_info["user"]["userid"]
|
||||
. "' and con='$con'");
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
|
||||
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
@ -21,13 +21,13 @@
|
||||
|
||||
if (! $con) {
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
|
||||
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||
exit;
|
||||
}
|
||||
|
||||
if (! $submit) {
|
||||
$phpgw->db->query("SELECT * FROM addressbook WHERE owner='"
|
||||
. $phpgw->session->loginid . "' AND con='$con'");
|
||||
. $phpgw_info["user"]["userid"] . "' AND con='$con'");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
$fields = array(
|
||||
@ -75,7 +75,7 @@
|
||||
. "', notes='" . addslashes($notes)
|
||||
. "', company='" . addslashes($company)
|
||||
. "', access='" . addslashes($access)
|
||||
. "' WHERE owner='" . $phpgw->session->loginid . "' AND con='$con'";
|
||||
. "' WHERE owner='" . $phpgw_info["user"]["userid"] . "' AND con='$con'";
|
||||
|
||||
$phpgw->db->query($sql);
|
||||
|
||||
|
@ -36,11 +36,11 @@
|
||||
if ($filter != "none") {
|
||||
$filtermethod = " access like '%,$filter,%' ";
|
||||
} else {
|
||||
$filtermethod = " (owner='" . $phpgw->session->loginid ."' OR access='public' "
|
||||
. $phpgw->accounts->sql_search("access") . " ) ";
|
||||
$filtermethod = " (owner='" . $phpgw_info["user"]["userid"] ."' OR access='public' "
|
||||
. $phpgw->accounts->sql_search("access") . " ) ";
|
||||
}
|
||||
} else {
|
||||
$filtermethod = " owner='" . $phpgw->session->loginid . "' ";
|
||||
$filtermethod = " owner='" . $phpgw_info["user"]["userid"] . "' ";
|
||||
}
|
||||
|
||||
if ($query) {
|
||||
|
@ -20,13 +20,13 @@
|
||||
include("../header.inc.php");
|
||||
if (! $con)
|
||||
Header("Location: " . $phpgw_info["server"]["webserver_url"] .
|
||||
"/addressbook/?sessionid=" . $phpgw->session->id);
|
||||
"/addressbook/?sessionid=" . $phpgw_info["user"]["sessionid"]);
|
||||
|
||||
if ($filter != "private")
|
||||
$filtermethod = " or access='public' " . $phpgw->groups->sql_search();
|
||||
|
||||
$phpgw->db->query("SELECT * FROM addressbook WHERE con='$con' AND (owner='"
|
||||
. $phpgw->session->loginid . "' $filtermethod)");
|
||||
. $phpgw_info["user"]["userid"] . "' $filtermethod)");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
$fields = array(
|
||||
|
Loading…
Reference in New Issue
Block a user