diff --git a/gosa-plugins/connectivity/personal/connectivity/class_connectivity.inc b/gosa-plugins/connectivity/personal/connectivity/class_connectivity.inc
index c5ca2aa8c51138b0b89178b0a658218a0d43ba23..f1be45aa0e325c7886cf5f4ce8e2664b1b3cca2f 100644 (file)
{
/* Definitions */
var $plHeadline= "Connectivity";
- var $plDescription= "This does something";
+ var $plDescription= "Manage connectivity user settings";
+ var $plIcon = "plugins/connectivity/images/plugin.png";
/* attribute list for save action */
var $attributes= array();
function connectivity (&$config, $dn= NULL,$parent =NULL)
{
/* Preseed permissions */
+ $this->initTime = microtime(TRUE);
$this->dn= $dn;
$ui= get_userinfo();
/* Load accounts */
foreach ($config->data['TABS']['CONNECTIVITY'] as $plug){
- if (!plugin_available($plug['CLASS'])) {
+ if (!class_available($plug['CLASS']) || !plugin_available($plug['CLASS'])) {
continue;
}
+
$name= $plug['CLASS'];
$this->plugin_name[]= $name;
$this->plugin[$name]= new $name($config, $dn,$parent);
$this->plugin[$name]-> set_acl_category("users");
$this->plugin[$name]-> set_acl_base($this->dn);
}
+
+ // Create statistic table entry
+ stats::log('plugin', $class = get_class($this), $category = array($this->acl_category), $action = 'open',
+ $amount = 1, $duration = (microtime(TRUE) - $this->initTime));
+
}
function execute()
}
}
if (!$enabled){
- $display= "<img alt=\"\" src=\"images/stop.png\" align=\"middle\"> <b>".
- _("This account has no connectivity extensions.")."</b>";
+ $display= "<img alt=\"\" src=\"images/small-error.png\" align=\"middle\"> <b>".
+ msgPool::noValidExtension()."</b>";
$display.= back_to_main();
return ($display);
}
}
- /* Remove checkboxes in single edit mode */
if ($this->parent !== NULL){
foreach ($this->plugin_name as $name){
$this->plugin[$name]->parent= $this->parent;
/* Execude objects */
$is_first= true;
- $ReadOnly = (!isset($this->parent) || !$this->parent) && !session::is_set('edit');
-
foreach ($this->plugin_name as $name){
- $this->plugin[$name]->ReadOnly = $ReadOnly;
+ $this->plugin[$name]->read_only = &$this->read_only;
if (!$is_first){
- $display.= '<p class="seperator"> </p>';
+ $display.= '<hr>';
} else {
$is_first= false;
}
/* Save to LDAP */
function save()
{
+ // Append parent to sub-plugins.
+ if ($this->parent !== NULL){
+ foreach ($this->plugin_name as $name){
+ $this->plugin[$name]->parent= $this->parent;
+ }
+ }
+
/* Save objects */
foreach ($this->plugin_name as $name){
$this->plugin[$name]->dn= $this->dn;
function remove_from_parent()
{
+ // Append parent to sub-plugins.
+ if ($this->parent !== NULL){
+ foreach ($this->plugin_name as $name){
+ $this->plugin[$name]->parent= $this->parent;
+ }
+ }
+
/* Remove objects */
foreach ($this->plugin_name as $name){
$this->plugin[$name]->dn= $this->dn;
}
}
- function adapt_from_template($dn)
+ function adapt_from_template($dn, $skip= array())
{
/* Adapt objects */
foreach ($this->plugin_name as $name){
$this->plugin[$name]->dn= $this->dn;
- $this->plugin[$name]->adapt_from_template($dn);
+ $this->plugin[$name]->adapt_from_template($dn, $skip);
}
}
$this->plugin[$name]->set_multi_edit_values($plugin->get_multi_edit_values());
}
}
+
+
+ /* Return plugin informations for acl handling */
+ static function plInfo()
+ {
+ return (array(
+ "plShortName" => _("Connectivity"),
+ "plDepends" => array("user"),
+ "plPriority" => 20, // Position in tabs
+ "plSection" => array("personal" => _("My account")),
+ "plCategory" => array("users"),
+ "plOptions" => array(),
+
+ "plDescription" => _("Connectivity add-on"),
+ "plSelfModify" => TRUE,
+
+ "plProvidedAcls" => array()
+ ));
+ }
+
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: