summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ee19394)
raw | patch | inline | side by side (parent: ee19394)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 12 Jul 2006 13:26:53 +0000 (13:26 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 12 Jul 2006 13:26:53 +0000 (13:26 +0000) |
* modified pluglist to get hands on all classes with plInfo()
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4129 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4129 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/include/class_acl.inc b/include/class_acl.inc
index e5b604bc438f1a608e66ed7872c2ea5f941d808e..89d443ab571b659e60fc4eacc69a5a36f01d85a0 100644 (file)
--- a/include/class_acl.inc
+++ b/include/class_acl.inc
}
}
- /* Store ACL in mail object? */
+ /* Store ACL in main object? */
if (isset($_POST['submit_new_acl'])){
$this->gosaAclEntry[$this->currentIndex]['type']= $this->aclType;
$this->gosaAclEntry[$this->currentIndex]['members']= $this->recipients;
if (count($this->aclContents[$key]) && isset($this->aclContents[$key][0]) &&
$this->aclContents[$key][0] != ""){
$summary.= "$key, ";
+ continue;
+ }
+ if (!isset($this->aclContents[$key][0]) && count($this->aclContents[$key])){
+ $summary.= "$key, ";
}
}
}
/* Show main page */
$smarty->assign("dialogState", $this->dialogState);
+
return ($smarty->fetch (get_template_path('acl.tpl')));
}
if (isset($entry['acl'])){
$acl= "";
foreach ($entry['acl'] as $name => $object){
- $acl.= "$name, ";
+ if (count($object)){
+ $acl.= "$name, ";
+ }
}
$summary.= sprintf(_("Contains settings for these objects: %s"), preg_replace('/, $/', '', $acl));
}
$acl= ":";
if (isset($entry['acl'])){
foreach ($entry['acl'] as $object => $contents){
- $acl.= $object.";";
-
- foreach($contents as $attr => $permission){
- /* First entry? Its the one for global settings... */
- if ($attr == '0'){
- $acl.= $permission;
- } else {
- $acl.= '#'.$attr.';'.$permission;
- }
+ /* Only save, if we've some contents in there... */
+ if (count($contents)){
+ $acl.= $object.";";
+
+ foreach($contents as $attr => $permission){
+ /* First entry? Its the one for global settings... */
+ if ($attr == '0'){
+ $acl.= $permission;
+ } else {
+ $acl.= '#'.$attr.';'.$permission;
+ }
+
+ }
+ $acl.= ',';
}
- $acl.= ',';
}
}
index 4cd8786c472a98dc3c6c3368c4cc1a8ef3d445e3..81048f1489f1ebbab93de532877844fa1e989752 100644 (file)
/* Create dirlist for all plugins */
$this->dirlist= $this->get_plugins ($this->dirlist, $this->config->data);
+
+ /* Fill info part of pluglist */
+ $classes= get_declared_classes();
+ foreach (get_declared_classes() as $cname){
+ if (method_exists($cname, 'plInfo')){
+ $this->info[$cname]= @call_user_func(array($cname, 'plInfo'));
+ }
+ }
}
function get_plugins($list, $config)
{
/* Error reporting, because I'm getting strange messages in PHP 4.2.x */
- error_reporting(0);
if (!isset($config['PATH']) && !isset($config['CLASS'])){
if (is_array($config)){
foreach ($config as $val){
$list[$this->index++]= $config['PATH'];
if (isset($config['CLASS'])){
$class= $config['CLASS'];
- $this->info[$class]= call_user_func(array($class, 'plInfo'));
}
}
}
- error_reporting(E_ALL);
return ($list);
}
diff --git a/include/functions.inc b/include/functions.inc
index 899aadb8dbe0c19d33313e32b7c524ceb99cd48b..7d731c918b43f5598deb84a1d8b039ec989b16c8 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
return $BASE_DIR;
}
+
+function obj_is_readable($dn, $object, $attribute)
+{
+ global $ui;
+
+ return preg_match('/r/', $ui->get_permissions($dn, $object, $attribute));
+}
+
+
+function obj_is_writable($dn, $object, $attribute)
+{
+ global $ui;
+
+ return preg_match('/w/', $ui->get_permissions($dn, $object, $attribute));
+}
+
+
+
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc
index 9206228a0cdfb5e8439a61d96a33fdec6ac3b7ed..56476efcbf6138529ccc373e26cec58b12aee72d 100644 (file)
}
}
+
+ function plInfo()
+ {
+ return (array("plDescription" => _("Departments"),
+ "plSelfModify" => FALSE,
+ "plDepends" => array("objectClass" => "gosaDepartment", "description" => _("Departments")),
+ "description" => _("Description"),
+ "c" => _("Country"),
+ "l" => _("Location"),
+ "telephoneNumber" => _("Telephone"),
+ "ou" => _("Department name") ));
+ }
+
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc
index 815f40da2b874a87de132c048275da4bac52637c..99f784c5a7703751a5dafbe97cba54b6ec4d1211 100644 (file)
$this->DivListDepartment->save_object();
}
- function plInfo()
- {
- return (array("plDescription" => _("Departments"),
- "plSelfModify" => FALSE,
- "plDepends" => array("objectClass" => "gosaDepartment", "description" => _("Departments")),
- "description" => _("Description"),
- "c" => _("Country"),
- "l" => _("Location"),
- "telephoneNumber" => _("Telephone"),
- "ou" => _("Department name") ));
- }
-
-
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>