summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2012-02-17 19:29:26 (GMT)
committerChristian Pointner <equinox@helsinki.at>2012-02-17 19:29:26 (GMT)
commiteff30d15df8108d41c9d5c95362911ebcceec740 (patch)
tree00b381ee1842d173914ae8d79aa1cbb4e44d4920
parent343227c978a8ce240a140264869714c672111802 (diff)
fixed pv add note (with type/status)
-rwxr-xr-xrhimport-dn2
-rwxr-xr-xrhimport-ra2
-rwxr-xr-xrhimport-rs4
-rwxr-xr-xrhimport-wl2
-rw-r--r--rhimport.pm5
5 files changed, 5 insertions, 10 deletions
diff --git a/rhimport-dn b/rhimport-dn
index fa7607f..f9d2613 100755
--- a/rhimport-dn
+++ b/rhimport-dn
@@ -132,7 +132,7 @@ for my $entry ($headlines_feed->entries) {
next if($y ne $1);
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $today[0], $today[1], $today[2]));
+ rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $today[0], $today[1], $today[2]), "1");
print "\n";
}
}
diff --git a/rhimport-ra b/rhimport-ra
index 0c0f49f..f8a2ca3 100755
--- a/rhimport-ra
+++ b/rhimport-ra
@@ -103,7 +103,7 @@ for my $entry ($feed->entries) {
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), 'n');
+ rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1");
print "\n";
last;
diff --git a/rhimport-rs b/rhimport-rs
index 99d2ce3..d501cf9 100755
--- a/rhimport-rs
+++ b/rhimport-rs
@@ -122,9 +122,9 @@ while(1) {
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), 1);
+ rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1");
print "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date_reb[0], $import_date_reb[1], $import_date_reb[2]), 2);
+ rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date_reb[0], $import_date_reb[1], $import_date_reb[2]), "2");
print "\n";
last;
diff --git a/rhimport-wl b/rhimport-wl
index 9844506..8769e81 100755
--- a/rhimport-wl
+++ b/rhimport-wl
@@ -114,7 +114,7 @@ for my $entry ($feed->entries) {
print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n";
- rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]));
+ rhimport::pv_add_note($sum_title, $sum_text, $PV_ID, sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]), "1");
print "\n";
}
}
diff --git a/rhimport.pm b/rhimport.pm
index e0bc11d..1c7efb4 100644
--- a/rhimport.pm
+++ b/rhimport.pm
@@ -330,11 +330,6 @@ sub delete_file
sub pv_add_note
{
my ( $title, $text, $id, $date, $type ) = @_;
- $type = 1 if undef($type);
- # 0 -> Cancelation
- # 1 -> Recommandation
- # 2 -> Repitition
-
my @script = ('/usr/bin/ssh', 'root@intranet', 'addnote', $id, $date, $type);
my ($reader, $writer, $error ) = ( new IO::Handle, new IO::Handle, new IO::Handle );