X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=cgi-bin%2FBackupPC_Admin;h=e099be495001781adad518bfffe0eb22f1eb2ae2;hp=a3fbe87116098ab7843913a74a66c82a50e7d5a1;hb=refs%2Ftags%2Fv3_0_0beta1;hpb=5c6a6cc4f333ce44a9df62ab828b0b9341579f7c diff --git a/cgi-bin/BackupPC_Admin b/cgi-bin/BackupPC_Admin index a3fbe87..e099be4 100755 --- a/cgi-bin/BackupPC_Admin +++ b/cgi-bin/BackupPC_Admin @@ -39,7 +39,7 @@ # #======================================================================== # -# Version 2.1.0beta1, released 9 Apr 2004. +# Version 3.0.0beta1, released 30 Jul 2006. # # See http://backuppc.sourceforge.net. # @@ -58,38 +58,39 @@ 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", + "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}) ); -## rk default non admin users to pc summary for their hosts -$In{action} = "summary" if ( !defined($ActionDispatch{$In{action}}) && !CheckPermission()); -$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,