]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apioauthauthorize.php
Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
[quix0rs-gnu-social.git] / actions / apioauthauthorize.php
index d76ae060f2f778a2a018265e2dbba0263ba28e5b..1755c36be3190fa68e0e87230b2c025cb51d9b13 100644 (file)
@@ -22,7 +22,7 @@
  * @category  API
  * @package   StatusNet
  * @author    Zach Copley <zach@status.net>
- * @copyright 2010 StatusNet, Inc.
+ * @copyright 2010-2011 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link      http://status.net/
  */
@@ -35,7 +35,7 @@ require_once INSTALLDIR . '/lib/apioauth.php';
 require_once INSTALLDIR . '/lib/info.php';
 
 /**
- * Authorize an Oputh request token
+ * Authorize an OAuth request token
  *
  * @category API
  * @package  StatusNet
@@ -196,12 +196,6 @@ class ApiOauthAuthorizeAction extends Action
                 )
             );
 
-            // XXX: Make sure we have a oauth_token_association table. The table
-            // is now in the main schema, but because it is being added with
-            // a point release, it's unlikely to be there. This code can be
-            // removed as of 1.0.
-            $this->ensureOauthTokenAssociationTable();
-
             $tokenAssoc = new Oauth_token_association();
 
             $tokenAssoc->profile_id     = $user->id;
@@ -295,30 +289,6 @@ class ApiOauthAuthorizeAction extends Action
         }
     }
 
-    // XXX Remove this function when we hit 1.0
-    function ensureOauthTokenAssociationTable()
-    {
-        $schema = Schema::get();
-
-        $reqTokenCols = array(
-            new ColumnDef('profile_id', 'integer', null, true, 'PRI'),
-            new ColumnDef('application_id', 'integer', null, true, 'PRI'),
-            new ColumnDef('token', 'varchar', 255, true, 'PRI'),
-            new ColumnDef('created', 'datetime', null, false),
-            new ColumnDef(
-                'modified',
-                'timestamp',
-                null,
-                false,
-                null,
-                'CURRENT_TIMESTAMP',
-                'on update CURRENT_TIMESTAMP'
-            )
-        );
-
-        $schema->ensureTable('oauth_token_association', $reqTokenCols);
-    }
-
     /**
      * Show body - override to add a special CSS class for the authorize
      * page's "desktop mode" (minimal display)