]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Set modified column correctly.
authorZach Copley <zach@status.net>
Tue, 1 Dec 2009 01:24:39 +0000 (01:24 +0000)
committerZach Copley <zach@status.net>
Wed, 6 Jan 2010 07:17:35 +0000 (23:17 -0800)
plugins/RSSCloud/RSSCloudPlugin.php

index 10f81b8ddf9e06d6d525e3e1347ba772919076d6..8e57b4a3e0993bd53675f82196a5e1228ad08c32 100644 (file)
@@ -50,7 +50,7 @@ class RSSCloudPlugin extends Plugin
 
         // set defaults
 
-        $local_server = parse_url(common_path('rsscloud/request_notify'));
+        $local_server = parse_url(common_path('/main/rsscloud/request_notify'));
 
         if (empty($this->domain)) {
             $this->domain = $local_server['host'];
@@ -61,7 +61,7 @@ class RSSCloudPlugin extends Plugin
         }
 
         if (empty($this->path)) {
-            $this->path = '/rsscloud/request_notify';
+            $this->path = '/main/rsscloud/request_notify';
         }
 
         if (empty($this->funct)) {
@@ -83,10 +83,10 @@ class RSSCloudPlugin extends Plugin
 
     function onRouterInitialized(&$m)
     {
-        $m->connect('rsscloud/request_notify', array('action' => 'RSSCloudRequestNotify'));
+        $m->connect('/main/rsscloud/request_notify', array('action' => 'RSSCloudRequestNotify'));
 
         // XXX: This is just for end-to-end testing
-        $m->connect('rsscloud/notify', array('action' => 'LoggingAggregator'));
+        $m->connect('/main/rsscloud/notify', array('action' => 'LoggingAggregator'));
 
         return true;
     }
@@ -110,8 +110,8 @@ class RSSCloudPlugin extends Plugin
         }
     }
 
-    function onStartApiRss($action){
-
+    function onStartApiRss($action)
+    {
         if (get_class($action) == 'ApiTimelineUserAction') {
 
             $attrs = array('domain'            => $this->domain,
@@ -126,8 +126,8 @@ class RSSCloudPlugin extends Plugin
             foreach ($attrs as $name => $value) {
                 $action->xw->writeAttribute($name, $value);
             }
-            $action->xw->endElement();
 
+            $action->xw->endElement();
         }
     }
 
@@ -178,7 +178,6 @@ class RSSCloudPlugin extends Plugin
                 $notice->is_local == Notice::LOCAL_NONPUBLIC);
     }
 
-
     function onCheckSchema() {
         $schema = Schema::get();
         $schema->ensureTable('rsscloud_subscription',
@@ -187,10 +186,13 @@ class RSSCloudPlugin extends Plugin
                                    new ColumnDef('url', 'varchar',
                                                  '255', false, 'PRI'),
                                    new ColumnDef('failures', 'integer',
-                                                 null, false, 'MUL'),
+                                                 null, false, null, 0),
                                    new ColumnDef('created', 'datetime',
                                                  null, false),
-                                   new ColumnDef('modified', 'timestamp')
+                                   new ColumnDef('modified', 'timestamp',
+                                                 null, false, null,
+                                                 'CURRENT_TIMESTAMP',
+                                                 'on update CURRENT_TIMESTAMP')
                                   )
                             );
          return true;