Diff for /loncom/publisher/lonpublisher.pm between versions 1.184 and 1.185

version 1.184, 2005/01/24 21:55:20 version 1.185, 2005/02/28 21:28:18
Line 842  sub store_metadata { Line 842  sub store_metadata {
 }  }
   
   
   # ========================================== Parse file for errors and warnings
   
   sub checkonthis {
       my ($r,$source)=@_;
       my $oldpath=$ENV{'request.filename'};
       $ENV{'request.filename'}=$source;
       &Apache::lonxml::xmlparse($r,'web',
         &Apache::lonnet::getfile($source));
       undef($Apache::lonhomework::parsing_a_problem);
       $ENV{'request.filename'}=$oldpath;
       if (($Apache::lonxml::errorcount) ||
    ($Apache::lonxml::warningcount)) {
    if ($Apache::lonxml::errorcount) {
       $r->print('<img src="/adm/lonMisc/bomb.gif" /><font color="red"><b>'.
         $Apache::lonxml::errorcount.' '.
         &mt('error(s)').'</b></font> ');
    }
    if ($Apache::lonxml::warningcount) {
       $r->print('<font color="blue">'.
         $Apache::lonxml::warningcount.' '.
         &mt('warning(s)').'</font>');
    }
       } else {
    $r->print('<font color="green">'.&mt('ok').'</font>');
       }
       $r->rflush();
       return ($Apache::lonxml::warningcount,$Apache::lonxml::errorcount);
   }
   
 # ============================================== Parse file itself for metadata  # ============================================== Parse file itself for metadata
 #  #
 # parses a file with target meta, sets global %metadatafields %metadatakeys   # parses a file with target meta, sets global %metadatafields %metadatakeys 
Line 1007  sub publish { Line 1036  sub publish {
             $scrout.=&metaread($logfile,$currentpath.'default.meta',$prefix);              $scrout.=&metaread($logfile,$currentpath.'default.meta',$prefix);
     $prefix=~s|^\.\./||;      $prefix=~s|^\.\./||;
         }          }
   
 # ----------------------------------------------------------- Parse file itself  # ----------------------------------------------------------- Parse file itself
 # read %metadatafields from file itself  # read %metadatafields from file itself
     
Line 1978  ENDDIFF Line 2008  ENDDIFF
 # ------------------ Publishing from $thisfn to $thistarget with $thisembstyle.  # ------------------ Publishing from $thisfn to $thistarget with $thisembstyle.
   
  unless ($ENV{'form.phase'} eq 'two') {   unless ($ENV{'form.phase'} eq 'two') {
   # ---------------------------------------------------------- Parse for problems
       &checkonthis($r,$thisfn);
     my ($outstring,$error)=&publish($thisfn,$thistarget,$thisembstyle);      my ($outstring,$error)=&publish($thisfn,$thistarget,$thisembstyle);
     $r->print('<hr />'.$outstring);      $r->print('<hr />'.$outstring);
  } else {   } else {

Removed from v.1.184  
changed lines
  Added in v.1.185


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