Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101591152
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
Tue, Feb 11, 20:54
Size
758 B
Mime Type
text/x-php
Expires
Thu, Feb 13, 20:54 (2 d)
Engine
blob
Format
Raw Data
Handle
24193648
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