Diff for /loncom/publisher/lonpublisher.pm between versions 1.222 and 1.224

version 1.222, 2007/03/02 23:20:17 version 1.224, 2007/05/02 01:34:23
Line 409  sub urlfixup { Line 409  sub urlfixup {
     if ($url =~ /^mailto:/i) { return $url; }      if ($url =~ /^mailto:/i) { return $url; }
     #internal document links need no fixing      #internal document links need no fixing
     if ($url =~ /^\#/) { return $url; }       if ($url =~ /^\#/) { return $url; } 
     my ($host)=($url=~/(?:(?:http|https|ftp)\:\/\/)*([^\/]+)/);      my ($host)=($url=~m{(?:(?:http|https|ftp)://)*([^/]+)});
     my %all_hostnames = &Apache::lonnet::all_hostnames();      my @lonids = &Apache::lonnet::machine_ids($host);
     foreach my $hostname (values(%all_hostnames)) {      if (@lonids) {
  if ($hostname eq $host) {   $url=~s{^(?:http|https|ftp)://}{};
     $url=~s/^(?:http|https|ftp)\:\/\///;   $url=~s/^\Q$host\E//;
             $url=~s/^\Q$host\E//;  
         }  
     }      }
     if ($url=~/^(?:http|https|ftp)\:\/\//) { return $url; }      if ($url=~m{^(?:http|https|ftp)://}) { return $url; }
     $url=~s{\Q~$cuname\E}{res/$cudom/$cuname};      $url=~s{\Q~$cuname\E}{res/$cudom/$cuname};
     return $url;      return $url;
 }  }
Line 846  sub store_metadata { Line 844  sub store_metadata {
                                                          \%metadata);                                                           \%metadata);
     }      }
     if (defined($status) && $status ne '') {      if (defined($status) && $status ne '') {
         $error='<font color="red">Error occured storing new values in '.          $error='<font color="red">Error occured saving new values in '.
             'metadata table in LON-CAPA database</font>';              'metadata table in LON-CAPA database</font>';
         &Apache::lonnet::logthis($error);          &Apache::lonnet::logthis($error);
         &Apache::lonnet::logthis($status);          &Apache::lonnet::logthis($status);
Line 1106  sub publish { Line 1104  sub publish {
  }   }
     }      }
     if ($chparms) {      if ($chparms) {
  $scrout.='<p><b>'.&mt('New parameters or stored values').   $scrout.='<p><b>'.&mt('New parameters or saved values').
     ':</b> '.$chparms.'</p>';      ':</b> '.$chparms.'</p>';
     }      }
   
Line 1123  sub publish { Line 1121  sub publish {
  }   }
     }      }
     if ($chparms) {      if ($chparms) {
  $scrout.='<p><b>'.&mt('Obsolete parameters or stored values').':</b> '.   $scrout.='<p><b>'.&mt('Obsolete parameters or saved values').':</b> '.
     $chparms.'</p><h1><span class="LC_warning">'.&mt('Warning!').      $chparms.'</p><h1><span class="LC_warning">'.&mt('Warning!').
     '</span></h1><p><span class="LC_warning">'.      '</span></h1><p><span class="LC_warning">'.
     &mt('If this resource is in active use, student performance data from the previous version may become inaccessible.').'</span></p><hr />';      &mt('If this resource is in active use, student performance data from the previous version may become inaccessible.').'</span></p><hr />';

Removed from v.1.222  
changed lines
  Added in v.1.224


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