OSDN Git Service

サムネイル更新中待ち表示をcreated単位に変更
authorCake <cake_67@users.sourceforge.jp>
Tue, 8 Mar 2011 05:40:39 +0000 (14:40 +0900)
committerCake <cake_67@users.sourceforge.jp>
Tue, 8 Mar 2011 05:40:39 +0000 (14:40 +0900)
app/plugins/links/controllers/links_controller.php
app/plugins/links/views/elements/link_view.ctp

index 8a37b42..ab37276 100644 (file)
@@ -248,6 +248,10 @@ class LinksController extends AppController {
                        // URL編集が無い場合
                        if ($this->Link->mb_urlEncode($this->data) == $link['Link']['url']) {
                                unset($this->Link->validate['url']['isUnique']);
+                       // URL編集した場合はcreatedも更新
+                       } else {
+                               $this->data['Link']['created'] = date('Y-m-d H:i:s');
+                               $fieldList[] = 'created';
                        }
 
                        $this->data['Link']['id'] = $id;
index eb6c396..652d3ea 100644 (file)
@@ -99,7 +99,7 @@ if ($showType && $link['Link']['type']) {
 </script>
 <?php
 $ThumnailNotice = null;
-if ($this->Time->wasWithinLast('2 hours', $link['Link']['modified'])) {
+if ($this->Time->wasWithinLast('2 hours', $link['Link']['created'])) {
        $ThumnailNotice = $this->Html->div('ThumnailNotice',
                __('It takes 1-2 hours for creating thumnail', true)
        );