X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=cgi-bin%2FBackupPC_Admin;h=90dfdba2667d94fe1a3f19fdb6ab2440b361c774;hp=81b85ad36a32a334f0b255434b05aec175a7ad9b;hb=38abb9a20f4f9562df117185570646049ce126fb;hpb=1a2fa2c2a1e0db12dc788216d9f3ba73301a131f diff --git a/cgi-bin/BackupPC_Admin b/cgi-bin/BackupPC_Admin index 81b85ad..90dfdba 100755 --- a/cgi-bin/BackupPC_Admin +++ b/cgi-bin/BackupPC_Admin @@ -1,4 +1,4 @@ -#!/bin/perl +#!/usr/bin/perl #============================================================= -*-perl-*-w # # BackupPC_Admin: Apache/CGI interface for BackupPC. @@ -21,7 +21,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2001-2003 Craig Barratt +# Copyright (C) 2001-2009 Craig Barratt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -39,7 +39,7 @@ # #======================================================================== # -# Version 2.1.0beta1, released 9 Apr 2004. +# Version 3.2.0, released 31 Jul 2010. # # See http://backuppc.sourceforge.net. # @@ -58,36 +58,41 @@ BackupPC::CGI::Lib::NewRequest; my %ActionDispatch = ( "summary" => "Summary", - $Lang->{Start_Incr_Backup} => "StartStopBackup", - $Lang->{Start_Full_Backup} => "StartStopBackup", - $Lang->{Stop_Dequeue_Backup} => "StartStopBackup", - $Lang->{Stop_Dequeue_Archive} => "StartStopBackup", + "search" => "SearchArchives", + "burn" => "BurnMedia", + "Start_Incr_Backup" => "StartStopBackup", + "Start_Full_Backup" => "StartStopBackup", + "Stop_Dequeue_Backup" => "StartStopBackup", + "Stop_Dequeue_Archive" => "StartStopBackup", "queue" => "Queue", "view" => "View", "LOGlist" => "LOGlist", "emailSummary" => "EmailSummary", "browse" => "Browse", "dirHistory" => "DirHistory", - $Lang->{Restore} => "Restore", + "Restore" => "Restore", "RestoreFile" => "RestoreFile", "hostInfo" => "HostInfo", "generalInfo" => "GeneralInfo", "restoreInfo" => "RestoreInfo", "archiveInfo" => "ArchiveInfo", - $Lang->{Start_Archive} => "Archive", + "Start_Archive" => "Archive", "Archive" => "Archive", "Reload" => "ReloadServer", "startServer" => "StartServer", "Stop" => "StopServer", "adminOpts" => "AdminOptions", + "editConfig" => "EditConfig", + "rss" => "RSS", ); # # Set default actions, then call sub handler # -$In{action} ||= "hostInfo" if ( defined($In{host}) ); -$In{action} = "generalInfo" if ( !defined($ActionDispatch{$In{action}}) ); -my $action = $ActionDispatch{$In{action}}; +if ( !defined($ActionDispatch{$In{action}}) ) { + $In{action} = defined($In{host}) ? "hostInfo" : "generalInfo"; +} +my $action = $ActionDispatch{$In{action}}; # # For some reason under mod_perl, the use lib above is unreliable,