浏览代码

Updated dataset to exclude a last_modifed field (irrelevant since creation_date and lease_seconds). This also resolves a possible Doctrine conflict using the suggested schema.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@20552 44c647ce-9c0f-0410-b52a-842ac1e357ba
padraic 16 年之前
父节点
当前提交
7d1a645acf

+ 0 - 1
documentation/manual/en/module_specs/Zend_Feed_Pubsubhubbub.xml

@@ -295,7 +295,6 @@ CREATE TABLE IF NOT EXISTS `subscription` (
   `topic_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
   `hub_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
   `created_time` datetime DEFAULT NULL,
-  `last_modified` datetime DEFAULT NULL,
   `lease_seconds` bigint(20) DEFAULT NULL,
   `verify_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
   `secret` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,

+ 3 - 2
library/Zend/Feed/Pubsubhubbub/Model/Subscription.php

@@ -55,9 +55,10 @@ class Zend_Feed_Pubsubhubbub_Model_Subscription
         if ($result) {
             $data['created_time'] = $result->current()->created_time;
             $now = new Zend_Date;
-            $data['last_modified'] = $now->get('yyyy-MM-dd HH:mm:ss');
-            $data['expiration_time'] = $now->add($result->current()->lease_seconds, Zend_Date::SECOND)
+            if ($data['lease_seconds']) {
+                $data['expiration_time'] = $now->add($data['lease_seconds'], Zend_Date::SECOND)
                 ->get('yyyy-MM-dd HH:mm:ss');
+            }
             $this->_db->update(
                 $data,
                 $this->_db->getAdapter()->quoteInto('id = ?', $data['id'])

+ 0 - 1
library/Zend/Feed/Pubsubhubbub/Subscriber.php

@@ -755,7 +755,6 @@ class Zend_Feed_Pubsubhubbub_Subscriber
             'topic_url'          => $params['hub.topic'],
             'hub_url'            => $hubUrl,
             'created_time'       => $now->get('yyyy-MM-dd HH:mm:ss'),
-            'last_modified'      => $now->get('yyyy-MM-dd HH:mm:ss'),
             'lease_seconds'      => $expires,
             'verify_token'       => hash('sha256', $params['hub.verify_token']),
             'secret'             => null,