summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: abca366)
raw | patch | inline | side by side (parent: abca366)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 Jan 2006 06:23:57 +0000 (06:23 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 Jan 2006 06:23:57 +0000 (06:23 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2507 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_glpiAttachmentPool.inc | patch | blob | history | |
plugins/admin/systems/remove_glpi.tpl | [new file with mode: 0644] | patch | blob |
diff --git a/plugins/admin/systems/class_glpiAttachmentPool.inc b/plugins/admin/systems/class_glpiAttachmentPool.inc
index 4cfd7f46e470d4887c2d0ef3f93316e0dcc177bf..fcfa664a12fd3b9e09d21b4ad582be16f32d269a 100644 (file)
var $Selected = array();
+ var $delAttach= "";
+
function glpiAttachmentPool ($config, $dn= NULL,$used=NULL)
{
plugin::plugin ($config, $dn);
$str = base64_decode(preg_replace("/_.*$/","",$str));
/* remove attach from db */
- $this->parent->handle->deleteAttachment($str);
+ $this->delAttach = $str;
+ $smarty->assign("warning", sprintf(_("You're about to delete the glpi attachment component '%s'."), $attach[$str]['name']));
+ return($smarty->fetch(get_template_path('remove_glpi.tpl', TRUE)));
}
-
+
/* Start editing entry */
if((preg_match("/^editAttach_/",$name))&&($only_once)){
$only_once = false;
}
}
+ if((isset($_POST['delete_glpi_confirm']))&&(isset($attach[$this->delAttach]))){
+ $this->parent->handle->deleteAttachment($this->delAttach);
+ $attach = $this->parent->handle->getAttachments();
+ }
+
/* Someone tries to upload a file */
if(($this->edit == true)&&(isset($_POST['upload']))){
if(!isset($_FILES['filename'])){
diff --git a/plugins/admin/systems/remove_glpi.tpl b/plugins/admin/systems/remove_glpi.tpl
--- /dev/null
@@ -0,0 +1,17 @@
+<div style="font-size:18px;">
+<img alt="" src="images/button_cancel.png" align=top> {t}Warning{/t}
+</div>
+<p>
+ {$warning}
+ {t}Please double check if your really want to do this since there is no way for GOsa to get your data back.{/t}
+</p>
+
+<p>
+ {t}Best thing to do before performing this action would be to save the current contents of your MySql database in a file. So - if you've done so - press 'Delete' to continue or 'Cancel' to abort.{/t}
+</p>
+
+<p class="plugbottom">
+ <input type=submit name="delete_glpi_confirm" value="{t}Delete{/t}">
+
+ <input type=submit name="delete_cancel" value="{t}Cancel{/t}">
+</p>