Revision: 2889
          http://ipcop.svn.sourceforge.net/ipcop/?rev=2889&view=rev
Author:   owes
Date:     2009-05-22 12:08:37 +0000 (Fri, 22 May 2009)

Log Message:
-----------
Pull in firewall-lib not DataAccess and use haveBlue, haveOrange from 
firewall-lib.

Modified Paths:
--------------
    ipcop/trunk/html/cgi-bin/ovpnmain.cgi

Modified: ipcop/trunk/html/cgi-bin/ovpnmain.cgi
===================================================================
--- ipcop/trunk/html/cgi-bin/ovpnmain.cgi       2009-05-22 11:50:00 UTC (rev 
2888)
+++ ipcop/trunk/html/cgi-bin/ovpnmain.cgi       2009-05-22 12:08:37 UTC (rev 
2889)
@@ -22,7 +22,7 @@
 require '/usr/lib/ipcop/lang.pl';
 require '/usr/lib/ipcop/header.pl';
 require '/usr/lib/ipcop/countries.pl';
-require '/usr/lib/ipcop/DataAccess.pl';
+require '/usr/lib/ipcop/firewall-lib.pl';
 
 # enable only the following on debugging purpose
 use warnings;
@@ -82,16 +82,6 @@
 ###
 ### Useful functions
 ###
-sub haveOrangeNet {
-    if ($netsettings{'ORANGE_COUNT'} >= 1) {return 1;}
-    return 0;
-}
-
-sub haveBlueNet {
-    if ($netsettings{'BLUE_COUNT'} >= 1) {return 1;}
-    return 0;
-}
-
 sub sizeformat {
     my $bytesize = shift;
     my $i = 0;
@@ -574,24 +564,24 @@
     if ( $vpnsettings{'ENABLED_RED_1'} eq 'on') {
         print CLIENTCONF "remote $vpnsettings{'VPN_IP'} 
$vpnsettings{'DDEST_PORT'}\r\n";
     
-        if ($vpnsettings{'ENABLED_BLUE_1'} eq 'on' && (&haveBlueNet())) {
+        if ($vpnsettings{'ENABLED_BLUE_1'} eq 'on' && (&FW::haveBlueNet())) {
             print CLIENTCONF "#Comment the above line and uncomment the next 
line, if you want to connect on the Blue interface\r\n";
             print CLIENTCONF ";remote $netsettings{'BLUE_1_ADDRESS'} 
$vpnsettings{'DDEST_PORT'}\r\n";
         }
-        if ($vpnsettings{'ENABLED_ORANGE_1'} eq 'on' && (&haveOrangeNet())) {
+        if ($vpnsettings{'ENABLED_ORANGE_1'} eq 'on' && 
(&FW::haveOrangeNet())) {
             print CLIENTCONF "#Comment the above line and uncomment the next 
line, if you want to connect on the Orange interface\r\n";
             print CLIENTCONF ";remote $netsettings{'ORANGE_1_ADDRESS'} 
$vpnsettings{'DDEST_PORT'}\r\n";
         }
     }
-    elsif ($vpnsettings{'ENABLED_BLUE_1'} eq 'on' && (&haveBlueNet())) {
+    elsif ($vpnsettings{'ENABLED_BLUE_1'} eq 'on' && (&FW::haveBlueNet())) {
         print CLIENTCONF "remote $netsettings{'BLUE_1_ADDRESS'} 
$vpnsettings{'DDEST_PORT'}\r\n";
         
-        if ($vpnsettings{'ENABLED_ORANGE_1'} eq 'on' && (&haveOrangeNet())) {
+        if ($vpnsettings{'ENABLED_ORANGE_1'} eq 'on' && 
(&FW::haveOrangeNet())) {
             print CLIENTCONF "#Comment the above line and uncomment the next 
line, if you want to connect on the Orange interface\r\n";
             print CLIENTCONF ";remote $netsettings{'ORANGE_1_ADDRESS'} 
$vpnsettings{'DDEST_PORT'}\r\n";
         }
     } 
-    elsif ($vpnsettings{'ENABLED_ORANGE_1'} eq 'on' && (&haveOrangeNet())) {
+    elsif ($vpnsettings{'ENABLED_ORANGE_1'} eq 'on' && (&FW::haveOrangeNet())) 
{
         print CLIENTCONF "remote $netsettings{'ORANGE_1_ADDRESS'} 
$vpnsettings{'DDEST_PORT'}\r\n";
     }
 
@@ -1772,11 +1762,11 @@
 END
 ;
 
-if (&haveBlueNet()) {
+if (&FW::haveBlueNet()) {
     print "<tr><td class='base'>$Lang::tr{'ovpn on blue'}:</td>";
     print "<td colspan='3'><input type='checkbox' name='ENABLED_BLUE_1' 
$checked{'ENABLED_BLUE_1'}{'on'} /></td></tr>";
 }
-if (&haveOrangeNet()) {
+if (&FW::haveOrangeNet()) {
     print "<tr><td class='base'>$Lang::tr{'ovpn on orange'}:</td>";
     print "<td colspan='3'><input type='checkbox' name='ENABLED_ORANGE_1' 
$checked{'ENABLED_ORANGE_1'}{'on'} /></td></tr>";
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Ipcop-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to