X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_goShareServer.inc;h=5f580dde93e6d69bc6555e0bbb4f843506252a28;hb=ea192ab4f2ec780c4e2f21820ba653c67da84bb3;hp=0eab8bf07f1bbd5504b65091f6b0af6f9d4dc710;hpb=734a44a3de82f0b212a89cdaed0a92fa38cfb0c4;p=gosa.git
diff --git a/plugins/admin/systems/class_goShareServer.inc b/plugins/admin/systems/class_goShareServer.inc
index 0eab8bf07..5f580dde9 100644
--- a/plugins/admin/systems/class_goShareServer.inc
+++ b/plugins/admin/systems/class_goShareServer.inc
@@ -212,8 +212,26 @@ class goShareServer extends goService{
$this->goExportEntryList[$key]=$entry[$key];
}
- function deleteFromList($id){
- unset($this->goExportEntryList[$id]);
+ function deleteFromList($id)
+ {
+ /* Check if the share is used by someone */
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(|(gotoProfileServer=*|$id)(gotoShare=*|$id|*))", array("cn"));
+ $cnt= $ldap->count();
+ if ($cnt){
+ $msg= sprintf(_("The share can't be removed since it is still used by %d users:"), $cnt);
+ $msg.= "