Merge branch 'master' into redesign-2015
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
* @task cookie Managing Cookies
|
||||
* @task cluster Working With a Phabricator Cluster
|
||||
*/
|
||||
final class AphrontRequest {
|
||||
final class AphrontRequest extends Phobject {
|
||||
|
||||
// NOTE: These magic request-type parameters are automatically included in
|
||||
// certain requests (e.g., by phabricator_form(), JX.Request,
|
||||
@@ -27,6 +27,7 @@ final class AphrontRequest {
|
||||
private $user;
|
||||
private $applicationConfiguration;
|
||||
private $uriData;
|
||||
private $cookiePrefix;
|
||||
|
||||
public function __construct($host, $path) {
|
||||
$this->host = $host;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class AphrontURIMapper {
|
||||
final class AphrontURIMapper extends Phobject {
|
||||
|
||||
private $map;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/**
|
||||
* @task routing URI Routing
|
||||
*/
|
||||
abstract class AphrontApplicationConfiguration {
|
||||
abstract class AphrontApplicationConfiguration extends Phobject {
|
||||
|
||||
private $request;
|
||||
private $host;
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
final class AphrontPlainTextResponse extends AphrontResponse {
|
||||
|
||||
private $content;
|
||||
|
||||
public function setContent($content) {
|
||||
$this->content = $content;
|
||||
return $this;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
abstract class AphrontResponse {
|
||||
abstract class AphrontResponse extends Phobject {
|
||||
|
||||
private $request;
|
||||
private $cacheable = false;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* @task write Writing Response Components
|
||||
* @task emit Emitting the Response
|
||||
*/
|
||||
abstract class AphrontHTTPSink {
|
||||
abstract class AphrontHTTPSink extends Phobject {
|
||||
|
||||
|
||||
/* -( Writing Response Components )---------------------------------------- */
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
final class AlmanacServiceTypeTestCase extends PhabricatorTestCase {
|
||||
|
||||
public function testGetAllServiceTypes() {
|
||||
AlmanacServiceType::getAllServiceTypes();
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class AphlictDropdownDataQuery {
|
||||
final class AphlictDropdownDataQuery extends Phobject {
|
||||
|
||||
private $viewer;
|
||||
private $notificationData;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class PhabricatorAuditActionConstants {
|
||||
final class PhabricatorAuditActionConstants extends Phobject {
|
||||
|
||||
const CONCERN = 'concern';
|
||||
const ACCEPT = 'accept';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class PhabricatorAuditCommitStatusConstants {
|
||||
final class PhabricatorAuditCommitStatusConstants extends Phobject {
|
||||
|
||||
const NONE = 0;
|
||||
const NEEDS_AUDIT = 1;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class PhabricatorAuditStatusConstants {
|
||||
final class PhabricatorAuditStatusConstants extends Phobject {
|
||||
|
||||
const NONE = '';
|
||||
const AUDIT_NOT_REQUIRED = 'audit-not-required';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
final class PhabricatorAuditInlineComment
|
||||
extends Phobject
|
||||
implements PhabricatorInlineCommentInterface {
|
||||
|
||||
private $proxy;
|
||||
|
||||
@@ -71,7 +71,7 @@ final class PhabricatorAuthStartController
|
||||
'This Phabricator install is not configured with any enabled '.
|
||||
'authentication providers which can be used to log in. If you '.
|
||||
'have accidentally locked yourself out by disabling all providers, '.
|
||||
'you can use `%s` to recover access to an administrative account.'.
|
||||
'you can use `%s` to recover access to an administrative account.',
|
||||
'phabricator/bin/auth recover <username>'));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?php
|
||||
|
||||
final class PhabricatorAuthHighSecurityToken {}
|
||||
final class PhabricatorAuthHighSecurityToken extends Phobject {}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
final class PhabricatorAuthFactorTestCase extends PhabricatorTestCase {
|
||||
|
||||
public function testGetAllFactors() {
|
||||
PhabricatorAuthFactor::getAllFactors();
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
abstract class PhabricatorAuthProvider {
|
||||
abstract class PhabricatorAuthProvider extends Phobject {
|
||||
|
||||
private $providerConfig;
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
* @task fact Fact Integration
|
||||
* @task meta Application Management
|
||||
*/
|
||||
abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
abstract class PhabricatorApplication
|
||||
extends Phobject
|
||||
implements PhabricatorPolicyInterface {
|
||||
|
||||
const MAX_STATUS_ITEMS = 100;
|
||||
|
||||
@@ -17,7 +19,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
const GROUP_ADMIN = 'admin';
|
||||
const GROUP_DEVELOPER = 'developer';
|
||||
|
||||
public static function getApplicationGroups() {
|
||||
final public static function getApplicationGroups() {
|
||||
return array(
|
||||
self::GROUP_CORE => pht('Core Applications'),
|
||||
self::GROUP_UTILITIES => pht('Utilities'),
|
||||
@@ -35,7 +37,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
return pht('%s Application', $this->getName());
|
||||
}
|
||||
|
||||
public function isInstalled() {
|
||||
final public function isInstalled() {
|
||||
if (!$this->canUninstall()) {
|
||||
return true;
|
||||
}
|
||||
@@ -133,7 +135,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getPHID() {
|
||||
final public function getPHID() {
|
||||
return 'PHID-APPS-'.get_class($this);
|
||||
}
|
||||
|
||||
@@ -145,7 +147,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getApplicationURI($path = '') {
|
||||
final public function getApplicationURI($path = '') {
|
||||
return $this->getBaseURI().ltrim($path, '/');
|
||||
}
|
||||
|
||||
@@ -169,7 +171,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getHelpMenuItems(PhabricatorUser $viewer) {
|
||||
final public function getHelpMenuItems(PhabricatorUser $viewer) {
|
||||
$items = array();
|
||||
|
||||
$articles = $this->getHelpDocumentationArticles($viewer);
|
||||
@@ -249,7 +251,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function getInboundEmailSupportLink() {
|
||||
final protected function getInboundEmailSupportLink() {
|
||||
return PhabricatorEnv::getDocLink('Configuring Inbound Email');
|
||||
}
|
||||
|
||||
@@ -286,7 +288,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
* @return string
|
||||
* @task ui
|
||||
*/
|
||||
public static function formatStatusCount(
|
||||
final public static function formatStatusCount(
|
||||
$count,
|
||||
$limit_string = '%s',
|
||||
$base_string = '%d') {
|
||||
@@ -359,7 +361,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
/* -( Application Management )--------------------------------------------- */
|
||||
|
||||
|
||||
public static function getByClass($class_name) {
|
||||
final public static function getByClass($class_name) {
|
||||
$selected = null;
|
||||
$applications = self::getAllApplications();
|
||||
|
||||
@@ -377,7 +379,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
return $selected;
|
||||
}
|
||||
|
||||
public static function getAllApplications() {
|
||||
final public static function getAllApplications() {
|
||||
static $applications;
|
||||
|
||||
if ($applications === null) {
|
||||
@@ -401,7 +403,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
return $applications;
|
||||
}
|
||||
|
||||
public static function getAllInstalledApplications() {
|
||||
final public static function getAllInstalledApplications() {
|
||||
$all_applications = self::getAllApplications();
|
||||
$apps = array();
|
||||
foreach ($all_applications as $app) {
|
||||
@@ -426,7 +428,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
* @return bool True if the class is installed.
|
||||
* @task meta
|
||||
*/
|
||||
public static function isClassInstalled($class) {
|
||||
final public static function isClassInstalled($class) {
|
||||
return self::getByClass($class)->isInstalled();
|
||||
}
|
||||
|
||||
@@ -443,7 +445,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
* @return bool True if the class is installed for the viewer.
|
||||
* @task meta
|
||||
*/
|
||||
public static function isClassInstalledForViewer(
|
||||
final public static function isClassInstalledForViewer(
|
||||
$class,
|
||||
PhabricatorUser $viewer) {
|
||||
|
||||
@@ -502,7 +504,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
return array();
|
||||
}
|
||||
|
||||
private function getCustomPolicySetting($capability) {
|
||||
final private function getCustomPolicySetting($capability) {
|
||||
if (!$this->isCapabilityEditable($capability)) {
|
||||
return null;
|
||||
}
|
||||
@@ -528,7 +530,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
}
|
||||
|
||||
|
||||
private function getCustomCapabilitySpecification($capability) {
|
||||
final private function getCustomCapabilitySpecification($capability) {
|
||||
$custom = $this->getCustomCapabilities();
|
||||
if (!isset($custom[$capability])) {
|
||||
throw new Exception(pht("Unknown capability '%s'!", $capability));
|
||||
@@ -536,7 +538,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
return $custom[$capability];
|
||||
}
|
||||
|
||||
public function getCapabilityLabel($capability) {
|
||||
final public function getCapabilityLabel($capability) {
|
||||
switch ($capability) {
|
||||
case PhabricatorPolicyCapability::CAN_VIEW:
|
||||
return pht('Can Use Application');
|
||||
@@ -552,7 +554,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
return null;
|
||||
}
|
||||
|
||||
public function isCapabilityEditable($capability) {
|
||||
final public function isCapabilityEditable($capability) {
|
||||
switch ($capability) {
|
||||
case PhabricatorPolicyCapability::CAN_VIEW:
|
||||
return $this->canUninstall();
|
||||
@@ -564,7 +566,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
}
|
||||
}
|
||||
|
||||
public function getCapabilityCaption($capability) {
|
||||
final public function getCapabilityCaption($capability) {
|
||||
switch ($capability) {
|
||||
case PhabricatorPolicyCapability::CAN_VIEW:
|
||||
if (!$this->canUninstall()) {
|
||||
@@ -582,6 +584,17 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface {
|
||||
}
|
||||
}
|
||||
|
||||
final public function getCapabilityTemplatePHIDType($capability) {
|
||||
switch ($capability) {
|
||||
case PhabricatorPolicyCapability::CAN_VIEW:
|
||||
case PhabricatorPolicyCapability::CAN_EDIT:
|
||||
return null;
|
||||
}
|
||||
|
||||
$spec = $this->getCustomCapabilitySpecification($capability);
|
||||
return idx($spec, 'template');
|
||||
}
|
||||
|
||||
public function getApplicationSearchDocumentTypes() {
|
||||
return array();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
final class PhabricatorApplicationTestCase extends PhabricatorTestCase {
|
||||
|
||||
public function testGetAllApplications() {
|
||||
PhabricatorApplication::getAllApplications();
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
}
|
||||
2
src/applications/cache/PhabricatorCaches.php
vendored
2
src/applications/cache/PhabricatorCaches.php
vendored
@@ -7,7 +7,7 @@
|
||||
* @task setup Setup Cache
|
||||
* @task compress Compression
|
||||
*/
|
||||
final class PhabricatorCaches {
|
||||
final class PhabricatorCaches extends Phobject {
|
||||
|
||||
private static $requestCache;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ final class PhabricatorCalendarEventEditController
|
||||
$viewer = $request->getViewer();
|
||||
$user_phid = $viewer->getPHID();
|
||||
$error_name = true;
|
||||
$error_recurrence_end_date = true;
|
||||
$error_recurrence_end_date = null;
|
||||
$error_start_date = true;
|
||||
$error_end_date = true;
|
||||
$validation_exception = null;
|
||||
@@ -336,8 +336,7 @@ final class PhabricatorCalendarEventEditController
|
||||
->setID($recurrence_end_date_id)
|
||||
->setIsTimeDisabled(true)
|
||||
->setIsDisabled($recurrence_end_date_value->isDisabled())
|
||||
->setAllowNull(true)
|
||||
->isRequired(false);
|
||||
->setAllowNull(true);
|
||||
|
||||
$recurrence_frequency_select = id(new AphrontFormSelectControl())
|
||||
->setName('frequency')
|
||||
|
||||
@@ -316,7 +316,7 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
|
||||
case 'monthly':
|
||||
return 'month';
|
||||
case 'yearly':
|
||||
return 'yearly';
|
||||
return 'year';
|
||||
default:
|
||||
return 'day';
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* a Sunday -> Saturday list, whilest the profile view shows a more simple
|
||||
* seven day rolling list of events.
|
||||
*/
|
||||
final class CalendarTimeUtil {
|
||||
final class CalendarTimeUtil extends Phobject {
|
||||
|
||||
public static function getCalendarEventEpochs(
|
||||
PhabricatorUser $user,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Indirection layer which provisions for a terrifying future where we need to
|
||||
* build multiple resource responses per page.
|
||||
*/
|
||||
final class CelerityAPI {
|
||||
final class CelerityAPI extends Phobject {
|
||||
|
||||
private static $response;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* not need to invoke it directly; instead, you call higher-level Celerity APIs
|
||||
* and it uses the resource map to satisfy your requests.
|
||||
*/
|
||||
final class CelerityResourceMap {
|
||||
final class CelerityResourceMap extends Phobject {
|
||||
|
||||
private static $instances = array();
|
||||
|
||||
@@ -16,6 +16,7 @@ final class CelerityResourceMap {
|
||||
private $packageMap;
|
||||
private $nameMap;
|
||||
private $hashMap;
|
||||
private $componentMap;
|
||||
|
||||
public function __construct(CelerityResources $resources) {
|
||||
$this->resources = $resources;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class CelerityResourceMapGenerator {
|
||||
final class CelerityResourceMapGenerator extends Phobject {
|
||||
|
||||
private $debug = false;
|
||||
private $resources;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class CelerityResourceTransformer {
|
||||
final class CelerityResourceTransformer extends Phobject {
|
||||
|
||||
private $minify;
|
||||
private $rawURIMap;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class CeleritySpriteGenerator {
|
||||
final class CeleritySpriteGenerator extends Phobject {
|
||||
|
||||
public function buildMenuSheet() {
|
||||
$sprites = array();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @{function:require_celerity_resource}, and then builds appropriate HTML or
|
||||
* Ajax responses.
|
||||
*/
|
||||
final class CelerityStaticResourceResponse {
|
||||
final class CelerityStaticResourceResponse extends Phobject {
|
||||
|
||||
private $symbols = array();
|
||||
private $needsResolve = true;
|
||||
|
||||
@@ -21,6 +21,7 @@ abstract class CelerityPhysicalResources extends CelerityResources {
|
||||
|
||||
public static function getAll() {
|
||||
static $resources_map;
|
||||
|
||||
if ($resources_map === null) {
|
||||
$resources_map = array();
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/**
|
||||
* Defines the location of static resources.
|
||||
*/
|
||||
abstract class CelerityResources {
|
||||
abstract class CelerityResources extends Phobject {
|
||||
|
||||
private $map;
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
final class CelerityPhysicalResourcesTestCase extends PhabricatorTestCase {
|
||||
|
||||
public function testGetAll() {
|
||||
CelerityPhysicalResources::getAll();
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,9 +8,10 @@
|
||||
* $result = $call->execute();
|
||||
*
|
||||
*/
|
||||
final class ConduitCall {
|
||||
final class ConduitCall extends Phobject {
|
||||
|
||||
private $method;
|
||||
private $handler;
|
||||
private $request;
|
||||
private $user;
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ abstract class ConduitAPIMethod
|
||||
return head(explode('.', $this->getAPIMethodName(), 2));
|
||||
}
|
||||
|
||||
public static function getConduitMethod($method_name) {
|
||||
public static function loadAllConduitMethods() {
|
||||
static $method_map = null;
|
||||
|
||||
if ($method_map === null) {
|
||||
@@ -143,6 +143,11 @@ abstract class ConduitAPIMethod
|
||||
}
|
||||
}
|
||||
|
||||
return $method_map;
|
||||
}
|
||||
|
||||
public static function getConduitMethod($method_name) {
|
||||
$method_map = self::loadAllConduitMethods();
|
||||
return idx($method_map, $method_name);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
final class ConduitAPIMethodTestCase extends PhabricatorTestCase {
|
||||
|
||||
public function testLoadAllConduitMethods() {
|
||||
ConduitAPIMethod::loadAllConduitMethods();
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class ConduitAPIRequest {
|
||||
final class ConduitAPIRequest extends Phobject {
|
||||
|
||||
protected $params;
|
||||
private $user;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class ConduitAPIResponse {
|
||||
final class ConduitAPIResponse extends Phobject {
|
||||
|
||||
private $result;
|
||||
private $errorCode;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
abstract class PhabricatorSetupCheck {
|
||||
abstract class PhabricatorSetupCheck extends Phobject {
|
||||
|
||||
private $issues;
|
||||
|
||||
@@ -111,7 +111,7 @@ abstract class PhabricatorSetupCheck {
|
||||
}
|
||||
}
|
||||
|
||||
final public static function runAllChecks() {
|
||||
final public static function loadAllChecks() {
|
||||
$symbols = id(new PhutilSymbolLoader())
|
||||
->setAncestorClass(__CLASS__)
|
||||
->setConcreteOnly(true)
|
||||
@@ -122,7 +122,11 @@ abstract class PhabricatorSetupCheck {
|
||||
$checks[] = newv($symbol['name'], array());
|
||||
}
|
||||
|
||||
$checks = msort($checks, 'getExecutionOrder');
|
||||
return msort($checks, 'getExecutionOrder');
|
||||
}
|
||||
|
||||
final public static function runAllChecks() {
|
||||
$checks = self::loadAllChecks();
|
||||
|
||||
$issues = array();
|
||||
foreach ($checks as $check) {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
final class PhabricatorSetupCheckTestCase extends PhabricatorTestCase {
|
||||
|
||||
public function testLoadAllChecks() {
|
||||
PhabricatorSetupCheck::loadAllChecks();
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
abstract class PhabricatorConfigOptionType {
|
||||
abstract class PhabricatorConfigOptionType extends Phobject {
|
||||
|
||||
public function validateOption(PhabricatorConfigOption $option, $value) {
|
||||
return;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class PhabricatorSetupIssue {
|
||||
final class PhabricatorSetupIssue extends Phobject {
|
||||
|
||||
private $issueKey;
|
||||
private $name;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class PhabricatorConfigJSON {
|
||||
final class PhabricatorConfigJSON extends Phobject {
|
||||
/**
|
||||
* Properly format a JSON value.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class ConpherenceTransactionRenderer {
|
||||
final class ConpherenceTransactionRenderer extends Phobject {
|
||||
|
||||
public static function renderTransactions(
|
||||
PhabricatorUser $user,
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?php
|
||||
|
||||
abstract class ConpherenceConstants {}
|
||||
abstract class ConpherenceConstants extends Phobject {}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
final class ConpherenceThreadMembersPolicyRule
|
||||
extends PhabricatorPolicyRule {
|
||||
|
||||
public function getObjectPolicyKey() {
|
||||
return 'conpherence.members';
|
||||
}
|
||||
|
||||
public function getObjectPolicyName() {
|
||||
return pht('Thread Members');
|
||||
}
|
||||
|
||||
public function getPolicyExplanation() {
|
||||
return pht('Members of this thread can take this action.');
|
||||
}
|
||||
|
||||
public function getRuleDescription() {
|
||||
return pht('thread members');
|
||||
}
|
||||
|
||||
public function canApplyToObject(PhabricatorPolicyInterface $object) {
|
||||
return ($object instanceof ConpherenceThread);
|
||||
}
|
||||
|
||||
public function applyRule(
|
||||
PhabricatorUser $viewer,
|
||||
$value,
|
||||
PhabricatorPolicyInterface $object) {
|
||||
$viewer_phid = $viewer->getPHID();
|
||||
if (!$viewer_phid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (bool)$object->getParticipantIfExists($viewer_phid);
|
||||
}
|
||||
|
||||
public function getValueControlType() {
|
||||
return self::CONTROL_TYPE_NONE;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DarkConsoleCore {
|
||||
final class DarkConsoleCore extends Phobject {
|
||||
|
||||
private $plugins = array();
|
||||
const STORAGE_VERSION = 1;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
abstract class DarkConsolePlugin {
|
||||
abstract class DarkConsolePlugin extends Phobject {
|
||||
|
||||
private $data;
|
||||
private $request;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DarkConsoleErrorLogPluginAPI {
|
||||
final class DarkConsoleErrorLogPluginAPI extends Phobject {
|
||||
|
||||
private static $errors = array();
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* @phutil-external-symbol function xhprof_enable
|
||||
* @phutil-external-symbol function xhprof_disable
|
||||
*/
|
||||
final class DarkConsoleXHProfPluginAPI {
|
||||
final class DarkConsoleXHProfPluginAPI extends Phobject {
|
||||
|
||||
private static $profilerStarted;
|
||||
private static $profilerRunning;
|
||||
|
||||
@@ -52,6 +52,7 @@ final class PhabricatorCountdownApplication extends PhabricatorApplication {
|
||||
return array(
|
||||
PhabricatorCountdownDefaultViewCapability::CAPABILITY => array(
|
||||
'caption' => pht('Default view policy for new countdowns.'),
|
||||
'template' => PhabricatorCountdownCountdownPHIDType::TYPECONST,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class PhabricatorDashboardLayoutConfig {
|
||||
final class PhabricatorDashboardLayoutConfig extends Phobject {
|
||||
|
||||
const MODE_FULL = 'layout-mode-full';
|
||||
const MODE_HALF_AND_HALF = 'layout-mode-half-and-half';
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Can't find a good place for this, so I'm putting it in the most notably
|
||||
* wrong place.
|
||||
*/
|
||||
final class DifferentialGetWorkingCopy {
|
||||
final class DifferentialGetWorkingCopy extends Phobject {
|
||||
|
||||
/**
|
||||
* Creates and/or cleans a workspace for the requested repo.
|
||||
|
||||
@@ -186,6 +186,7 @@ final class PhabricatorDifferentialApplication extends PhabricatorApplication {
|
||||
return array(
|
||||
DifferentialDefaultViewCapability::CAPABILITY => array(
|
||||
'caption' => pht('Default view policy for newly created revisions.'),
|
||||
'template' => DifferentialRevisionPHIDType::TYPECONST,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DifferentialAction {
|
||||
final class DifferentialAction extends Phobject {
|
||||
|
||||
const ACTION_CLOSE = 'commit';
|
||||
const ACTION_COMMENT = 'none';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DifferentialChangeType {
|
||||
final class DifferentialChangeType extends Phobject {
|
||||
|
||||
const TYPE_ADD = 1;
|
||||
const TYPE_CHANGE = 2;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DifferentialLintStatus {
|
||||
final class DifferentialLintStatus extends Phobject {
|
||||
|
||||
const LINT_NONE = 0;
|
||||
const LINT_OKAY = 1;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DifferentialReviewerStatus {
|
||||
final class DifferentialReviewerStatus extends Phobject {
|
||||
|
||||
const STATUS_BLOCKING = 'blocking';
|
||||
const STATUS_ADDED = 'added';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
// TODO: Unify with similar Repository constants
|
||||
final class DifferentialRevisionControlSystem {
|
||||
final class DifferentialRevisionControlSystem extends Phobject {
|
||||
|
||||
const SVN = 'svn';
|
||||
const GIT = 'git';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* application.
|
||||
*/
|
||||
|
||||
final class DifferentialRevisionStatus {
|
||||
final class DifferentialRevisionStatus extends Phobject {
|
||||
|
||||
const COLOR_STATUS_DEFAULT = 'status';
|
||||
const COLOR_STATUS_DARK = 'status-dark';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DifferentialUnitStatus {
|
||||
final class DifferentialUnitStatus extends Phobject {
|
||||
|
||||
const UNIT_NONE = 0;
|
||||
const UNIT_OKAY = 1;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DifferentialUnitTestResult {
|
||||
final class DifferentialUnitTestResult extends Phobject {
|
||||
|
||||
const RESULT_PASS = 'pass';
|
||||
const RESULT_FAIL = 'fail';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
abstract class DifferentialLandingStrategy {
|
||||
abstract class DifferentialLandingStrategy extends Phobject {
|
||||
|
||||
abstract public function processLandRequest(
|
||||
AphrontRequest $request,
|
||||
|
||||
@@ -48,8 +48,6 @@ final class PhabricatorHunksManagementMigrateWorkflow
|
||||
new PhutilNumber($diff_len),
|
||||
sprintf('%.1f%%', 100 * ($diff_len / $old_len))));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if ($saw_any_rows) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DifferentialChangesetParser {
|
||||
final class DifferentialChangesetParser extends Phobject {
|
||||
|
||||
const HIGHLIGHT_BYTE_LIMIT = 262144;
|
||||
|
||||
@@ -55,6 +55,8 @@ final class DifferentialChangesetParser {
|
||||
private $rangeEnd;
|
||||
private $mask;
|
||||
|
||||
private $highlightEngine;
|
||||
|
||||
public function setRange($start, $end) {
|
||||
$this->rangeStart = $start;
|
||||
$this->rangeEnd = $end;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
* @task support Support Methods
|
||||
* @task internal Internals
|
||||
*/
|
||||
final class DifferentialCommitMessageParser {
|
||||
final class DifferentialCommitMessageParser extends Phobject {
|
||||
|
||||
private $labelMap;
|
||||
private $titleKey;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DifferentialHunkParser {
|
||||
final class DifferentialHunkParser extends Phobject {
|
||||
|
||||
private $oldLines;
|
||||
private $newLines;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
abstract class DifferentialChangesetRenderer {
|
||||
abstract class DifferentialChangesetRenderer extends Phobject {
|
||||
|
||||
private $user;
|
||||
private $changeset;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
final class DifferentialRawDiffRenderer {
|
||||
|
||||
final class DifferentialRawDiffRenderer extends Phobject {
|
||||
|
||||
private $changesets;
|
||||
private $format = 'unified';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
final class DifferentialInlineComment
|
||||
extends Phobject
|
||||
implements PhabricatorInlineCommentInterface {
|
||||
|
||||
private $proxy;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DifferentialReviewer {
|
||||
final class DifferentialReviewer extends Phobject {
|
||||
|
||||
private $reviewerPHID;
|
||||
private $status;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DifferentialChangesetFileTreeSideNavBuilder {
|
||||
final class DifferentialChangesetFileTreeSideNavBuilder extends Phobject {
|
||||
|
||||
private $title;
|
||||
private $baseURI;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DiffusionLintSaveRunner {
|
||||
final class DiffusionLintSaveRunner extends Phobject {
|
||||
private $arc = 'arc';
|
||||
private $severity = ArcanistLintSeverity::SEVERITY_ADVICE;
|
||||
private $all = false;
|
||||
|
||||
@@ -140,11 +140,16 @@ final class PhabricatorDiffusionApplication extends PhabricatorApplication {
|
||||
|
||||
protected function getCustomCapabilities() {
|
||||
return array(
|
||||
DiffusionDefaultViewCapability::CAPABILITY => array(),
|
||||
DiffusionDefaultViewCapability::CAPABILITY => array(
|
||||
'template' => PhabricatorRepositoryRepositoryPHIDType::TYPECONST,
|
||||
),
|
||||
DiffusionDefaultEditCapability::CAPABILITY => array(
|
||||
'default' => PhabricatorPolicies::POLICY_ADMIN,
|
||||
'template' => PhabricatorRepositoryRepositoryPHIDType::TYPECONST,
|
||||
),
|
||||
DiffusionDefaultPushCapability::CAPABILITY => array(
|
||||
'template' => PhabricatorRepositoryRepositoryPHIDType::TYPECONST,
|
||||
),
|
||||
DiffusionDefaultPushCapability::CAPABILITY => array(),
|
||||
DiffusionCreateRepositoriesCapability::CAPABILITY => array(
|
||||
'default' => PhabricatorPolicies::POLICY_ADMIN,
|
||||
),
|
||||
|
||||
@@ -591,8 +591,8 @@ final class DiffusionRepositoryCreateController
|
||||
if ($this->isSSHProtocol($proto)) {
|
||||
$c_credential->setLabel(pht('SSH Key'));
|
||||
$c_credential->setCredentialType(
|
||||
PassphraseCredentialTypeSSHPrivateKeyText::CREDENTIAL_TYPE);
|
||||
$provides_type = PassphraseCredentialTypeSSHPrivateKey::PROVIDES_TYPE;
|
||||
PassphraseSSHPrivateKeyTextCredentialType::CREDENTIAL_TYPE);
|
||||
$provides_type = PassphraseSSHPrivateKeyCredentialType::PROVIDES_TYPE;
|
||||
|
||||
$page->addRemarkupInstructions(
|
||||
pht(
|
||||
@@ -607,8 +607,8 @@ final class DiffusionRepositoryCreateController
|
||||
$c_credential->setLabel(pht('Password'));
|
||||
$c_credential->setAllowNull(true);
|
||||
$c_credential->setCredentialType(
|
||||
PassphraseCredentialTypePassword::CREDENTIAL_TYPE);
|
||||
$provides_type = PassphraseCredentialTypePassword::PROVIDES_TYPE;
|
||||
PassphrasePasswordCredentialType::CREDENTIAL_TYPE);
|
||||
$provides_type = PassphrasePasswordCredentialType::PROVIDES_TYPE;
|
||||
|
||||
$page->addRemarkupInstructions(
|
||||
pht(
|
||||
@@ -663,7 +663,7 @@ final class DiffusionRepositoryCreateController
|
||||
pht('You must choose an SSH credential to connect over SSH.'));
|
||||
}
|
||||
|
||||
$ssh_type = PassphraseCredentialTypeSSHPrivateKey::PROVIDES_TYPE;
|
||||
$ssh_type = PassphraseSSHPrivateKeyCredentialType::PROVIDES_TYPE;
|
||||
if ($credential->getProvidesType() !== $ssh_type) {
|
||||
$c_credential->setError(pht('Invalid'));
|
||||
$page->addPageError(
|
||||
@@ -674,7 +674,7 @@ final class DiffusionRepositoryCreateController
|
||||
|
||||
} else if ($this->isUsernamePasswordProtocol($proto)) {
|
||||
if ($credential) {
|
||||
$password_type = PassphraseCredentialTypePassword::PROVIDES_TYPE;
|
||||
$password_type = PassphrasePasswordCredentialType::PROVIDES_TYPE;
|
||||
if ($credential->getProvidesType() !== $password_type) {
|
||||
$c_credential->setError(pht('Invalid'));
|
||||
$page->addPageError(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DiffusionBrowseResultSet {
|
||||
final class DiffusionBrowseResultSet extends Phobject {
|
||||
|
||||
const REASON_IS_FILE = 'is-file';
|
||||
const REASON_IS_DELETED = 'is-deleted';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DiffusionFileContent {
|
||||
final class DiffusionFileContent extends Phobject {
|
||||
|
||||
private $corpus;
|
||||
private $blameDict;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DiffusionGitBranch {
|
||||
final class DiffusionGitBranch extends Phobject {
|
||||
|
||||
const DEFAULT_GIT_REMOTE = 'origin';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DiffusionPathChange {
|
||||
final class DiffusionPathChange extends Phobject {
|
||||
|
||||
private $path;
|
||||
private $commitIdentifier;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DiffusionRepositoryPath {
|
||||
final class DiffusionRepositoryPath extends Phobject {
|
||||
|
||||
private $fullPath;
|
||||
private $path;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DiffusionRepositoryTag {
|
||||
final class DiffusionRepositoryTag extends Phobject {
|
||||
|
||||
private $author;
|
||||
private $epoch;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DiffusionMercurialWireProtocol {
|
||||
final class DiffusionMercurialWireProtocol extends Phobject {
|
||||
|
||||
public static function getCommandArgs($command) {
|
||||
// We need to enumerate all of the Mercurial wire commands because the
|
||||
|
||||
@@ -193,6 +193,7 @@ final class DiffusionCommitQuery
|
||||
if ($repo) {
|
||||
$commit->attachRepository($repo);
|
||||
} else {
|
||||
$this->didRejectResult($commit);
|
||||
unset($commits[$key]);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DiffusionPathQuery {
|
||||
final class DiffusionPathQuery extends Phobject {
|
||||
|
||||
private $pathIDs;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DiffusionRenameHistoryQuery {
|
||||
final class DiffusionRenameHistoryQuery extends Phobject {
|
||||
|
||||
private $oldCommit;
|
||||
private $wasCreated;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DiffusionPathChangeQuery {
|
||||
final class DiffusionPathChangeQuery extends Phobject {
|
||||
|
||||
private $request;
|
||||
private $limit;
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
/**
|
||||
* @task pathutil Path Utilities
|
||||
*/
|
||||
final class DiffusionPathIDQuery {
|
||||
final class DiffusionPathIDQuery extends Phobject {
|
||||
|
||||
private $paths = array();
|
||||
|
||||
public function __construct(array $paths) {
|
||||
$this->paths = $paths;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @task new Creating Requests
|
||||
* @task uri Managing Diffusion URIs
|
||||
*/
|
||||
abstract class DiffusionRequest {
|
||||
abstract class DiffusionRequest extends Phobject {
|
||||
|
||||
protected $callsign;
|
||||
protected $path;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
* This protocol has a good spec here:
|
||||
*
|
||||
* http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_ra_svn/protocol
|
||||
*
|
||||
*/
|
||||
final class DiffusionSubversionServeSSHWorkflow
|
||||
extends DiffusionSubversionSSHWorkflow {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DiffusionExternalSymbolQuery {
|
||||
final class DiffusionExternalSymbolQuery extends Phobject {
|
||||
private $languages = array();
|
||||
private $types = array();
|
||||
private $names = array();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
abstract class DiffusionExternalSymbolsSource {
|
||||
abstract class DiffusionExternalSymbolsSource extends Phobject {
|
||||
|
||||
/**
|
||||
* @return list of PhabricatorRepositorySymbol
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DivinerAtom {
|
||||
final class DivinerAtom extends Phobject {
|
||||
|
||||
const TYPE_ARTICLE = 'article';
|
||||
const TYPE_CLASS = 'class';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
final class DivinerAtomRef {
|
||||
final class DivinerAtomRef extends Phobject {
|
||||
|
||||
private $book;
|
||||
private $context;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/**
|
||||
* Generate @{class:DivinerAtom}s from source code.
|
||||
*/
|
||||
abstract class DivinerAtomizer {
|
||||
abstract class DivinerAtomizer extends Phobject {
|
||||
|
||||
private $book;
|
||||
private $fileName;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
abstract class DivinerDiskCache {
|
||||
abstract class DivinerDiskCache extends Phobject {
|
||||
|
||||
private $cache;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ final class DivinerLivePublisher extends DivinerPublisher {
|
||||
if (!$book) {
|
||||
$book = id(new DivinerLiveBook())
|
||||
->setName($book_name)
|
||||
->setViewPolicy(PhabricatorPolicies::POLICY_USER)
|
||||
->setViewPolicy(PhabricatorPolicies::getMostOpenPolicy())
|
||||
->save();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
abstract class DivinerPublisher {
|
||||
abstract class DivinerPublisher extends Phobject {
|
||||
|
||||
private $atomCache;
|
||||
private $atomGraphHashToNodeHashMap;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
abstract class DivinerRenderer {
|
||||
abstract class DivinerRenderer extends Phobject {
|
||||
|
||||
private $publisher;
|
||||
private $atomStack = array();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/**
|
||||
* @task config Configuration
|
||||
*/
|
||||
abstract class DoorkeeperFeedStoryPublisher {
|
||||
abstract class DoorkeeperFeedStoryPublisher extends Phobject {
|
||||
|
||||
private $feedStory;
|
||||
private $viewer;
|
||||
|
||||
@@ -72,9 +72,12 @@ final class PhabricatorDrydockApplication extends PhabricatorApplication {
|
||||
|
||||
protected function getCustomCapabilities() {
|
||||
return array(
|
||||
DrydockDefaultViewCapability::CAPABILITY => array(),
|
||||
DrydockDefaultViewCapability::CAPABILITY => array(
|
||||
'template' => DrydockBlueprintPHIDType::TYPECONST,
|
||||
),
|
||||
DrydockDefaultEditCapability::CAPABILITY => array(
|
||||
'default' => PhabricatorPolicies::POLICY_ADMIN,
|
||||
'template' => DrydockBlueprintPHIDType::TYPECONST,
|
||||
),
|
||||
DrydockCreateBlueprintsCapability::CAPABILITY => array(
|
||||
'default' => PhabricatorPolicies::POLICY_ADMIN,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @task resource Resource Allocation
|
||||
* @task log Logging
|
||||
*/
|
||||
abstract class DrydockBlueprintImplementation {
|
||||
abstract class DrydockBlueprintImplementation extends Phobject {
|
||||
|
||||
private $activeResource;
|
||||
private $activeLease;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user