Commit 79aab43e authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes: #2129 ldapmanager tabs

parent 973ec986
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2003-2010 Cajus Pollmeier
Copyright (C) 2011 FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
class ldif extends plugin
{
/* attribute list for save action */
var $attributes = array();
var $objectclasses = array();
var $ldif;
function __construct (&$config)
{
/* Include config object */
$this->ldif = new ldiftab($config, $config->data['TABS']['LDAPMANAGERTABS'], "");
}
function execute()
{
/* Call parent execute */
plugin::execute();
/* Show main page */
return $this->ldif->execute();
}
/* Return plugin informations for acl handling */
static function plInfo()
{
return array(
"plShortName" => _("LDAP manager"),
"plDescription" => _("Allows the management of the ldap tree"),
"plIcon" => "plugins/ldapmanager/images/ldif.png",
"plSelfModify" => FALSE,
"plSection" => "addons",
"plPriority" => 20,
"plCategory" => array("ldapmanager" => array("objectClass" => "none", "description" => _("Ldap manager"))),
"plProvidedAcls" => array()
);
}
}
?>
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2003-2010 Cajus Pollmeier
Copyright (C) 2011 FusionDirectory
Copyright (C) 2013 FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -20,39 +18,5 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/* Remove locks created by this plugin */
if ($remove_lock){
if(session::is_set('ldif')){
// Nothing to unlock here
}
}
/* Remove this plugin from session */
if ( $cleanup ){
session::un_set('ldif');
}else{
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
session::un_set ('ldif');
}
/* Create phonelist object on demand */
if (!session::is_set('ldif')){
$ldif= new ldif ($config);
$ldif->set_acl_category("logview");
session::set('ldif',$ldif);
}
$ldif = session::get('ldif');
/* Execute formular */
$display= $ldif->execute ();
$display.= "<input type=\"hidden\" name=\"ignore\">\n";
/* Page header*/
$display= print_header(get_template_path('plugins/ldapmanager/images/ldif.png'), _("LDAP manager")).$display;
/* Store changes in session */
session::set('ldif',$ldif);
}
simplePlugin::mainInc('ldifexport', '', 'ldiftab', FALSE);
?>
......@@ -22,7 +22,6 @@
class ldiftab extends tabs
{
function ldiftab($config, $data, $dn, $cat = '', $copied_object = NULL)
{
parent::tabs($config, $data, $dn, '', $copied_object);
......@@ -32,5 +31,19 @@ class ldiftab extends tabs
{
}
/* Return plugin informations for acl handling */
static function plInfo()
{
return array(
"plShortName" => _("LDAP manager"),
"plDescription" => _("Allows the management of the ldap tree"),
"plIcon" => "plugins/ldapmanager/images/ldif.png",
"plSection" => "addons",
"plPriority" => 20,
"plCategory" => array("ldapmanager" => array("objectClass" => "none", "description" => _("Ldap manager"))),
"plProvidedAcls" => array()
);
}
}
?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment