Changeset 1779 for branches/release-33/lib/MT/WeblogPublisher.pm
- Timestamp:
- 04/05/08 02:21:23 (20 months ago)
- Files:
-
- 1 modified
-
branches/release-33/lib/MT/WeblogPublisher.pm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-33/lib/MT/WeblogPublisher.pm
r1754 r1779 29 29 my $this = {@_}; 30 30 my $cfg = MT->config; 31 if ( !exists $this->{start_time} ) { 32 $this->{start_time} = time; 33 } 31 34 if ( !exists $this->{NoTempFiles} ) { 32 35 $this->{NoTempFiles} = $cfg->NoTempFiles; … … 109 112 }; 110 113 114 } 115 116 sub start_time { 117 my $pub = shift; 118 $pub->{start_time} = shift if @_; 119 return $pub->{start_time}; 111 120 } 112 121 … … 809 818 } 810 819 820 # Calculate file path and URL for the new entry. 821 my $file = File::Spec->catfile( $root_path, $map->{__saved_output_file} ); 822 823 ## Untaint. We have to assume that we can trust the user's setting of 824 ## the archive_path, and nothing else is based on user input. 825 ($file) = $file =~ /(.+)/s; 826 827 # compare file modification time to start of build process. if it 828 # is greater than the start_time, then we shouldn't need to build this 829 # file again 830 my $fmgr = $blog->file_mgr; 831 if (my $mod_time = $fmgr->file_mod_time($file)) { 832 return 1 if $mod_time >= $mt->start_time; 833 } 834 811 835 if ( $archiver->category_based ) { 812 836 $category = $specifier{Category}; … … 850 874 local $ctx->{current_timestamp_end} = $end if $end; 851 875 852 my $fmgr = $blog->file_mgr;853 876 $ctx->{__stash}{blog} = $blog; 854 877 855 # Calculate file path and URL for the new entry.856 my $file = File::Spec->catfile( $root_path, $map->{__saved_output_file} );857 878 require MT::FileInfo; 858 879 … … 907 928 my ($rel_url) = ( $url =~ m|^(?:[^:]*\:\/\/)?[^/]*(.*)| ); 908 929 $rel_url =~ s|//+|/|g; 909 910 ## Untaint. We have to assume that we can trust the user's setting of911 ## the archive_path, and nothing else is based on user input.912 ($file) = $file =~ /(.+)/s;913 930 914 931 # Clear out all the FileInfo records that might point at the page
