mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 04:50:55 +01:00
29 lines
758 B
PHP
29 lines
758 B
PHP
|
<?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);
|