index b9d34dc6f47d4e5ffbf99a7e46df8658c3854875..80d51ebc717c2f8496b6008c9b698f72772fd7d8 100644 (file)
function check_and_reload()
{
function check_and_reload()
{
+ global $ui;
/* Check if class_location.inc has changed, this is the case
if we have installed or removed plugins.
/* Check if class_location.inc has changed, this is the case
if we have installed or removed plugins.
if(session::is_set("class_location.inc:timestamp")){
$tmp = stat("../include/class_location.inc");
if($tmp['mtime'] != session::get("class_location.inc:timestamp")){
if(session::is_set("class_location.inc:timestamp")){
$tmp = stat("../include/class_location.inc");
if($tmp['mtime'] != session::get("class_location.inc:timestamp")){
-
- /* Refresh users ACLs */
- $ui= get_userinfo();
- $ui->loadACL();
- session::set('ui',$ui);
-
- /* Reset menu and iconmenu */
- if(session::is_set("plist")){
- $plist = session::get("plist");
- $plist->reset_menus();
- session::set("plist",$plist);
- }
+ session::un_set("plist");
}
}
$tmp = stat("../include/class_location.inc");
}
}
$tmp = stat("../include/class_location.inc");
if ($this->current['MAILMETHOD'] == ""){
$ldap->search ("(objectClass=goMailServer)", array('cn'));
$this->data['SERVERS']['IMAP']= array();
if ($this->current['MAILMETHOD'] == ""){
$ldap->search ("(objectClass=goMailServer)", array('cn'));
$this->data['SERVERS']['IMAP']= array();
- error_reporting(0);
while ($attrs= $ldap->fetch()){
$name= $attrs['cn'][0];
while ($attrs= $ldap->fetch()){
$name= $attrs['cn'][0];
- $this->data['SERVERS']['IMAP'][$name]= $name;
+ $this->data['SERVERS']['IMAP'][$name]=
+ array(
+ "server_dn" => $attrs['dn'],
+ "connect" => "",
+ "admin" => "",
+ "password" => "",
+ "sieve_server"=> "",
+ "sieve_option"=> "",
+ "sieve_port" => "");
}
}
- error_reporting(E_ALL);
} else {
$ldap->search ("(&(objectClass=goImapServer)(goImapSieveServer=*))",
array('goImapName', 'goImapConnect', 'goImapAdmin', 'goImapPassword',
} else {
$ldap->search ("(&(objectClass=goImapServer)(goImapSieveServer=*))",
array('goImapName', 'goImapConnect', 'goImapAdmin', 'goImapPassword',
}
/* Fix name, if it contains a replace tag */
}
/* Fix name, if it contains a replace tag */
- $name= @LDAP::fix($name);
+ $name= preg_replace('/\\\\,/', ',', @LDAP::fix($name));
/* Check if current name is too long, then cut it */
if(mb_strlen($name, 'UTF-8')> $max_size){
/* Check if current name is too long, then cut it */
if(mb_strlen($name, 'UTF-8')> $max_size){
*/
function getShareList($listboxEntry = false)
{
*/
function getShareList($listboxEntry = false)
{
- $tmp = get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))","server",get_ou("serverou"),
+ $tmp = get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))","server/goShareServer",get_ou("serverou"),
$this->current['BASE'],array("goExportEntry","cn"), GL_NONE);
$return =array();
foreach($tmp as $entry){
$this->current['BASE'],array("goExportEntry","cn"), GL_NONE);
$return =array();
foreach($tmp as $entry){
foreach($res as $entry){
foreach($res as $entry){
- $acl = $ui->get_permissions($entry['dn'],"server/goShareServer","");
+ $acl = $ui->get_permissions($entry['dn'],"server","");
if(isset($entry['goExportEntry']['count'])){
unset($entry['goExportEntry']['count']);
}
if(isset($entry['goExportEntry']['count'])){
unset($entry['goExportEntry']['count']);
}