diff --git a/include/functions.inc b/include/functions.inc
index 2262718feee29e28c1302b785ac85c3c0d73e246..46a0e53e9ddd51036441153a199723d2d01d374f 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
function ldap_expired_account($config, $userdn, $username)
{
function ldap_expired_account($config, $userdn, $username)
{
- $this->config= $config;
- $ldap= $this->config->get_ldap_link();
+ //$this->config= $config;
+ $ldap= $config->get_ldap_link();
$ldap->cat($userdn);
$attrs= $ldap->fetch();
$ldap->cat($userdn);
$attrs= $ldap->fetch();
{
global $config;
{
global $config;
- $pattern= "/^[^,]+,".preg_quote(get_people_ou())."/";
+ $pattern= "/^[^,]+,".preg_quote(get_people_ou())."/i";
$base= preg_replace($pattern, '', $dn);
/* Set to base, if we're not on a correct subtree */
$base= preg_replace($pattern, '', $dn);
/* Set to base, if we're not on a correct subtree */
$ar = false;
exec("lpstat -p", $ar);
foreach($ar as $val){
$ar = false;
exec("lpstat -p", $ar);
foreach($ar as $val){
- list($dummy, $printer, $rest)= split(' ', $val, 3);
+ @list($dummy, $printer, $rest)= split(' ', $val, 3);
if (preg_match('/^[^@]+$/', $printer)){
$res[$printer]= "$printer";
}
if (preg_match('/^[^@]+$/', $printer)){
$res[$printer]= "$printer";
}
global $config;
if (get_people_ou() != ""){
global $config;
if (get_people_ou() != ""){
- $dn= preg_replace('/,'.get_people_ou().'/' , ',', $dn);
+ $dn= preg_replace('/,'.get_people_ou().'/i' , ',', $dn);
}
if (get_groups_ou() != ""){
}
if (get_groups_ou() != ""){
- $dn= preg_replace('/,'.get_groups_ou().'/' , ',', $dn);
+ $dn= preg_replace('/,'.get_groups_ou().'/i' , ',', $dn);
}
$base= preg_replace ('/^[^,]+,/i', '', $dn);
}
$base= preg_replace ('/^[^,]+,/i', '', $dn);