Project

General

Profile

Revision 10010

Added by Chris Jones over 4 years ago

Change the ldapweb.cgi script to use an additional property called email.contact which provides a contat email (particularly when email.sender is set to noreply@...). Update the skin configurations with this property, as well as the metacat.properties default.

View differences:

ldapweb.cgi
1
#!/usr/bin/perl -w
1
#!/usr/bin/perl -w
2 2
#
3 3
#  '$RCSfile$'
4 4
#  Copyright: 2001 Regents of the University of California 
......
290 290

  
291 291
if(!@validDisplayOrgList) {
292 292
     my $sender;
293
     my $contact;
293 294
     $sender = $skinProperties->getProperty("email.sender") or $sender = $properties->getProperty('email.sender');
295
     $contact = $skinProperties->getProperty("email.contact") or $contact = $properties->getProperty('email.contact');
294 296
    print "Content-type: text/html\n\n";
295 297
    print "The value of property ldap.templates.organizationList in " 
296 298
     . $skinName . ".properties file or metacat.properties file (if the property doesn't exist in the " 
297
     . $skinName . ".properties file) is invalid. Please send the information to ". $sender;
299
     . $skinName . ".properties file) is invalid. Please send the information to ". $contact;
298 300
    exit(0);
299 301
}
300 302

  
......
453 455

  
454 456
    my $mailhost = $properties->getProperty('email.mailhost');
455 457
    my $sender;
458
    my $contact;
456 459
    $sender = $skinProperties->getProperty("email.sender") or $sender = $properties->getProperty('email.sender');
460
    $contact = $skinProperties->getProperty("email.contact") or $contact = $properties->getProperty('email.contact');
457 461
    debug("the sender is " . $sender);
462
    debug("the contact is " . $contact);
458 463
    my $recipient = $query->param('mail');
459 464
    # Send the email message to them
460 465
    my $smtp = Net::SMTP->new($mailhost) or do {  
......
993 998

  
994 999
        Thanks,
995 1000
            $sender
1001
            $contact
996 1002
    
997 1003
        ENDOFMESSAGE
998 1004
        $message =~ s/^[ \t\r\f]+//gm;
......
1230 1236
    if(!$nextUidNumber) {
1231 1237
        print "Content-type: text/html\n\n";
1232 1238
         my $sender;
1239
         my $contact;
1233 1240
        $sender = $skinProperties->getProperty("email.recipient") or $sender = $properties->getProperty('email.recipient');
1234
        my $errorMessage = "The Identity Service can't get the next avaliable uid number. Please try again.  If the issue persists, please contact the administrator - $sender.
1241
        $contact = $skinProperties->getProperty("email.contact") or $contact = $properties->getProperty('email.contact');
1242
        my $errorMessage = "The Identity Service can't get the next avaliable uid number. Please try again.  If the issue persists, please contact the administrator - $contact.
1235 1243
                           The possible reasons are: the dn - $dn_store_next_uid or its attribute - $attribute_name_store_next_uid don't exist; the value of the attribute - $attribute_name_store_next_uid
1236 1244
                           is not a number; or lots of users were registering and you couldn't get a lock on the dn - $dn_store_next_uid.";
1237 1245
        fullTemplate(['register'], { stage => "register",
......
1302 1310
    
1303 1311
    my $mailhost = $properties->getProperty('email.mailhost');
1304 1312
    my $sender;
1313
    my $contact;
1305 1314
    $sender = $skinProperties->getProperty("email.sender") or $sender = $properties->getProperty('email.sender');
1315
    $contact = $skinProperties->getProperty("email.contact") or $contact = $properties->getProperty('email.contact');
1306 1316
    debug("the sender is " . $sender);
1317
    debug("the contact is :" . $contact);
1307 1318
    my $recipient = $query->param('mail');
1308 1319
    # Send the email message to them
1309 1320
    my $smtp = Net::SMTP->new($mailhost) or do {  
......
1327 1338

  
1328 1339
    Thanks,
1329 1340
        $sender
1341
        $contact
1330 1342
    
1331 1343
     ENDOFMESSAGE
1332 1344
     $message =~ s/^[ \t\r\f]+//gm;

Also available in: Unified diff