Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101184242
20151219.proj.06.defaultpolicy.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
Thu, Feb 6, 14:05
Size
758 B
Mime Type
text/x-php
Expires
Sat, Feb 8, 14:05 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24108563
Attached To
rPH Phabricator
20151219.proj.06.defaultpolicy.php
View Options
<?php
$app
=
PhabricatorApplication
::
getByClass
(
'PhabricatorProjectApplication'
);
$view_policy
=
$app
->
getPolicy
(
ProjectDefaultViewCapability
::
CAPABILITY
);
$edit_policy
=
$app
->
getPolicy
(
ProjectDefaultEditCapability
::
CAPABILITY
);
$join_policy
=
$app
->
getPolicy
(
ProjectDefaultJoinCapability
::
CAPABILITY
);
$table
=
new
PhabricatorProject
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
queryfx
(
$conn_w
,
'UPDATE %T SET viewPolicy = %s WHERE viewPolicy IS NULL'
,
$table
->
getTableName
(),
$view_policy
);
queryfx
(
$conn_w
,
'UPDATE %T SET editPolicy = %s WHERE editPolicy IS NULL'
,
$table
->
getTableName
(),
$edit_policy
);
queryfx
(
$conn_w
,
'UPDATE %T SET joinPolicy = %s WHERE joinPolicy IS NULL'
,
$table
->
getTableName
(),
$join_policy
);
Event Timeline
Log In to Comment