one more before I passout. I have yanked conversion of id, so now you need to pass account_id only

This commit is contained in:
seek3r 2001-02-06 12:06:17 +00:00
parent f6430b723b
commit 7483d5a8f9
6 changed files with 6 additions and 20 deletions

View File

@ -34,9 +34,7 @@
{ {
global $phpgw, $phpgw_info; global $phpgw, $phpgw_info;
$this->db = $phpgw->db; $this->db = $phpgw->db;
if ($account_id == ""){ $account_id = $phpgw_info["user"]["account_id"]; } if ($account_id == False){ $this->account_id = $account_id; }
elseif (gettype($account_id) == "string") { $account_id = $this->name2id($account_id); }
$this->account_id = $account_id;
} }
function read() function read()

View File

@ -38,10 +38,7 @@
{ {
global $phpgw, $phpgw_info; global $phpgw, $phpgw_info;
$this->db = $phpgw->db; $this->db = $phpgw->db;
// if ($account_id == False) { $this->account_id = $phpgw_info["user"]["account_id"]; if ($account_id != False){ $this->account_id = $account_id; }
// }elseif (gettype($account_id) == "string") { $account_id = $phpgw->accounts->name2id($account_id); }
$this->account_id = $account_id;
} }
/**************************************************************************\ /**************************************************************************\

View File

@ -31,13 +31,11 @@
/**************************************************************************\ /**************************************************************************\
* Standard constructor for setting $this->account_id * * Standard constructor for setting $this->account_id *
\**************************************************************************/ \**************************************************************************/
function applications($account_id = "") function applications($account_id = False)
{ {
global $phpgw, $phpgw_info; global $phpgw, $phpgw_info;
$this->db = $phpgw->db; $this->db = $phpgw->db;
if ($account_id == ""){ $account_id = $phpgw_info["user"]["account_id"]; } if ($account_id == False){ $this->account_id = $account_id; }
elseif (gettype($account_id) == "string") { $account_id = $phpgw->accounts->name2id($account_id); }
$this->account_id = $account_id;
} }
/**************************************************************************\ /**************************************************************************\

View File

@ -108,7 +108,7 @@
if ($phpgw_info["flags"]["currentapp"] == "login") { if ($phpgw_info["flags"]["currentapp"] == "login") {
if ($login != ""){ if ($login != ""){
$login_array = explode("@",$login); $login_array = explode("@",$login);
$login_id = $phpgw->accounts->name2id($login_array[0]); $login_id = $this->accounts->name2id($login_array[0]);
$this->accounts->accounts($login_id); $this->accounts->accounts($login_id);
$this->preferences->preferences($login_id); $this->preferences->preferences($login_id);
} }

View File

@ -39,9 +39,7 @@
{ {
global $phpgw, $phpgw_info; global $phpgw, $phpgw_info;
$this->db = $phpgw->db; $this->db = $phpgw->db;
// if ($account_id == ""){ $account_id = $phpgw_info["user"]["account_id"]; } if ($account_id != False){ $this->account_id = $account_id; }
// elseif (gettype($account_id) == "string") { $account_id = $phpgw->accounts->name2id($account_id); }
$this->account_id = $account_id;
} }
/**************************************************************************\ /**************************************************************************\

View File

@ -105,9 +105,7 @@
} }
$this->update_dla(); $this->update_dla();
echo "account_lid: ".$this->account_lid."<br>";
$this->account_id = $phpgw->accounts->name2id($this->account_lid); $this->account_id = $phpgw->accounts->name2id($this->account_lid);
echo "account_id: ".$this->account_id."<br>";
$phpgw->acl->acl($this->account_id); $phpgw->acl->acl($this->account_id);
$phpgw->accounts->accounts($this->account_id); $phpgw->accounts->accounts($this->account_id);
$phpgw->preferences->preferences($this->account_id); $phpgw->preferences->preferences($this->account_id);
@ -137,9 +135,6 @@ echo "account_id: ".$this->account_id."<br>";
function read_repositories() function read_repositories()
{ {
global $phpgw_info, $phpgw; global $phpgw_info, $phpgw;
// if (gettype($account_id) == "string") { $account_id = $phpgw->accounts->name2id($account_id); }
// $this->account_id = $account_id;
echo "step 1<br>";
$phpgw->acl->acl($this->account_id); $phpgw->acl->acl($this->account_id);
$phpgw->accounts->accounts($this->account_id); $phpgw->accounts->accounts($this->account_id);
$phpgw->preferences->preferences($this->account_id); $phpgw->preferences->preferences($this->account_id);