@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Created PhabricatorExternalAccount Class and Sql patch to create an external_account table.

Summary: Created PhabricatorExternalAccount class with only data members. Will discuss with you regarding the necessary functions to be implemented in this class. Sql Patch to create a new table for external_accounts. Will I have to write unit tests the new storage object? Sending you this diff so that you can comment on this to further improve :).

Test Plan: {F40977}

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan

Maniphest Tasks: T1536, T1205

Differential Revision: https://secure.phabricator.com/D5724

authored by

Afaque Hussain and committed by
epriestley
dc6cfe6e 0f0c2a6f

+37 -1
+12
resources/sql/patches/20130417.externalaccount.sql
··· 1 + 2 + CREATE TABLE {$NAMESPACE}_user.externalaccount ( 3 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 4 + phid VARCHAR(64) COLLATE utf8_bin NOT NULL UNIQUE KEY, 5 + userPHID VARCHAR(64) COLLATE utf8_bin, 6 + accountType VARCHAR(16) COLLATE utf8_bin NOT NULL, 7 + accountDomain VARCHAR(64) COLLATE utf8_bin, 8 + accountSecret LONGTEXT COLLATE utf8_bin, 9 + accountID VARCHAR(160) COLLATE utf8_bin NOT NULL, 10 + displayName VARCHAR(256) COLLATE utf8_bin NOT NULL, 11 + UNIQUE KEY `account_details` (accountType, accountDomain, accountID) 12 + )ENGINE=InnoDB DEFAULT CHARSET=utf8;
+1 -1
src/__celerity_resource_map__.php
··· 1282 1282 ), 1283 1283 'javelin-behavior-conpherence-menu' => 1284 1284 array( 1285 - 'uri' => '/res/89c92cc0/rsrc/js/application/conpherence/behavior-menu.js', 1285 + 'uri' => '/res/00da05a6/rsrc/js/application/conpherence/behavior-menu.js', 1286 1286 'type' => 'js', 1287 1287 'requires' => 1288 1288 array(
+2
src/__phutil_library_map__.php
··· 922 922 'PhabricatorEventType' => 'infrastructure/events/constant/PhabricatorEventType.php', 923 923 'PhabricatorExampleEventListener' => 'infrastructure/events/PhabricatorExampleEventListener.php', 924 924 'PhabricatorExtendingPhabricatorConfigOptions' => 'applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php', 925 + 'PhabricatorExternalAccount' => 'applications/people/storage/PhabricatorExternalAccount.php', 925 926 'PhabricatorFacebookConfigOptions' => 'applications/config/option/PhabricatorFacebookConfigOptions.php', 926 927 'PhabricatorFactAggregate' => 'applications/fact/storage/PhabricatorFactAggregate.php', 927 928 'PhabricatorFactChartController' => 'applications/fact/controller/PhabricatorFactChartController.php', ··· 2631 2632 'PhabricatorEventType' => 'PhutilEventType', 2632 2633 'PhabricatorExampleEventListener' => 'PhutilEventListener', 2633 2634 'PhabricatorExtendingPhabricatorConfigOptions' => 'PhabricatorApplicationConfigOptions', 2635 + 'PhabricatorExternalAccount' => 'PhabricatorUserDAO', 2634 2636 'PhabricatorFacebookConfigOptions' => 'PhabricatorApplicationConfigOptions', 2635 2637 'PhabricatorFactAggregate' => 'PhabricatorFactDAO', 2636 2638 'PhabricatorFactChartController' => 'PhabricatorFactController',
+17
src/applications/people/storage/PhabricatorExternalAccount.php
··· 1 + <?php 2 + 3 + final class PhabricatorExternalAccount extends PhabricatorUserDAO { 4 + 5 + private $phid; 6 + private $userPHID; 7 + private $accountType; 8 + private $accountDomain; 9 + private $accountSecret; 10 + private $accountID; 11 + private $displayName; 12 + 13 + public function generatePHID() { 14 + return PhabricatorPHID::generateNewPHID( 15 + PhabricatorPHIDConstants::PHID_TYPE_XUSR); 16 + } 17 + }
+1
src/applications/phid/PhabricatorPHIDConstants.php
··· 41 41 42 42 const PHID_TYPE_XACT = 'XACT'; 43 43 const PHID_TYPE_XCMT = 'XCMT'; 44 + const PHID_TYPE_XUSR = 'XUSR'; 44 45 45 46 }
+4
src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
··· 1238 1238 'type' => 'php', 1239 1239 'name' => $this->getPatchPath('20130409.commitdrev.php'), 1240 1240 ), 1241 + '20130417.externalaccount.sql' => array( 1242 + 'type' => 'sql', 1243 + 'name' => $this->getPatchPath('20130417.externalaccount.sql'), 1244 + ), 1241 1245 ); 1242 1246 } 1243 1247 }