Merged some duplicate code

This commit is contained in:
jengo 2000-12-24 09:55:51 +00:00
parent 5ef7bdf190
commit bddad0c03d
3 changed files with 14 additions and 29 deletions

View File

@ -302,18 +302,4 @@
return $accounts;
}
function accounts_const($line,$file)
{
global $phpgw, $phpgw_info;
//echo "accounts_const called<br>line: $line<br>$file";
$phpgw->accounts->phpgw_fillarray();
$phpgw->preferences->read_preferences();
$this->groups = $this->read_groups($phpgw_info["user"]["userid"]);
$this->apps = $this->read_apps($phpgw_info["user"]["userid"]);
$phpgw_info["user"]["apps"] = $this->apps;
}
}

View File

@ -14,6 +14,20 @@
class accounts extends accounts_
{
function accounts_const($line,$file)
{
global $phpgw, $phpgw_info;
//echo "accounts_const called<br>line: $line<br>$file";
$phpgw->accounts->phpgw_fillarray();
$phpgw->preferences->read_preferences();
$this->groups = $this->read_groups($phpgw_info["user"]["userid"]);
$this->apps = $this->read_apps($phpgw_info["user"]["userid"]);
$phpgw_info["user"]["apps"] = $this->apps;
}
// use this if you make any changes to phpgw_info, including preferences, config table changes, etc
function sync($line="",$file="")
{

View File

@ -210,19 +210,4 @@
return $accounts;
}
function accounts_const($line,$file)
{
global $phpgw, $phpgw_info;
//echo "accounts_const called<br>line: $line<br>$file";
$phpgw->accounts->phpgw_fillarray();
$phpgw->preferences->read_preferences();
$this->groups = $this->read_groups($phpgw_info["user"]["userid"]);
$this->apps = $this->read_apps($phpgw_info["user"]["userid"]);
$phpgw_info["user"]["apps"] = $this->apps;
}
}