summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 60f2931)
raw | patch | inline | side by side (parent: 60f2931)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Dec 2007 11:03:30 +0000 (11:03 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Dec 2007 11:03:30 +0000 (11:03 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8010 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_plugin.inc | patch | blob | history | |
include/class_tabs.inc | patch | blob | history |
index b71e576ca9b205b107d7e07509c0d45aefa6d54d..c7b2346e5ee01c77e65fc561c24f9c0dcb4c23c6 100644 (file)
--- a/include/class_plugin.inc
+++ b/include/class_plugin.inc
/* This can be set to render the tabulators in another stylesheet */
var $pl_notify= FALSE;
+ /* Object entry CSN */
+ var $entryCSN = "";
+ var $CSN_check_active = FALSE;
/* This variable indicates that this class can handle multiple dns at once. */
var $multiple_support = FALSE;
$ldap= $this->config->get_ldap_link();
if ($dn !== NULL){
+ /* Get entry CSN */
+ if($this->CSN_check_active){
+ $this->entryCSN = getEntryCSN($dn);
+ }
+
/* Load data to 'attrs' and save 'dn' */
if ($parent !== NULL){
$this->attrs= $parent->attrs;
/* Save data to object */
function save_object()
{
+ /* Update entry CSN if it is empty. */
+ if(empty($this->entryCSN) && $this->CSN_check_active){
+ $this->entryCSN = getEntryCSN($this->dn);
+ }
+
if($this->multiple_support_active){
foreach($this->attributes as $attr){
if(isset($_POST["use_".$attr])){
/* include global link_info */
$ldap= $this->config->get_ldap_link();
+ /* Save all plugins */
+ $this->entryCSN = "";
+
/* Start with empty array */
$this->attrs= array();
}
+ /* Check entryCSN */
+ if($this->CSN_check_active){
+ $current_csn = getEntryCSN($this->dn);
+ if($current_csn != $this->entryCSN && !empty($this->entryCSN) && !empty($current_csn)){
+ $this->entryCSN = $current_csn;
+ $message[] = _("The object has changed since opened in GOsa. Please ensure that nobody has done serious changes that may get lost if you save this entry.");
+ }
+ }
return ($message);
}
return($ret);
}
+
+ /* This function enables the entry Serial ID check.
+ * If an entry was edited while we have edited the entry too,
+ * an error message will be shown.
+ * To configure this check correctly read the FAQ.
+ */
+ function enable_CSN_check()
+ {
+ $this->CSN_check_active =TRUE;
+ }
+
+
function set_multi_edit_value()
{
diff --git a/include/class_tabs.inc b/include/class_tabs.inc
index c54739fb6c2b5d9c2f0e69c10479bac763001ac1..219c9d15c2d52c7a1f415300344dad4d750aa645 100644 (file)
--- a/include/class_tabs.inc
+++ b/include/class_tabs.inc
$obj->pl_notify= FALSE;
}
}
- $messages = array_unique($messages);
return ($messages);
}