Permalink
Browse files

Merge pull request #40 from lingo/bugfix

Bugfix branch
  • Loading branch information...
2 parents a9648ac + 969e3c6 commit 9512c8f87422f839608ede146ff1862733a07de0 @unclecheese committed Mar 23, 2012
Showing with 5 additions and 1 deletion.
  1. +4 −0 code/KickAssetAdmin.php
  2. +1 −1 templates/Includes/KickAssetFieldFiles.ss
View
@@ -285,6 +285,10 @@ public function newfolder(SS_HTTPRequest $r) {
*/
public function updatefilename(SS_HTTPRequest $r) {
if($file = DataObject::get_by_id("File", (int) $r->requestVar('fileid'))) {
+ if ($file->Title == $file->Name) {
+ // Make sure title also changes, if old title was same as old Name.
+ $file->Title = $r->requestVar('new');
+ }
$file->setName($r->requestVar('new'));
$file->write();
$template = $file instanceof Folder ? "Folder" : "File";
@@ -2,7 +2,7 @@
<div class="file_drop <% if File %><% else %>empty<% end_if %>" data-uploadurl="$UploadLink"
<% if File %>
<% control File %>
- style="background-image:url($Thumb)"
+ style="background-image:url('$Thumb')"
<% end_control %>
<% end_if %>
>

0 comments on commit 9512c8f

Please sign in to comment.