Remove the now-obsolete upload wizard (it was never much used).
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 5 May 2014 01:07:33 +0000 (03:07 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 5 May 2014 01:07:33 +0000 (03:07 +0200)
perl/Sesse/pr0n/Registry.pm [deleted file]
perl/Sesse/pr0n/Wizard.pm [deleted file]
perl/Sesse/pr0n/pr0n.pm

diff --git a/perl/Sesse/pr0n/Registry.pm b/perl/Sesse/pr0n/Registry.pm
deleted file mode 100644 (file)
index 4ebd4f7..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# Not related to Apache2::Registry; generates a .reg file for Windows XP to import.
-
-package Sesse::pr0n::Registry;
-use strict;
-use warnings;
-
-use Sesse::pr0n::Common qw(error dberror);
-use Apache2::Request;
-
-sub handler {
-       my $r = shift;
-       my $dbh = Sesse::pr0n::Common::get_dbh();
-       my $vhost = $r->get_server_name;
-       chomp (my $desc = Sesse::pr0n::Templates::fetch_template($r, 'wizard-description'));
-
-       $r->content_type("application/octet-stream");
-       $r->headers_out->add('Content-disposition' => 'attachment; filename="' . $vhost . '.reg"');
-
-       $r->print("Windows Registry Editor Version 5.00\r\n\r\n");
-       $r->print("[HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Currentversion\\Explorer\\PublishingWizard\\PublishingWizard\\Providers\\$vhost]\r\n");
-       $r->print("\"Icon\"=\"http://$vhost/pr0n.ico\"\r\n");
-       $r->print("\"DisplayName\"=\"$vhost\"\r\n");
-       $r->print("\"Description\"=\"$desc\"\r\n");
-       $r->print("\"HREF\"=\"http://$vhost/wizard\"\r\n");
-       $r->print("");
-       $r->print("[HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Currentversion\\Explorer\\PublishingWizard\\InternetPhotoPrinting\\Providers\\$vhost]\r\n");
-       $r->print("\"Icon\"=\"http://$vhost/pr0n.ico\"\r\n");
-       $r->print("\"DisplayName\"=\"$vhost\"\r\n");
-       $r->print("\"Description\"=\"$desc\"\r\n");
-       $r->print("\"HREF\"=\"http://$vhost/wizard\"\r\n");
-
-       return Apache2::Const::OK;
-}
-       
-1;
-
-
diff --git a/perl/Sesse/pr0n/Wizard.pm b/perl/Sesse/pr0n/Wizard.pm
deleted file mode 100644 (file)
index a756a76..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-package Sesse::pr0n::Wizard;
-use strict;
-use warnings;
-
-use Sesse::pr0n::Common qw(error dberror);
-use Apache2::Request;
-
-sub handler {
-       my $r = shift;
-       my $apr = Apache2::Request->new($r);
-       my $dbh = Sesse::pr0n::Common::get_dbh();
-
-        # Internal? (Ugly?)
-       if ($r->get_server_name =~ /internal/ || $r->get_server_name =~ /skoyen\.bilder\.knatten\.com/ || $r->get_server_name =~ /lia\.heimdal\.org/) {
-               my $user = Sesse::pr0n::Common::check_access($r);
-               if (!defined($user)) {
-                       return Apache2::Const::OK;
-               }
-       }
-
-       # Find events
-       my $q = $dbh->prepare('SELECT event,date,name FROM events e JOIN last_picture_cache c USING (vhost,event) WHERE vhost=? ORDER BY last_picture DESC')
-               or dberror($r, "Couldn't list events");
-       $q->execute($r->get_server_name)
-               or dberror($r, "Couldn't get events");
-
-       $r->content_type('text/html; charset=utf-8');
-       $r->print(Sesse::pr0n::Templates::fetch_template($r, 'wizard-header'));
-       
-       while (my $ref = $q->fetchrow_hashref()) {
-               my $id = $ref->{'event'};
-               my $date = $ref->{'date'};
-               my $name = $ref->{'name'};
-               
-               $r->print("              <option value=\"$id\">$name</option>\n");
-       }
-
-       $r->print(Sesse::pr0n::Templates::fetch_template($r, 'wizard-footer'));
-
-       return Apache2::Const::OK;
-}
-       
-1;
-
-
index eeb93b0a7aa544df4b88db2e350a6d24e9ec4e04..0372c46bb7416d7b17b4561dccbd64283530e2cb 100644 (file)
@@ -6,8 +6,6 @@ use Sesse::pr0n::Rotate;
 use Sesse::pr0n::Select;
 use Sesse::pr0n::WebDAV;
 use Sesse::pr0n::NewEvent;
-use Sesse::pr0n::Registry;
-use Sesse::pr0n::Wizard;
 
 package Sesse::pr0n::pr0n;
 use strict;    
@@ -64,10 +62,6 @@ sub handler {
                return Sesse::pr0n::Select::handler($r);
        } elsif ($uri =~ m#^/newevent$#) {
                return Sesse::pr0n::NewEvent::handler($r);
-       } elsif ($uri =~ m#^/registry$#) {
-               return Sesse::pr0n::Registry::handler($r);
-       } elsif ($uri =~ m#^/wizard$#) {
-               return Sesse::pr0n::Wizard::handler($r);
        } elsif ($uri =~ /^\/[a-zA-Z0-9-]+\/?$/ ||
                 $uri =~ /^\/\+all\/?$/ ||
                 $uri =~ /^\/\+tags\/[a-zA-Z0-9-]+\/?$/) {