summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1c84bfb)
raw | patch | inline | side by side (parent: 1c84bfb)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 16 Jan 2008 08:09:15 +0000 (08:09 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 16 Jan 2008 08:09:15 +0000 (08:09 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8382 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_plugin.inc | patch | blob | history | |
gosa-core/include/functions.inc | patch | blob | history |
index 3194ffabbe15eb9e38b22cc2a2fff9a332f57268..346699bad1097b73fc8fb4655b2598460299b984 100644 (file)
}
/* Remove tags that may already be here... */
- $this->remove_objectClass("gosaAdministrativeUnitTag", &$at);
+ remove_objectClass("gosaAdministrativeUnitTag", &$at);
if (isset($at['gosaUnitTag'])){
unset($at['gosaUnitTag']);
}
index 314a0d05fd9a689d588bd344e7512e2dd555bdf1..8f45c429bada51671e6b1fbff1ca8cfb94dd8810 100644 (file)
}
+/* Add a given objectClass to an attrs entry */
+function add_objectClass($classes, &$attrs)
+{
+ if (is_array($classes)){
+ $list= $classes;
+ } else {
+ $list= array($classes);
+ }
+
+ foreach ($list as $class){
+ $attrs['objectClass'][]= $class;
+ }
+}
+
+
+/* Removes a given objectClass from the attrs entry */
+function remove_objectClass($classes, &$attrs)
+{
+ if (isset($attrs['objectClass'])){
+ /* Array? */
+ if (is_array($classes)){
+ $list= $classes;
+ } else {
+ $list= array($classes);
+ }
+
+ $tmp= array();
+ foreach ($attrs['objectClass'] as $oc) {
+ foreach ($list as $class){
+ if ($oc != $class){
+ $tmp[]= $oc;
+ }
+ }
+ }
+ $attrs['objectClass']= $tmp;
+ }
+}
+
+
function display_error_page()
{
$smarty= get_smarty();