Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82929384
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
Sat, Sep 14, 06:52
Size
758 B
Mime Type
text/x-php
Expires
Mon, Sep 16, 06:52 (2 d)
Engine
blob
Format
Raw Data
Handle
20776366
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