Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96201307
20140722.renameauth.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Dec 23, 17:45
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Dec 25, 17:45 (1 d, 17 h)
Engine
blob
Format
Raw Data
Handle
23143489
Attached To
rPH Phabricator
20140722.renameauth.php
View Options
<?php
$map
=
array
(
'PhabricatorAuthProviderOAuthAmazon'
=>
'PhabricatorAmazonAuthProvider'
,
'PhabricatorAuthProviderOAuthAsana'
=>
'PhabricatorAsanaAuthProvider'
,
'PhabricatorAuthProviderOAuth1Bitbucket'
=>
'PhabricatorBitbucketAuthProvider'
,
'PhabricatorAuthProviderOAuthDisqus'
=>
'PhabricatorDisqusAuthProvider'
,
'PhabricatorAuthProviderOAuthFacebook'
=>
'PhabricatorFacebookAuthProvider'
,
'PhabricatorAuthProviderOAuthGitHub'
=>
'PhabricatorGitHubAuthProvider'
,
'PhabricatorAuthProviderOAuthGoogle'
=>
'PhabricatorGoogleAuthProvider'
,
'PhabricatorAuthProviderOAuth1JIRA'
=>
'PhabricatorJIRAAuthProvider'
,
'PhabricatorAuthProviderLDAP'
=>
'PhabricatorLDAPAuthProvider'
,
'PhabricatorAuthProviderPassword'
=>
'PhabricatorPasswordAuthProvider'
,
'PhabricatorAuthProviderPersona'
=>
'PhabricatorPersonaAuthProvider'
,
'PhabricatorAuthProviderOAuthTwitch'
=>
'PhabricatorTwitchAuthProvider'
,
'PhabricatorAuthProviderOAuth1Twitter'
=>
'PhabricatorTwitterAuthProvider'
,
'PhabricatorAuthProviderOAuthWordPress'
=>
'PhabricatorWordPressAuthProvider'
,
);
echo
pht
(
'Migrating auth providers...'
).
"
\n
"
;
$table
=
new
PhabricatorAuthProviderConfig
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$provider
)
{
$provider_class
=
$provider
->
getProviderClass
();
queryfx
(
$conn_w
,
'UPDATE %T SET providerClass = %s WHERE id = %d'
,
$provider
->
getTableName
(),
idx
(
$map
,
$provider_class
,
$provider_class
),
$provider
->
getID
());
}
Event Timeline
Log In to Comment