summaryrefslogtreecommitdiff
path: root/rhimport-sm
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2015-07-10 16:36:41 (GMT)
committerChristian Pointner <equinox@helsinki.at>2015-07-10 16:36:41 (GMT)
commitc5bda0a596d9f8c6e1b3767c1091b3e403ff99c8 (patch)
tree9e529bcf1102a1652ff842422962634813affe8c /rhimport-sm
parentcaab0e9dcb749512581405c42e516107f9c0ef25 (diff)
replaced fetching of current week by static calculation algorightm
Diffstat (limited to 'rhimport-sm')
-rwxr-xr-xrhimport-sm12
1 files changed, 1 insertions, 11 deletions
diff --git a/rhimport-sm b/rhimport-sm
index aaa71f2..2466154 100755
--- a/rhimport-sm
+++ b/rhimport-sm
@@ -70,17 +70,7 @@ if(scalar(@allowed_dbs) != 1) {
my $dropbox = $allowed_dbs[0]->{'PATH'};
my $to_cart = $allowed_dbs[0]->{'TO_CART'};
-my $curweek = get("http://airplay/getweek.php");
-if(!defined $curweek || $curweek !~ /\d/ ) {
- print "can't fetch current week info!\n";
- $dbh->disconnect();
- exit 1;
-}
-if($curweek < 1 || $curweek > 4) {
- print "current week($curweek) out of bounds!\n";
- $dbh->disconnect();
- exit 1;
-}
+my $curweek = get_rd_week();
my @today = Date::Calc::Today();
my $dow = Date::Calc::Day_of_Week(@today);