Selaa lähdekoodia

move funciton between modules

Roman Dmitriev 3 kuukautta sitten
vanhempi
sitoutus
001b453664
2 muutettua tiedostoa jossa 11 lisäystä ja 11 poistoa
  1. 0 11
      scripts/eyelib/common.pm
  2. 11 0
      scripts/eyelib/database.pm

+ 0 - 11
scripts/eyelib/common.pm

@@ -45,7 +45,6 @@ get_dynamic_ou
 get_first_line
 get_ip_subnet
 get_new_user_id
-get_notify_subnet
 GetNowTime
 get_office_subnet
 get_subnets_ref
@@ -297,16 +296,6 @@ sub get_office_subnet {
 
 #---------------------------------------------------------------------------------------------------------------
 
-sub get_notify_subnet {
-my $db = shift;
-my $ip  = shift;
-my $notify_flag = get_office_subnet($db,$ip);
-if ($notify_flag) { return $notify_flag->{notify}; }
-return 0;
-}
-
-#---------------------------------------------------------------------------------------------------------------
-
 sub get_new_user_id {
     my ($db, $ip, $mac, $hostname) = @_;
     return unless $db;

+ 11 - 0
scripts/eyelib/database.pm

@@ -43,6 +43,7 @@ use Text::CSV;
 our @ISA = qw(Exporter);
 
 our @EXPORT = qw(
+get_notify_subnet
 is_hotspot
 get_queue
 get_group
@@ -148,6 +149,16 @@ our %db_schema;
 
 #---------------------------------------------------------------------------------------------------------------
 
+sub get_notify_subnet {
+my $db = shift;
+my $ip  = shift;
+my $notify_flag = get_office_subnet($db,$ip);
+if ($notify_flag) { return $notify_flag->{notify}; }
+return 0;
+}
+
+#---------------------------------------------------------------------------------------------------------------
+
 sub is_hotspot {
     my ($db, $ip) = @_;
     return 0 unless $db && defined $ip;