summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bee81f3)
raw | patch | inline | side by side (parent: bee81f3)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 May 2006 09:56:34 +0000 (09:56 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 May 2006 09:56:34 +0000 (09:56 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3577 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_plugin.inc | patch | blob | history | |
include/class_tabs.inc | patch | blob | history |
index 15180d73cbd1719b2805435b63ce8ae03a597d83..7ba3a4054bb09fe2dd89ca1b08586507422ee2e2 100644 (file)
--- a/include/class_plugin.inc
+++ b/include/class_plugin.inc
}
+
+ /* Add possibility to stop remove process */
+ function allow_remove()
+ {
+ $reason= "";
+ return $reason;
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/include/class_tabs.inc b/include/class_tabs.inc
index 689d89268149b06d7e47ceb8c7d23c8f5a040e0d..e0e8dbe422b0bf555c7fe25940a04bdf3b5aa0bf 100644 (file)
--- a/include/class_tabs.inc
+++ b/include/class_tabs.inc
function delete()
{
+ /* Check if all plugins will ACK for deletion */
+ foreach (array_reverse($this->by_object) as $key => $obj){
+ $reason= $obj->allow_remove();
+ if ($reason != ""){
+ print_red(sprintf(_("Delete process has been canceled by plugin '%s': %s"), $key, $reason));
+ return;
+ }
+ }
+
/* Delete for all plugins */
foreach (array_reverse($this->by_object) as $key => $obj){
$obj->remove_from_parent();