Diff for /loncom/interface/domainprefs.pm between versions 1.20 and 1.21

version 1.20, 2007/06/04 14:14:27 version 1.21, 2007/06/07 23:19:42
Line 133  sub handler { Line 133  sub handler {
         my %helphash;             my %helphash;   
         my $numprefs = @prefs;          my $numprefs = @prefs;
         &print_header($r,$phase);          &print_header($r,$phase);
           if (keys(%domconfig) == 0) {
               my $primarylibserv = &Apache::lonnet::domain($dom,'primary');
               my $perlvarref = &LONCAPA::Configuration::read_conf('loncapa.conf');
               my $hostid = $perlvarref->{'lonHostID'};
               if ($hostid ne $primarylibserv) {
                   my %designhash = &Apache::loncommon::get_domainconf($dom);
                   my @loginimages = ('img','logo','domlogo');
                   my $custom_img_count = 0;
                   foreach my $img (@loginimages) {
                       if ($designhash{$dom.'.login.'.$img} ne '') {
                           $custom_img_count ++;
                       }
                   }
                   foreach my $role (@roles) {
                       if ($designhash{$dom.'.'.$role.'.img'} ne '') {
                           $custom_img_count ++;
                       }
                   }
                   if ($custom_img_count > 0) {
                       my $switch_server = &check_switchserver($dom,$confname);
                       $r->print(&mt('Domain configuration settings have yet to be saved for this domain via the web-based domain preferences interface.').'<br />'.&mt("While this remains so, you must switch to the domain's primary library server in order to update settings.").'<br /><br />'.&mt("Thereafter, you will be able to update settings from this screen when logged in to any server in the LON-CAPA network (with a DC role selected in the domain), although you will still need to switch to the domain's primary library server to upload new images or logos.").'<br /><br />'.$switch_server.' '.&mt('to primary library server for domain: [_1]',$dom));
                       return OK;
                   }
               }
           }
         $r->print('<table border="0" width="100%" cellpadding="2" cellspacing="4"><tr><td align="left" valign="top" width="45%">');          $r->print('<table border="0" width="100%" cellpadding="2" cellspacing="4"><tr><td align="left" valign="top" width="45%">');
         foreach my $item (@prefs) {          foreach my $item (@prefs) {
             if ($item->{'action'} eq 'login') {              if ($item->{'action'} eq 'login') {
Line 1268  sub check_dimensions { Line 1293  sub check_dimensions {
             }              }
             chomp($imageinfo);              chomp($imageinfo);
             my ($fullsize) =               my ($fullsize) = 
                 ($imageinfo =~ /^\Q$inputfile\E\s+\w+\s+(\d+x\d+)\s+/);                  ($imageinfo =~ /^\Q$inputfile\E\s+\w+\s+(\d+x\d+)/);
             if ($fullsize) {              if ($fullsize) {
                 ($fullwidth,$fullheight) = split(/x/,$fullsize);                  ($fullwidth,$fullheight) = split(/x/,$fullsize);
             }              }

Removed from v.1.20  
changed lines
  Added in v.1.21


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>