- Timestamp:
- Feb 11, 2011, 4:29:48 PM (15 years ago)
- Location:
- branches/czw_branch/20101203
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
pstamp/scripts/pstampparse.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20101203
- Property svn:mergeinfo changed
-
branches/czw_branch/20101203/pstamp/scripts/pstampparse.pl
r30118 r30586 30 30 my $save_temps; 31 31 my $no_update; 32 my $dest_requires_magic; 32 33 33 34 GetOptions( … … 38 39 'label=s' => \$label, 39 40 'mode=s' => \$mode, 41 'need_magic'=> \$dest_requires_magic, 40 42 'dbname=s' => \$dbname, 41 43 'dbserver=s'=> \$dbserver, … … 126 128 } 127 129 128 # Adjust the label for requests coming in over the web interaface 130 131 # Adjust the label for requests coming in over the web interface 129 132 130 133 my $label_changed = 0; … … 384 387 my $proj_hash = resolve_project($ipprc, $project, $dbname, $dbserver); 385 388 if (!$proj_hash) { 386 foreach $row(@$rowList) {387 insertFakeJobForRow($r ow, 1, $PSTAMP_UNKNOWN_PRODUCT);389 foreach my $r (@$rowList) { 390 insertFakeJobForRow($r, 1, $PSTAMP_UNKNOWN_PRODUCT); 388 391 $num_jobs++; 389 392 } … … 409 412 $need_magic = $proj_hash->{need_magic}; 410 413 411 # Temporary hack so that IFA can get at non-magicked data412 my $allow_mops_unmagicked = 1;413 if ($allow_mops_unmagicked) {414 if ($product and (($product eq "mops-pstamp-results") or415 ($product eq "mops-pstamp-results2") or416 ($product eq "ifa-pstamp-results"))) {417 $need_magic = 0;418 }419 }420 421 414 $need_magic = 0 if $stage eq 'stack'; 415 416 if ($need_magic) { 417 418 # this project requires that postage stamps be extracted from destreaked images 419 420 if ($option_mask & ($PSTAMP_REQUEST_UNCENSORED | $PSTAMP_REQUIRE_UNCENSORED)) { 421 # The user has requested uncensored stamps 422 423 if (!$dest_requires_magic) { 424 # and this user's data store destination is allowed uncensored stamps, so accept the request 425 $need_magic = 0; 426 } else { 427 print STDERR "Error row $rownum: User not authorized to to request uncensored stamps.\n"; 428 if ($option_mask & $PSTAMP_REQUIRE_UNCENSORED) { 429 # user required uncensored stamps. Can't do it so fail. 430 foreach my $r (@$rowList) { 431 insertFakeJobForRow($r, 1, $PSTAMP_NOT_AUTHORIZED); 432 $num_jobs++; 433 } 434 return $num_jobs; 435 } 436 437 # user will accept censored stamps. alter OPTION_MASK and continue 438 439 print STDERR " Will attempt to make destreaked stamps\n"; 440 # zap the offending bit in the option mask 441 $option_mask = $option_mask ^ ($PSTAMP_REQUEST_UNCENSORED); 442 foreach my $r (@$rowList) { 443 $r->{OPTION_MASK} = $option_mask; 444 } 445 } 446 } 447 } 422 448 423 449 my $numRows = scalar @$rowList;
Note:
See TracChangeset
for help on using the changeset viewer.
