]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 747189: Remove Bugzilla::Util::file_mod_time()
authorMatt Selsky <selsky@columbia.edu>
Thu, 26 Apr 2012 11:42:55 +0000 (13:42 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 26 Apr 2012 11:42:55 +0000 (13:42 +0200)
r/a=LpSolit

Bugzilla/Util.pm
showdependencygraph.cgi

index 097fc49feaae03413f8eb6eacda977fc56d6b3ce..9e2e1fecd3fa1015e129dfc402cac52701323851 100644 (file)
@@ -18,8 +18,7 @@ use base qw(Exporter);
                              diff_arrays on_main_db say
                              trim wrap_hard wrap_comment find_wrap_point
                              format_time validate_date validate_time datetime_from
-                             file_mod_time is_7bit_clean
-                             bz_crypt generate_random_password
+                             is_7bit_clean bz_crypt generate_random_password
                              validate_email_syntax check_email_syntax clean_text
                              get_text template_var disable_utf8
                              detect_encoding);
@@ -560,14 +559,6 @@ sub datetime_from {
     return $dt;
 }
 
-sub file_mod_time {
-    my ($filename) = (@_);
-    my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
-        $atime,$mtime,$ctime,$blksize,$blocks)
-        = stat($filename);
-    return $mtime;
-}
-
 sub bz_crypt {
     my ($password, $salt) = @_;
 
@@ -849,9 +840,6 @@ Bugzilla::Util - Generic utility functions for bugzilla
   format_time($time);
   datetime_from($time, $timezone);
 
-  # Functions for dealing with files
-  $time = file_mod_time($filename);
-
   # Cryptographic Functions
   $crypted_password = bz_crypt($password);
   $new_password = generate_random_password($password_length);
@@ -1119,18 +1107,6 @@ the Bugzilla server's local timezone if there isn't a logged-in user.
 
 =back
 
-
-=head2 Files
-
-=over 4
-
-=item C<file_mod_time($filename)>
-
-Takes a filename and returns the modification time. It returns it in the format
-of the "mtime" parameter of the perl "stat" function.
-
-=back
-
 =head2 Cryptography
 
 =over 4
index 32abf1747f5f190bce8fdf34ae7326255576f481..842e12f2a9bd74395aa3adc504000e29864e799b 100755 (executable)
@@ -296,7 +296,7 @@ foreach my $f (@files)
     # symlinks), this can't escape to delete anything it shouldn't
     # (unless someone moves the location of $webdotdir, of course)
     trick_taint($f);
-    my $mtime = file_mod_time($f);
+    my $mtime = (stat($f))[9];
     if ($mtime && $mtime < $since) {
         unlink $f;
     }