mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-23 21:51:14 +01:00
fixes authing against ldap
This commit is contained in:
parent
5c9323a2c4
commit
ea94c3fa4d
@ -59,20 +59,9 @@
|
|||||||
|
|
||||||
function phpgw_()
|
function phpgw_()
|
||||||
{
|
{
|
||||||
global $phpgw_info, $sessionid, $login;
|
|
||||||
/************************************************************************\
|
/************************************************************************\
|
||||||
* Required classes *
|
* Required classes *
|
||||||
\************************************************************************/
|
\************************************************************************/
|
||||||
$this->db = CreateObject("phpgwapi.db");
|
|
||||||
$this->db->Host = $phpgw_info["server"]["db_host"];
|
|
||||||
$this->db->Type = $phpgw_info["server"]["db_type"];
|
|
||||||
$this->db->Database = $phpgw_info["server"]["db_name"];
|
|
||||||
$this->db->User = $phpgw_info["server"]["db_user"];
|
|
||||||
$this->db->Password = $phpgw_info["server"]["db_pass"];
|
|
||||||
if ($this->debug) {
|
|
||||||
$this->db->Debug = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->common = CreateObject("phpgwapi.common");
|
$this->common = CreateObject("phpgwapi.common");
|
||||||
$this->hooks = CreateObject("phpgwapi.hooks");
|
$this->hooks = CreateObject("phpgwapi.hooks");
|
||||||
$this->auth = createobject("phpgwapi.auth");
|
$this->auth = createobject("phpgwapi.auth");
|
||||||
@ -87,6 +76,19 @@
|
|||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* Core functions *
|
* Core functions *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
|
function load_db() {
|
||||||
|
global $phpgw_info;
|
||||||
|
$this->db = CreateObject("phpgwapi.db");
|
||||||
|
$this->db->Host = $phpgw_info["server"]["db_host"];
|
||||||
|
$this->db->Type = $phpgw_info["server"]["db_type"];
|
||||||
|
$this->db->Database = $phpgw_info["server"]["db_name"];
|
||||||
|
$this->db->User = $phpgw_info["server"]["db_user"];
|
||||||
|
$this->db->Password = $phpgw_info["server"]["db_pass"];
|
||||||
|
if ($this->debug) {
|
||||||
|
$this->db->Debug = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
function strip_html($s)
|
function strip_html($s)
|
||||||
{
|
{
|
||||||
return htmlspecialchars(stripslashes($s));
|
return htmlspecialchars(stripslashes($s));
|
||||||
@ -131,4 +133,4 @@
|
|||||||
return $this->translation->translate($key);
|
return $this->translation->translate($key);
|
||||||
}
|
}
|
||||||
} //end phpgw class
|
} //end phpgw class
|
||||||
?>
|
?>
|
||||||
|
@ -185,14 +185,17 @@
|
|||||||
\****************************************************************************/
|
\****************************************************************************/
|
||||||
/* Load main class */
|
/* Load main class */
|
||||||
$phpgw = CreateObject("phpgwapi.phpgw");
|
$phpgw = CreateObject("phpgwapi.phpgw");
|
||||||
$phpgw->phpgw_();
|
$phpgw->load_db();
|
||||||
print_debug('main class loaded');
|
|
||||||
|
|
||||||
/* Fill phpgw_info["server"] array */
|
/* Fill phpgw_info["server"] array */
|
||||||
$phpgw->db->query("select * from phpgw_config",__LINE__,__FILE__);
|
$phpgw->db->query("select * from phpgw_config",__LINE__,__FILE__);
|
||||||
while ($phpgw->db->next_record()) {
|
while ($phpgw->db->next_record()) {
|
||||||
$phpgw_info["server"][$phpgw->db->f("config_name")] = stripslashes($phpgw->db->f("config_value"));
|
$phpgw_info["server"][$phpgw->db->f("config_name")] = stripslashes($phpgw->db->f("config_value"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$phpgw->phpgw_();
|
||||||
|
print_debug('main class loaded');
|
||||||
|
|
||||||
// Handy little shortcut
|
// Handy little shortcut
|
||||||
$sep = $phpgw_info["server"]["dir_separator"];
|
$sep = $phpgw_info["server"]["dir_separator"];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user