version 1.90, 2006/04/18 22:38:08
|
version 1.91, 2006/05/17 13:41:45
|
Line 36 use Apache::Constants qw(:common :http :
|
Line 36 use Apache::Constants qw(:common :http :
|
use Apache::loncacc; |
use Apache::loncacc; |
use Apache::loncommon(); |
use Apache::loncommon(); |
use Apache::lonhtmlcommon(); |
use Apache::lonhtmlcommon(); |
|
use Apache::londiff(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonmsg; |
use Apache::lonmsg; |
use Apache::lonmenu; |
use Apache::lonmenu; |
Line 571 sub putresource {
|
Line 572 sub putresource {
|
# $uname.'/'.$thisdisfn.'/'.$filename.'">'. |
# $uname.'/'.$thisdisfn.'/'.$filename.'">'. |
# &mt('Delete').'</a>'; |
# &mt('Delete').'</a>'; |
if (-e $resdir.'/'.$filename) { |
if (-e $resdir.'/'.$filename) { |
|
my $same=0; |
my ($rdev,$rino,$rmode,$rnlink, |
my ($rdev,$rino,$rmode,$rnlink, |
$ruid,$rgid,$rrdev,$rsize, |
$ruid,$rgid,$rrdev,$rsize, |
$ratime,$rmtime,$rctime, |
$ratime,$rmtime,$rctime, |
$rblksize,$rblocks)=stat($resdir.'/'.$filename); |
$rblksize,$rblocks)=stat($resdir.'/'.$filename); |
|
if ($rmtime>=$cmtime) { |
|
$same=1; |
|
} else { |
|
if (&Apache::londiff::are_different_files($resdir.'/'.$filename, |
|
'/home/'.$uname.'/public_html/'.$thisdisfn.'/'.$filename)) { |
|
$same=0; |
|
} else { |
|
$same=1; |
|
} |
|
} |
$publish_button=&mt('Re-publish'); |
$publish_button=&mt('Re-publish'); |
if ($rmtime>=$cmtime) { |
if ($same) { |
$pubstatus = 'published'; |
$pubstatus = 'published'; |
$status=&mt('Published').'<br />'. |
$status=&mt('Published').'<br />'. |
&mt(&getCopyRightString($targetdir.'/'.$filename)).' '. |
&mt(&getCopyRightString($targetdir.'/'.$filename)).' '. |