Cleanup script name.
authorJan Schneider <jan@horde.org>
Fri, 30 Apr 2010 09:50:23 +0000 (11:50 +0200)
committerJan Schneider <jan@horde.org>
Fri, 30 Apr 2010 10:07:06 +0000 (12:07 +0200)
whups/lib/Whups.php
whups/ticket/deleteAttachment.php [deleted file]
whups/ticket/delete_attachment.php [new file with mode: 0644]

index 257342a..bfd809e 100644 (file)
@@ -843,7 +843,7 @@ class Whups {
         // Admins can delete attachments.
         if (Whups::hasPermission($queue, 'queue', Horde_Perms::DELETE)) {
             $url = Horde_Util::addParameter(
-                Horde::applicationUrl('ticket/deleteAttachment.php'),
+                Horde::applicationUrl('ticket/delete_attachment.php'),
                 array('file' => $file['name'],
                       'id' => $ticket,
                       'url' => Horde::selfUrl(true, false, true)));
diff --git a/whups/ticket/deleteAttachment.php b/whups/ticket/deleteAttachment.php
deleted file mode 100644 (file)
index d9b0edb..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * Displays and handles the form to delete an attachment from the ticket.
- *
- * Copyright 2001-2002 Robert E. Coyle <robertecoyle@hotmail.com>
- * Copyright 2001-2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file LICENSE for license information (BSD). If you
- * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
- */
-
-require_once dirname(__FILE__) . '/../lib/Application.php';
-Horde_Registry::appInit('whups');
-
-$ticket = Whups::getCurrentTicket();
-if (!Whups::hasPermission($ticket->get('queue'), 'queue', Horde_Perms::DELETE)) {
-    $notification->push(_("Permission Denied"), 'horde.error');
-    header('Location: ' . Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true));
-    exit;
-}
-
-$file = basename(Horde_Util::getFormData('file'));
-$ticket->change('delete-attachment', $file);
-$result = $ticket->commit();
-if (is_a($result, 'PEAR_Error')) {
-    $notification->push($result, 'horde.error');
-} else {
-    $notification->push(sprintf(_("Attachment %s deleted."), $file), 'horde.success');
-}
-
-if ($url = Horde_Util::getFormData('url')) {
-    header('Location: ' . $url);
-} else {
-    header('Location: ' . Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true));
-}
diff --git a/whups/ticket/delete_attachment.php b/whups/ticket/delete_attachment.php
new file mode 100644 (file)
index 0000000..d9b0edb
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Displays and handles the form to delete an attachment from the ticket.
+ *
+ * Copyright 2001-2002 Robert E. Coyle <robertecoyle@hotmail.com>
+ * Copyright 2001-2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file LICENSE for license information (BSD). If you
+ * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
+ */
+
+require_once dirname(__FILE__) . '/../lib/Application.php';
+Horde_Registry::appInit('whups');
+
+$ticket = Whups::getCurrentTicket();
+if (!Whups::hasPermission($ticket->get('queue'), 'queue', Horde_Perms::DELETE)) {
+    $notification->push(_("Permission Denied"), 'horde.error');
+    header('Location: ' . Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true));
+    exit;
+}
+
+$file = basename(Horde_Util::getFormData('file'));
+$ticket->change('delete-attachment', $file);
+$result = $ticket->commit();
+if (is_a($result, 'PEAR_Error')) {
+    $notification->push($result, 'horde.error');
+} else {
+    $notification->push(sprintf(_("Attachment %s deleted."), $file), 'horde.success');
+}
+
+if ($url = Horde_Util::getFormData('url')) {
+    header('Location: ' . $url);
+} else {
+    header('Location: ' . Horde::applicationUrl($prefs->getValue('whups_default_view') . '.php', true));
+}