? facebook-platform
cvs diff: Diffing .
Index: fb_app.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/fb/fb_app.install,v
retrieving revision 1.7
diff -u -r1.7 fb_app.install
--- fb_app.install	5 Mar 2009 17:07:36 -0000	1.7
+++ fb_app.install	1 Apr 2009 18:16:22 -0000
@@ -33,11 +33,6 @@
       'apikey' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, ),
       'id' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, ),
       'secret' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, ),
-      'canvas' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, ),
-      'require_login' => array('type' => 'int', 'length' => 4, 'not null' => TRUE, ),
-      'create_account' => array('type' => 'int', 'length' => 4, 'not null' => TRUE, ),
-      'unique_account' => array('type' => 'int', 'length' => 4, 'not null' => TRUE, ),
-      'rid' => array('type' => 'int', 'length' => 10, 'unsigned' => TRUE, 'not null' => TRUE, ),
       'data' => array('type' => 'text', 'size' => 'big', ),
     ),
     'unique keys' => array(
@@ -63,5 +58,19 @@
   // Add id field
   $ret = array();
   db_add_field($ret, 'fb_app', 'id', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, ));
-	return $ret;
+  return $ret;
+}
+
+function fb_app_update_6101() {
+  $ret = array();
+  // The rid field is no longer used, and causes problems for databases in strict mode.
+  db_drop_field($ret, 'fb_app', 'rid');
+  // Other columns have been moved to fb_user.module, and are stored in data
+  db_drop_field($ret, 'fb_app', 'require_login');
+  db_drop_field($ret, 'fb_app', 'create_account');
+  db_drop_field($ret, 'fb_app', 'unique_account');
+  // canvas moved to fb_canvas.module
+  db_drop_field($ret, 'fb_app', 'canvas');
+
+  return $ret;
 }
\ No newline at end of file
Index: fb_app.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/fb/fb_app.module,v
retrieving revision 1.28
diff -u -r1.28 fb_app.module
--- fb_app.module	31 Mar 2009 03:03:00 -0000	1.28
+++ fb_app.module	1 Apr 2009 18:16:22 -0000
@@ -360,17 +360,15 @@
 }
 
 function fb_app_insert($node) {
-  //drupal_set_message("fb_app_insert" . dpr($node,1));
   $fb_app = (object) $node->fb_app;
   fb_app_get_app_properties($fb_app); // Get canvas and possible other props
   $fb_app->data = serialize($node->fb_app_data);
   $fb_app->nid = $node->nid;
   
-  db_query("INSERT INTO {fb_app} (nid, label, apikey, secret, id, canvas, require_login, create_account, unique_account, data) VALUES (%d, '%s', '%s', '%s', '%s', '%s', %d, %d, %d, '%s')",
+  db_query("INSERT INTO {fb_app} (nid, label, apikey, secret, id, data) VALUES (%d, '%s', '%s', '%s', '%s', '%s')",
            $node->nid, $fb_app->label, $fb_app->apikey, $fb_app->secret,
            $fb_app->id,
-           $fb_app->canvas_name, $fb_app->require_login, $fb_app->create_account, 
-           $fb_app->unique_account, $fb_app->data
+           $fb_app->data
   );
 
   watchdog('fb_app', 'Created Facebook Application %label.',
@@ -388,11 +386,10 @@
   $fb_app->data = serialize($node->fb_app_data);
   $fb_app->nid = $node->nid;
   
-  db_query("UPDATE {fb_app} SET label='%s', apikey='%s', secret='%s', id='%s', canvas='%s', require_login=%d, create_account=%d, unique_account=%d, data='%s' WHERE nid=%d",
+  db_query("UPDATE {fb_app} SET label='%s', apikey='%s', secret='%s', id='%s', data='%s' WHERE nid=%d",
            $fb_app->label, $fb_app->apikey, $fb_app->secret,
            $fb_app->id,
-           $fb_app->canvas_name, $fb_app->require_login, $fb_app->create_account,
-           $fb_app->unique_account, $fb_app->data,
+           $fb_app->data,
            $node->nid);
   
   fb_app_set_app_properties($fb_app); // Set callback URL, etc.
cvs diff: Diffing themes
cvs diff: Diffing themes/fb_fbml
