Showing 3 changed files with 11 additions and 11 deletions
+7 -7
lib/Gitprep/Git.pm
... ...
@@ -157,21 +157,21 @@ sub blob {
157 157
   return $lines;
158 158
 }
159 159
 
160
-sub blob_mimetype {
160
+sub blob_mime_type {
161 161
   my ($self, $user, $project, $rev, $file) = @_;
162 162
   
163
-  # Blob content
164
-  my $bid = $self->path_to_hash($user, $project, $rev, $file, 'blob')
163
+  # Blob
164
+  my $hash = $self->path_to_hash($user, $project, $rev, $file, 'blob')
165 165
     or croak 'Cannot find file';
166 166
   my @cmd = $self->cmd(
167 167
     $user,
168 168
     $project,
169 169
     'cat-file',
170 170
     'blob',
171
-    $bid
171
+    $hash
172 172
   );
173 173
   open my $fh, '-|', @cmd
174
-    or croak "Can't cat $file, $bid";
174
+    or croak "Can't cat $file, $hash";
175 175
 
176 176
   return 'text/plain' unless $fh;
177 177
   
... ...
@@ -191,11 +191,11 @@ sub blob_mimetype {
191 191
   return;
192 192
 }
193 193
 
194
-sub blob_contenttype {
194
+sub blob_content_type {
195 195
   my ($self, $user, $project, $rev, $file) = @_;
196 196
   
197 197
   # Content type
198
-  my $type = $self->blob_mimetype($user, $project, $rev, $file);
198
+  my $type = $self->blob_mime_type($user, $project, $rev, $file);
199 199
   if ($type eq 'text/plain') {
200 200
     $type .= "; charset=" . $self->encoding;
201 201
   }
+3 -3
templates/blob.html.ep
... ...
@@ -28,7 +28,7 @@
28 28
   my $file_type = $git->file_type_long($mode);
29 29
   
30 30
   # MIME type
31
-  my $mimetype = $git->blob_mimetype($user, $project, $rev, $file);
31
+  my $mime_type = $git->blob_mime_type($user, $project, $rev, $file);
32 32
 
33 33
   # Variables for included template
34 34
   stash(id => $rev, project => $project, rev => $rev);
... ...
@@ -71,9 +71,9 @@
71 71
         </div>
72 72
       </div>
73 73
     </div>
74
-    % if ($mimetype =~ m#^image/#) {
74
+    % if ($mime_type =~ m#^image/#) {
75 75
       <div style="background:#ddd;text-align:center;padding-top:30px;padding-bottom:30px;margin-bottom:30px">
76
-        <img type="<%= $mimetype %>
76
+        <img type="<%= $mime_type %>
77 77
           % if (defined $file) {
78 78
             alt="<%= $file %>" title="<%= $file %>"
79 79
           % }
+1 -1
templates/raw.html.ep
... ...
@@ -12,7 +12,7 @@
12 12
   my $blob_raw = $git->blob_raw($user, $project, $rev, $file);
13 13
   
14 14
   # Content type
15
-  my $type = $git->blob_contenttype($user, $project, $rev, $file);
15
+  my $type = $git->blob_content_type($user, $project, $rev, $file);
16 16
 
17 17
   # Convert text/* content type to text/plain
18 18
   if (app->config->{basic}{prevent_xss} &&