mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 10:12:41 +01:00
Promote 2024.35 to stable
This commit is contained in:
commit
d3c0a7edc3
317 changed files with 5977 additions and 1614 deletions
11
externals/JsShrink/jsShrink.php
vendored
11
externals/JsShrink/jsShrink.php
vendored
|
@ -11,7 +11,8 @@
|
||||||
function jsShrink($input) {
|
function jsShrink($input) {
|
||||||
return preg_replace_callback('(
|
return preg_replace_callback('(
|
||||||
(?:
|
(?:
|
||||||
(^|[-+\([{}=,:;!%^&*|?~]|/(?![/*])|return|throw) # context before regexp
|
(`(?:\\\\.|[^`\\\\])*`) # template literal
|
||||||
|
|(^|[-+\([{}=,:;!%^&*|?~]|/(?![/*])|return|throw) # context before regexp
|
||||||
(?:\s|//[^\n]*+\n|/\*(?:[^*]|\*(?!/))*+\*/)* # optional space
|
(?:\s|//[^\n]*+\n|/\*(?:[^*]|\*(?!/))*+\*/)* # optional space
|
||||||
(/(?![/*])(?:
|
(/(?![/*])(?:
|
||||||
\\\\[^\n]
|
\\\\[^\n]
|
||||||
|
@ -31,9 +32,11 @@ function jsShrink($input) {
|
||||||
|
|
||||||
function jsShrinkCallback($match) {
|
function jsShrinkCallback($match) {
|
||||||
static $last = '';
|
static $last = '';
|
||||||
$match += array_fill(1, 5, null); // avoid E_NOTICE
|
$match += array_fill(1, 7, null); // avoid E_NOTICE
|
||||||
list(, $context, $regexp, $result, $word, $operator) = $match;
|
list(, $template, $context, $regexp, $result, $word, $operator) = $match;
|
||||||
if ($word != '') {
|
if ($template) {
|
||||||
|
$result = $template;
|
||||||
|
} elseif ($word != '') {
|
||||||
$result = ($last == 'word' ? "\n" : ($last == 'return' ? " " : "")) . $result;
|
$result = ($last == 'word' ? "\n" : ($last == 'return' ? " " : "")) . $result;
|
||||||
$last = ($word == 'return' || $word == 'throw' || $word == 'break' || $word == 'async' ? 'return' : 'word');
|
$last = ($word == 'return' || $word == 'throw' || $word == 'break' || $word == 'async' ? 'return' : 'word');
|
||||||
} elseif ($operator) {
|
} elseif ($operator) {
|
||||||
|
|
8
externals/cldr/cldr_windows_timezones.xml
vendored
8
externals/cldr/cldr_windows_timezones.xml
vendored
|
@ -537,7 +537,8 @@ For terms of use, see http://www.unicode.org/copyright.html
|
||||||
<!-- (UTC+05:00) Ashgabat, Tashkent -->
|
<!-- (UTC+05:00) Ashgabat, Tashkent -->
|
||||||
<mapZone other="West Asia Standard Time" territory="001" type="Asia/Tashkent"/>
|
<mapZone other="West Asia Standard Time" territory="001" type="Asia/Tashkent"/>
|
||||||
<mapZone other="West Asia Standard Time" territory="AQ" type="Antarctica/Mawson"/>
|
<mapZone other="West Asia Standard Time" territory="AQ" type="Antarctica/Mawson"/>
|
||||||
<mapZone other="West Asia Standard Time" territory="KZ" type="Asia/Oral Asia/Aqtau Asia/Aqtobe Asia/Atyrau"/>
|
<!-- Microsoft may create a new zone dedicated for Almaty and Qostanay. -->
|
||||||
|
<mapZone other="West Asia Standard Time" territory="KZ" type="Asia/Oral Asia/Almaty Asia/Aqtau Asia/Aqtobe Asia/Atyrau Asia/Qostanay"/>
|
||||||
<mapZone other="West Asia Standard Time" territory="MV" type="Indian/Maldives"/>
|
<mapZone other="West Asia Standard Time" territory="MV" type="Indian/Maldives"/>
|
||||||
<mapZone other="West Asia Standard Time" territory="TF" type="Indian/Kerguelen"/>
|
<mapZone other="West Asia Standard Time" territory="TF" type="Indian/Kerguelen"/>
|
||||||
<mapZone other="West Asia Standard Time" territory="TJ" type="Asia/Dushanbe"/>
|
<mapZone other="West Asia Standard Time" territory="TJ" type="Asia/Dushanbe"/>
|
||||||
|
@ -569,13 +570,12 @@ For terms of use, see http://www.unicode.org/copyright.html
|
||||||
<mapZone other="Nepal Standard Time" territory="001" type="Asia/Katmandu"/>
|
<mapZone other="Nepal Standard Time" territory="001" type="Asia/Katmandu"/>
|
||||||
<mapZone other="Nepal Standard Time" territory="NP" type="Asia/Katmandu"/>
|
<mapZone other="Nepal Standard Time" territory="NP" type="Asia/Katmandu"/>
|
||||||
|
|
||||||
<!-- (UTC+06:00) Astana -->
|
<!-- (UTC+06:00) Astana --> <!-- Microsoft probably keeps Central Asia Standard Time, but change Astana to something else. -->
|
||||||
<mapZone other="Central Asia Standard Time" territory="001" type="Asia/Almaty"/>
|
<mapZone other="Central Asia Standard Time" territory="001" type="Asia/Bishkek"/>
|
||||||
<mapZone other="Central Asia Standard Time" territory="AQ" type="Antarctica/Vostok"/>
|
<mapZone other="Central Asia Standard Time" territory="AQ" type="Antarctica/Vostok"/>
|
||||||
<mapZone other="Central Asia Standard Time" territory="CN" type="Asia/Urumqi"/>
|
<mapZone other="Central Asia Standard Time" territory="CN" type="Asia/Urumqi"/>
|
||||||
<mapZone other="Central Asia Standard Time" territory="IO" type="Indian/Chagos"/>
|
<mapZone other="Central Asia Standard Time" territory="IO" type="Indian/Chagos"/>
|
||||||
<mapZone other="Central Asia Standard Time" territory="KG" type="Asia/Bishkek"/>
|
<mapZone other="Central Asia Standard Time" territory="KG" type="Asia/Bishkek"/>
|
||||||
<mapZone other="Central Asia Standard Time" territory="KZ" type="Asia/Almaty Asia/Qostanay"/>
|
|
||||||
<mapZone other="Central Asia Standard Time" territory="ZZ" type="Etc/GMT-6"/>
|
<mapZone other="Central Asia Standard Time" territory="ZZ" type="Etc/GMT-6"/>
|
||||||
|
|
||||||
<!-- (UTC+06:00) Dhaka -->
|
<!-- (UTC+06:00) Dhaka -->
|
||||||
|
|
11
externals/phpmailer/class.phpmailer-lite.php
vendored
11
externals/phpmailer/class.phpmailer-lite.php
vendored
|
@ -1311,11 +1311,6 @@ class PHPMailerLite {
|
||||||
if (!is_readable($path)) {
|
if (!is_readable($path)) {
|
||||||
throw new phpmailerException($this->Lang('file_open') . $path, self::STOP_CONTINUE);
|
throw new phpmailerException($this->Lang('file_open') . $path, self::STOP_CONTINUE);
|
||||||
}
|
}
|
||||||
if (function_exists('get_magic_quotes')) {
|
|
||||||
function get_magic_quotes() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (PHP_VERSION < 6) {
|
if (PHP_VERSION < 6) {
|
||||||
$magic_quotes = get_magic_quotes_runtime();
|
$magic_quotes = get_magic_quotes_runtime();
|
||||||
set_magic_quotes_runtime(0);
|
set_magic_quotes_runtime(0);
|
||||||
|
@ -1492,7 +1487,7 @@ class PHPMailerLite {
|
||||||
$eol = "\r\n";
|
$eol = "\r\n";
|
||||||
$escape = '=';
|
$escape = '=';
|
||||||
$output = '';
|
$output = '';
|
||||||
while( list(, $line) = each($lines) ) {
|
foreach ($lines as $line) {
|
||||||
$linlen = strlen($line);
|
$linlen = strlen($line);
|
||||||
$newline = '';
|
$newline = '';
|
||||||
for($i = 0; $i < $linlen; $i++) {
|
for($i = 0; $i < $linlen; $i++) {
|
||||||
|
@ -1523,7 +1518,7 @@ class PHPMailerLite {
|
||||||
$newline .= $c;
|
$newline .= $c;
|
||||||
} // end of for
|
} // end of for
|
||||||
$output .= $newline.$eol;
|
$output .= $newline.$eol;
|
||||||
} // end of while
|
} // end of foreach
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1985,7 +1980,6 @@ class PHPMailerLite {
|
||||||
'mov' => 'video/quicktime',
|
'mov' => 'video/quicktime',
|
||||||
'avi' => 'video/x-msvideo',
|
'avi' => 'video/x-msvideo',
|
||||||
'movie' => 'video/x-sgi-movie',
|
'movie' => 'video/x-sgi-movie',
|
||||||
'doc' => 'application/msword',
|
|
||||||
'word' => 'application/msword',
|
'word' => 'application/msword',
|
||||||
'xl' => 'application/excel',
|
'xl' => 'application/excel',
|
||||||
'eml' => 'message/rfc822'
|
'eml' => 'message/rfc822'
|
||||||
|
@ -2054,7 +2048,6 @@ class PHPMailerLite {
|
||||||
* @param string $key_pass Password for private key
|
* @param string $key_pass Password for private key
|
||||||
*/
|
*/
|
||||||
public function DKIM_QP($txt) {
|
public function DKIM_QP($txt) {
|
||||||
$tmp="";
|
|
||||||
$line="";
|
$line="";
|
||||||
for ($i=0;$i<strlen($txt);$i++) {
|
for ($i=0;$i<strlen($txt);$i++) {
|
||||||
$ord=ord($txt[$i]);
|
$ord=ord($txt[$i]);
|
||||||
|
|
11
externals/phpmailer/class.phpmailer.php
vendored
11
externals/phpmailer/class.phpmailer.php
vendored
|
@ -1443,11 +1443,6 @@ class PHPMailer {
|
||||||
if (!is_readable($path)) {
|
if (!is_readable($path)) {
|
||||||
throw new phpmailerException($this->Lang('file_open') . $path, self::STOP_CONTINUE);
|
throw new phpmailerException($this->Lang('file_open') . $path, self::STOP_CONTINUE);
|
||||||
}
|
}
|
||||||
if (function_exists('get_magic_quotes')) {
|
|
||||||
function get_magic_quotes() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (PHP_VERSION < 6) {
|
if (PHP_VERSION < 6) {
|
||||||
$magic_quotes = get_magic_quotes_runtime();
|
$magic_quotes = get_magic_quotes_runtime();
|
||||||
set_magic_quotes_runtime(0);
|
set_magic_quotes_runtime(0);
|
||||||
|
@ -1624,7 +1619,7 @@ class PHPMailer {
|
||||||
$eol = "\r\n";
|
$eol = "\r\n";
|
||||||
$escape = '=';
|
$escape = '=';
|
||||||
$output = '';
|
$output = '';
|
||||||
while( list(, $line) = each($lines) ) {
|
foreach ($lines as $line) {
|
||||||
$linlen = strlen($line);
|
$linlen = strlen($line);
|
||||||
$newline = '';
|
$newline = '';
|
||||||
for($i = 0; $i < $linlen; $i++) {
|
for($i = 0; $i < $linlen; $i++) {
|
||||||
|
@ -1655,7 +1650,7 @@ class PHPMailer {
|
||||||
$newline .= $c;
|
$newline .= $c;
|
||||||
} // end of for
|
} // end of for
|
||||||
$output .= $newline.$eol;
|
$output .= $newline.$eol;
|
||||||
} // end of while
|
} // end of foreach
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2123,7 +2118,6 @@ class PHPMailer {
|
||||||
'mov' => 'video/quicktime',
|
'mov' => 'video/quicktime',
|
||||||
'avi' => 'video/x-msvideo',
|
'avi' => 'video/x-msvideo',
|
||||||
'movie' => 'video/x-sgi-movie',
|
'movie' => 'video/x-sgi-movie',
|
||||||
'doc' => 'application/msword',
|
|
||||||
'word' => 'application/msword',
|
'word' => 'application/msword',
|
||||||
'xl' => 'application/excel',
|
'xl' => 'application/excel',
|
||||||
'eml' => 'message/rfc822'
|
'eml' => 'message/rfc822'
|
||||||
|
@ -2192,7 +2186,6 @@ class PHPMailer {
|
||||||
* @param string $key_pass Password for private key
|
* @param string $key_pass Password for private key
|
||||||
*/
|
*/
|
||||||
public function DKIM_QP($txt) {
|
public function DKIM_QP($txt) {
|
||||||
$tmp="";
|
|
||||||
$line="";
|
$line="";
|
||||||
for ($i=0;$i<strlen($txt);$i++) {
|
for ($i=0;$i<strlen($txt);$i++) {
|
||||||
$ord=ord($txt[$i]);
|
$ord=ord($txt[$i]);
|
||||||
|
|
11
externals/phpmailer/class.pop3.php
vendored
11
externals/phpmailer/class.pop3.php
vendored
|
@ -142,7 +142,7 @@ class POP3 {
|
||||||
* @param string $username
|
* @param string $username
|
||||||
* @param string $password
|
* @param string $password
|
||||||
*/
|
*/
|
||||||
public function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0) {
|
public function Authorise ($host, $port = false, $tval = false, $username = '', $password = '', $debug_level = 0) {
|
||||||
$this->host = $host;
|
$this->host = $host;
|
||||||
|
|
||||||
// If no port value is passed, retrieve it
|
// If no port value is passed, retrieve it
|
||||||
|
@ -239,16 +239,7 @@ class POP3 {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Increase the stream time-out
|
// Increase the stream time-out
|
||||||
|
|
||||||
// Check for PHP 4.3.0 or later
|
|
||||||
if (version_compare(phpversion(), '5.0.0', 'ge')) {
|
|
||||||
stream_set_timeout($this->pop_conn, $tval, 0);
|
stream_set_timeout($this->pop_conn, $tval, 0);
|
||||||
} else {
|
|
||||||
// Does not work on Windows
|
|
||||||
if (substr(PHP_OS, 0, 3) !== 'WIN') {
|
|
||||||
socket_set_timeout($this->pop_conn, $tval, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the POP3 server response
|
// Get the POP3 server response
|
||||||
$pop3_response = $this->getResponse();
|
$pop3_response = $this->getResponse();
|
||||||
|
|
1987
externals/phpqrcode/phpqrcode.php
vendored
1987
externals/phpqrcode/phpqrcode.php
vendored
File diff suppressed because it is too large
Load diff
|
@ -9,10 +9,10 @@ return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'conpherence.pkg.css' => '2f25eb4f',
|
'conpherence.pkg.css' => '2f25eb4f',
|
||||||
'conpherence.pkg.js' => '020aebcf',
|
'conpherence.pkg.js' => '020aebcf',
|
||||||
'core.pkg.css' => '3471f5d3',
|
'core.pkg.css' => 'ac619266',
|
||||||
'core.pkg.js' => '2eeda9e0',
|
'core.pkg.js' => '2eeda9e0',
|
||||||
'dark-console.pkg.js' => '187792c2',
|
'dark-console.pkg.js' => '187792c2',
|
||||||
'differential.pkg.css' => '6d3700f0',
|
'differential.pkg.css' => 'fda9518d',
|
||||||
'differential.pkg.js' => '46fcb3af',
|
'differential.pkg.js' => '46fcb3af',
|
||||||
'diffusion.pkg.css' => '354279ea',
|
'diffusion.pkg.css' => '354279ea',
|
||||||
'diffusion.pkg.js' => '78c9885d',
|
'diffusion.pkg.js' => '78c9885d',
|
||||||
|
@ -63,7 +63,7 @@ return array(
|
||||||
'rsrc/css/application/diff/diff-tree-view.css' => 'e2d3e222',
|
'rsrc/css/application/diff/diff-tree-view.css' => 'e2d3e222',
|
||||||
'rsrc/css/application/diff/inline-comment-summary.css' => '81eb368d',
|
'rsrc/css/application/diff/inline-comment-summary.css' => '81eb368d',
|
||||||
'rsrc/css/application/differential/add-comment.css' => '7e5900d9',
|
'rsrc/css/application/differential/add-comment.css' => '7e5900d9',
|
||||||
'rsrc/css/application/differential/changeset-view.css' => '1b0476bc',
|
'rsrc/css/application/differential/changeset-view.css' => '979e688c',
|
||||||
'rsrc/css/application/differential/core.css' => '7300a73e',
|
'rsrc/css/application/differential/core.css' => '7300a73e',
|
||||||
'rsrc/css/application/differential/phui-inline-comment.css' => '9863a85e',
|
'rsrc/css/application/differential/phui-inline-comment.css' => '9863a85e',
|
||||||
'rsrc/css/application/differential/revision-comment.css' => '7dbc8d1d',
|
'rsrc/css/application/differential/revision-comment.css' => '7dbc8d1d',
|
||||||
|
@ -137,7 +137,7 @@ return array(
|
||||||
'rsrc/css/phui/object-item/phui-oi-simple-ui.css' => '9b03a61f',
|
'rsrc/css/phui/object-item/phui-oi-simple-ui.css' => '9b03a61f',
|
||||||
'rsrc/css/phui/phui-action-list.css' => '1b0085b2',
|
'rsrc/css/phui/phui-action-list.css' => '1b0085b2',
|
||||||
'rsrc/css/phui/phui-action-panel.css' => '6c386cbf',
|
'rsrc/css/phui/phui-action-panel.css' => '6c386cbf',
|
||||||
'rsrc/css/phui/phui-badge.css' => '666e25ad',
|
'rsrc/css/phui/phui-badge.css' => 'd12f6f6c',
|
||||||
'rsrc/css/phui/phui-basic-nav-view.css' => 'a5693cf0',
|
'rsrc/css/phui/phui-basic-nav-view.css' => 'a5693cf0',
|
||||||
'rsrc/css/phui/phui-big-info-view.css' => '362ad37b',
|
'rsrc/css/phui/phui-big-info-view.css' => '362ad37b',
|
||||||
'rsrc/css/phui/phui-box.css' => '5ed3b8cb',
|
'rsrc/css/phui/phui-box.css' => '5ed3b8cb',
|
||||||
|
@ -158,7 +158,7 @@ return array(
|
||||||
'rsrc/css/phui/phui-form.css' => '1f177cb7',
|
'rsrc/css/phui/phui-form.css' => '1f177cb7',
|
||||||
'rsrc/css/phui/phui-formation-view.css' => 'd2dec8ed',
|
'rsrc/css/phui/phui-formation-view.css' => 'd2dec8ed',
|
||||||
'rsrc/css/phui/phui-head-thing.css' => 'd7f293df',
|
'rsrc/css/phui/phui-head-thing.css' => 'd7f293df',
|
||||||
'rsrc/css/phui/phui-header-view.css' => '36c86a58',
|
'rsrc/css/phui/phui-header-view.css' => '4cd25427',
|
||||||
'rsrc/css/phui/phui-hovercard.css' => '39fd2e14',
|
'rsrc/css/phui/phui-hovercard.css' => '39fd2e14',
|
||||||
'rsrc/css/phui/phui-icon-set-selector.css' => '19e0253b',
|
'rsrc/css/phui/phui-icon-set-selector.css' => '19e0253b',
|
||||||
'rsrc/css/phui/phui-icon.css' => '084ac612',
|
'rsrc/css/phui/phui-icon.css' => '084ac612',
|
||||||
|
@ -187,7 +187,7 @@ return array(
|
||||||
'rsrc/css/sprite-login.css' => '07052ee0',
|
'rsrc/css/sprite-login.css' => '07052ee0',
|
||||||
'rsrc/css/sprite-tokens.css' => 'f1896dc5',
|
'rsrc/css/sprite-tokens.css' => 'f1896dc5',
|
||||||
'rsrc/css/syntax/syntax-default.css' => 'c0307dc6',
|
'rsrc/css/syntax/syntax-default.css' => 'c0307dc6',
|
||||||
'rsrc/externals/d3/d3.min.js' => '9d068042',
|
'rsrc/externals/d3/d3.min.js' => 'e97b4b78',
|
||||||
'rsrc/externals/font/fontawesome/fontawesome-webfont.eot' => '23f8c698',
|
'rsrc/externals/font/fontawesome/fontawesome-webfont.eot' => '23f8c698',
|
||||||
'rsrc/externals/font/fontawesome/fontawesome-webfont.ttf' => '70983df0',
|
'rsrc/externals/font/fontawesome/fontawesome-webfont.ttf' => '70983df0',
|
||||||
'rsrc/externals/font/fontawesome/fontawesome-webfont.woff' => 'cd02f93b',
|
'rsrc/externals/font/fontawesome/fontawesome-webfont.woff' => 'cd02f93b',
|
||||||
|
@ -396,7 +396,7 @@ return array(
|
||||||
'rsrc/js/application/diffusion/behavior-pull-lastmodified.js' => 'c715c123',
|
'rsrc/js/application/diffusion/behavior-pull-lastmodified.js' => 'c715c123',
|
||||||
'rsrc/js/application/doorkeeper/behavior-doorkeeper-tag.js' => '6a85bc5a',
|
'rsrc/js/application/doorkeeper/behavior-doorkeeper-tag.js' => '6a85bc5a',
|
||||||
'rsrc/js/application/drydock/drydock-live-operation-status.js' => '47a0728b',
|
'rsrc/js/application/drydock/drydock-live-operation-status.js' => '47a0728b',
|
||||||
'rsrc/js/application/fact/Chart.js' => '52e3ff03',
|
'rsrc/js/application/fact/Chart.js' => '351abd1c',
|
||||||
'rsrc/js/application/fact/ChartCurtainView.js' => '86954222',
|
'rsrc/js/application/fact/ChartCurtainView.js' => '86954222',
|
||||||
'rsrc/js/application/fact/ChartFunctionLabel.js' => '81de1dab',
|
'rsrc/js/application/fact/ChartFunctionLabel.js' => '81de1dab',
|
||||||
'rsrc/js/application/files/behavior-document-engine.js' => '243d6c22',
|
'rsrc/js/application/files/behavior-document-engine.js' => '243d6c22',
|
||||||
|
@ -558,9 +558,9 @@ return array(
|
||||||
'conpherence-participant-pane-css' => '69e0058a',
|
'conpherence-participant-pane-css' => '69e0058a',
|
||||||
'conpherence-thread-manager' => 'aec8e38c',
|
'conpherence-thread-manager' => 'aec8e38c',
|
||||||
'conpherence-transaction-css' => '3a3f5e7e',
|
'conpherence-transaction-css' => '3a3f5e7e',
|
||||||
'd3' => '9d068042',
|
'd3' => 'e97b4b78',
|
||||||
'diff-tree-view-css' => 'e2d3e222',
|
'diff-tree-view-css' => 'e2d3e222',
|
||||||
'differential-changeset-view-css' => '1b0476bc',
|
'differential-changeset-view-css' => '979e688c',
|
||||||
'differential-core-view-css' => '7300a73e',
|
'differential-core-view-css' => '7300a73e',
|
||||||
'differential-revision-add-comment-css' => '7e5900d9',
|
'differential-revision-add-comment-css' => '7e5900d9',
|
||||||
'differential-revision-comment-css' => '7dbc8d1d',
|
'differential-revision-comment-css' => '7dbc8d1d',
|
||||||
|
@ -702,7 +702,7 @@ return array(
|
||||||
'javelin-behavior-user-menu' => '60cd9241',
|
'javelin-behavior-user-menu' => '60cd9241',
|
||||||
'javelin-behavior-view-placeholder' => 'a9942052',
|
'javelin-behavior-view-placeholder' => 'a9942052',
|
||||||
'javelin-behavior-workflow' => '9623adc1',
|
'javelin-behavior-workflow' => '9623adc1',
|
||||||
'javelin-chart' => '52e3ff03',
|
'javelin-chart' => '351abd1c',
|
||||||
'javelin-chart-curtain-view' => '86954222',
|
'javelin-chart-curtain-view' => '86954222',
|
||||||
'javelin-chart-function-label' => '81de1dab',
|
'javelin-chart-function-label' => '81de1dab',
|
||||||
'javelin-color' => '78f811c9',
|
'javelin-color' => '78f811c9',
|
||||||
|
@ -822,7 +822,7 @@ return array(
|
||||||
'phrequent-css' => 'bd79cc67',
|
'phrequent-css' => 'bd79cc67',
|
||||||
'phriction-document-css' => '03380da0',
|
'phriction-document-css' => '03380da0',
|
||||||
'phui-action-panel-css' => '6c386cbf',
|
'phui-action-panel-css' => '6c386cbf',
|
||||||
'phui-badge-view-css' => '666e25ad',
|
'phui-badge-view-css' => 'd12f6f6c',
|
||||||
'phui-basic-nav-view-css' => 'a5693cf0',
|
'phui-basic-nav-view-css' => 'a5693cf0',
|
||||||
'phui-big-info-view-css' => '362ad37b',
|
'phui-big-info-view-css' => '362ad37b',
|
||||||
'phui-box-css' => '5ed3b8cb',
|
'phui-box-css' => '5ed3b8cb',
|
||||||
|
@ -851,7 +851,7 @@ return array(
|
||||||
'phui-form-view-css' => '57edecb7',
|
'phui-form-view-css' => '57edecb7',
|
||||||
'phui-formation-view-css' => 'd2dec8ed',
|
'phui-formation-view-css' => 'd2dec8ed',
|
||||||
'phui-head-thing-view-css' => 'd7f293df',
|
'phui-head-thing-view-css' => 'd7f293df',
|
||||||
'phui-header-view-css' => '36c86a58',
|
'phui-header-view-css' => '4cd25427',
|
||||||
'phui-hovercard' => '6199f752',
|
'phui-hovercard' => '6199f752',
|
||||||
'phui-hovercard-list' => 'de4b4919',
|
'phui-hovercard-list' => 'de4b4919',
|
||||||
'phui-hovercard-view-css' => '39fd2e14',
|
'phui-hovercard-view-css' => '39fd2e14',
|
||||||
|
@ -1056,9 +1056,6 @@ return array(
|
||||||
'javelin-util',
|
'javelin-util',
|
||||||
'phabricator-keyboard-shortcut-manager',
|
'phabricator-keyboard-shortcut-manager',
|
||||||
),
|
),
|
||||||
'1b0476bc' => array(
|
|
||||||
'phui-inline-comment-view-css',
|
|
||||||
),
|
|
||||||
'1b6acc2a' => array(
|
'1b6acc2a' => array(
|
||||||
'javelin-magical-init',
|
'javelin-magical-init',
|
||||||
'javelin-util',
|
'javelin-util',
|
||||||
|
@ -1233,6 +1230,12 @@ return array(
|
||||||
'aphront-typeahead-control-css',
|
'aphront-typeahead-control-css',
|
||||||
'phui-tag-view-css',
|
'phui-tag-view-css',
|
||||||
),
|
),
|
||||||
|
'351abd1c' => array(
|
||||||
|
'phui-chart-css',
|
||||||
|
'd3',
|
||||||
|
'javelin-chart-curtain-view',
|
||||||
|
'javelin-chart-function-label',
|
||||||
|
),
|
||||||
'3829a3cf' => array(
|
'3829a3cf' => array(
|
||||||
'javelin-behavior',
|
'javelin-behavior',
|
||||||
'javelin-uri',
|
'javelin-uri',
|
||||||
|
@ -1419,12 +1422,6 @@ return array(
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
'javelin-fx',
|
'javelin-fx',
|
||||||
),
|
),
|
||||||
'52e3ff03' => array(
|
|
||||||
'phui-chart-css',
|
|
||||||
'd3',
|
|
||||||
'javelin-chart-curtain-view',
|
|
||||||
'javelin-chart-function-label',
|
|
||||||
),
|
|
||||||
'541f81c3' => array(
|
'541f81c3' => array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
),
|
),
|
||||||
|
@ -1777,6 +1774,9 @@ return array(
|
||||||
'javelin-stratcom',
|
'javelin-stratcom',
|
||||||
'phabricator-notification',
|
'phabricator-notification',
|
||||||
),
|
),
|
||||||
|
'979e688c' => array(
|
||||||
|
'phui-inline-comment-view-css',
|
||||||
|
),
|
||||||
'98ef467f' => array(
|
'98ef467f' => array(
|
||||||
'javelin-behavior',
|
'javelin-behavior',
|
||||||
'javelin-dom',
|
'javelin-dom',
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
USE {$NAMESPACE}_file;
|
||||||
|
DELETE FROM file_attachment
|
||||||
|
WHERE NOT EXISTS
|
||||||
|
(SELECT *
|
||||||
|
FROM file
|
||||||
|
WHERE phid=file_attachment.filePHID)
|
|
@ -436,6 +436,7 @@ phutil_register_library_map(array(
|
||||||
'ConpherenceViewController' => 'applications/conpherence/controller/ConpherenceViewController.php',
|
'ConpherenceViewController' => 'applications/conpherence/controller/ConpherenceViewController.php',
|
||||||
'CountdownEditConduitAPIMethod' => 'applications/countdown/conduit/CountdownEditConduitAPIMethod.php',
|
'CountdownEditConduitAPIMethod' => 'applications/countdown/conduit/CountdownEditConduitAPIMethod.php',
|
||||||
'CountdownSearchConduitAPIMethod' => 'applications/countdown/conduit/CountdownSearchConduitAPIMethod.php',
|
'CountdownSearchConduitAPIMethod' => 'applications/countdown/conduit/CountdownSearchConduitAPIMethod.php',
|
||||||
|
'CowsayReferenceController' => 'applications/reference/src/controller/CowsayReferenceController.php',
|
||||||
'DarkConsoleController' => 'applications/console/controller/DarkConsoleController.php',
|
'DarkConsoleController' => 'applications/console/controller/DarkConsoleController.php',
|
||||||
'DarkConsoleCore' => 'applications/console/core/DarkConsoleCore.php',
|
'DarkConsoleCore' => 'applications/console/core/DarkConsoleCore.php',
|
||||||
'DarkConsoleDataController' => 'applications/console/controller/DarkConsoleDataController.php',
|
'DarkConsoleDataController' => 'applications/console/controller/DarkConsoleDataController.php',
|
||||||
|
@ -1304,6 +1305,7 @@ phutil_register_library_map(array(
|
||||||
'FeedStoryNotificationGarbageCollector' => 'applications/notification/garbagecollector/FeedStoryNotificationGarbageCollector.php',
|
'FeedStoryNotificationGarbageCollector' => 'applications/notification/garbagecollector/FeedStoryNotificationGarbageCollector.php',
|
||||||
'FerretConfigurableSearchFunction' => 'applications/search/ferret/function/FerretConfigurableSearchFunction.php',
|
'FerretConfigurableSearchFunction' => 'applications/search/ferret/function/FerretConfigurableSearchFunction.php',
|
||||||
'FerretSearchFunction' => 'applications/search/ferret/function/FerretSearchFunction.php',
|
'FerretSearchFunction' => 'applications/search/ferret/function/FerretSearchFunction.php',
|
||||||
|
'FigletReferenceController' => 'applications/reference/src/controller/FigletReferenceController.php',
|
||||||
'FileAllocateConduitAPIMethod' => 'applications/files/conduit/FileAllocateConduitAPIMethod.php',
|
'FileAllocateConduitAPIMethod' => 'applications/files/conduit/FileAllocateConduitAPIMethod.php',
|
||||||
'FileConduitAPIMethod' => 'applications/files/conduit/FileConduitAPIMethod.php',
|
'FileConduitAPIMethod' => 'applications/files/conduit/FileConduitAPIMethod.php',
|
||||||
'FileCreateMailReceiver' => 'applications/files/mail/FileCreateMailReceiver.php',
|
'FileCreateMailReceiver' => 'applications/files/mail/FileCreateMailReceiver.php',
|
||||||
|
@ -1802,6 +1804,7 @@ phutil_register_library_map(array(
|
||||||
'ManiphestEditConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestEditConduitAPIMethod.php',
|
'ManiphestEditConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestEditConduitAPIMethod.php',
|
||||||
'ManiphestEditEngine' => 'applications/maniphest/editor/ManiphestEditEngine.php',
|
'ManiphestEditEngine' => 'applications/maniphest/editor/ManiphestEditEngine.php',
|
||||||
'ManiphestEmailCommand' => 'applications/maniphest/command/ManiphestEmailCommand.php',
|
'ManiphestEmailCommand' => 'applications/maniphest/command/ManiphestEmailCommand.php',
|
||||||
|
'ManiphestFlagCustomField' => 'applications/maniphest/field/ManiphestFlagCustomField.php',
|
||||||
'ManiphestGetTaskTransactionsConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestGetTaskTransactionsConduitAPIMethod.php',
|
'ManiphestGetTaskTransactionsConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestGetTaskTransactionsConduitAPIMethod.php',
|
||||||
'ManiphestHovercardEngineExtension' => 'applications/maniphest/engineextension/ManiphestHovercardEngineExtension.php',
|
'ManiphestHovercardEngineExtension' => 'applications/maniphest/engineextension/ManiphestHovercardEngineExtension.php',
|
||||||
'ManiphestInfoConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestInfoConduitAPIMethod.php',
|
'ManiphestInfoConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestInfoConduitAPIMethod.php',
|
||||||
|
@ -3450,6 +3453,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorFileAES256StorageFormat' => 'applications/files/format/PhabricatorFileAES256StorageFormat.php',
|
'PhabricatorFileAES256StorageFormat' => 'applications/files/format/PhabricatorFileAES256StorageFormat.php',
|
||||||
'PhabricatorFileAltTextTransaction' => 'applications/files/xaction/PhabricatorFileAltTextTransaction.php',
|
'PhabricatorFileAltTextTransaction' => 'applications/files/xaction/PhabricatorFileAltTextTransaction.php',
|
||||||
'PhabricatorFileAttachment' => 'applications/files/storage/PhabricatorFileAttachment.php',
|
'PhabricatorFileAttachment' => 'applications/files/storage/PhabricatorFileAttachment.php',
|
||||||
|
'PhabricatorFileAttachmentDestructionEngineExtension' => 'applications/files/engineextension/PhabricatorFileAttachmentDestructionEngineExtension.php',
|
||||||
'PhabricatorFileAttachmentQuery' => 'applications/files/query/PhabricatorFileAttachmentQuery.php',
|
'PhabricatorFileAttachmentQuery' => 'applications/files/query/PhabricatorFileAttachmentQuery.php',
|
||||||
'PhabricatorFileBundleLoader' => 'applications/files/query/PhabricatorFileBundleLoader.php',
|
'PhabricatorFileBundleLoader' => 'applications/files/query/PhabricatorFileBundleLoader.php',
|
||||||
'PhabricatorFileChunk' => 'applications/files/storage/PhabricatorFileChunk.php',
|
'PhabricatorFileChunk' => 'applications/files/storage/PhabricatorFileChunk.php',
|
||||||
|
@ -4490,6 +4494,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorProjectTransactionType' => 'applications/project/xaction/PhabricatorProjectTransactionType.php',
|
'PhabricatorProjectTransactionType' => 'applications/project/xaction/PhabricatorProjectTransactionType.php',
|
||||||
'PhabricatorProjectTrigger' => 'applications/project/storage/PhabricatorProjectTrigger.php',
|
'PhabricatorProjectTrigger' => 'applications/project/storage/PhabricatorProjectTrigger.php',
|
||||||
'PhabricatorProjectTriggerAddProjectsRule' => 'applications/project/trigger/PhabricatorProjectTriggerAddProjectsRule.php',
|
'PhabricatorProjectTriggerAddProjectsRule' => 'applications/project/trigger/PhabricatorProjectTriggerAddProjectsRule.php',
|
||||||
|
'PhabricatorProjectTriggerAddSubscribersRule' => 'applications/project/trigger/PhabricatorProjectTriggerAddSubscribersRule.php',
|
||||||
'PhabricatorProjectTriggerController' => 'applications/project/controller/trigger/PhabricatorProjectTriggerController.php',
|
'PhabricatorProjectTriggerController' => 'applications/project/controller/trigger/PhabricatorProjectTriggerController.php',
|
||||||
'PhabricatorProjectTriggerCorruptionException' => 'applications/project/exception/PhabricatorProjectTriggerCorruptionException.php',
|
'PhabricatorProjectTriggerCorruptionException' => 'applications/project/exception/PhabricatorProjectTriggerCorruptionException.php',
|
||||||
'PhabricatorProjectTriggerEditController' => 'applications/project/controller/trigger/PhabricatorProjectTriggerEditController.php',
|
'PhabricatorProjectTriggerEditController' => 'applications/project/controller/trigger/PhabricatorProjectTriggerEditController.php',
|
||||||
|
@ -4504,6 +4509,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorProjectTriggerPlaySoundRule' => 'applications/project/trigger/PhabricatorProjectTriggerPlaySoundRule.php',
|
'PhabricatorProjectTriggerPlaySoundRule' => 'applications/project/trigger/PhabricatorProjectTriggerPlaySoundRule.php',
|
||||||
'PhabricatorProjectTriggerQuery' => 'applications/project/query/PhabricatorProjectTriggerQuery.php',
|
'PhabricatorProjectTriggerQuery' => 'applications/project/query/PhabricatorProjectTriggerQuery.php',
|
||||||
'PhabricatorProjectTriggerRemoveProjectsRule' => 'applications/project/trigger/PhabricatorProjectTriggerRemoveProjectsRule.php',
|
'PhabricatorProjectTriggerRemoveProjectsRule' => 'applications/project/trigger/PhabricatorProjectTriggerRemoveProjectsRule.php',
|
||||||
|
'PhabricatorProjectTriggerRemoveSubscribersRule' => 'applications/project/trigger/PhabricatorProjectTriggerRemoveSubscribersRule.php',
|
||||||
'PhabricatorProjectTriggerRule' => 'applications/project/trigger/PhabricatorProjectTriggerRule.php',
|
'PhabricatorProjectTriggerRule' => 'applications/project/trigger/PhabricatorProjectTriggerRule.php',
|
||||||
'PhabricatorProjectTriggerRuleRecord' => 'applications/project/trigger/PhabricatorProjectTriggerRuleRecord.php',
|
'PhabricatorProjectTriggerRuleRecord' => 'applications/project/trigger/PhabricatorProjectTriggerRuleRecord.php',
|
||||||
'PhabricatorProjectTriggerRulesetTransaction' => 'applications/project/xaction/trigger/PhabricatorProjectTriggerRulesetTransaction.php',
|
'PhabricatorProjectTriggerRulesetTransaction' => 'applications/project/xaction/trigger/PhabricatorProjectTriggerRulesetTransaction.php',
|
||||||
|
@ -5075,6 +5081,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorTypeaheadDatasourceTestCase' => 'applications/typeahead/datasource/__tests__/PhabricatorTypeaheadDatasourceTestCase.php',
|
'PhabricatorTypeaheadDatasourceTestCase' => 'applications/typeahead/datasource/__tests__/PhabricatorTypeaheadDatasourceTestCase.php',
|
||||||
'PhabricatorTypeaheadFunctionHelpController' => 'applications/typeahead/controller/PhabricatorTypeaheadFunctionHelpController.php',
|
'PhabricatorTypeaheadFunctionHelpController' => 'applications/typeahead/controller/PhabricatorTypeaheadFunctionHelpController.php',
|
||||||
'PhabricatorTypeaheadInvalidTokenException' => 'applications/typeahead/exception/PhabricatorTypeaheadInvalidTokenException.php',
|
'PhabricatorTypeaheadInvalidTokenException' => 'applications/typeahead/exception/PhabricatorTypeaheadInvalidTokenException.php',
|
||||||
|
'PhabricatorTypeaheadLoginRequiredException' => 'applications/typeahead/exception/PhabricatorTypeaheadLoginRequiredException.php',
|
||||||
'PhabricatorTypeaheadModularDatasourceController' => 'applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php',
|
'PhabricatorTypeaheadModularDatasourceController' => 'applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php',
|
||||||
'PhabricatorTypeaheadMonogramDatasource' => 'applications/typeahead/datasource/PhabricatorTypeaheadMonogramDatasource.php',
|
'PhabricatorTypeaheadMonogramDatasource' => 'applications/typeahead/datasource/PhabricatorTypeaheadMonogramDatasource.php',
|
||||||
'PhabricatorTypeaheadProxyDatasource' => 'applications/typeahead/datasource/PhabricatorTypeaheadProxyDatasource.php',
|
'PhabricatorTypeaheadProxyDatasource' => 'applications/typeahead/datasource/PhabricatorTypeaheadProxyDatasource.php',
|
||||||
|
@ -5388,6 +5395,8 @@ phutil_register_library_map(array(
|
||||||
'PholioTransactionView' => 'applications/pholio/view/PholioTransactionView.php',
|
'PholioTransactionView' => 'applications/pholio/view/PholioTransactionView.php',
|
||||||
'PholioUploadedImageView' => 'applications/pholio/view/PholioUploadedImageView.php',
|
'PholioUploadedImageView' => 'applications/pholio/view/PholioUploadedImageView.php',
|
||||||
'PhorgeCodeWarningSetupCheck' => 'applications/config/check/PhorgeCodeWarningSetupCheck.php',
|
'PhorgeCodeWarningSetupCheck' => 'applications/config/check/PhorgeCodeWarningSetupCheck.php',
|
||||||
|
'PhorgeFlagFlaggedObjectCustomField' => 'applications/flag/customfield/PhorgeFlagFlaggedObjectCustomField.php',
|
||||||
|
'PhorgeFlagFlaggedObjectFieldStorage' => 'applications/flag/customfield/PhorgeFlagFlaggedObjectFieldStorage.php',
|
||||||
'PhorgeSystemDeprecationWarningListener' => 'applications/system/events/PhorgeSystemDeprecationWarningListener.php',
|
'PhorgeSystemDeprecationWarningListener' => 'applications/system/events/PhorgeSystemDeprecationWarningListener.php',
|
||||||
'PhortuneAccount' => 'applications/phortune/storage/PhortuneAccount.php',
|
'PhortuneAccount' => 'applications/phortune/storage/PhortuneAccount.php',
|
||||||
'PhortuneAccountAddManagerController' => 'applications/phortune/controller/account/PhortuneAccountAddManagerController.php',
|
'PhortuneAccountAddManagerController' => 'applications/phortune/controller/account/PhortuneAccountAddManagerController.php',
|
||||||
|
@ -5609,6 +5618,7 @@ phutil_register_library_map(array(
|
||||||
'PhrictionDocumentDatasource' => 'applications/phriction/typeahead/PhrictionDocumentDatasource.php',
|
'PhrictionDocumentDatasource' => 'applications/phriction/typeahead/PhrictionDocumentDatasource.php',
|
||||||
'PhrictionDocumentDeleteTransaction' => 'applications/phriction/xaction/PhrictionDocumentDeleteTransaction.php',
|
'PhrictionDocumentDeleteTransaction' => 'applications/phriction/xaction/PhrictionDocumentDeleteTransaction.php',
|
||||||
'PhrictionDocumentDraftTransaction' => 'applications/phriction/xaction/PhrictionDocumentDraftTransaction.php',
|
'PhrictionDocumentDraftTransaction' => 'applications/phriction/xaction/PhrictionDocumentDraftTransaction.php',
|
||||||
|
'PhrictionDocumentEditConduitAPIMethod' => 'applications/phriction/conduit/PhrictionDocumentEditConduitAPIMethod.php',
|
||||||
'PhrictionDocumentEditEngine' => 'applications/phriction/editor/PhrictionDocumentEditEngine.php',
|
'PhrictionDocumentEditEngine' => 'applications/phriction/editor/PhrictionDocumentEditEngine.php',
|
||||||
'PhrictionDocumentEditTransaction' => 'applications/phriction/xaction/PhrictionDocumentEditTransaction.php',
|
'PhrictionDocumentEditTransaction' => 'applications/phriction/xaction/PhrictionDocumentEditTransaction.php',
|
||||||
'PhrictionDocumentFerretEngine' => 'applications/phriction/search/PhrictionDocumentFerretEngine.php',
|
'PhrictionDocumentFerretEngine' => 'applications/phriction/search/PhrictionDocumentFerretEngine.php',
|
||||||
|
@ -5790,6 +5800,8 @@ phutil_register_library_map(array(
|
||||||
'PhutilTranslatedHTMLTestCase' => 'infrastructure/markup/__tests__/PhutilTranslatedHTMLTestCase.php',
|
'PhutilTranslatedHTMLTestCase' => 'infrastructure/markup/__tests__/PhutilTranslatedHTMLTestCase.php',
|
||||||
'PhutilTwitchAuthAdapter' => 'applications/auth/adapter/PhutilTwitchAuthAdapter.php',
|
'PhutilTwitchAuthAdapter' => 'applications/auth/adapter/PhutilTwitchAuthAdapter.php',
|
||||||
'PhutilTwitterAuthAdapter' => 'applications/auth/adapter/PhutilTwitterAuthAdapter.php',
|
'PhutilTwitterAuthAdapter' => 'applications/auth/adapter/PhutilTwitterAuthAdapter.php',
|
||||||
|
'PhutilURIHelper' => 'infrastructure/parser/PhutilURIHelper.php',
|
||||||
|
'PhutilURIHelperTestCase' => 'infrastructure/parser/__tests__/PhutilURIHelperTestCase.php',
|
||||||
'PhutilWordPressAuthAdapter' => 'applications/auth/adapter/PhutilWordPressAuthAdapter.php',
|
'PhutilWordPressAuthAdapter' => 'applications/auth/adapter/PhutilWordPressAuthAdapter.php',
|
||||||
'PhutilXHPASTSyntaxHighlighter' => 'infrastructure/markup/syntax/highlighter/PhutilXHPASTSyntaxHighlighter.php',
|
'PhutilXHPASTSyntaxHighlighter' => 'infrastructure/markup/syntax/highlighter/PhutilXHPASTSyntaxHighlighter.php',
|
||||||
'PhutilXHPASTSyntaxHighlighterFuture' => 'infrastructure/markup/syntax/highlighter/xhpast/PhutilXHPASTSyntaxHighlighterFuture.php',
|
'PhutilXHPASTSyntaxHighlighterFuture' => 'infrastructure/markup/syntax/highlighter/xhpast/PhutilXHPASTSyntaxHighlighterFuture.php',
|
||||||
|
@ -5871,7 +5883,11 @@ phutil_register_library_map(array(
|
||||||
'ProjectSearchConduitAPIMethod' => 'applications/project/conduit/ProjectSearchConduitAPIMethod.php',
|
'ProjectSearchConduitAPIMethod' => 'applications/project/conduit/ProjectSearchConduitAPIMethod.php',
|
||||||
'QueryFormattingTestCase' => 'infrastructure/storage/__tests__/QueryFormattingTestCase.php',
|
'QueryFormattingTestCase' => 'infrastructure/storage/__tests__/QueryFormattingTestCase.php',
|
||||||
'QueryFuture' => 'infrastructure/storage/future/QueryFuture.php',
|
'QueryFuture' => 'infrastructure/storage/future/QueryFuture.php',
|
||||||
|
'ReferenceApplication' => 'applications/reference/src/application/ReferenceApplication.php',
|
||||||
|
'ReferenceController' => 'applications/reference/src/controller/ReferenceController.php',
|
||||||
'RemarkupProcessConduitAPIMethod' => 'applications/remarkup/conduit/RemarkupProcessConduitAPIMethod.php',
|
'RemarkupProcessConduitAPIMethod' => 'applications/remarkup/conduit/RemarkupProcessConduitAPIMethod.php',
|
||||||
|
'RemarkupReferenceController' => 'applications/reference/src/controller/RemarkupReferenceController.php',
|
||||||
|
'RemarkupSyntaxDocumentationProvider' => 'infrastructure/markup/interface/RemarkupSyntaxDocumentationProvider.php',
|
||||||
'RemarkupValue' => 'applications/remarkup/RemarkupValue.php',
|
'RemarkupValue' => 'applications/remarkup/RemarkupValue.php',
|
||||||
'RepositoryConduitAPIMethod' => 'applications/repository/conduit/RepositoryConduitAPIMethod.php',
|
'RepositoryConduitAPIMethod' => 'applications/repository/conduit/RepositoryConduitAPIMethod.php',
|
||||||
'RepositoryQueryConduitAPIMethod' => 'applications/repository/conduit/RepositoryQueryConduitAPIMethod.php',
|
'RepositoryQueryConduitAPIMethod' => 'applications/repository/conduit/RepositoryQueryConduitAPIMethod.php',
|
||||||
|
@ -6437,6 +6453,7 @@ phutil_register_library_map(array(
|
||||||
'ConpherenceViewController' => 'ConpherenceController',
|
'ConpherenceViewController' => 'ConpherenceController',
|
||||||
'CountdownEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
'CountdownEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
||||||
'CountdownSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
|
'CountdownSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
|
||||||
|
'CowsayReferenceController' => 'ReferenceController',
|
||||||
'DarkConsoleController' => 'PhabricatorController',
|
'DarkConsoleController' => 'PhabricatorController',
|
||||||
'DarkConsoleCore' => 'Phobject',
|
'DarkConsoleCore' => 'Phobject',
|
||||||
'DarkConsoleDataController' => 'PhabricatorController',
|
'DarkConsoleDataController' => 'PhabricatorController',
|
||||||
|
@ -7397,6 +7414,7 @@ phutil_register_library_map(array(
|
||||||
'FeedStoryNotificationGarbageCollector' => 'PhabricatorGarbageCollector',
|
'FeedStoryNotificationGarbageCollector' => 'PhabricatorGarbageCollector',
|
||||||
'FerretConfigurableSearchFunction' => 'FerretSearchFunction',
|
'FerretConfigurableSearchFunction' => 'FerretSearchFunction',
|
||||||
'FerretSearchFunction' => 'Phobject',
|
'FerretSearchFunction' => 'Phobject',
|
||||||
|
'FigletReferenceController' => 'ReferenceController',
|
||||||
'FileAllocateConduitAPIMethod' => 'FileConduitAPIMethod',
|
'FileAllocateConduitAPIMethod' => 'FileConduitAPIMethod',
|
||||||
'FileConduitAPIMethod' => 'ConduitAPIMethod',
|
'FileConduitAPIMethod' => 'ConduitAPIMethod',
|
||||||
'FileCreateMailReceiver' => 'PhabricatorApplicationMailReceiver',
|
'FileCreateMailReceiver' => 'PhabricatorApplicationMailReceiver',
|
||||||
|
@ -8008,6 +8026,7 @@ phutil_register_library_map(array(
|
||||||
'ManiphestEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
'ManiphestEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
||||||
'ManiphestEditEngine' => 'PhabricatorEditEngine',
|
'ManiphestEditEngine' => 'PhabricatorEditEngine',
|
||||||
'ManiphestEmailCommand' => 'MetaMTAEmailTransactionCommand',
|
'ManiphestEmailCommand' => 'MetaMTAEmailTransactionCommand',
|
||||||
|
'ManiphestFlagCustomField' => 'ManiphestCustomField',
|
||||||
'ManiphestGetTaskTransactionsConduitAPIMethod' => 'ManiphestConduitAPIMethod',
|
'ManiphestGetTaskTransactionsConduitAPIMethod' => 'ManiphestConduitAPIMethod',
|
||||||
'ManiphestHovercardEngineExtension' => 'PhabricatorHovercardEngineExtension',
|
'ManiphestHovercardEngineExtension' => 'PhabricatorHovercardEngineExtension',
|
||||||
'ManiphestInfoConduitAPIMethod' => 'ManiphestConduitAPIMethod',
|
'ManiphestInfoConduitAPIMethod' => 'ManiphestConduitAPIMethod',
|
||||||
|
@ -9906,6 +9925,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorPolicyInterface',
|
'PhabricatorPolicyInterface',
|
||||||
'PhabricatorExtendedPolicyInterface',
|
'PhabricatorExtendedPolicyInterface',
|
||||||
),
|
),
|
||||||
|
'PhabricatorFileAttachmentDestructionEngineExtension' => 'PhabricatorDestructionEngineExtension',
|
||||||
'PhabricatorFileAttachmentQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'PhabricatorFileAttachmentQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
'PhabricatorFileBundleLoader' => 'Phobject',
|
'PhabricatorFileBundleLoader' => 'Phobject',
|
||||||
'PhabricatorFileChunk' => array(
|
'PhabricatorFileChunk' => array(
|
||||||
|
@ -11125,6 +11145,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorDestructibleInterface',
|
'PhabricatorDestructibleInterface',
|
||||||
),
|
),
|
||||||
'PhabricatorProjectTriggerAddProjectsRule' => 'PhabricatorProjectTriggerRule',
|
'PhabricatorProjectTriggerAddProjectsRule' => 'PhabricatorProjectTriggerRule',
|
||||||
|
'PhabricatorProjectTriggerAddSubscribersRule' => 'PhabricatorProjectTriggerRule',
|
||||||
'PhabricatorProjectTriggerController' => 'PhabricatorProjectController',
|
'PhabricatorProjectTriggerController' => 'PhabricatorProjectController',
|
||||||
'PhabricatorProjectTriggerCorruptionException' => 'Exception',
|
'PhabricatorProjectTriggerCorruptionException' => 'Exception',
|
||||||
'PhabricatorProjectTriggerEditController' => 'PhabricatorProjectTriggerController',
|
'PhabricatorProjectTriggerEditController' => 'PhabricatorProjectTriggerController',
|
||||||
|
@ -11139,6 +11160,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorProjectTriggerPlaySoundRule' => 'PhabricatorProjectTriggerRule',
|
'PhabricatorProjectTriggerPlaySoundRule' => 'PhabricatorProjectTriggerRule',
|
||||||
'PhabricatorProjectTriggerQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'PhabricatorProjectTriggerQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
'PhabricatorProjectTriggerRemoveProjectsRule' => 'PhabricatorProjectTriggerRule',
|
'PhabricatorProjectTriggerRemoveProjectsRule' => 'PhabricatorProjectTriggerRule',
|
||||||
|
'PhabricatorProjectTriggerRemoveSubscribersRule' => 'PhabricatorProjectTriggerRule',
|
||||||
'PhabricatorProjectTriggerRule' => 'Phobject',
|
'PhabricatorProjectTriggerRule' => 'Phobject',
|
||||||
'PhabricatorProjectTriggerRuleRecord' => 'Phobject',
|
'PhabricatorProjectTriggerRuleRecord' => 'Phobject',
|
||||||
'PhabricatorProjectTriggerRulesetTransaction' => 'PhabricatorProjectTriggerTransactionType',
|
'PhabricatorProjectTriggerRulesetTransaction' => 'PhabricatorProjectTriggerTransactionType',
|
||||||
|
@ -11201,12 +11223,18 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorRegistrationProfile' => 'Phobject',
|
'PhabricatorRegistrationProfile' => 'Phobject',
|
||||||
'PhabricatorRemarkupCachePurger' => 'PhabricatorCachePurger',
|
'PhabricatorRemarkupCachePurger' => 'PhabricatorCachePurger',
|
||||||
'PhabricatorRemarkupControl' => 'AphrontFormTextAreaControl',
|
'PhabricatorRemarkupControl' => 'AphrontFormTextAreaControl',
|
||||||
'PhabricatorRemarkupCowsayBlockInterpreter' => 'PhutilRemarkupBlockInterpreter',
|
'PhabricatorRemarkupCowsayBlockInterpreter' => array(
|
||||||
|
'PhutilRemarkupBlockInterpreter',
|
||||||
|
'RemarkupSyntaxDocumentationProvider',
|
||||||
|
),
|
||||||
'PhabricatorRemarkupCustomBlockRule' => 'PhutilRemarkupBlockRule',
|
'PhabricatorRemarkupCustomBlockRule' => 'PhutilRemarkupBlockRule',
|
||||||
'PhabricatorRemarkupCustomInlineRule' => 'PhutilRemarkupRule',
|
'PhabricatorRemarkupCustomInlineRule' => 'PhutilRemarkupRule',
|
||||||
'PhabricatorRemarkupDocumentEngine' => 'PhabricatorDocumentEngine',
|
'PhabricatorRemarkupDocumentEngine' => 'PhabricatorDocumentEngine',
|
||||||
'PhabricatorRemarkupEditField' => 'PhabricatorEditField',
|
'PhabricatorRemarkupEditField' => 'PhabricatorEditField',
|
||||||
'PhabricatorRemarkupFigletBlockInterpreter' => 'PhutilRemarkupBlockInterpreter',
|
'PhabricatorRemarkupFigletBlockInterpreter' => array(
|
||||||
|
'PhutilRemarkupBlockInterpreter',
|
||||||
|
'RemarkupSyntaxDocumentationProvider',
|
||||||
|
),
|
||||||
'PhabricatorRemarkupHyperlinkEngineExtension' => 'PhutilRemarkupHyperlinkEngineExtension',
|
'PhabricatorRemarkupHyperlinkEngineExtension' => 'PhutilRemarkupHyperlinkEngineExtension',
|
||||||
'PhabricatorRemarkupUIExample' => 'PhabricatorUIExample',
|
'PhabricatorRemarkupUIExample' => 'PhabricatorUIExample',
|
||||||
'PhabricatorRemoveEmailUserLogType' => 'PhabricatorUserLogType',
|
'PhabricatorRemoveEmailUserLogType' => 'PhabricatorUserLogType',
|
||||||
|
@ -11811,6 +11839,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorTypeaheadDatasourceTestCase' => 'PhabricatorTestCase',
|
'PhabricatorTypeaheadDatasourceTestCase' => 'PhabricatorTestCase',
|
||||||
'PhabricatorTypeaheadFunctionHelpController' => 'PhabricatorTypeaheadDatasourceController',
|
'PhabricatorTypeaheadFunctionHelpController' => 'PhabricatorTypeaheadDatasourceController',
|
||||||
'PhabricatorTypeaheadInvalidTokenException' => 'Exception',
|
'PhabricatorTypeaheadInvalidTokenException' => 'Exception',
|
||||||
|
'PhabricatorTypeaheadLoginRequiredException' => 'Exception',
|
||||||
'PhabricatorTypeaheadModularDatasourceController' => 'PhabricatorTypeaheadDatasourceController',
|
'PhabricatorTypeaheadModularDatasourceController' => 'PhabricatorTypeaheadDatasourceController',
|
||||||
'PhabricatorTypeaheadMonogramDatasource' => 'PhabricatorTypeaheadDatasource',
|
'PhabricatorTypeaheadMonogramDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||||
'PhabricatorTypeaheadProxyDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
'PhabricatorTypeaheadProxyDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||||
|
@ -12212,6 +12241,8 @@ phutil_register_library_map(array(
|
||||||
'PholioTransactionView' => 'PhabricatorApplicationTransactionView',
|
'PholioTransactionView' => 'PhabricatorApplicationTransactionView',
|
||||||
'PholioUploadedImageView' => 'AphrontView',
|
'PholioUploadedImageView' => 'AphrontView',
|
||||||
'PhorgeCodeWarningSetupCheck' => 'PhabricatorSetupCheck',
|
'PhorgeCodeWarningSetupCheck' => 'PhabricatorSetupCheck',
|
||||||
|
'PhorgeFlagFlaggedObjectCustomField' => 'PhabricatorCustomField',
|
||||||
|
'PhorgeFlagFlaggedObjectFieldStorage' => 'Phobject',
|
||||||
'PhorgeSystemDeprecationWarningListener' => 'PhabricatorEventListener',
|
'PhorgeSystemDeprecationWarningListener' => 'PhabricatorEventListener',
|
||||||
'PhortuneAccount' => array(
|
'PhortuneAccount' => array(
|
||||||
'PhortuneDAO',
|
'PhortuneDAO',
|
||||||
|
@ -12498,6 +12529,7 @@ phutil_register_library_map(array(
|
||||||
'PhrictionDocumentDatasource' => 'PhabricatorTypeaheadDatasource',
|
'PhrictionDocumentDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||||
'PhrictionDocumentDeleteTransaction' => 'PhrictionDocumentVersionTransaction',
|
'PhrictionDocumentDeleteTransaction' => 'PhrictionDocumentVersionTransaction',
|
||||||
'PhrictionDocumentDraftTransaction' => 'PhrictionDocumentEditTransaction',
|
'PhrictionDocumentDraftTransaction' => 'PhrictionDocumentEditTransaction',
|
||||||
|
'PhrictionDocumentEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
||||||
'PhrictionDocumentEditEngine' => 'PhabricatorEditEngine',
|
'PhrictionDocumentEditEngine' => 'PhabricatorEditEngine',
|
||||||
'PhrictionDocumentEditTransaction' => 'PhrictionDocumentVersionTransaction',
|
'PhrictionDocumentEditTransaction' => 'PhrictionDocumentVersionTransaction',
|
||||||
'PhrictionDocumentFerretEngine' => 'PhabricatorFerretEngine',
|
'PhrictionDocumentFerretEngine' => 'PhabricatorFerretEngine',
|
||||||
|
@ -12677,6 +12709,8 @@ phutil_register_library_map(array(
|
||||||
'PhutilTranslatedHTMLTestCase' => 'PhutilTestCase',
|
'PhutilTranslatedHTMLTestCase' => 'PhutilTestCase',
|
||||||
'PhutilTwitchAuthAdapter' => 'PhutilOAuthAuthAdapter',
|
'PhutilTwitchAuthAdapter' => 'PhutilOAuthAuthAdapter',
|
||||||
'PhutilTwitterAuthAdapter' => 'PhutilOAuth1AuthAdapter',
|
'PhutilTwitterAuthAdapter' => 'PhutilOAuth1AuthAdapter',
|
||||||
|
'PhutilURIHelper' => 'Phobject',
|
||||||
|
'PhutilURIHelperTestCase' => 'PhabricatorTestCase',
|
||||||
'PhutilWordPressAuthAdapter' => 'PhutilOAuthAuthAdapter',
|
'PhutilWordPressAuthAdapter' => 'PhutilOAuthAuthAdapter',
|
||||||
'PhutilXHPASTSyntaxHighlighter' => 'Phobject',
|
'PhutilXHPASTSyntaxHighlighter' => 'Phobject',
|
||||||
'PhutilXHPASTSyntaxHighlighterFuture' => 'FutureProxy',
|
'PhutilXHPASTSyntaxHighlighterFuture' => 'FutureProxy',
|
||||||
|
@ -12779,7 +12813,10 @@ phutil_register_library_map(array(
|
||||||
'ProjectSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
|
'ProjectSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod',
|
||||||
'QueryFormattingTestCase' => 'PhabricatorTestCase',
|
'QueryFormattingTestCase' => 'PhabricatorTestCase',
|
||||||
'QueryFuture' => 'Future',
|
'QueryFuture' => 'Future',
|
||||||
|
'ReferenceApplication' => 'PhabricatorApplication',
|
||||||
|
'ReferenceController' => 'PhabricatorController',
|
||||||
'RemarkupProcessConduitAPIMethod' => 'ConduitAPIMethod',
|
'RemarkupProcessConduitAPIMethod' => 'ConduitAPIMethod',
|
||||||
|
'RemarkupReferenceController' => 'ReferenceController',
|
||||||
'RemarkupValue' => 'Phobject',
|
'RemarkupValue' => 'Phobject',
|
||||||
'RepositoryConduitAPIMethod' => 'ConduitAPIMethod',
|
'RepositoryConduitAPIMethod' => 'ConduitAPIMethod',
|
||||||
'RepositoryQueryConduitAPIMethod' => 'RepositoryConduitAPIMethod',
|
'RepositoryQueryConduitAPIMethod' => 'RepositoryConduitAPIMethod',
|
||||||
|
|
|
@ -56,8 +56,8 @@ final class AphrontRequest extends Phobject {
|
||||||
* Applications like Paste, Diffusion, and Harbormaster use "$12-14" in the
|
* Applications like Paste, Diffusion, and Harbormaster use "$12-14" in the
|
||||||
* URI to allow users to link to particular lines.
|
* URI to allow users to link to particular lines.
|
||||||
*
|
*
|
||||||
* @param string URI data key to pull line range information from.
|
* @param string $key URI data key to pull line range information from.
|
||||||
* @param int|null Maximum length of the range.
|
* @param int|null $limit Maximum length of the range.
|
||||||
* @return null|pair<int, int> Null, or beginning and end of the range.
|
* @return null|pair<int, int> Null, or beginning and end of the range.
|
||||||
*/
|
*/
|
||||||
public function getURILineRange($key, $limit) {
|
public function getURILineRange($key, $limit) {
|
||||||
|
@ -537,8 +537,8 @@ final class AphrontRequest extends Phobject {
|
||||||
*
|
*
|
||||||
* To set a temporary cookie, see @{method:setTemporaryCookie}.
|
* To set a temporary cookie, see @{method:setTemporaryCookie}.
|
||||||
*
|
*
|
||||||
* @param string Cookie name.
|
* @param string $name Cookie name.
|
||||||
* @param string Cookie value.
|
* @param string $value Cookie value.
|
||||||
* @return this
|
* @return this
|
||||||
* @task cookie
|
* @task cookie
|
||||||
*/
|
*/
|
||||||
|
@ -553,8 +553,8 @@ final class AphrontRequest extends Phobject {
|
||||||
*
|
*
|
||||||
* To set a durable cookie, see @{method:setCookie}.
|
* To set a durable cookie, see @{method:setCookie}.
|
||||||
*
|
*
|
||||||
* @param string Cookie name.
|
* @param string $name Cookie name.
|
||||||
* @param string Cookie value.
|
* @param string $value Cookie value.
|
||||||
* @return this
|
* @return this
|
||||||
* @task cookie
|
* @task cookie
|
||||||
*/
|
*/
|
||||||
|
@ -566,9 +566,9 @@ final class AphrontRequest extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Set a cookie with a given expiration policy.
|
* Set a cookie with a given expiration policy.
|
||||||
*
|
*
|
||||||
* @param string Cookie name.
|
* @param string $name Cookie name.
|
||||||
* @param string Cookie value.
|
* @param string $value Cookie value.
|
||||||
* @param int Epoch timestamp for cookie expiration.
|
* @param int $expire Epoch timestamp for cookie expiration.
|
||||||
* @return this
|
* @return this
|
||||||
* @task cookie
|
* @task cookie
|
||||||
*/
|
*/
|
||||||
|
@ -748,7 +748,7 @@ final class AphrontRequest extends Phobject {
|
||||||
* into a list of key-value pairs suitable for submitting via HTTP request
|
* into a list of key-value pairs suitable for submitting via HTTP request
|
||||||
* (with arrays flattened).
|
* (with arrays flattened).
|
||||||
*
|
*
|
||||||
* @param dict<string, wild> Data to flatten.
|
* @param dict<string, wild> $data Data to flatten.
|
||||||
* @return dict<string, string> Flat data suitable for inclusion in an HTTP
|
* @return dict<string, string> Flat data suitable for inclusion in an HTTP
|
||||||
* request.
|
* request.
|
||||||
*/
|
*/
|
||||||
|
@ -778,9 +778,11 @@ final class AphrontRequest extends Phobject {
|
||||||
* and looks up the appropriate value in `$_SERVER` (in this case,
|
* and looks up the appropriate value in `$_SERVER` (in this case,
|
||||||
* `"HTTP_ACCEPT_ENCODING"`).
|
* `"HTTP_ACCEPT_ENCODING"`).
|
||||||
*
|
*
|
||||||
* @param string Canonical header name, like `"Accept-Encoding"`.
|
* @param string $name Canonical header name, like
|
||||||
* @param wild Default value to return if header is not present.
|
`"Accept-Encoding"`.
|
||||||
* @param array? Read this instead of `$_SERVER`.
|
* @param wild? $default Default value to return if header is not
|
||||||
|
present.
|
||||||
|
* @param array? $data Read this instead of `$_SERVER`.
|
||||||
* @return string|wild Header value if present, or `$default` if not.
|
* @return string|wild Header value if present, or `$default` if not.
|
||||||
*/
|
*/
|
||||||
public static function getHTTPHeader($name, $default = null, $data = null) {
|
public static function getHTTPHeader($name, $default = null, $data = null) {
|
||||||
|
@ -844,7 +846,7 @@ final class AphrontRequest extends Phobject {
|
||||||
* This is not a general-purpose proxying method; it is a specialized
|
* This is not a general-purpose proxying method; it is a specialized
|
||||||
* method with niche applications and severe security implications.
|
* method with niche applications and severe security implications.
|
||||||
*
|
*
|
||||||
* @param string URI identifying the host we are proxying the request to.
|
* @param string URI $uri identifying the host we are proxying the request to.
|
||||||
* @return HTTPSFuture New proxy future.
|
* @return HTTPSFuture New proxy future.
|
||||||
*
|
*
|
||||||
* @phutil-external-symbol class PhabricatorStartup
|
* @phutil-external-symbol class PhabricatorStartup
|
||||||
|
|
|
@ -510,8 +510,8 @@ final class AphrontApplicationConfiguration
|
||||||
* Map a specific path to the corresponding controller. For a description
|
* Map a specific path to the corresponding controller. For a description
|
||||||
* of routing, see @{method:buildController}.
|
* of routing, see @{method:buildController}.
|
||||||
*
|
*
|
||||||
* @param list<AphrontRoutingMap> List of routing maps.
|
* @param list<AphrontRoutingMap> $maps List of routing maps.
|
||||||
* @param string Path to route.
|
* @param string $path Path to route.
|
||||||
* @return pair<AphrontController,dict> Controller and dictionary of request
|
* @return pair<AphrontController,dict> Controller and dictionary of request
|
||||||
* parameters.
|
* parameters.
|
||||||
* @task routing
|
* @task routing
|
||||||
|
@ -523,6 +523,7 @@ final class AphrontApplicationConfiguration
|
||||||
return array($result->getController(), $result->getURIData());
|
return array($result->getController(), $result->getURIData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildSiteForRequest(AphrontRequest $request) {
|
private function buildSiteForRequest(AphrontRequest $request) {
|
||||||
|
@ -561,7 +562,7 @@ final class AphrontApplicationConfiguration
|
||||||
/**
|
/**
|
||||||
* Tests if a response is of a valid type.
|
* Tests if a response is of a valid type.
|
||||||
*
|
*
|
||||||
* @param wild Supposedly valid response.
|
* @param wild $response Supposedly valid response.
|
||||||
* @return bool True if the object is of a valid type.
|
* @return bool True if the object is of a valid type.
|
||||||
* @task response
|
* @task response
|
||||||
*/
|
*/
|
||||||
|
@ -582,8 +583,9 @@ final class AphrontApplicationConfiguration
|
||||||
* Verifies that the return value from an @{class:AphrontController} is
|
* Verifies that the return value from an @{class:AphrontController} is
|
||||||
* of an allowed type.
|
* of an allowed type.
|
||||||
*
|
*
|
||||||
* @param AphrontController Controller which returned the response.
|
* @param AphrontController $controller Controller which returned the
|
||||||
* @param wild Supposedly valid response.
|
* response.
|
||||||
|
* @param wild $response Supposedly valid response.
|
||||||
* @return void
|
* @return void
|
||||||
* @task response
|
* @task response
|
||||||
*/
|
*/
|
||||||
|
@ -611,9 +613,9 @@ final class AphrontApplicationConfiguration
|
||||||
* Verifies that the return value from an
|
* Verifies that the return value from an
|
||||||
* @{class:AphrontResponseProducerInterface} is of an allowed type.
|
* @{class:AphrontResponseProducerInterface} is of an allowed type.
|
||||||
*
|
*
|
||||||
* @param AphrontResponseProducerInterface Object which produced
|
* @param AphrontResponseProducerInterface $producer Object which produced
|
||||||
* this response.
|
* this response.
|
||||||
* @param wild Supposedly valid response.
|
* @param wild $response Supposedly valid response.
|
||||||
* @return void
|
* @return void
|
||||||
* @task response
|
* @task response
|
||||||
*/
|
*/
|
||||||
|
@ -641,9 +643,9 @@ final class AphrontApplicationConfiguration
|
||||||
* Verifies that the return value from an
|
* Verifies that the return value from an
|
||||||
* @{class:AphrontRequestExceptionHandler} is of an allowed type.
|
* @{class:AphrontRequestExceptionHandler} is of an allowed type.
|
||||||
*
|
*
|
||||||
* @param AphrontRequestExceptionHandler Object which produced this
|
* @param AphrontRequestExceptionHandler $handler Object which produced this
|
||||||
* response.
|
* response.
|
||||||
* @param wild Supposedly valid response.
|
* @param wild $response Supposedly valid response.
|
||||||
* @return void
|
* @return void
|
||||||
* @task response
|
* @task response
|
||||||
*/
|
*/
|
||||||
|
@ -677,9 +679,9 @@ final class AphrontApplicationConfiguration
|
||||||
* If a controller returns a response producer, invoke it now and produce
|
* If a controller returns a response producer, invoke it now and produce
|
||||||
* the real response.
|
* the real response.
|
||||||
*
|
*
|
||||||
* @param AphrontRequest Request being handled.
|
* @param AphrontRequest $request Request being handled.
|
||||||
* @param AphrontResponse|AphrontResponseProducerInterface Response, or
|
* @param AphrontResponse|AphrontResponseProducerInterface $response
|
||||||
* response producer.
|
* Response, or response producer.
|
||||||
* @return AphrontResponse Response after any required production.
|
* @return AphrontResponse Response after any required production.
|
||||||
* @task response
|
* @task response
|
||||||
*/
|
*/
|
||||||
|
@ -737,7 +739,7 @@ final class AphrontApplicationConfiguration
|
||||||
* This method delegates exception handling to available subclasses of
|
* This method delegates exception handling to available subclasses of
|
||||||
* @{class:AphrontRequestExceptionHandler}.
|
* @{class:AphrontRequestExceptionHandler}.
|
||||||
*
|
*
|
||||||
* @param Throwable Exception which needs to be handled.
|
* @param Throwable $throwable Exception which needs to be handled.
|
||||||
* @return wild Response or response producer, or null if no available
|
* @return wild Response or response producer, or null if no available
|
||||||
* handler can produce a response.
|
* handler can produce a response.
|
||||||
* @task exception
|
* @task exception
|
||||||
|
|
|
@ -31,7 +31,7 @@ abstract class AphrontHTTPParameterType extends Phobject {
|
||||||
* example, a type might lookup usernames or project names. These types need
|
* example, a type might lookup usernames or project names. These types need
|
||||||
* to use the current viewer to execute queries.
|
* to use the current viewer to execute queries.
|
||||||
*
|
*
|
||||||
* @param PhabricatorUser Current viewer.
|
* @param PhabricatorUser $viewer Current viewer.
|
||||||
* @return this
|
* @return this
|
||||||
* @task read
|
* @task read
|
||||||
*/
|
*/
|
||||||
|
@ -58,8 +58,8 @@ abstract class AphrontHTTPParameterType extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Test if a value is present in a request.
|
* Test if a value is present in a request.
|
||||||
*
|
*
|
||||||
* @param AphrontRequest The incoming request.
|
* @param AphrontRequest $request The incoming request.
|
||||||
* @param string The key to examine.
|
* @param string $key The key to examine.
|
||||||
* @return bool True if a readable value is present in the request.
|
* @return bool True if a readable value is present in the request.
|
||||||
* @task read
|
* @task read
|
||||||
*/
|
*/
|
||||||
|
@ -74,8 +74,8 @@ abstract class AphrontHTTPParameterType extends Phobject {
|
||||||
* If the value is not present, a default value is returned (usually `null`).
|
* If the value is not present, a default value is returned (usually `null`).
|
||||||
* Use @{method:getExists} to test if a value is present.
|
* Use @{method:getExists} to test if a value is present.
|
||||||
*
|
*
|
||||||
* @param AphrontRequest The incoming request.
|
* @param AphrontRequest $request The incoming request.
|
||||||
* @param string The key to examine.
|
* @param string $key The key to examine.
|
||||||
* @return wild Value, or default if value is not present.
|
* @return wild Value, or default if value is not present.
|
||||||
* @task read
|
* @task read
|
||||||
*/
|
*/
|
||||||
|
@ -165,9 +165,9 @@ abstract class AphrontHTTPParameterType extends Phobject {
|
||||||
* existence check that a simpler "list of strings" type has, and can just
|
* existence check that a simpler "list of strings" type has, and can just
|
||||||
* call the simpler type to reuse its behavior.
|
* call the simpler type to reuse its behavior.
|
||||||
*
|
*
|
||||||
* @param AphrontHTTPParameterType The other type.
|
* @param AphrontHTTPParameterType $type The other type.
|
||||||
* @param AphrontRequest Incoming request.
|
* @param AphrontRequest $request Incoming request.
|
||||||
* @param string Key to examine.
|
* @param string $key Key to examine.
|
||||||
* @return bool True if the parameter exists.
|
* @return bool True if the parameter exists.
|
||||||
* @task util
|
* @task util
|
||||||
*/
|
*/
|
||||||
|
@ -189,9 +189,9 @@ abstract class AphrontHTTPParameterType extends Phobject {
|
||||||
* type. For example, a "list of users" type may start by running the same
|
* type. For example, a "list of users" type may start by running the same
|
||||||
* basic parsing that a simpler "list of strings" type does.
|
* basic parsing that a simpler "list of strings" type does.
|
||||||
*
|
*
|
||||||
* @param AphrontHTTPParameterType The other type.
|
* @param AphrontHTTPParameterType $type The other type.
|
||||||
* @param AphrontRequest Incoming request.
|
* @param AphrontRequest $request Incoming request.
|
||||||
* @param string Key to examine.
|
* @param string $key Key to examine.
|
||||||
* @return wild Parsed value.
|
* @return wild Parsed value.
|
||||||
* @task util
|
* @task util
|
||||||
*/
|
*/
|
||||||
|
@ -233,8 +233,8 @@ abstract class AphrontHTTPParameterType extends Phobject {
|
||||||
* To call another type's behavior in order to perform this check, use
|
* To call another type's behavior in order to perform this check, use
|
||||||
* @{method:getExistsWithType}.
|
* @{method:getExistsWithType}.
|
||||||
*
|
*
|
||||||
* @param AphrontRequest The incoming request.
|
* @param AphrontRequest $request The incoming request.
|
||||||
* @param string The key to examine.
|
* @param string $key The key to examine.
|
||||||
* @return bool True if a readable value is present in the request.
|
* @return bool True if a readable value is present in the request.
|
||||||
* @task impl
|
* @task impl
|
||||||
*/
|
*/
|
||||||
|
@ -253,8 +253,8 @@ abstract class AphrontHTTPParameterType extends Phobject {
|
||||||
* To call another type's behavior in order to parse a value, use
|
* To call another type's behavior in order to parse a value, use
|
||||||
* @{method:getValueWithType}.
|
* @{method:getValueWithType}.
|
||||||
*
|
*
|
||||||
* @param AphrontRequest The incoming request.
|
* @param AphrontRequest $request The incoming request.
|
||||||
* @param string The key to examine.
|
* @param string $key The key to examine.
|
||||||
* @return wild Parsed value.
|
* @return wild Parsed value.
|
||||||
* @task impl
|
* @task impl
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -30,7 +30,7 @@ final class AphrontFileResponse extends AphrontResponse {
|
||||||
/**
|
/**
|
||||||
* Set a download filename
|
* Set a download filename
|
||||||
*
|
*
|
||||||
* @param $download string
|
* @param string $download
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function setDownload($download) {
|
public function setDownload($download) {
|
||||||
|
|
|
@ -117,8 +117,9 @@ class AphrontRedirectResponse extends AphrontResponse {
|
||||||
* ambiguity. For example, Chrome interprets "Location: /\evil.com" to mean
|
* ambiguity. For example, Chrome interprets "Location: /\evil.com" to mean
|
||||||
* "perform a protocol-relative redirect to evil.com".
|
* "perform a protocol-relative redirect to evil.com".
|
||||||
*
|
*
|
||||||
* @param string URI to redirect to.
|
* @param string $uri URI to redirect to.
|
||||||
* @param bool True if this URI identifies a remote resource.
|
* @param bool $is_external True if this URI identifies a remote
|
||||||
|
* resource.
|
||||||
* @return string URI for use in a "Location:" header.
|
* @return string URI for use in a "Location:" header.
|
||||||
*/
|
*/
|
||||||
public static function getURIForRedirect($uri, $is_external) {
|
public static function getURIForRedirect($uri, $is_external) {
|
||||||
|
|
|
@ -28,7 +28,8 @@ abstract class AphrontHTTPSink extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Write an HTTP status code to the output.
|
* Write an HTTP status code to the output.
|
||||||
*
|
*
|
||||||
* @param int Numeric HTTP status code.
|
* @param int $code Numeric HTTP status code.
|
||||||
|
* @param string? $message
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
final public function writeHTTPStatus($code, $message = '') {
|
final public function writeHTTPStatus($code, $message = '') {
|
||||||
|
@ -44,7 +45,7 @@ abstract class AphrontHTTPSink extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Write HTTP headers to the output.
|
* Write HTTP headers to the output.
|
||||||
*
|
*
|
||||||
* @param list<pair> List of <name, value> pairs.
|
* @param list<pair> $headers List of <name, value> pairs.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
final public function writeHeaders(array $headers) {
|
final public function writeHeaders(array $headers) {
|
||||||
|
@ -89,7 +90,7 @@ abstract class AphrontHTTPSink extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Write HTTP body data to the output.
|
* Write HTTP body data to the output.
|
||||||
*
|
*
|
||||||
* @param string Body data.
|
* @param string $data Body data.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
final public function writeData($data) {
|
final public function writeData($data) {
|
||||||
|
@ -100,7 +101,7 @@ abstract class AphrontHTTPSink extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Write an entire @{class:AphrontResponse} to the output.
|
* Write an entire @{class:AphrontResponse} to the output.
|
||||||
*
|
*
|
||||||
* @param AphrontResponse The response object to write.
|
* @param AphrontResponse $response The response object to write.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
final public function writeResponse(AphrontResponse $response) {
|
final public function writeResponse(AphrontResponse $response) {
|
||||||
|
|
|
@ -50,7 +50,7 @@ final class AphrontRoutingMap extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Find the route matching a path, if one exists.
|
* Find the route matching a path, if one exists.
|
||||||
*
|
*
|
||||||
* @param string Path to route.
|
* @param string $path Path to route.
|
||||||
* @return AphrontRoutingResult|null Routing result, if path matches map.
|
* @return AphrontRoutingResult|null Routing result, if path matches map.
|
||||||
* @task routing
|
* @task routing
|
||||||
*/
|
*/
|
||||||
|
@ -84,9 +84,9 @@ final class AphrontRoutingMap extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Test a sub-map to see if any routes match a path.
|
* Test a sub-map to see if any routes match a path.
|
||||||
*
|
*
|
||||||
* @param string Path to route.
|
* @param string $route Pattern from the map.
|
||||||
* @param string Pattern from the map.
|
* @param string $value Value from the map.
|
||||||
* @param string Value from the map.
|
* @param string $path Path to route.
|
||||||
* @return dict<string, wild>|null Match details, if path matches sub-map.
|
* @return dict<string, wild>|null Match details, if path matches sub-map.
|
||||||
* @task routing
|
* @task routing
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -57,7 +57,7 @@ final class AphrontWriteGuard extends Phobject {
|
||||||
* the request, or abort the request (e.g., by throwing an exception) if a
|
* the request, or abort the request (e.g., by throwing an exception) if a
|
||||||
* valid token isn't present.
|
* valid token isn't present.
|
||||||
*
|
*
|
||||||
* @param callable CSRF callback.
|
* @param $callback Callable CSRF callback.
|
||||||
* @return this
|
* @return this
|
||||||
* @task manage
|
* @task manage
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -137,4 +137,30 @@ final class AlmanacDeviceSearchEngine
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getNewUserBody() {
|
||||||
|
$see_network = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('See Networks'))
|
||||||
|
->setHref('/almanac/network/');
|
||||||
|
|
||||||
|
$create_button = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('Create a Device'))
|
||||||
|
->setHref('/almanac/device/edit/')
|
||||||
|
->setIcon('fa-plus')
|
||||||
|
->setColor(PHUIButtonView::GREEN);
|
||||||
|
|
||||||
|
$app_name = pht('Devices');
|
||||||
|
$view = id(new PHUIBigInfoView())
|
||||||
|
->setIcon('fa-server')
|
||||||
|
->setTitle(pht('Welcome to %s', $app_name))
|
||||||
|
->setDescription(
|
||||||
|
pht(
|
||||||
|
'Use Almanac devices to catalogue your build hosts '.
|
||||||
|
'and their SSH ports your network, and more.'))
|
||||||
|
->addAction($see_network)
|
||||||
|
->addAction($create_button);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,4 +87,25 @@ final class AlmanacNetworkSearchEngine
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getNewUserBody() {
|
||||||
|
$create_button = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('Create a Network'))
|
||||||
|
->setHref('/almanac/network/edit/')
|
||||||
|
->setIcon('fa-plus')
|
||||||
|
->setColor(PHUIButtonView::GREEN);
|
||||||
|
|
||||||
|
$app_name = pht('Networks');
|
||||||
|
$view = id(new PHUIBigInfoView())
|
||||||
|
->setIcon('fa-globe')
|
||||||
|
->setTitle(pht('Welcome to %s', $app_name))
|
||||||
|
->setDescription(
|
||||||
|
pht(
|
||||||
|
'Use Almanac networks to catalogue private and public '.
|
||||||
|
'computer networks.'))
|
||||||
|
->addAction($create_button);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,4 +115,32 @@ final class AlmanacServiceSearchEngine
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getNewUserBody() {
|
||||||
|
$see_devices = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('See Devices'))
|
||||||
|
->setHref('/almanac/device/');
|
||||||
|
|
||||||
|
$create_button = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('Create a Service'))
|
||||||
|
->setHref('/almanac/service/edit/')
|
||||||
|
->setIcon('fa-plus')
|
||||||
|
->setColor(PHUIButtonView::GREEN);
|
||||||
|
|
||||||
|
|
||||||
|
$app_name = pht('Services');
|
||||||
|
$view = id(new PHUIBigInfoView())
|
||||||
|
->setIcon('fa-plug')
|
||||||
|
->setTitle(pht('Welcome to %s', $app_name))
|
||||||
|
->setDescription(
|
||||||
|
pht(
|
||||||
|
'Services describe pools of devices, and '.
|
||||||
|
'they are available to Drydock for CI/CD, and more.'))
|
||||||
|
->addAction($see_devices)
|
||||||
|
->addAction($create_button);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ final class PhutilBitbucketAuthAdapter extends PhutilOAuth1AuthAdapter {
|
||||||
|
|
||||||
public function getAccountURI() {
|
public function getAccountURI() {
|
||||||
$name = $this->getAccountID();
|
$name = $this->getAccountID();
|
||||||
if (strlen($name)) {
|
if (phutil_nonempty_string($name)) {
|
||||||
return 'https://bitbucket.org/'.$name;
|
return 'https://bitbucket.org/'.$name;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -31,7 +31,7 @@ final class PhutilGitHubAuthAdapter extends PhutilOAuthAuthAdapter {
|
||||||
|
|
||||||
public function getAccountURI() {
|
public function getAccountURI() {
|
||||||
$name = $this->getAccountName();
|
$name = $this->getAccountName();
|
||||||
if (strlen($name)) {
|
if (phutil_nonempty_string($name)) {
|
||||||
return 'https://github.com/'.$name;
|
return 'https://github.com/'.$name;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -17,7 +17,7 @@ final class PhutilTwitterAuthAdapter extends PhutilOAuth1AuthAdapter {
|
||||||
|
|
||||||
public function getAccountURI() {
|
public function getAccountURI() {
|
||||||
$name = $this->getAccountName();
|
$name = $this->getAccountName();
|
||||||
if (strlen($name)) {
|
if (phutil_nonempty_string($name)) {
|
||||||
return 'https://twitter.com/'.$name;
|
return 'https://twitter.com/'.$name;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -16,7 +16,7 @@ final class PhabricatorCommonPasswords extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Check if a password is extremely common.
|
* Check if a password is extremely common.
|
||||||
*
|
*
|
||||||
* @param string Password to test.
|
* @param string $password Password to test.
|
||||||
* @return bool True if the password is pathologically weak.
|
* @return bool True if the password is pathologically weak.
|
||||||
*
|
*
|
||||||
* @task common
|
* @task common
|
||||||
|
|
|
@ -77,7 +77,7 @@ final class PhabricatorCookies extends Phobject {
|
||||||
* Set the client ID cookie. This is a random cookie used like a CSRF value
|
* Set the client ID cookie. This is a random cookie used like a CSRF value
|
||||||
* during authentication workflows.
|
* during authentication workflows.
|
||||||
*
|
*
|
||||||
* @param AphrontRequest Request to modify.
|
* @param AphrontRequest $request Request to modify.
|
||||||
* @return void
|
* @return void
|
||||||
* @task clientid
|
* @task clientid
|
||||||
*/
|
*/
|
||||||
|
@ -105,10 +105,10 @@ final class PhabricatorCookies extends Phobject {
|
||||||
* written, to avoid writing over a real URI with a bunch of "humans.txt"
|
* written, to avoid writing over a real URI with a bunch of "humans.txt"
|
||||||
* stuff. See T3793 for discussion.
|
* stuff. See T3793 for discussion.
|
||||||
*
|
*
|
||||||
* @param AphrontRequest Request to write to.
|
* @param AphrontRequest $request Request to write to.
|
||||||
* @param string URI to write.
|
* @param string $next_uri URI to write.
|
||||||
* @param bool Write this cookie even if we have a fresh
|
* @param bool? $force Write this cookie even if we have a
|
||||||
* cookie already.
|
* fresh cookie already.
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @task next
|
* @task next
|
||||||
|
@ -139,7 +139,7 @@ final class PhabricatorCookies extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Read the URI out of the Next URI cookie.
|
* Read the URI out of the Next URI cookie.
|
||||||
*
|
*
|
||||||
* @param AphrontRequest Request to examine.
|
* @param AphrontRequest $request Request to examine.
|
||||||
* @return string|null Next URI cookie's URI value.
|
* @return string|null Next URI cookie's URI value.
|
||||||
*
|
*
|
||||||
* @task next
|
* @task next
|
||||||
|
@ -155,7 +155,7 @@ final class PhabricatorCookies extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Parse a Next URI cookie into its components.
|
* Parse a Next URI cookie into its components.
|
||||||
*
|
*
|
||||||
* @param string Raw cookie value.
|
* @param string $cookie Raw cookie value.
|
||||||
* @return list<string> List of timestamp and URI.
|
* @return list<string> List of timestamp and URI.
|
||||||
*
|
*
|
||||||
* @task next
|
* @task next
|
||||||
|
|
|
@ -44,8 +44,9 @@ abstract class PhabricatorAuthController extends PhabricatorController {
|
||||||
* the user's cookies are set. However, event listeners can intercept this
|
* the user's cookies are set. However, event listeners can intercept this
|
||||||
* event and do something else if they prefer.
|
* event and do something else if they prefer.
|
||||||
*
|
*
|
||||||
* @param PhabricatorUser User to log the viewer in as.
|
* @param PhabricatorUser $user User to log the viewer in as.
|
||||||
* @param bool True to issue a full session immediately, bypassing MFA.
|
* @param bool? $force_full_session True to issue a full session immediately,
|
||||||
|
* bypassing MFA.
|
||||||
* @return AphrontResponse Response which continues the login process.
|
* @return AphrontResponse Response which continues the login process.
|
||||||
*/
|
*/
|
||||||
protected function loginUser(
|
protected function loginUser(
|
||||||
|
|
|
@ -31,7 +31,7 @@ final class PhabricatorAuthStartController
|
||||||
$session_token = $request->getCookie(PhabricatorCookies::COOKIE_SESSION);
|
$session_token = $request->getCookie(PhabricatorCookies::COOKIE_SESSION);
|
||||||
$did_clear = $request->getStr('cleared');
|
$did_clear = $request->getStr('cleared');
|
||||||
|
|
||||||
if (strlen($session_token)) {
|
if (phutil_nonempty_string($session_token)) {
|
||||||
$kind = PhabricatorAuthSessionEngine::getSessionKindFromToken(
|
$kind = PhabricatorAuthSessionEngine::getSessionKindFromToken(
|
||||||
$session_token);
|
$session_token);
|
||||||
switch ($kind) {
|
switch ($kind) {
|
||||||
|
|
|
@ -102,7 +102,7 @@ final class PhabricatorAuthUnlinkController
|
||||||
->addHiddenInput('confirmations', implode(',', $confirmations))
|
->addHiddenInput('confirmations', implode(',', $confirmations))
|
||||||
->appendParagraph(
|
->appendParagraph(
|
||||||
pht(
|
pht(
|
||||||
'This is the only external login account linked to your Phabicator '.
|
'This is the only external login account linked to your '.
|
||||||
'account. If you remove it, you may no longer be able to log in.'))
|
'account. If you remove it, you may no longer be able to log in.'))
|
||||||
->appendParagraph(
|
->appendParagraph(
|
||||||
pht(
|
pht(
|
||||||
|
|
|
@ -75,7 +75,7 @@ final class PhabricatorAuthSessionEngine extends Phobject {
|
||||||
* Get the session kind (e.g., anonymous, user, external account) from a
|
* Get the session kind (e.g., anonymous, user, external account) from a
|
||||||
* session token. Returns a `KIND_` constant.
|
* session token. Returns a `KIND_` constant.
|
||||||
*
|
*
|
||||||
* @param string Session token.
|
* @param string $session_token Session token.
|
||||||
* @return const Session kind constant.
|
* @return const Session kind constant.
|
||||||
*/
|
*/
|
||||||
public static function getSessionKindFromToken($session_token) {
|
public static function getSessionKindFromToken($session_token) {
|
||||||
|
@ -109,8 +109,8 @@ final class PhabricatorAuthSessionEngine extends Phobject {
|
||||||
* loading context. This prevents use of a Conduit sesssion as a Web
|
* loading context. This prevents use of a Conduit sesssion as a Web
|
||||||
* session, for example.
|
* session, for example.
|
||||||
*
|
*
|
||||||
* @param const The type of session to load.
|
* @param const $session_type The type of session to load.
|
||||||
* @param string The session token.
|
* @param string $session_token The session token.
|
||||||
* @return PhabricatorUser|null
|
* @return PhabricatorUser|null
|
||||||
* @task use
|
* @task use
|
||||||
*/
|
*/
|
||||||
|
@ -250,11 +250,12 @@ final class PhabricatorAuthSessionEngine extends Phobject {
|
||||||
* You can configure the maximum number of concurrent sessions for various
|
* You can configure the maximum number of concurrent sessions for various
|
||||||
* session types in the Phabricator configuration.
|
* session types in the Phabricator configuration.
|
||||||
*
|
*
|
||||||
* @param const Session type constant (see
|
* @param const $session_type Session type constant (see
|
||||||
* @{class:PhabricatorAuthSession}).
|
* @{class:PhabricatorAuthSession}).
|
||||||
* @param phid|null Identity to establish a session for, usually a user
|
* @param phid|null $identity_phid Identity to establish a session for,
|
||||||
* PHID. With `null`, generates an anonymous session.
|
* usually a user PHID. With `null`, generates an
|
||||||
* @param bool True to issue a partial session.
|
* anonymous session.
|
||||||
|
* @param bool $partial True to issue a partial session.
|
||||||
* @return string Newly generated session key.
|
* @return string Newly generated session key.
|
||||||
*/
|
*/
|
||||||
public function establishSession($session_type, $identity_phid, $partial) {
|
public function establishSession($session_type, $identity_phid, $partial) {
|
||||||
|
@ -325,9 +326,9 @@ final class PhabricatorAuthSessionEngine extends Phobject {
|
||||||
* This is used when users change passwords, linked accounts, or add
|
* This is used when users change passwords, linked accounts, or add
|
||||||
* multifactor authentication.
|
* multifactor authentication.
|
||||||
*
|
*
|
||||||
* @param PhabricatorUser User whose sessions should be terminated.
|
* @param PhabricatorUser $user User whose sessions should be terminated.
|
||||||
* @param string|null Optionally, one session to keep. Normally, the current
|
* @param string|null? $except_session Optionally, one session to keep.
|
||||||
* login session.
|
* Normally, the current login session.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -388,9 +389,11 @@ final class PhabricatorAuthSessionEngine extends Phobject {
|
||||||
* does not upgrade the user's session as a side effect. This method is
|
* does not upgrade the user's session as a side effect. This method is
|
||||||
* appropriate for one-time checks.
|
* appropriate for one-time checks.
|
||||||
*
|
*
|
||||||
* @param PhabricatorUser User whose session needs to be in high security.
|
* @param PhabricatorUser $viewer User whose session needs to be in high
|
||||||
* @param AphrontRequest Current request.
|
* security.
|
||||||
* @param string URI to return the user to if they cancel.
|
* @param AphrontRequest $request Current request.
|
||||||
|
* @param string $cancel_uri URI to return the user to if they
|
||||||
|
* cancel.
|
||||||
* @return PhabricatorAuthHighSecurityToken Security token.
|
* @return PhabricatorAuthHighSecurityToken Security token.
|
||||||
* @task hisec
|
* @task hisec
|
||||||
*/
|
*/
|
||||||
|
@ -420,12 +423,14 @@ final class PhabricatorAuthSessionEngine extends Phobject {
|
||||||
* take multiple high security actions. To perform a one-time check instead,
|
* take multiple high security actions. To perform a one-time check instead,
|
||||||
* use @{method:requireHighSecurityToken}.
|
* use @{method:requireHighSecurityToken}.
|
||||||
*
|
*
|
||||||
* @param PhabricatorUser User whose session needs to be in high security.
|
* @param PhabricatorUser $viewer User whose session needs to be in high
|
||||||
* @param AphrontRequest Current request.
|
* security.
|
||||||
* @param string URI to return the user to if they cancel.
|
* @param AphrontRequest $request Current request.
|
||||||
* @param bool True to jump partial sessions directly into high
|
* @param string $cancel_uri URI to return the user to if they
|
||||||
* security instead of just upgrading them to full
|
* cancel.
|
||||||
* sessions.
|
* @param bool? $jump_into_hisec True to jump partial sessions
|
||||||
|
* directly into high security instead of just
|
||||||
|
* upgrading them to full sessions.
|
||||||
* @return PhabricatorAuthHighSecurityToken Security token.
|
* @return PhabricatorAuthHighSecurityToken Security token.
|
||||||
* @task hisec
|
* @task hisec
|
||||||
*/
|
*/
|
||||||
|
@ -736,8 +741,8 @@ final class PhabricatorAuthSessionEngine extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Issue a high security token for a session, if authorized.
|
* Issue a high security token for a session, if authorized.
|
||||||
*
|
*
|
||||||
* @param PhabricatorAuthSession Session to issue a token for.
|
* @param PhabricatorAuthSession $session Session to issue a token for.
|
||||||
* @param bool Force token issue.
|
* @param bool? $force Force token issue.
|
||||||
* @return PhabricatorAuthHighSecurityToken|null Token, if authorized.
|
* @return PhabricatorAuthHighSecurityToken|null Token, if authorized.
|
||||||
* @task hisec
|
* @task hisec
|
||||||
*/
|
*/
|
||||||
|
@ -756,8 +761,10 @@ final class PhabricatorAuthSessionEngine extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Render a form for providing relevant multi-factor credentials.
|
* Render a form for providing relevant multi-factor credentials.
|
||||||
*
|
*
|
||||||
* @param PhabricatorUser Viewing user.
|
* @param array $factors
|
||||||
* @param AphrontRequest Current request.
|
* @param array $validation_results
|
||||||
|
* @param PhabricatorUser $viewer Viewing user.
|
||||||
|
* @param AphrontRequest $request Current request.
|
||||||
* @return AphrontFormView Renderable form.
|
* @return AphrontFormView Renderable form.
|
||||||
* @task hisec
|
* @task hisec
|
||||||
*/
|
*/
|
||||||
|
@ -810,8 +817,9 @@ final class PhabricatorAuthSessionEngine extends Phobject {
|
||||||
*
|
*
|
||||||
* Kicks a session out of high security and logs the exit.
|
* Kicks a session out of high security and logs the exit.
|
||||||
*
|
*
|
||||||
* @param PhabricatorUser Acting user.
|
* @param PhabricatorUser $viewer Acting user.
|
||||||
* @param PhabricatorAuthSession Session to return to normal security.
|
* @param PhabricatorAuthSession $session Session to return to normal
|
||||||
|
* security.
|
||||||
* @return void
|
* @return void
|
||||||
* @task hisec
|
* @task hisec
|
||||||
*/
|
*/
|
||||||
|
@ -843,7 +851,7 @@ final class PhabricatorAuthSessionEngine extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Upgrade a partial session to a full session.
|
* Upgrade a partial session to a full session.
|
||||||
*
|
*
|
||||||
* @param PhabricatorAuthSession Session to upgrade.
|
* @param PhabricatorUser $viewer Viewer whose session should upgrade.
|
||||||
* @return void
|
* @return void
|
||||||
* @task partial
|
* @task partial
|
||||||
*/
|
*/
|
||||||
|
@ -885,8 +893,8 @@ final class PhabricatorAuthSessionEngine extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Upgrade a session to have all legalpad documents signed.
|
* Upgrade a session to have all legalpad documents signed.
|
||||||
*
|
*
|
||||||
* @param PhabricatorUser User whose session should upgrade.
|
* @param PhabricatorUser $viewer User whose session should upgrade.
|
||||||
* @param array LegalpadDocument objects
|
* @param array $docs LegalpadDocument objects
|
||||||
* @return void
|
* @return void
|
||||||
* @task partial
|
* @task partial
|
||||||
*/
|
*/
|
||||||
|
@ -934,13 +942,14 @@ final class PhabricatorAuthSessionEngine extends Phobject {
|
||||||
* These URIs are used for password recovery and to regain access to accounts
|
* These URIs are used for password recovery and to regain access to accounts
|
||||||
* which users have been locked out of.
|
* which users have been locked out of.
|
||||||
*
|
*
|
||||||
* @param PhabricatorUser User to generate a URI for.
|
* @param PhabricatorUser $user User to generate a URI for.
|
||||||
* @param PhabricatorUserEmail Optionally, email to verify when
|
* @param PhabricatorUserEmail? $email Optionally, email to verify when
|
||||||
* link is used.
|
* link is used.
|
||||||
* @param string Optional context string for the URI. This is purely cosmetic
|
* @param string? $type Optional context string for the URI. This is purely
|
||||||
* and used only to customize workflow and error messages.
|
* cosmetic and used only to customize workflow and error messages.
|
||||||
* @param bool True to generate a URI which forces an immediate upgrade to
|
* @param bool? $force_full_session True to generate a URI which forces an
|
||||||
* a full session, bypassing MFA and other login checks.
|
* immediate upgrade to a full session, bypassing MFA and other login
|
||||||
|
* checks.
|
||||||
* @return string Login URI.
|
* @return string Login URI.
|
||||||
* @task onetime
|
* @task onetime
|
||||||
*/
|
*/
|
||||||
|
@ -984,10 +993,10 @@ final class PhabricatorAuthSessionEngine extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Load the temporary token associated with a given one-time login key.
|
* Load the temporary token associated with a given one-time login key.
|
||||||
*
|
*
|
||||||
* @param PhabricatorUser User to load the token for.
|
* @param PhabricatorUser $user User to load the token for.
|
||||||
* @param PhabricatorUserEmail Optionally, email to verify when
|
* @param PhabricatorUserEmail? $email Optionally, email to verify when
|
||||||
* link is used.
|
* link is used.
|
||||||
* @param string Key user is presenting as a valid one-time login key.
|
* @param string? $key Key user is presenting as a valid one-time login key.
|
||||||
* @return PhabricatorAuthTemporaryToken|null Token, if one exists.
|
* @return PhabricatorAuthTemporaryToken|null Token, if one exists.
|
||||||
* @task onetime
|
* @task onetime
|
||||||
*/
|
*/
|
||||||
|
@ -1012,10 +1021,10 @@ final class PhabricatorAuthSessionEngine extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Hash a one-time login key for storage as a temporary token.
|
* Hash a one-time login key for storage as a temporary token.
|
||||||
*
|
*
|
||||||
* @param PhabricatorUser User this key is for.
|
* @param PhabricatorUser $user User this key is for.
|
||||||
* @param PhabricatorUserEmail Optionally, email to verify when
|
* @param PhabricatorUserEmail? $email Optionally, email to verify when
|
||||||
* link is used.
|
* link is used.
|
||||||
* @param string The one time login key.
|
* @param string? $key The one time login key.
|
||||||
* @return string Hash of the key.
|
* @return string Hash of the key.
|
||||||
* task onetime
|
* task onetime
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,8 +14,8 @@ interface PhabricatorAuthPasswordHashInterface {
|
||||||
* as their password or picking other passwords which are trivially similar
|
* as their password or picking other passwords which are trivially similar
|
||||||
* to an account or object identifier.
|
* to an account or object identifier.
|
||||||
*
|
*
|
||||||
* @param PhabricatorUser The user selecting the password.
|
* @param PhabricatorUser $viewer The user selecting the password.
|
||||||
* @param PhabricatorAuthPasswordEngine The password engine updating a
|
* @param PhabricatorAuthPasswordEngine $engine The password engine updating a
|
||||||
* password.
|
* password.
|
||||||
* @return list<string> Blocklist of nonsecret identifiers which the password
|
* @return list<string> Blocklist of nonsecret identifiers which the password
|
||||||
* should not be similar to.
|
* should not be similar to.
|
||||||
|
|
|
@ -460,9 +460,9 @@ abstract class PhabricatorAuthProvider extends Phobject {
|
||||||
* - `uri`: URI the button should take the user to when clicked.
|
* - `uri`: URI the button should take the user to when clicked.
|
||||||
* - `method`: Optional HTTP method the button should use, defaults to GET.
|
* - `method`: Optional HTTP method the button should use, defaults to GET.
|
||||||
*
|
*
|
||||||
* @param AphrontRequest HTTP request.
|
* @param AphrontRequest $request HTTP request.
|
||||||
* @param string Request mode string.
|
* @param string $mode Request mode string.
|
||||||
* @param map Additional parameters, see above.
|
* @param map? $attributes Additional parameters, see above.
|
||||||
* @return wild Log in button.
|
* @return wild Log in button.
|
||||||
*/
|
*/
|
||||||
protected function renderStandardLoginButton(
|
protected function renderStandardLoginButton(
|
||||||
|
|
|
@ -142,10 +142,10 @@ final class PhabricatorLDAPAuthProvider extends PhabricatorAuthProvider {
|
||||||
|
|
||||||
$username = $request->getStr('ldap_username');
|
$username = $request->getStr('ldap_username');
|
||||||
$password = $request->getStr('ldap_password');
|
$password = $request->getStr('ldap_password');
|
||||||
$has_password = strlen($password);
|
$has_password = phutil_nonempty_string($password);
|
||||||
$password = new PhutilOpaqueEnvelope($password);
|
$password = new PhutilOpaqueEnvelope($password);
|
||||||
|
|
||||||
if (!strlen($username) || !$has_password) {
|
if (!phutil_nonempty_string($username) || !$has_password) {
|
||||||
$response = $controller->buildProviderPageResponse(
|
$response = $controller->buildProviderPageResponse(
|
||||||
$this,
|
$this,
|
||||||
$this->renderLoginForm($request, 'login'));
|
$this->renderLoginForm($request, 'login'));
|
||||||
|
@ -154,7 +154,7 @@ final class PhabricatorLDAPAuthProvider extends PhabricatorAuthProvider {
|
||||||
|
|
||||||
if ($request->isFormPost()) {
|
if ($request->isFormPost()) {
|
||||||
try {
|
try {
|
||||||
if (strlen($username) && $has_password) {
|
if (phutil_nonempty_string($username) && $has_password) {
|
||||||
$adapter = $this->getAdapter();
|
$adapter = $this->getAdapter();
|
||||||
$adapter->setLoginUsername($username);
|
$adapter->setLoginUsername($username);
|
||||||
$adapter->setLoginPassword($password);
|
$adapter->setLoginPassword($password);
|
||||||
|
|
|
@ -63,7 +63,7 @@ final class PhabricatorAuthAccountView extends AphrontView {
|
||||||
));
|
));
|
||||||
|
|
||||||
$account_uri = $account->getAccountURI();
|
$account_uri = $account->getAccountURI();
|
||||||
if (strlen($account_uri)) {
|
if (phutil_nonempty_string($account_uri)) {
|
||||||
|
|
||||||
// Make sure we don't link a "javascript:" URI if a user somehow
|
// Make sure we don't link a "javascript:" URI if a user somehow
|
||||||
// managed to get one here.
|
// managed to get one here.
|
||||||
|
|
|
@ -6,6 +6,8 @@ final class PhabricatorBadgesAwardController
|
||||||
public function handleRequest(AphrontRequest $request) {
|
public function handleRequest(AphrontRequest $request) {
|
||||||
$viewer = $request->getViewer();
|
$viewer = $request->getViewer();
|
||||||
$id = $request->getURIData('id');
|
$id = $request->getURIData('id');
|
||||||
|
$errors = array();
|
||||||
|
$e_badge = true;
|
||||||
|
|
||||||
$user = id(new PhabricatorPeopleQuery())
|
$user = id(new PhabricatorPeopleQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
|
@ -19,6 +21,12 @@ final class PhabricatorBadgesAwardController
|
||||||
|
|
||||||
if ($request->isFormPost()) {
|
if ($request->isFormPost()) {
|
||||||
$badge_phids = $request->getArr('badgePHIDs');
|
$badge_phids = $request->getArr('badgePHIDs');
|
||||||
|
|
||||||
|
if (empty($badge_phids)) {
|
||||||
|
$errors[] = pht('Badge name is required.');
|
||||||
|
$e_badge = pht('Required');
|
||||||
|
}
|
||||||
|
if (!$errors) {
|
||||||
$badges = id(new PhabricatorBadgesQuery())
|
$badges = id(new PhabricatorBadgesQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->withPHIDs($badge_phids)
|
->withPHIDs($badge_phids)
|
||||||
|
@ -28,9 +36,6 @@ final class PhabricatorBadgesAwardController
|
||||||
PhabricatorPolicyCapability::CAN_VIEW,
|
PhabricatorPolicyCapability::CAN_VIEW,
|
||||||
))
|
))
|
||||||
->execute();
|
->execute();
|
||||||
if (!$badges) {
|
|
||||||
return new Aphront404Response();
|
|
||||||
}
|
|
||||||
$award_phids = array($user->getPHID());
|
$award_phids = array($user->getPHID());
|
||||||
|
|
||||||
foreach ($badges as $badge) {
|
foreach ($badges as $badge) {
|
||||||
|
@ -51,6 +56,7 @@ final class PhabricatorBadgesAwardController
|
||||||
return id(new AphrontRedirectResponse())
|
return id(new AphrontRedirectResponse())
|
||||||
->setURI($view_uri);
|
->setURI($view_uri);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$form = id(new AphrontFormView())
|
$form = id(new AphrontFormView())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
|
@ -58,6 +64,7 @@ final class PhabricatorBadgesAwardController
|
||||||
id(new AphrontFormTokenizerControl())
|
id(new AphrontFormTokenizerControl())
|
||||||
->setLabel(pht('Badge'))
|
->setLabel(pht('Badge'))
|
||||||
->setName('badgePHIDs')
|
->setName('badgePHIDs')
|
||||||
|
->setError($e_badge)
|
||||||
->setDatasource(
|
->setDatasource(
|
||||||
id(new PhabricatorBadgesDatasource())
|
id(new PhabricatorBadgesDatasource())
|
||||||
->setParameters(
|
->setParameters(
|
||||||
|
|
|
@ -7,6 +7,8 @@ final class PhabricatorBadgesEditRecipientsController
|
||||||
$viewer = $request->getViewer();
|
$viewer = $request->getViewer();
|
||||||
$id = $request->getURIData('id');
|
$id = $request->getURIData('id');
|
||||||
$xactions = array();
|
$xactions = array();
|
||||||
|
$errors = array();
|
||||||
|
$e_recipient = true;
|
||||||
|
|
||||||
$badge = id(new PhabricatorBadgesQuery())
|
$badge = id(new PhabricatorBadgesQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
|
@ -29,10 +31,14 @@ final class PhabricatorBadgesEditRecipientsController
|
||||||
$add_recipients = $request->getArr('phids');
|
$add_recipients = $request->getArr('phids');
|
||||||
if ($add_recipients) {
|
if ($add_recipients) {
|
||||||
foreach ($add_recipients as $phid) {
|
foreach ($add_recipients as $phid) {
|
||||||
$award_phids[] = $phid;
|
$award_phids[$phid] = $phid;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$errors[] = pht('Recipient name is required.');
|
||||||
|
$e_recipient = pht('Required');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$errors) {
|
||||||
$xactions[] = id(new PhabricatorBadgesTransaction())
|
$xactions[] = id(new PhabricatorBadgesTransaction())
|
||||||
->setTransactionType(
|
->setTransactionType(
|
||||||
PhabricatorBadgesBadgeAwardTransaction::TRANSACTIONTYPE)
|
PhabricatorBadgesBadgeAwardTransaction::TRANSACTIONTYPE)
|
||||||
|
@ -48,16 +54,7 @@ final class PhabricatorBadgesEditRecipientsController
|
||||||
return id(new AphrontRedirectResponse())
|
return id(new AphrontRedirectResponse())
|
||||||
->setURI($view_uri);
|
->setURI($view_uri);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$can_edit = PhabricatorPolicyFilter::hasCapability(
|
|
||||||
$viewer,
|
|
||||||
$badge,
|
|
||||||
PhabricatorPolicyCapability::CAN_EDIT);
|
|
||||||
|
|
||||||
$form_box = null;
|
|
||||||
$title = pht('Add Recipient');
|
|
||||||
if ($can_edit) {
|
|
||||||
$header_name = pht('Edit Recipients');
|
|
||||||
|
|
||||||
$form = new AphrontFormView();
|
$form = new AphrontFormView();
|
||||||
$form
|
$form
|
||||||
|
@ -67,8 +64,8 @@ final class PhabricatorBadgesEditRecipientsController
|
||||||
id(new AphrontFormTokenizerControl())
|
id(new AphrontFormTokenizerControl())
|
||||||
->setName('phids')
|
->setName('phids')
|
||||||
->setLabel(pht('Recipients'))
|
->setLabel(pht('Recipients'))
|
||||||
|
->setError($e_recipient)
|
||||||
->setDatasource(new PhabricatorPeopleDatasource()));
|
->setDatasource(new PhabricatorPeopleDatasource()));
|
||||||
}
|
|
||||||
|
|
||||||
$dialog = id(new AphrontDialogView())
|
$dialog = id(new AphrontDialogView())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
|
|
|
@ -141,7 +141,7 @@ abstract class PhabricatorApplication
|
||||||
*
|
*
|
||||||
* Users who have not yet set preferences see a default list of applications.
|
* Users who have not yet set preferences see a default list of applications.
|
||||||
*
|
*
|
||||||
* @param PhabricatorUser User viewing the pinned application list.
|
* @param PhabricatorUser $viewer User viewing the pinned application list.
|
||||||
* @return bool True if this application should be pinned by default.
|
* @return bool True if this application should be pinned by default.
|
||||||
*/
|
*/
|
||||||
public function isPinnedByDefault(PhabricatorUser $viewer) {
|
public function isPinnedByDefault(PhabricatorUser $viewer) {
|
||||||
|
@ -330,9 +330,9 @@ abstract class PhabricatorApplication
|
||||||
/**
|
/**
|
||||||
* Build items for the main menu.
|
* Build items for the main menu.
|
||||||
*
|
*
|
||||||
* @param PhabricatorUser The viewing user.
|
* @param PhabricatorUser $user The viewing user.
|
||||||
* @param AphrontController The current controller. May be null for special
|
* @param AphrontController? $controller The current controller. May be null
|
||||||
* pages like 404, exception handlers, etc.
|
* for special pages like 404, exception handlers, etc.
|
||||||
* @return list<PHUIListItemView> List of menu items.
|
* @return list<PHUIListItemView> List of menu items.
|
||||||
* @task ui
|
* @task ui
|
||||||
*/
|
*/
|
||||||
|
@ -409,7 +409,7 @@ abstract class PhabricatorApplication
|
||||||
* To check if an application is installed //and// available to a particular
|
* To check if an application is installed //and// available to a particular
|
||||||
* viewer, user @{method:isClassInstalledForViewer}.
|
* viewer, user @{method:isClassInstalledForViewer}.
|
||||||
*
|
*
|
||||||
* @param string Application class name.
|
* @param string $class Application class name.
|
||||||
* @return bool True if the class is installed.
|
* @return bool True if the class is installed.
|
||||||
* @task meta
|
* @task meta
|
||||||
*/
|
*/
|
||||||
|
@ -425,8 +425,8 @@ abstract class PhabricatorApplication
|
||||||
* To check if an application is installed at all, use
|
* To check if an application is installed at all, use
|
||||||
* @{method:isClassInstalled}.
|
* @{method:isClassInstalled}.
|
||||||
*
|
*
|
||||||
* @param string Application class name.
|
* @param string $class Application class name.
|
||||||
* @param PhabricatorUser Viewing user.
|
* @param PhabricatorUser $viewer Viewing user.
|
||||||
* @return bool True if the class is installed for the viewer.
|
* @return bool True if the class is installed for the viewer.
|
||||||
* @task meta
|
* @task meta
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -627,25 +627,4 @@ abstract class PhabricatorController extends AphrontController {
|
||||||
return $this->delegateToController($controller);
|
return $this->delegateToController($controller);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( Deprecated )--------------------------------------------------------- */
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DEPRECATED. Use @{method:newPage}.
|
|
||||||
*/
|
|
||||||
public function buildStandardPageView() {
|
|
||||||
return $this->newPage();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DEPRECATED. Use @{method:newPage}.
|
|
||||||
*/
|
|
||||||
public function buildStandardPageResponse($view, array $data) {
|
|
||||||
$page = $this->buildStandardPageView();
|
|
||||||
$page->appendChild($view);
|
|
||||||
return $page->produceAphrontResponse();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
4
src/applications/cache/PhabricatorCaches.php
vendored
4
src/applications/cache/PhabricatorCaches.php
vendored
|
@ -416,7 +416,7 @@ final class PhabricatorCaches extends Phobject {
|
||||||
*
|
*
|
||||||
* Data can later be inflated with @{method:inflateData}.
|
* Data can later be inflated with @{method:inflateData}.
|
||||||
*
|
*
|
||||||
* @param string String to attempt to deflate.
|
* @param string $value String to attempt to deflate.
|
||||||
* @return string|null Deflated string, or null if it was not deflated.
|
* @return string|null Deflated string, or null if it was not deflated.
|
||||||
* @task compress
|
* @task compress
|
||||||
*/
|
*/
|
||||||
|
@ -447,7 +447,7 @@ final class PhabricatorCaches extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Inflate data previously deflated by @{method:maybeDeflateData}.
|
* Inflate data previously deflated by @{method:maybeDeflateData}.
|
||||||
*
|
*
|
||||||
* @param string Deflated data, from @{method:maybeDeflateData}.
|
* @param string $value Deflated data, from @{method:maybeDeflateData}.
|
||||||
* @return string Original, uncompressed data.
|
* @return string Original, uncompressed data.
|
||||||
* @task compress
|
* @task compress
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -235,14 +235,14 @@ abstract class PhabricatorCalendarImportEngine
|
||||||
// We avoid disclosing email addresses to be consistent with the rest
|
// We avoid disclosing email addresses to be consistent with the rest
|
||||||
// of the product.
|
// of the product.
|
||||||
$name = $attendee->getName();
|
$name = $attendee->getName();
|
||||||
if (preg_match('/@/', $name)) {
|
if (phutil_nonempty_string($name) && preg_match('/@/', $name)) {
|
||||||
$name = new PhutilEmailAddress($name);
|
$name = new PhutilEmailAddress($name);
|
||||||
$name = $name->getDisplayName();
|
$name = $name->getDisplayName();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we don't have a name or the name still looks like it's an
|
// If we don't have a name or the name still looks like it's an
|
||||||
// email address, give them a dummy placeholder name.
|
// email address, give them a dummy placeholder name.
|
||||||
if (!strlen($name) || preg_match('/@/', $name)) {
|
if (!phutil_nonempty_string($name) || preg_match('/@/', $name)) {
|
||||||
$name = pht('Private User %d', $private_index);
|
$name = pht('Private User %d', $private_index);
|
||||||
$private_index++;
|
$private_index++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -525,6 +525,10 @@ final class PhabricatorCalendarEventSearchEngine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param PhabricatorSavedQuery $saved
|
||||||
|
* @return AphrontFormDateControlValue
|
||||||
|
*/
|
||||||
private function getQueryDateFrom(PhabricatorSavedQuery $saved) {
|
private function getQueryDateFrom(PhabricatorSavedQuery $saved) {
|
||||||
if ($this->calendarYear && $this->calendarMonth) {
|
if ($this->calendarYear && $this->calendarMonth) {
|
||||||
$viewer = $this->requireViewer();
|
$viewer = $this->requireViewer();
|
||||||
|
|
|
@ -28,8 +28,12 @@ final class PhabricatorCalendarInviteeViewerFunctionDatasource
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function isFunctionWithLoginRequired($function) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public function loadResults() {
|
public function loadResults() {
|
||||||
if ($this->getViewer()->getPHID()) {
|
if ($this->getViewer()->isLoggedIn()) {
|
||||||
$results = array($this->renderViewerFunctionToken());
|
$results = array($this->renderViewerFunctionToken());
|
||||||
} else {
|
} else {
|
||||||
$results = array();
|
$results = array();
|
||||||
|
@ -39,7 +43,7 @@ final class PhabricatorCalendarInviteeViewerFunctionDatasource
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function canEvaluateFunction($function) {
|
protected function canEvaluateFunction($function) {
|
||||||
if (!$this->getViewer()->getPHID()) {
|
if (!$this->getViewer()->isLoggedIn()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ final class CelerityResourceMap extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Get the epoch timestamp of the last modification time of a symbol.
|
* Get the epoch timestamp of the last modification time of a symbol.
|
||||||
*
|
*
|
||||||
* @param string Resource symbol to lookup.
|
* @param string $name Resource symbol to lookup.
|
||||||
* @return int Epoch timestamp of last resource modification.
|
* @return int Epoch timestamp of last resource modification.
|
||||||
*/
|
*/
|
||||||
public function getModifiedTimeForName($name) {
|
public function getModifiedTimeForName($name) {
|
||||||
|
@ -186,7 +186,7 @@ final class CelerityResourceMap extends Phobject {
|
||||||
* Return the absolute URI for the resource associated with a symbol. This
|
* Return the absolute URI for the resource associated with a symbol. This
|
||||||
* method is fairly low-level and ignores packaging.
|
* method is fairly low-level and ignores packaging.
|
||||||
*
|
*
|
||||||
* @param string Resource symbol to lookup.
|
* @param string $symbol Resource symbol to lookup.
|
||||||
* @return string|null Resource URI, or null if the symbol is unknown.
|
* @return string|null Resource URI, or null if the symbol is unknown.
|
||||||
*/
|
*/
|
||||||
public function getURIForSymbol($symbol) {
|
public function getURIForSymbol($symbol) {
|
||||||
|
@ -199,7 +199,7 @@ final class CelerityResourceMap extends Phobject {
|
||||||
* Return the absolute URI for the resource associated with a resource name.
|
* Return the absolute URI for the resource associated with a resource name.
|
||||||
* This method is fairly low-level and ignores packaging.
|
* This method is fairly low-level and ignores packaging.
|
||||||
*
|
*
|
||||||
* @param string Resource name to lookup.
|
* @param string $name Resource name to lookup.
|
||||||
* @return string|null Resource URI, or null if the name is unknown.
|
* @return string|null Resource URI, or null if the name is unknown.
|
||||||
*/
|
*/
|
||||||
public function getURIForName($name) {
|
public function getURIForName($name) {
|
||||||
|
@ -217,7 +217,7 @@ final class CelerityResourceMap extends Phobject {
|
||||||
* Return the absolute URI for a resource, identified by hash.
|
* Return the absolute URI for a resource, identified by hash.
|
||||||
* This method is fairly low-level and ignores packaging.
|
* This method is fairly low-level and ignores packaging.
|
||||||
*
|
*
|
||||||
* @param string Resource hash to lookup.
|
* @param string $hash Resource hash to lookup.
|
||||||
* @return string|null Resource URI, or null if the hash is unknown.
|
* @return string|null Resource URI, or null if the hash is unknown.
|
||||||
*/
|
*/
|
||||||
private function getURIForHash($hash) {
|
private function getURIForHash($hash) {
|
||||||
|
@ -231,7 +231,7 @@ final class CelerityResourceMap extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Return the resource symbols required by a named resource.
|
* Return the resource symbols required by a named resource.
|
||||||
*
|
*
|
||||||
* @param string Resource name to lookup.
|
* @param string $name Resource name to lookup.
|
||||||
* @return list<string>|null List of required symbols, or null if the name
|
* @return list<string>|null List of required symbols, or null if the name
|
||||||
* is unknown.
|
* is unknown.
|
||||||
*/
|
*/
|
||||||
|
@ -247,7 +247,7 @@ final class CelerityResourceMap extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Return the resource name for a given symbol.
|
* Return the resource name for a given symbol.
|
||||||
*
|
*
|
||||||
* @param string Resource symbol to lookup.
|
* @param string $symbol Resource symbol to lookup.
|
||||||
* @return string|null Resource name, or null if the symbol is unknown.
|
* @return string|null Resource name, or null if the symbol is unknown.
|
||||||
*/
|
*/
|
||||||
public function getResourceNameForSymbol($symbol) {
|
public function getResourceNameForSymbol($symbol) {
|
||||||
|
|
|
@ -146,7 +146,8 @@ EOFILE;
|
||||||
* Find binary resources (like PNG and SWF) and return information about
|
* Find binary resources (like PNG and SWF) and return information about
|
||||||
* them.
|
* them.
|
||||||
*
|
*
|
||||||
* @param CelerityPhysicalResources Resource map to find binary resources for.
|
* @param CelerityPhysicalResources $resources Resource map to find binary
|
||||||
|
* resources for.
|
||||||
* @return map<string, map<string, string>> Resource information map.
|
* @return map<string, map<string, string>> Resource information map.
|
||||||
*/
|
*/
|
||||||
private function rebuildBinaryResources(
|
private function rebuildBinaryResources(
|
||||||
|
@ -170,8 +171,10 @@ EOFILE;
|
||||||
/**
|
/**
|
||||||
* Find text resources (like JS and CSS) and return information about them.
|
* Find text resources (like JS and CSS) and return information about them.
|
||||||
*
|
*
|
||||||
* @param CelerityPhysicalResources Resource map to find text resources for.
|
* @param CelerityPhysicalResources $resources Resource map to find text
|
||||||
* @param CelerityResourceTransformer Configured resource transformer.
|
* resources for.
|
||||||
|
* @param CelerityResourceTransformer $xformer Configured resource
|
||||||
|
* transformer.
|
||||||
* @return map<string, map<string, string>> Resource information map.
|
* @return map<string, map<string, string>> Resource information map.
|
||||||
*/
|
*/
|
||||||
private function rebuildTextResources(
|
private function rebuildTextResources(
|
||||||
|
@ -211,8 +214,8 @@ EOFILE;
|
||||||
* Parse the `@provides` and `@requires` symbols out of a text resource, like
|
* Parse the `@provides` and `@requires` symbols out of a text resource, like
|
||||||
* JS or CSS.
|
* JS or CSS.
|
||||||
*
|
*
|
||||||
* @param string Resource name.
|
* @param string $name Resource name.
|
||||||
* @param string Resource data.
|
* @param string $data Resource data.
|
||||||
* @return pair<string|null, list<string>|null> The `@provides` symbol and
|
* @return pair<string|null, list<string>|null> The `@provides` symbol and
|
||||||
* the list of `@requires` symbols. If the resource is not part of the
|
* the list of `@requires` symbols. If the resource is not part of the
|
||||||
* dependency graph, both are null.
|
* dependency graph, both are null.
|
||||||
|
@ -254,8 +257,8 @@ EOFILE;
|
||||||
* Check for dependency cycles in the resource graph. Raises an exception if
|
* Check for dependency cycles in the resource graph. Raises an exception if
|
||||||
* a cycle is detected.
|
* a cycle is detected.
|
||||||
*
|
*
|
||||||
* @param map<string, list<string>> Map of `@provides` symbols to their
|
* @param map<string, list<string>> $nodes Map of `@provides` symbols to
|
||||||
* `@requires` symbols.
|
* their `@requires` symbols.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function detectGraphCycles(array $nodes) {
|
private function detectGraphCycles(array $nodes) {
|
||||||
|
@ -278,9 +281,9 @@ EOFILE;
|
||||||
/**
|
/**
|
||||||
* Build package specifications for a given resource source.
|
* Build package specifications for a given resource source.
|
||||||
*
|
*
|
||||||
* @param CelerityPhysicalResources Resource source to rebuild.
|
* @param CelerityPhysicalResources $resources Resource source to rebuild.
|
||||||
* @param map<string, string> Map of `@provides` to hashes.
|
* @param map<string, string> $symbol_map Map of `@provides` to hashes.
|
||||||
* @param map<string, string> Map of hashes to resource names.
|
* @param map<string, string> $reverse_map Map of hashes to resource names.
|
||||||
* @return map<string, map<string, string>> Package information maps.
|
* @return map<string, map<string, string>> Package information maps.
|
||||||
*/
|
*/
|
||||||
private function rebuildPackages(
|
private function rebuildPackages(
|
||||||
|
|
|
@ -228,7 +228,8 @@ final class CelerityResourceTransformer extends Phobject {
|
||||||
* small enough. Otherwise, this method will return `null` and we'll end up
|
* small enough. Otherwise, this method will return `null` and we'll end up
|
||||||
* using a normal URI instead.
|
* using a normal URI instead.
|
||||||
*
|
*
|
||||||
* @param string Resource name to attempt to generate a data URI for.
|
* @param string $resource_name Resource name to attempt to generate a data
|
||||||
|
* URI for.
|
||||||
* @return string|null Data URI, or null if we declined to generate one.
|
* @return string|null Data URI, or null if we declined to generate one.
|
||||||
*/
|
*/
|
||||||
private function generateDataURI($resource_name) {
|
private function generateDataURI($resource_name) {
|
||||||
|
|
|
@ -9,8 +9,9 @@
|
||||||
*
|
*
|
||||||
* For more information, see @{article:Adding New CSS and JS}.
|
* For more information, see @{article:Adding New CSS and JS}.
|
||||||
*
|
*
|
||||||
* @param string Name of the celerity module to include. This is whatever you
|
* @param string $symbol Name of the celerity module to include. This is
|
||||||
* annotated as "@provides" in the file.
|
* whatever you annotated as "@provides" in the file.
|
||||||
|
* @param string? $source_name
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function require_celerity_resource($symbol, $source_name = 'phabricator') {
|
function require_celerity_resource($symbol, $source_name = 'phabricator') {
|
||||||
|
@ -40,7 +41,8 @@ function celerity_generate_unique_node_id() {
|
||||||
/**
|
/**
|
||||||
* Get the versioned URI for a raw resource, like an image.
|
* Get the versioned URI for a raw resource, like an image.
|
||||||
*
|
*
|
||||||
* @param string Path to the raw image.
|
* @param string $resource Path to the raw image.
|
||||||
|
* @param string? $source
|
||||||
* @return string Versioned path to the image, if one is available.
|
* @return string Versioned path to the image, if one is available.
|
||||||
*/
|
*/
|
||||||
function celerity_get_resource_uri($resource, $source = 'phabricator') {
|
function celerity_get_resource_uri($resource, $source = 'phabricator') {
|
||||||
|
|
|
@ -59,6 +59,7 @@ abstract class CelerityResourceController extends PhabricatorController {
|
||||||
}
|
}
|
||||||
|
|
||||||
$cache = null;
|
$cache = null;
|
||||||
|
$cache_key = null;
|
||||||
$data = null;
|
$data = null;
|
||||||
if ($is_cacheable && $is_locally_cacheable && !$dev_mode) {
|
if ($is_cacheable && $is_locally_cacheable && !$dev_mode) {
|
||||||
$cache = PhabricatorCaches::getImmutableCache();
|
$cache = PhabricatorCaches::getImmutableCache();
|
||||||
|
@ -98,7 +99,7 @@ abstract class CelerityResourceController extends PhabricatorController {
|
||||||
$data = $xformer->transformResource($path, $data);
|
$data = $xformer->transformResource($path, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cache) {
|
if ($cache && $cache_key !== null) {
|
||||||
$cache->setKey($cache_key, $data);
|
$cache->setKey($cache_key, $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -193,7 +194,7 @@ abstract class CelerityResourceController extends PhabricatorController {
|
||||||
* are cached, while other types of resources (which are large, and cheap
|
* are cached, while other types of resources (which are large, and cheap
|
||||||
* to process) are not.
|
* to process) are not.
|
||||||
*
|
*
|
||||||
* @param string Resource type.
|
* @param string $type Resource type.
|
||||||
* @return bool True to enable caching.
|
* @return bool True to enable caching.
|
||||||
*/
|
*/
|
||||||
private function isLocallyCacheableResourceType($type) {
|
private function isLocallyCacheableResourceType($type) {
|
||||||
|
|
|
@ -32,7 +32,7 @@ final class CelerityManagementMapWorkflow
|
||||||
/**
|
/**
|
||||||
* Rebuild the resource map for a resource source.
|
* Rebuild the resource map for a resource source.
|
||||||
*
|
*
|
||||||
* @param CelerityPhysicalResources Resource source to rebuild.
|
* @param $resources CelerityPhysicalResources Resource source to rebuild.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function rebuildResources(CelerityPhysicalResources $resources) {
|
private function rebuildResources(CelerityPhysicalResources $resources) {
|
||||||
|
|
|
@ -159,8 +159,9 @@ final class PhabricatorConduitAPIController
|
||||||
/**
|
/**
|
||||||
* Authenticate the client making the request to a Phabricator user account.
|
* Authenticate the client making the request to a Phabricator user account.
|
||||||
*
|
*
|
||||||
* @param ConduitAPIRequest Request being executed.
|
* @param ConduitAPIRequest $api_request Request being executed.
|
||||||
* @param dict Request metadata.
|
* @param dict $metadata Request metadata.
|
||||||
|
* @param wild $method
|
||||||
* @return null|pair Null to indicate successful authentication, or
|
* @return null|pair Null to indicate successful authentication, or
|
||||||
* an error code and error message pair.
|
* an error code and error message pair.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,7 +12,7 @@ class ConduitException extends Exception {
|
||||||
* will be used instead. This is useful to provide specific information about
|
* will be used instead. This is useful to provide specific information about
|
||||||
* an exception (e.g., which values were wrong in an invalid request).
|
* an exception (e.g., which values were wrong in an invalid request).
|
||||||
*
|
*
|
||||||
* @param string Detailed error description.
|
* @param string $error_description Detailed error description.
|
||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
final public function setErrorDescription($error_description) {
|
final public function setErrorDescription($error_description) {
|
||||||
|
|
|
@ -60,7 +60,7 @@ final class PhabricatorConfigConsoleController
|
||||||
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
|
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
|
||||||
->setObjectList($menu);
|
->setObjectList($menu);
|
||||||
|
|
||||||
$versions = $this->newLibraryVersionTable($viewer);
|
$versions = $this->newLibraryVersionTable();
|
||||||
$binary_versions = $this->newBinaryVersionTable();
|
$binary_versions = $this->newBinaryVersionTable();
|
||||||
|
|
||||||
$launcher_view = id(new PHUILauncherView())
|
$launcher_view = id(new PHUILauncherView())
|
||||||
|
|
|
@ -13,6 +13,45 @@ final class PhabricatorCustomLogoConfigType
|
||||||
return idx($logo, 'wordmarkText');
|
return idx($logo, 'wordmarkText');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the full URI of the Phorge logo
|
||||||
|
* @param PhabricatorUser $viewer Current viewer
|
||||||
|
* @return string Full URI of the Phorge logo
|
||||||
|
*/
|
||||||
|
public static function getLogoURI(PhabricatorUser $viewer) {
|
||||||
|
$logo_uri = null;
|
||||||
|
|
||||||
|
$custom_header = self::getLogoImagePHID();
|
||||||
|
if ($custom_header) {
|
||||||
|
$cache = PhabricatorCaches::getImmutableCache();
|
||||||
|
$cache_key_logo = 'ui.custom-header.logo-phid.v3.'.$custom_header;
|
||||||
|
$logo_uri = $cache->getKey($cache_key_logo);
|
||||||
|
|
||||||
|
if (!$logo_uri) {
|
||||||
|
// NOTE: If the file policy has been changed to be restrictive, we'll
|
||||||
|
// miss here and just show the default logo. The cache will fill later
|
||||||
|
// when someone who can see the file loads the page. This might be a
|
||||||
|
// little spooky, see T11982.
|
||||||
|
$files = id(new PhabricatorFileQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withPHIDs(array($custom_header))
|
||||||
|
->execute();
|
||||||
|
$file = head($files);
|
||||||
|
if ($file) {
|
||||||
|
$logo_uri = $file->getViewURI();
|
||||||
|
$cache->setKey($cache_key_logo, $logo_uri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$logo_uri) {
|
||||||
|
$logo_uri =
|
||||||
|
celerity_get_resource_uri('/rsrc/image/logo/project-logo.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $logo_uri;
|
||||||
|
}
|
||||||
|
|
||||||
public function validateOption(PhabricatorConfigOption $option, $value) {
|
public function validateOption(PhabricatorConfigOption $option, $value) {
|
||||||
if (!is_array($value)) {
|
if (!is_array($value)) {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
|
|
|
@ -145,8 +145,8 @@ final class PhabricatorSetupIssue extends Phobject {
|
||||||
* we alter `memory_limit` during startup, so if the original value is not
|
* we alter `memory_limit` during startup, so if the original value is not
|
||||||
* provided it will look like it is always set to `-1`.
|
* provided it will look like it is always set to `-1`.
|
||||||
*
|
*
|
||||||
* @param string PHP configuration option to provide a value for.
|
* @param string $php_config PHP configuration option to provide a value for.
|
||||||
* @param string Explicit value to show in the UI.
|
* @param string $value Explicit value to show in the UI.
|
||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public function addPHPConfigOriginalValue($php_config, $value) {
|
public function addPHPConfigOriginalValue($php_config, $value) {
|
||||||
|
|
|
@ -4,7 +4,8 @@ final class PhabricatorConfigJSON extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Properly format a JSON value.
|
* Properly format a JSON value.
|
||||||
*
|
*
|
||||||
* @param wild Any value, but should be a raw value, not a string of JSON.
|
* @param wild $value Any value, but should be a raw value, not a string of
|
||||||
|
* JSON.
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function prettyPrintJSON($value) {
|
public static function prettyPrintJSON($value) {
|
||||||
|
|
|
@ -8,7 +8,7 @@ final class PhabricatorAWSConfigOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDescription() {
|
public function getDescription() {
|
||||||
return pht('Configure integration with AWS (EC2, SES, S3, etc).');
|
return pht('Configure integration with AWS (EC2, SES, S3, etc.).');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getIcon() {
|
public function getIcon() {
|
||||||
|
|
|
@ -65,8 +65,8 @@ abstract class PhabricatorApplicationConfigOptions extends Phobject {
|
||||||
* or other context. For example, this is used to show workspace IDs when
|
* or other context. For example, this is used to show workspace IDs when
|
||||||
* configuring `asana.workspace-id`.
|
* configuring `asana.workspace-id`.
|
||||||
*
|
*
|
||||||
* @param PhabricatorConfigOption Option being rendered.
|
* @param PhabricatorConfigOption $option Option being rendered.
|
||||||
* @param AphrontRequest Active request.
|
* @param AphrontRequest $request Active request.
|
||||||
* @return wild Additional contextual description
|
* @return wild Additional contextual description
|
||||||
* information.
|
* information.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -79,6 +79,30 @@ final class ConpherenceUpdateController
|
||||||
$user,
|
$user,
|
||||||
$conpherence,
|
$conpherence,
|
||||||
$message);
|
$message);
|
||||||
|
|
||||||
|
$xaction_comment = PhabricatorTransactions::findOneByType(
|
||||||
|
$xactions,
|
||||||
|
PhabricatorTransactions::TYPE_COMMENT);
|
||||||
|
|
||||||
|
$text_metadata = $request->getStr('text_metadata');
|
||||||
|
if ($text_metadata) {
|
||||||
|
$text_metadata = phutil_json_decode($text_metadata);
|
||||||
|
$attached_file_phids = idx(
|
||||||
|
$text_metadata,
|
||||||
|
'attachedFilePHIDs',
|
||||||
|
array());
|
||||||
|
|
||||||
|
if ($attached_file_phids) {
|
||||||
|
$metadata_object = array(
|
||||||
|
'remarkup.control' => array(
|
||||||
|
'attachedFilePHIDs' => $attached_file_phids,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
$xaction_comment->setMetadata($metadata_object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$delete_draft = true;
|
$delete_draft = true;
|
||||||
} else {
|
} else {
|
||||||
$action = ConpherenceUpdateActions::LOAD;
|
$action = ConpherenceUpdateActions::LOAD;
|
||||||
|
|
|
@ -472,23 +472,4 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildStatusText() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function buildSendButton() {
|
|
||||||
$conpherence = $this->getSelectedConpherence();
|
|
||||||
if (!$conpherence) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return javelin_tag(
|
|
||||||
'button',
|
|
||||||
array(
|
|
||||||
'class' => 'grey',
|
|
||||||
'sigil' => 'conpherence-send-message',
|
|
||||||
),
|
|
||||||
pht('Send'));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ abstract class PhabricatorDaemonController
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildApplicationMenu() {
|
public function buildApplicationMenu() {
|
||||||
return $this->buildSideNavView(true)->getMenu();
|
return $this->buildSideNavView()->getMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function buildSideNavView() {
|
protected function buildSideNavView() {
|
||||||
|
|
|
@ -48,23 +48,4 @@ final class PhabricatorDashboardPanelListController
|
||||||
return $crumbs;
|
return $crumbs;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getNewUserBody() {
|
|
||||||
$create_button = id(new PHUIButtonView())
|
|
||||||
->setTag('a')
|
|
||||||
->setText(pht('Create a Panel'))
|
|
||||||
->setHref('/dashboard/panel/edit/')
|
|
||||||
->setColor(PHUIButtonView::GREEN);
|
|
||||||
|
|
||||||
$icon = $this->getApplication()->getIcon();
|
|
||||||
$app_name = $this->getApplication()->getName();
|
|
||||||
$view = id(new PHUIBigInfoView())
|
|
||||||
->setIcon($icon)
|
|
||||||
->setTitle(pht('Welcome to %s', $app_name))
|
|
||||||
->setDescription(
|
|
||||||
pht('Build individual panels to display on your homepage dashboard.'))
|
|
||||||
->addAction($create_button);
|
|
||||||
|
|
||||||
return $view;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ final class PhabricatorDashboardQueryPanelQueryEditField
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($value) && !$seen) {
|
if (phutil_nonempty_string($value) && !$seen) {
|
||||||
$name = pht('Custom Query ("%s")', $value);
|
$name = pht('Custom Query ("%s")', $value);
|
||||||
} else {
|
} else {
|
||||||
$name = pht('(None)');
|
$name = pht('(None)');
|
||||||
|
@ -56,7 +56,7 @@ final class PhabricatorDashboardQueryPanelQueryEditField
|
||||||
'queryID' => $control_id,
|
'queryID' => $control_id,
|
||||||
'options' => $queries,
|
'options' => $queries,
|
||||||
'value' => array(
|
'value' => array(
|
||||||
'key' => strlen($value) ? $value : null,
|
'key' => phutil_nonempty_string($value) ? $value : null,
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
|
@ -427,7 +427,7 @@ final class PhabricatorDashboardPanelRenderingEngine extends Phobject {
|
||||||
* panel. Generally, all of this stuff is ridiculous and we just want to
|
* panel. Generally, all of this stuff is ridiculous and we just want to
|
||||||
* shut it down.
|
* shut it down.
|
||||||
*
|
*
|
||||||
* @param PhabricatorDashboardPanel Panel being rendered.
|
* @param PhabricatorDashboardPanel $panel Panel being rendered.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function detectRenderingCycle(PhabricatorDashboardPanel $panel) {
|
private function detectRenderingCycle(PhabricatorDashboardPanel $panel) {
|
||||||
|
|
|
@ -41,7 +41,7 @@ final class PhabricatorDashboardPortalProfileMenuEngine
|
||||||
pht('New Portal'),
|
pht('New Portal'),
|
||||||
pht('Use "Edit Menu" to add menu items to this portal.'));
|
pht('Use "Edit Menu" to add menu items to this portal.'));
|
||||||
} else {
|
} else {
|
||||||
return $this->newEmptyValue(
|
return $this->newNoContentView(
|
||||||
pht('No Portal Content'),
|
pht('No Portal Content'),
|
||||||
pht(
|
pht(
|
||||||
'None of the visible menu items in this portal can render any '.
|
'None of the visible menu items in this portal can render any '.
|
||||||
|
|
|
@ -31,7 +31,7 @@ final class PhabricatorDashboardPortalMenuItem
|
||||||
PhabricatorProfileMenuItemConfiguration $config) {
|
PhabricatorProfileMenuItemConfiguration $config) {
|
||||||
$name = $config->getMenuItemProperty('name');
|
$name = $config->getMenuItemProperty('name');
|
||||||
|
|
||||||
if (strlen($name)) {
|
if (phutil_nonempty_string($name)) {
|
||||||
return $name;
|
return $name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,4 +147,22 @@ final class PhabricatorDashboardPanelSearchEngine
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getNewUserBody() {
|
||||||
|
$create_button = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('Create a Panel'))
|
||||||
|
->setHref('/dashboard/panel/edit/')
|
||||||
|
->setColor(PHUIButtonView::GREEN);
|
||||||
|
|
||||||
|
$app_name = pht('Panels');
|
||||||
|
$view = id(new PHUIBigInfoView())
|
||||||
|
->setIcon('fa-line-chart')
|
||||||
|
->setTitle(pht('Welcome to %s', $app_name))
|
||||||
|
->setDescription(
|
||||||
|
pht('Build individual panels to display on your homepage dashboard.'))
|
||||||
|
->addAction($create_button);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ final class DifferentialReviewerStatus extends Phobject {
|
||||||
* will attempt to update you to both "commented" and "accepted". We want
|
* will attempt to update you to both "commented" and "accepted". We want
|
||||||
* "accepted" to win, because it's the stronger of the two.
|
* "accepted" to win, because it's the stronger of the two.
|
||||||
*
|
*
|
||||||
* @param const Reviewer status constant.
|
* @param const $constant Reviewer status constant.
|
||||||
* @return int Relative strength (higher is stronger).
|
* @return int Relative strength (higher is stronger).
|
||||||
*/
|
*/
|
||||||
public static function getStatusStrength($constant) {
|
public static function getStatusStrength($constant) {
|
||||||
|
|
|
@ -63,4 +63,16 @@ final class DifferentialRepositoryField
|
||||||
$repository->getMonogram().' '.$repository->getName());
|
$repository->getMonogram().' '.$repository->getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function shouldAppearInListView() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function renderOnListItem(PHUIObjectItemView $view) {
|
||||||
|
if ($this->getValue()) {
|
||||||
|
$handle = $this->getViewer()->renderHandle($this->getValue());
|
||||||
|
$view->addByLine(pht('Repository: %s', $handle));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,12 +240,12 @@ final class DifferentialChangesetParser extends Phobject {
|
||||||
* the left and right halves of the displayed diff to be correctly mapped to
|
* the left and right halves of the displayed diff to be correctly mapped to
|
||||||
* storage changesets.
|
* storage changesets.
|
||||||
*
|
*
|
||||||
* @param id The Differential Changeset ID that comments added to the right
|
* @param id $id The Differential Changeset ID that comments added to the
|
||||||
* side of the visible diff should be attached to.
|
* right side of the visible diff should be attached to.
|
||||||
* @param bool If true, attach new comments to the right side of the storage
|
* @param bool $is_new If true, attach new comments to the right side of the
|
||||||
* changeset. Note that this may be false, if the left side of
|
* storage changeset. Note that this may be false, if the left
|
||||||
* some storage changeset is being shown as the right side of
|
* side of some storage changeset is being shown as the right
|
||||||
* a display diff.
|
* side of a display diff.
|
||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public function setRightSideCommentMapping($id, $is_new) {
|
public function setRightSideCommentMapping($id, $is_new) {
|
||||||
|
@ -295,7 +295,8 @@ final class DifferentialChangesetParser extends Phobject {
|
||||||
* By default, there is no render cache key and parsers do not use the cache.
|
* By default, there is no render cache key and parsers do not use the cache.
|
||||||
* This is appropriate for rarely-viewed changesets.
|
* This is appropriate for rarely-viewed changesets.
|
||||||
*
|
*
|
||||||
* @param string Key for identifying this changeset in the render cache.
|
* @param string $key Key for identifying this changeset in the render
|
||||||
|
* cache.
|
||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public function setRenderCacheKey($key) {
|
public function setRenderCacheKey($key) {
|
||||||
|
@ -1238,7 +1239,7 @@ final class DifferentialChangesetParser extends Phobject {
|
||||||
* taking into consideration which halves of which changesets will actually
|
* taking into consideration which halves of which changesets will actually
|
||||||
* be shown.
|
* be shown.
|
||||||
*
|
*
|
||||||
* @param PhabricatorInlineComment Comment to test for visibility.
|
* @param PhabricatorInlineComment $comment Comment to test for visibility.
|
||||||
* @return bool True if the comment is visible on the rendered diff.
|
* @return bool True if the comment is visible on the rendered diff.
|
||||||
*/
|
*/
|
||||||
private function isCommentVisibleOnRenderedDiff(
|
private function isCommentVisibleOnRenderedDiff(
|
||||||
|
@ -1266,7 +1267,7 @@ final class DifferentialChangesetParser extends Phobject {
|
||||||
* Note that the comment must appear somewhere on the rendered changeset, as
|
* Note that the comment must appear somewhere on the rendered changeset, as
|
||||||
* per isCommentVisibleOnRenderedDiff().
|
* per isCommentVisibleOnRenderedDiff().
|
||||||
*
|
*
|
||||||
* @param PhabricatorInlineComment Comment to test for display
|
* @param PhabricatorInlineComment $comment Comment to test for display
|
||||||
* location.
|
* location.
|
||||||
* @return bool True for right, false for left.
|
* @return bool True for right, false for left.
|
||||||
*/
|
*/
|
||||||
|
@ -1298,8 +1299,8 @@ final class DifferentialChangesetParser extends Phobject {
|
||||||
* list($start, $end, $mask) = $parsed;
|
* list($start, $end, $mask) = $parsed;
|
||||||
* $parser->render($start, $end, $mask);
|
* $parser->render($start, $end, $mask);
|
||||||
*
|
*
|
||||||
* @param string Range specification, indicating the range of the diff that
|
* @param string $spec Range specification, indicating the range of the diff
|
||||||
* should be rendered.
|
* that should be rendered.
|
||||||
* @return tuple List of <start, end, mask> suitable for passing to
|
* @return tuple List of <start, end, mask> suitable for passing to
|
||||||
* @{method:render}.
|
* @{method:render}.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -58,8 +58,8 @@ final class DifferentialLineAdjustmentMap extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Map a line across a change, or a series of changes.
|
* Map a line across a change, or a series of changes.
|
||||||
*
|
*
|
||||||
* @param int Line to map
|
* @param int $line Line to map
|
||||||
* @param bool True to map it as the end of a range.
|
* @param bool $is_end True to map it as the end of a range.
|
||||||
* @return wild Spooky magic.
|
* @return wild Spooky magic.
|
||||||
*/
|
*/
|
||||||
public function mapLine($line, $is_end) {
|
public function mapLine($line, $is_end) {
|
||||||
|
|
|
@ -45,7 +45,7 @@ final class DifferentialRevisionQuery
|
||||||
/**
|
/**
|
||||||
* Find revisions affecting one or more items in a list of paths.
|
* Find revisions affecting one or more items in a list of paths.
|
||||||
*
|
*
|
||||||
* @param list<string> List of file paths.
|
* @param list<string> $paths List of file paths.
|
||||||
* @return this
|
* @return this
|
||||||
* @task config
|
* @task config
|
||||||
*/
|
*/
|
||||||
|
@ -59,7 +59,7 @@ final class DifferentialRevisionQuery
|
||||||
* this function will clear anything set by previous calls to
|
* this function will clear anything set by previous calls to
|
||||||
* @{method:withAuthors}.
|
* @{method:withAuthors}.
|
||||||
*
|
*
|
||||||
* @param array List of PHIDs of authors
|
* @param array $author_phids List of PHIDs of authors
|
||||||
* @return this
|
* @return this
|
||||||
* @task config
|
* @task config
|
||||||
*/
|
*/
|
||||||
|
@ -72,7 +72,7 @@ final class DifferentialRevisionQuery
|
||||||
* Filter results to revisions which CC one of the listed people. Calling this
|
* Filter results to revisions which CC one of the listed people. Calling this
|
||||||
* function will clear anything set by previous calls to @{method:withCCs}.
|
* function will clear anything set by previous calls to @{method:withCCs}.
|
||||||
*
|
*
|
||||||
* @param array List of PHIDs of subscribers.
|
* @param array $cc_phids List of PHIDs of subscribers.
|
||||||
* @return this
|
* @return this
|
||||||
* @task config
|
* @task config
|
||||||
*/
|
*/
|
||||||
|
@ -86,7 +86,7 @@ final class DifferentialRevisionQuery
|
||||||
* reviewers. Calling this function will clear anything set by previous calls
|
* reviewers. Calling this function will clear anything set by previous calls
|
||||||
* to @{method:withReviewers}.
|
* to @{method:withReviewers}.
|
||||||
*
|
*
|
||||||
* @param array List of PHIDs of reviewers
|
* @param array $reviewer_phids List of PHIDs of reviewers
|
||||||
* @return this
|
* @return this
|
||||||
* @task config
|
* @task config
|
||||||
*/
|
*/
|
||||||
|
@ -124,7 +124,7 @@ final class DifferentialRevisionQuery
|
||||||
* Calling this function will clear anything set by previous calls to
|
* Calling this function will clear anything set by previous calls to
|
||||||
* @{method:withCommitHashes}.
|
* @{method:withCommitHashes}.
|
||||||
*
|
*
|
||||||
* @param array List of pairs <Class
|
* @param array $commit_hashes List of pairs <Class
|
||||||
* ArcanistDifferentialRevisionHash::HASH_$type constant,
|
* ArcanistDifferentialRevisionHash::HASH_$type constant,
|
||||||
* hash>
|
* hash>
|
||||||
* @return this
|
* @return this
|
||||||
|
@ -149,7 +149,7 @@ final class DifferentialRevisionQuery
|
||||||
/**
|
/**
|
||||||
* Filter results to revisions on given branches.
|
* Filter results to revisions on given branches.
|
||||||
*
|
*
|
||||||
* @param list List of branch names.
|
* @param list $branches List of branch names.
|
||||||
* @return this
|
* @return this
|
||||||
* @task config
|
* @task config
|
||||||
*/
|
*/
|
||||||
|
@ -162,7 +162,7 @@ final class DifferentialRevisionQuery
|
||||||
/**
|
/**
|
||||||
* Filter results to only return revisions whose ids are in the given set.
|
* Filter results to only return revisions whose ids are in the given set.
|
||||||
*
|
*
|
||||||
* @param array List of revision ids
|
* @param array $ids List of revision ids
|
||||||
* @return this
|
* @return this
|
||||||
* @task config
|
* @task config
|
||||||
*/
|
*/
|
||||||
|
@ -175,7 +175,7 @@ final class DifferentialRevisionQuery
|
||||||
/**
|
/**
|
||||||
* Filter results to only return revisions whose PHIDs are in the given set.
|
* Filter results to only return revisions whose PHIDs are in the given set.
|
||||||
*
|
*
|
||||||
* @param array List of revision PHIDs
|
* @param array $phids List of revision PHIDs
|
||||||
* @return this
|
* @return this
|
||||||
* @task config
|
* @task config
|
||||||
*/
|
*/
|
||||||
|
@ -189,7 +189,7 @@ final class DifferentialRevisionQuery
|
||||||
* Given a set of users, filter results to return only revisions they are
|
* Given a set of users, filter results to return only revisions they are
|
||||||
* responsible for (i.e., they are either authors or reviewers).
|
* responsible for (i.e., they are either authors or reviewers).
|
||||||
*
|
*
|
||||||
* @param array List of user PHIDs.
|
* @param array $responsible_phids List of user PHIDs.
|
||||||
* @return this
|
* @return this
|
||||||
* @task config
|
* @task config
|
||||||
*/
|
*/
|
||||||
|
@ -221,7 +221,7 @@ final class DifferentialRevisionQuery
|
||||||
* Set whether or not the query should load the active diff for each
|
* Set whether or not the query should load the active diff for each
|
||||||
* revision.
|
* revision.
|
||||||
*
|
*
|
||||||
* @param bool True to load and attach diffs.
|
* @param bool $need_active_diffs True to load and attach diffs.
|
||||||
* @return this
|
* @return this
|
||||||
* @task config
|
* @task config
|
||||||
*/
|
*/
|
||||||
|
@ -235,7 +235,7 @@ final class DifferentialRevisionQuery
|
||||||
* Set whether or not the query should load the associated commit PHIDs for
|
* Set whether or not the query should load the associated commit PHIDs for
|
||||||
* each revision.
|
* each revision.
|
||||||
*
|
*
|
||||||
* @param bool True to load and attach diffs.
|
* @param bool $need_commit_phids True to load and attach diffs.
|
||||||
* @return this
|
* @return this
|
||||||
* @task config
|
* @task config
|
||||||
*/
|
*/
|
||||||
|
@ -249,7 +249,7 @@ final class DifferentialRevisionQuery
|
||||||
* Set whether or not the query should load associated diff IDs for each
|
* Set whether or not the query should load associated diff IDs for each
|
||||||
* revision.
|
* revision.
|
||||||
*
|
*
|
||||||
* @param bool True to load and attach diff IDs.
|
* @param bool $need_diff_ids True to load and attach diff IDs.
|
||||||
* @return this
|
* @return this
|
||||||
* @task config
|
* @task config
|
||||||
*/
|
*/
|
||||||
|
@ -263,7 +263,7 @@ final class DifferentialRevisionQuery
|
||||||
* Set whether or not the query should load associated commit hashes for each
|
* Set whether or not the query should load associated commit hashes for each
|
||||||
* revision.
|
* revision.
|
||||||
*
|
*
|
||||||
* @param bool True to load and attach commit hashes.
|
* @param bool $need_hashes True to load and attach commit hashes.
|
||||||
* @return this
|
* @return this
|
||||||
* @task config
|
* @task config
|
||||||
*/
|
*/
|
||||||
|
@ -276,7 +276,7 @@ final class DifferentialRevisionQuery
|
||||||
/**
|
/**
|
||||||
* Set whether or not the query should load associated reviewers.
|
* Set whether or not the query should load associated reviewers.
|
||||||
*
|
*
|
||||||
* @param bool True to load and attach reviewers.
|
* @param bool $need_reviewers True to load and attach reviewers.
|
||||||
* @return this
|
* @return this
|
||||||
* @task config
|
* @task config
|
||||||
*/
|
*/
|
||||||
|
@ -291,7 +291,7 @@ final class DifferentialRevisionQuery
|
||||||
* reviewer. In particular, they have authority to act on behalf of projects
|
* reviewer. In particular, they have authority to act on behalf of projects
|
||||||
* they are a member of.
|
* they are a member of.
|
||||||
*
|
*
|
||||||
* @param bool True to load and attach authority.
|
* @param bool $need_reviewer_authority True to load and attach authority.
|
||||||
* @return this
|
* @return this
|
||||||
* @task config
|
* @task config
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -199,6 +199,10 @@ final class DifferentialRevisionSearchEngine
|
||||||
|
|
||||||
$unlanded = $this->loadUnlandedDependencies($revisions);
|
$unlanded = $this->loadUnlandedDependencies($revisions);
|
||||||
|
|
||||||
|
$custom_field_lists = $this->loadCustomFields(
|
||||||
|
$revisions,
|
||||||
|
PhabricatorCustomField::ROLE_LIST);
|
||||||
|
|
||||||
$views = array();
|
$views = array();
|
||||||
if ($bucket) {
|
if ($bucket) {
|
||||||
$bucket->setViewer($viewer);
|
$bucket->setViewer($viewer);
|
||||||
|
@ -231,6 +235,7 @@ final class DifferentialRevisionSearchEngine
|
||||||
|
|
||||||
foreach ($views as $view) {
|
foreach ($views as $view) {
|
||||||
$view->setUnlandedDependencies($unlanded);
|
$view->setUnlandedDependencies($unlanded);
|
||||||
|
$view->setCustomFieldLists($custom_field_lists);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($views) == 1) {
|
if (count($views) == 1) {
|
||||||
|
|
|
@ -491,9 +491,10 @@ abstract class DifferentialChangesetHTMLRenderer
|
||||||
/**
|
/**
|
||||||
* Build links which users can click to show more context in a changeset.
|
* Build links which users can click to show more context in a changeset.
|
||||||
*
|
*
|
||||||
* @param int Beginning of the line range to build links for.
|
* @param int $top Beginning of the line range to build links for.
|
||||||
* @param int Length of the line range to build links for.
|
* @param int $len Length of the line range to build links for.
|
||||||
* @param int Total number of lines in the changeset.
|
* @param int $changeset_length Total number of lines in the changeset.
|
||||||
|
* @param bool? $is_blocks
|
||||||
* @return markup Rendered links.
|
* @return markup Rendered links.
|
||||||
*/
|
*/
|
||||||
protected function renderShowContextLinks(
|
protected function renderShowContextLinks(
|
||||||
|
@ -580,9 +581,9 @@ abstract class DifferentialChangesetHTMLRenderer
|
||||||
*
|
*
|
||||||
* See @{method:renderShowContextLinks}.
|
* See @{method:renderShowContextLinks}.
|
||||||
*
|
*
|
||||||
* @param bool Does this link show all context when clicked?
|
* @param bool $is_all Does this link show all context when clicked?
|
||||||
* @param string Range specification for lines to show.
|
* @param string $range Range specification for lines to show.
|
||||||
* @param string Text of the link.
|
* @param string $text Text of the link.
|
||||||
* @return markup Rendered link.
|
* @return markup Rendered link.
|
||||||
*/
|
*/
|
||||||
private function renderShowContextLink($is_all, $range, $text) {
|
private function renderShowContextLink($is_all, $range, $text) {
|
||||||
|
|
|
@ -442,8 +442,8 @@ abstract class DifferentialChangesetRenderer extends Phobject {
|
||||||
* when a file is not changed.
|
* when a file is not changed.
|
||||||
* - `"none"`: Don't show the link (e.g., text not available).
|
* - `"none"`: Don't show the link (e.g., text not available).
|
||||||
*
|
*
|
||||||
* @param string Message explaining why the diff is hidden.
|
* @param string $message Message explaining why the diff is hidden.
|
||||||
* @param string|null Force mode, see above.
|
* @param string|null $force Force mode, see above.
|
||||||
* @return string Shield markup.
|
* @return string Shield markup.
|
||||||
*/
|
*/
|
||||||
abstract public function renderShield($message, $force = 'default');
|
abstract public function renderShield($message, $force = 'default');
|
||||||
|
|
|
@ -213,7 +213,7 @@ final class DifferentialChangeset
|
||||||
* Test if this changeset and some other changeset put the affected file in
|
* Test if this changeset and some other changeset put the affected file in
|
||||||
* the same state.
|
* the same state.
|
||||||
*
|
*
|
||||||
* @param DifferentialChangeset Changeset to compare against.
|
* @param DifferentialChangeset $other Changeset to compare against.
|
||||||
* @return bool True if the two changesets have the same effect.
|
* @return bool True if the two changesets have the same effect.
|
||||||
*/
|
*/
|
||||||
public function hasSameEffectAs(DifferentialChangeset $other) {
|
public function hasSameEffectAs(DifferentialChangeset $other) {
|
||||||
|
|
|
@ -28,8 +28,12 @@ final class DifferentialResponsibleViewerFunctionDatasource
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function isFunctionWithLoginRequired($function) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public function loadResults() {
|
public function loadResults() {
|
||||||
if ($this->getViewer()->getPHID()) {
|
if ($this->getViewer()->isLoggedIn()) {
|
||||||
$results = array($this->renderViewerFunctionToken());
|
$results = array($this->renderViewerFunctionToken());
|
||||||
} else {
|
} else {
|
||||||
$results = array();
|
$results = array();
|
||||||
|
@ -39,7 +43,7 @@ final class DifferentialResponsibleViewerFunctionDatasource
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function canEvaluateFunction($function) {
|
protected function canEvaluateFunction($function) {
|
||||||
if (!$this->getViewer()->getPHID()) {
|
if (!$this->getViewer()->isLoggedIn()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -233,6 +233,22 @@ final class DifferentialChangesetDetailView extends AphrontView {
|
||||||
$show_directory_uri = phutil_string_cast($show_directory_uri);
|
$show_directory_uri = phutil_string_cast($show_directory_uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Javelin::initBehavior('phabricator-clipboard-copy');
|
||||||
|
$path_copy_button = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setColor(PHUIButtonView::GREY)
|
||||||
|
->setIcon('fa-clipboard')
|
||||||
|
->setHref('#')
|
||||||
|
->addSigil('clipboard-copy')
|
||||||
|
->addSigil('has-tooltip')
|
||||||
|
->setMetadata(
|
||||||
|
array(
|
||||||
|
'tip' => pht('Copy file path'),
|
||||||
|
'text' => $display_filename,
|
||||||
|
'successMessage' => pht('File path copied.'),
|
||||||
|
'errorMessage' => pht('Copy of file path failed.'),
|
||||||
|
));
|
||||||
|
|
||||||
return javelin_tag(
|
return javelin_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
|
@ -278,7 +294,16 @@ final class DifferentialChangesetDetailView extends AphrontView {
|
||||||
'sigil' => 'changeset-header',
|
'sigil' => 'changeset-header',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
$icon,
|
javelin_tag(
|
||||||
|
'span',
|
||||||
|
array(
|
||||||
|
'class' => 'differential-changeset-path-copy-button',
|
||||||
|
'meta' => array(
|
||||||
|
'selectID' => $display_filename,
|
||||||
|
'once' => true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
$path_copy_button),
|
||||||
javelin_tag(
|
javelin_tag(
|
||||||
'span',
|
'span',
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -11,6 +11,7 @@ final class DifferentialRevisionListView extends AphrontView {
|
||||||
private $noBox;
|
private $noBox;
|
||||||
private $background = null;
|
private $background = null;
|
||||||
private $unlandedDependencies = array();
|
private $unlandedDependencies = array();
|
||||||
|
private $customFieldLists = array();
|
||||||
|
|
||||||
public function setUnlandedDependencies(array $unlanded_dependencies) {
|
public function setUnlandedDependencies(array $unlanded_dependencies) {
|
||||||
$this->unlandedDependencies = $unlanded_dependencies;
|
$this->unlandedDependencies = $unlanded_dependencies;
|
||||||
|
@ -47,6 +48,11 @@ final class DifferentialRevisionListView extends AphrontView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setCustomFieldLists(array $lists) {
|
||||||
|
$this->customFieldLists = $lists;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function render() {
|
public function render() {
|
||||||
$viewer = $this->getViewer();
|
$viewer = $this->getViewer();
|
||||||
|
|
||||||
|
@ -181,6 +187,12 @@ final class DifferentialRevisionListView extends AphrontView {
|
||||||
"{$icon} {$color}",
|
"{$icon} {$color}",
|
||||||
$revision->getStatusDisplayName());
|
$revision->getStatusDisplayName());
|
||||||
|
|
||||||
|
$field_list = idx($this->customFieldLists, $revision->getPHID());
|
||||||
|
if ($field_list) {
|
||||||
|
$field_list
|
||||||
|
->addFieldsToListViewItem($revision, $viewer, $item);
|
||||||
|
}
|
||||||
|
|
||||||
$list->addItem($item);
|
$list->addItem($item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ final class DiffusionQueryPathsConduitAPIMethod
|
||||||
|
|
||||||
protected function getResult(ConduitAPIRequest $request) {
|
protected function getResult(ConduitAPIRequest $request) {
|
||||||
$results = parent::getResult($request);
|
$results = parent::getResult($request);
|
||||||
$offset = $request->getValue('offset');
|
$offset = $request->getValue('offset', 0);
|
||||||
return array_slice($results, $offset);
|
return array_slice($results, $offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ final class DiffusionSearchQueryConduitAPIMethod
|
||||||
throw $ex;
|
throw $ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
$offset = $request->getValue('offset');
|
$offset = $request->getValue('offset', 0);
|
||||||
$results = array_slice($results, $offset);
|
$results = array_slice($results, $offset);
|
||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
|
|
|
@ -624,6 +624,13 @@ final class DiffusionCommitController extends DiffusionController {
|
||||||
$author_view = $commit->newCommitAuthorView($viewer);
|
$author_view = $commit->newCommitAuthorView($viewer);
|
||||||
if ($author_view) {
|
if ($author_view) {
|
||||||
$author_date = $data->getAuthorEpoch();
|
$author_date = $data->getAuthorEpoch();
|
||||||
|
|
||||||
|
// Add support to Subversion commits that only have one date,
|
||||||
|
// since in SVN you cannot prepare local commits to push them later.
|
||||||
|
if ($author_date === null) {
|
||||||
|
$author_date = $commit->getEpoch();
|
||||||
|
}
|
||||||
|
|
||||||
$author_date = phabricator_datetime($author_date, $viewer);
|
$author_date = phabricator_datetime($author_date, $viewer);
|
||||||
|
|
||||||
$provenance_list->addItem(
|
$provenance_list->addItem(
|
||||||
|
|
|
@ -123,7 +123,7 @@ final class DiffusionBrowseResultSet extends Phobject {
|
||||||
* When a directory contains several README files, this function scores them
|
* When a directory contains several README files, this function scores them
|
||||||
* so the caller can select a preferred file. See @{method:getReadmePath}.
|
* so the caller can select a preferred file. See @{method:getReadmePath}.
|
||||||
*
|
*
|
||||||
* @param string Local README path, like "README.txt".
|
* @param string $path Local README path, like "README.txt".
|
||||||
* @return int Priority score, with higher being more preferred.
|
* @return int Priority score, with higher being more preferred.
|
||||||
*/
|
*/
|
||||||
public static function getReadmePriority($path) {
|
public static function getReadmePriority($path) {
|
||||||
|
|
|
@ -19,8 +19,9 @@ final class DiffusionGitBranch extends Phobject {
|
||||||
* 'master' => '99a9c082f9a1b68c7264e26b9e552484a5ae5f25',
|
* 'master' => '99a9c082f9a1b68c7264e26b9e552484a5ae5f25',
|
||||||
* );
|
* );
|
||||||
*
|
*
|
||||||
* @param string stdout of git branch command.
|
* @param string $stdout stdout of git branch command.
|
||||||
* @param string Filter branches to those on a specific remote.
|
* @param string? $only_this_remote Filter branches to those on a specific
|
||||||
|
* remote.
|
||||||
* @return map Map of 'branch' or 'remote/branch' to hash at HEAD.
|
* @return map Map of 'branch' or 'remote/branch' to hash at HEAD.
|
||||||
*/
|
*/
|
||||||
public static function parseRemoteBranchOutput(
|
public static function parseRemoteBranchOutput(
|
||||||
|
|
|
@ -58,7 +58,7 @@ final class DiffusionMercurialCommandEngine
|
||||||
* Sanitize output of an `hg` command invoked with the `--debug` flag to make
|
* Sanitize output of an `hg` command invoked with the `--debug` flag to make
|
||||||
* it usable.
|
* it usable.
|
||||||
*
|
*
|
||||||
* @param string Output from `hg --debug ...`
|
* @param string $stdout Output from `hg --debug ...`
|
||||||
* @return string Usable output.
|
* @return string Usable output.
|
||||||
*/
|
*/
|
||||||
public static function filterMercurialDebugOutput($stdout) {
|
public static function filterMercurialDebugOutput($stdout) {
|
||||||
|
|
|
@ -586,7 +586,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject {
|
||||||
'for %s seconds(s). This repository will be frozen.',
|
'for %s seconds(s). This repository will be frozen.',
|
||||||
$this->clusterWriteOwner,
|
$this->clusterWriteOwner,
|
||||||
$device->getName(),
|
$device->getName(),
|
||||||
$this->getDisplayName(),
|
$repository->getDisplayName(),
|
||||||
new PhutilNumber($duration)));
|
new PhutilNumber($duration)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,7 +252,7 @@ final class DiffusionCommitQuery
|
||||||
$table->getTableName());
|
$table->getTableName());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$subqueries) {
|
if (!$subqueries && $empty_exception) {
|
||||||
throw $empty_exception;
|
throw $empty_exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,11 +126,11 @@ final class DiffusionLowLevelCommitQuery
|
||||||
$head = $parts[6];
|
$head = $parts[6];
|
||||||
$tail = $parts[7];
|
$tail = $parts[7];
|
||||||
|
|
||||||
if (strlen($head) && strlen($tail)) {
|
if (phutil_nonempty_string($head) && phutil_nonempty_string($tail)) {
|
||||||
$body = $head."\n\n".$tail;
|
$body = $head."\n\n".$tail;
|
||||||
} else if (strlen($head)) {
|
} else if (phutil_nonempty_string($head)) {
|
||||||
$body = $head;
|
$body = $head;
|
||||||
} else if (strlen($tail)) {
|
} else if (phutil_nonempty_string($tail)) {
|
||||||
$body = $tail;
|
$body = $tail;
|
||||||
} else {
|
} else {
|
||||||
$body = '';
|
$body = '';
|
||||||
|
|
|
@ -42,7 +42,7 @@ final class DiffusionPathIDQuery extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Convert a path to the canonical, absolute representation used by Diffusion.
|
* Convert a path to the canonical, absolute representation used by Diffusion.
|
||||||
*
|
*
|
||||||
* @param string Some repository path.
|
* @param string $path Some repository path.
|
||||||
* @return string Canonicalized Diffusion path.
|
* @return string Canonicalized Diffusion path.
|
||||||
* @task pathutil
|
* @task pathutil
|
||||||
*/
|
*/
|
||||||
|
@ -62,7 +62,7 @@ final class DiffusionPathIDQuery extends Phobject {
|
||||||
* Return the canonical parent directory for a path. Note, returns "/" when
|
* Return the canonical parent directory for a path. Note, returns "/" when
|
||||||
* passed "/".
|
* passed "/".
|
||||||
*
|
*
|
||||||
* @param string Some repository path.
|
* @param string $path Some repository path.
|
||||||
* @return string That path's canonical parent directory.
|
* @return string That path's canonical parent directory.
|
||||||
* @task pathutil
|
* @task pathutil
|
||||||
*/
|
*/
|
||||||
|
@ -80,7 +80,7 @@ final class DiffusionPathIDQuery extends Phobject {
|
||||||
* Generate a list of parents for a repository path. The path itself is
|
* Generate a list of parents for a repository path. The path itself is
|
||||||
* included.
|
* included.
|
||||||
*
|
*
|
||||||
* @param string Some repository path.
|
* @param string $path Some repository path.
|
||||||
* @return list List of canonical paths between the path and the root.
|
* @return list List of canonical paths between the path and the root.
|
||||||
* @task pathutil
|
* @task pathutil
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -35,7 +35,7 @@ final class DiffusionGitRawDiffQuery extends DiffusionRawDiffQuery {
|
||||||
}
|
}
|
||||||
|
|
||||||
$path = $drequest->getPath();
|
$path = $drequest->getPath();
|
||||||
if (!strlen($path)) {
|
if (!phutil_nonempty_string($path)) {
|
||||||
$path = '.';
|
$path = '.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ abstract class DiffusionRequest extends Phobject {
|
||||||
* - `commit` Optional, commit identifier.
|
* - `commit` Optional, commit identifier.
|
||||||
* - `line` Optional, line range.
|
* - `line` Optional, line range.
|
||||||
*
|
*
|
||||||
* @param map See documentation.
|
* @param map $data See documentation.
|
||||||
* @return DiffusionRequest New request object.
|
* @return DiffusionRequest New request object.
|
||||||
* @task new
|
* @task new
|
||||||
*/
|
*/
|
||||||
|
@ -133,8 +133,9 @@ abstract class DiffusionRequest extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Internal. Use @{method:newFromDictionary}, not this method.
|
* Internal. Use @{method:newFromDictionary}, not this method.
|
||||||
*
|
*
|
||||||
* @param string Repository identifier.
|
* @param string $identifier Repository identifier.
|
||||||
* @param PhabricatorUser Viewing user.
|
* @param PhabricatorUser $viewer Viewing user.
|
||||||
|
* @param bool? $need_edit
|
||||||
* @return DiffusionRequest New request object.
|
* @return DiffusionRequest New request object.
|
||||||
* @task new
|
* @task new
|
||||||
*/
|
*/
|
||||||
|
@ -170,7 +171,7 @@ abstract class DiffusionRequest extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Internal. Use @{method:newFromDictionary}, not this method.
|
* Internal. Use @{method:newFromDictionary}, not this method.
|
||||||
*
|
*
|
||||||
* @param PhabricatorRepository Repository object.
|
* @param PhabricatorRepository $repository Repository object.
|
||||||
* @return DiffusionRequest New request object.
|
* @return DiffusionRequest New request object.
|
||||||
* @task new
|
* @task new
|
||||||
*/
|
*/
|
||||||
|
@ -201,7 +202,7 @@ abstract class DiffusionRequest extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Internal. Use @{method:newFromDictionary}, not this method.
|
* Internal. Use @{method:newFromDictionary}, not this method.
|
||||||
*
|
*
|
||||||
* @param map Map of parsed data.
|
* @param map $data Map of parsed data.
|
||||||
* @return void
|
* @return void
|
||||||
* @task new
|
* @task new
|
||||||
*/
|
*/
|
||||||
|
@ -294,7 +295,7 @@ abstract class DiffusionRequest extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Modify the request to move the symbolic commit elsewhere.
|
* Modify the request to move the symbolic commit elsewhere.
|
||||||
*
|
*
|
||||||
* @param string New symbolic commit.
|
* @param string $symbol New symbolic commit.
|
||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public function updateSymbolicCommit($symbol) {
|
public function updateSymbolicCommit($symbol) {
|
||||||
|
@ -464,8 +465,8 @@ abstract class DiffusionRequest extends Phobject {
|
||||||
*
|
*
|
||||||
* Parse the request URI into components.
|
* Parse the request URI into components.
|
||||||
*
|
*
|
||||||
* @param string URI blob.
|
* @param string $blob URI blob.
|
||||||
* @param bool True if this VCS supports branches.
|
* @param bool $supports_branches True if this VCS supports branches.
|
||||||
* @return map Parsed URI.
|
* @return map Parsed URI.
|
||||||
*
|
*
|
||||||
* @task uri
|
* @task uri
|
||||||
|
@ -535,7 +536,7 @@ abstract class DiffusionRequest extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Check that the working copy of the repository is present and readable.
|
* Check that the working copy of the repository is present and readable.
|
||||||
*
|
*
|
||||||
* @param string Path to the working copy.
|
* @param string $path Path to the working copy.
|
||||||
*/
|
*/
|
||||||
protected function validateWorkingCopy($path) {
|
protected function validateWorkingCopy($path) {
|
||||||
if (!is_readable(dirname($path))) {
|
if (!is_readable(dirname($path))) {
|
||||||
|
|
|
@ -26,7 +26,7 @@ final class DiffusionReadmeView extends DiffusionView {
|
||||||
/**
|
/**
|
||||||
* Get the markup language a README should be interpreted as.
|
* Get the markup language a README should be interpreted as.
|
||||||
*
|
*
|
||||||
* @param string Local README path, like "README.txt".
|
* @param string $path Local README path, like "README.txt".
|
||||||
* @return string Best markup interpreter (like "remarkup") for this file.
|
* @return string Best markup interpreter (like "remarkup") for this file.
|
||||||
*/
|
*/
|
||||||
private function getReadmeLanguage($path) {
|
private function getReadmeLanguage($path) {
|
||||||
|
|
|
@ -437,7 +437,7 @@ final class DivinerAtomController extends DivinerController {
|
||||||
$tasks = $symbol->getAtom()->getDocblockMetaValue('task');
|
$tasks = $symbol->getAtom()->getDocblockMetaValue('task');
|
||||||
|
|
||||||
if (!is_array($tasks)) {
|
if (!is_array($tasks)) {
|
||||||
if (strlen($tasks)) {
|
if (phutil_nonempty_string($tasks)) {
|
||||||
$tasks = array($tasks);
|
$tasks = array($tasks);
|
||||||
} else {
|
} else {
|
||||||
$tasks = array();
|
$tasks = array();
|
||||||
|
@ -446,7 +446,11 @@ final class DivinerAtomController extends DivinerController {
|
||||||
|
|
||||||
if ($tasks) {
|
if ($tasks) {
|
||||||
foreach ($tasks as $task) {
|
foreach ($tasks as $task) {
|
||||||
|
if (strpos($task, ' ') !== false) {
|
||||||
list($name, $title) = explode(' ', $task, 2);
|
list($name, $title) = explode(' ', $task, 2);
|
||||||
|
} else {
|
||||||
|
list($name, $title) = array($task, '');
|
||||||
|
}
|
||||||
$name = trim($name);
|
$name = trim($name);
|
||||||
$title = trim($title);
|
$title = trim($title);
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ final class DivinerFindController extends DivinerController {
|
||||||
}
|
}
|
||||||
|
|
||||||
$type = $request->getStr('type');
|
$type = $request->getStr('type');
|
||||||
if (strlen($type)) {
|
if (phutil_nonempty_string($type)) {
|
||||||
$query->withTypes(array($type));
|
$query->withTypes(array($type));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ final class DivinerAtomQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
* have been generated incorrectly by accident. In these cases, we can
|
* have been generated incorrectly by accident. In these cases, we can
|
||||||
* restore the original data.
|
* restore the original data.
|
||||||
*
|
*
|
||||||
* @param bool
|
* @param bool $ghosts
|
||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
public function withGhosts($ghosts) {
|
public function withGhosts($ghosts) {
|
||||||
|
@ -437,9 +437,10 @@ final class DivinerAtomQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
* children. When recursing, also walk up the tree and collect children of
|
* children. When recursing, also walk up the tree and collect children of
|
||||||
* atoms they extend.
|
* atoms they extend.
|
||||||
*
|
*
|
||||||
* @param list<DivinerLiveSymbol> List of symbols to collect child hashes of.
|
* @param list<DivinerLiveSymbol> $symbols List of symbols to collect child
|
||||||
* @param bool True to collect children of extended atoms,
|
* hashes of.
|
||||||
* as well.
|
* @param bool $recurse_up True to collect children of
|
||||||
|
* extended atoms, as well.
|
||||||
* @return map<string, string> Hashes of atoms' children.
|
* @return map<string, string> Hashes of atoms' children.
|
||||||
*/
|
*/
|
||||||
private function getAllChildHashes(array $symbols, $recurse_up) {
|
private function getAllChildHashes(array $symbols, $recurse_up) {
|
||||||
|
@ -469,9 +470,12 @@ final class DivinerAtomQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
||||||
* Attach child atoms to existing atoms. In recursive mode, also attach child
|
* Attach child atoms to existing atoms. In recursive mode, also attach child
|
||||||
* atoms to atoms that these atoms extend.
|
* atoms to atoms that these atoms extend.
|
||||||
*
|
*
|
||||||
* @param list<DivinerLiveSymbol> List of symbols to attach children to.
|
* @param list<DivinerLiveSymbol> $symbols List of symbols to attach children
|
||||||
* @param map<string, DivinerLiveSymbol> Map of symbols, keyed by node hash.
|
* to.
|
||||||
* @param bool True to attach children to extended atoms, as well.
|
* @param map<string, DivinerLiveSymbol> $children Map of symbols, keyed by
|
||||||
|
* node hash.
|
||||||
|
* @param bool $recurse_up True to attach children to extended atoms, as
|
||||||
|
* well.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function attachAllChildren(
|
private function attachAllChildren(
|
||||||
|
|
|
@ -31,7 +31,8 @@ abstract class DoorkeeperFeedStoryPublisher extends Phobject {
|
||||||
* JIRA issues which can have several linked revisions), it's generally
|
* JIRA issues which can have several linked revisions), it's generally
|
||||||
* more useful not to assume context.
|
* more useful not to assume context.
|
||||||
*
|
*
|
||||||
* @param bool True to assume object context when rendering.
|
* @param bool $render_with_implied_context True to assume object context
|
||||||
|
* when rendering.
|
||||||
* @return this
|
* @return this
|
||||||
* @task config
|
* @task config
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -60,11 +60,7 @@ final class DoorkeeperExternalObject extends DoorkeeperDAO
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getObjectKey() {
|
public function getObjectKey() {
|
||||||
$key = parent::getObjectKey();
|
return $this->getRef()->getObjectKey();
|
||||||
if ($key === null) {
|
|
||||||
$key = $this->getRef()->getObjectKey();
|
|
||||||
}
|
|
||||||
return $key;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRef() {
|
public function getRef() {
|
||||||
|
|
|
@ -63,9 +63,10 @@ abstract class DrydockBlueprintImplementation extends Phobject {
|
||||||
* This method should not acquire locks or expect anything to be locked. This
|
* This method should not acquire locks or expect anything to be locked. This
|
||||||
* is a coarse compatibility check between a lease and a resource.
|
* is a coarse compatibility check between a lease and a resource.
|
||||||
*
|
*
|
||||||
* @param DrydockBlueprint Concrete blueprint to allocate for.
|
* @param DrydockBlueprint $blueprint Concrete blueprint to allocate for.
|
||||||
* @param DrydockResource Candidate resource to allocate the lease on.
|
* @param DrydockResource $resource Candidate resource to allocate the lease
|
||||||
* @param DrydockLease Pending lease that wants to allocate here.
|
* on.
|
||||||
|
* @param DrydockLease $lease Pending lease that wants to allocate here.
|
||||||
* @return bool True if the resource and lease are compatible.
|
* @return bool True if the resource and lease are compatible.
|
||||||
* @task lease
|
* @task lease
|
||||||
*/
|
*/
|
||||||
|
@ -81,9 +82,9 @@ abstract class DrydockBlueprintImplementation extends Phobject {
|
||||||
*
|
*
|
||||||
* If acquisition fails, throw an exception.
|
* If acquisition fails, throw an exception.
|
||||||
*
|
*
|
||||||
* @param DrydockBlueprint Blueprint which built the resource.
|
* @param DrydockBlueprint $blueprint Blueprint which built the resource.
|
||||||
* @param DrydockResource Resource to acquire a lease on.
|
* @param DrydockResource $resource Resource to acquire a lease on.
|
||||||
* @param DrydockLease Requested lease.
|
* @param DrydockLease $lease Requested lease.
|
||||||
* @return void
|
* @return void
|
||||||
* @task lease
|
* @task lease
|
||||||
*/
|
*/
|
||||||
|
@ -111,9 +112,9 @@ abstract class DrydockBlueprintImplementation extends Phobject {
|
||||||
* This callback is primarily useful for automatically releasing resources
|
* This callback is primarily useful for automatically releasing resources
|
||||||
* once all leases are released.
|
* once all leases are released.
|
||||||
*
|
*
|
||||||
* @param DrydockBlueprint Blueprint which built the resource.
|
* @param DrydockBlueprint $blueprint Blueprint which built the resource.
|
||||||
* @param DrydockResource Resource a lease was released on.
|
* @param DrydockResource $resource Resource a lease was released on.
|
||||||
* @param DrydockLease Recently released lease.
|
* @param DrydockLease $lease Recently released lease.
|
||||||
* @return void
|
* @return void
|
||||||
* @task lease
|
* @task lease
|
||||||
*/
|
*/
|
||||||
|
@ -128,9 +129,9 @@ abstract class DrydockBlueprintImplementation extends Phobject {
|
||||||
*
|
*
|
||||||
* If a lease creates temporary state while held, destroy it here.
|
* If a lease creates temporary state while held, destroy it here.
|
||||||
*
|
*
|
||||||
* @param DrydockBlueprint Blueprint which built the resource.
|
* @param DrydockBlueprint $blueprint Blueprint which built the resource.
|
||||||
* @param DrydockResource Resource the lease is acquired on.
|
* @param DrydockResource $resource Resource the lease is acquired on.
|
||||||
* @param DrydockLease The lease being destroyed.
|
* @param DrydockLease $lease The lease being destroyed.
|
||||||
* @return void
|
* @return void
|
||||||
* @task lease
|
* @task lease
|
||||||
*/
|
*/
|
||||||
|
@ -156,11 +157,11 @@ abstract class DrydockBlueprintImplementation extends Phobject {
|
||||||
* has a flexible pool of expensive resources and you want to pack leases
|
* has a flexible pool of expensive resources and you want to pack leases
|
||||||
* onto them as tightly as possible.
|
* onto them as tightly as possible.
|
||||||
*
|
*
|
||||||
* @param DrydockBlueprint The blueprint for an existing resource being
|
* @param DrydockBlueprint $blueprint The blueprint for an existing resource
|
||||||
* acquired.
|
* being acquired.
|
||||||
* @param DrydockResource The resource being acquired, which we may want to
|
* @param DrydockResource $resource The resource being acquired, which we may
|
||||||
* build a supplemental resource for.
|
* want to build a supplemental resource for.
|
||||||
* @param DrydockLease The current lease performing acquisition.
|
* @param DrydockLease $lease The current lease performing acquisition.
|
||||||
* @return bool True to prefer allocating a supplemental resource.
|
* @return bool True to prefer allocating a supplemental resource.
|
||||||
*
|
*
|
||||||
* @task lease
|
* @task lease
|
||||||
|
@ -190,7 +191,7 @@ abstract class DrydockBlueprintImplementation extends Phobject {
|
||||||
* really exists, only if some blueprint may conceivably exist which could
|
* really exists, only if some blueprint may conceivably exist which could
|
||||||
* plausibly be able to build a suitable resource.
|
* plausibly be able to build a suitable resource.
|
||||||
*
|
*
|
||||||
* @param DrydockLease Requested lease.
|
* @param DrydockLease $lease Requested lease.
|
||||||
* @return bool True if some concrete blueprint of this implementation's
|
* @return bool True if some concrete blueprint of this implementation's
|
||||||
* type might ever be able to build a resource for the lease.
|
* type might ever be able to build a resource for the lease.
|
||||||
* @task resource
|
* @task resource
|
||||||
|
@ -211,9 +212,9 @@ abstract class DrydockBlueprintImplementation extends Phobject {
|
||||||
* if the blueprint as configured may, at some time, be able to build a
|
* if the blueprint as configured may, at some time, be able to build a
|
||||||
* suitable resource.
|
* suitable resource.
|
||||||
*
|
*
|
||||||
* @param DrydockBlueprint Blueprint which may be asked to allocate a
|
* @param DrydockBlueprint $blueprint Blueprint which may be asked to
|
||||||
* resource.
|
* allocate a resource.
|
||||||
* @param DrydockLease Requested lease.
|
* @param DrydockLease $lease Requested lease.
|
||||||
* @return bool True if this blueprint can eventually build a suitable
|
* @return bool True if this blueprint can eventually build a suitable
|
||||||
* resource for the lease, as currently configured.
|
* resource for the lease, as currently configured.
|
||||||
* @task resource
|
* @task resource
|
||||||
|
@ -240,9 +241,9 @@ abstract class DrydockBlueprintImplementation extends Phobject {
|
||||||
* eaten up free capacity by the time it actually tries to build a resource.
|
* eaten up free capacity by the time it actually tries to build a resource.
|
||||||
* This is normal and the allocator will recover from it.
|
* This is normal and the allocator will recover from it.
|
||||||
*
|
*
|
||||||
* @param DrydockBlueprint The blueprint which may be asked to allocate a
|
* @param DrydockBlueprint $blueprint The blueprint which may be asked to
|
||||||
* resource.
|
* allocate a resource.
|
||||||
* @param DrydockLease Requested lease.
|
* @param DrydockLease $lease Requested lease.
|
||||||
* @return bool True if this blueprint appears likely to be able to allocate
|
* @return bool True if this blueprint appears likely to be able to allocate
|
||||||
* a suitable resource.
|
* a suitable resource.
|
||||||
* @task resource
|
* @task resource
|
||||||
|
@ -260,8 +261,9 @@ abstract class DrydockBlueprintImplementation extends Phobject {
|
||||||
* called. Blueprints are entirely responsible for any lock handling they
|
* called. Blueprints are entirely responsible for any lock handling they
|
||||||
* need to perform.
|
* need to perform.
|
||||||
*
|
*
|
||||||
* @param DrydockBlueprint The blueprint which should allocate a resource.
|
* @param DrydockBlueprint $blueprint The blueprint which should allocate a
|
||||||
* @param DrydockLease Requested lease.
|
* resource.
|
||||||
|
* @param DrydockLease $lease Requested lease.
|
||||||
* @return DrydockResource Allocated resource.
|
* @return DrydockResource Allocated resource.
|
||||||
* @task resource
|
* @task resource
|
||||||
*/
|
*/
|
||||||
|
@ -287,8 +289,8 @@ abstract class DrydockBlueprintImplementation extends Phobject {
|
||||||
* here. For example, you might shut down a virtual host or destroy a working
|
* here. For example, you might shut down a virtual host or destroy a working
|
||||||
* copy on disk.
|
* copy on disk.
|
||||||
*
|
*
|
||||||
* @param DrydockBlueprint Blueprint which built the resource.
|
* @param DrydockBlueprint $blueprint Blueprint which built the resource.
|
||||||
* @param DrydockResource Resource being destroyed.
|
* @param DrydockResource $resource Resource being destroyed.
|
||||||
* @return void
|
* @return void
|
||||||
* @task resource
|
* @task resource
|
||||||
*/
|
*/
|
||||||
|
@ -300,8 +302,8 @@ abstract class DrydockBlueprintImplementation extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Get a human readable name for a resource.
|
* Get a human readable name for a resource.
|
||||||
*
|
*
|
||||||
* @param DrydockBlueprint Blueprint which built the resource.
|
* @param DrydockBlueprint $blueprint Blueprint which built the resource.
|
||||||
* @param DrydockResource Resource to get the name of.
|
* @param DrydockResource $resource Resource to get the name of.
|
||||||
* @return string Human-readable resource name.
|
* @return string Human-readable resource name.
|
||||||
* @task resource
|
* @task resource
|
||||||
*/
|
*/
|
||||||
|
@ -338,7 +340,7 @@ abstract class DrydockBlueprintImplementation extends Phobject {
|
||||||
* build a resource which can satisfy the lease. They may not be able to
|
* build a resource which can satisfy the lease. They may not be able to
|
||||||
* build that resource right now.
|
* build that resource right now.
|
||||||
*
|
*
|
||||||
* @param DrydockLease Requested lease.
|
* @param DrydockLease $lease Requested lease.
|
||||||
* @return list<DrydockBlueprintImplementation> List of qualifying blueprint
|
* @return list<DrydockBlueprintImplementation> List of qualifying blueprint
|
||||||
* implementations.
|
* implementations.
|
||||||
*/
|
*/
|
||||||
|
@ -429,7 +431,7 @@ abstract class DrydockBlueprintImplementation extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Get the effective concurrent resource limit for this blueprint.
|
* Get the effective concurrent resource limit for this blueprint.
|
||||||
*
|
*
|
||||||
* @param DrydockBlueprint Blueprint to get the limit for.
|
* @param DrydockBlueprint $blueprint Blueprint to get the limit for.
|
||||||
* @return int|null Limit, or `null` for no limit.
|
* @return int|null Limit, or `null` for no limit.
|
||||||
*/
|
*/
|
||||||
protected function getConcurrentResourceLimit(DrydockBlueprint $blueprint) {
|
protected function getConcurrentResourceLimit(DrydockBlueprint $blueprint) {
|
||||||
|
@ -500,7 +502,7 @@ abstract class DrydockBlueprintImplementation extends Phobject {
|
||||||
/**
|
/**
|
||||||
* Apply standard limits on resource allocation rate.
|
* Apply standard limits on resource allocation rate.
|
||||||
*
|
*
|
||||||
* @param DrydockBlueprint The blueprint requesting an allocation.
|
* @param DrydockBlueprint $blueprint The blueprint requesting an allocation.
|
||||||
* @return bool True if further allocations should be limited.
|
* @return bool True if further allocations should be limited.
|
||||||
*/
|
*/
|
||||||
protected function shouldLimitAllocatingPoolSize(
|
protected function shouldLimitAllocatingPoolSize(
|
||||||
|
|
|
@ -138,4 +138,32 @@ final class DrydockBlueprintSearchEngine
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getNewUserBody() {
|
||||||
|
$see_almanac_button = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('See Almanac services'))
|
||||||
|
->setHref('/almanac/service/');
|
||||||
|
|
||||||
|
$create_button = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('Create a Blueprint'))
|
||||||
|
->setHref('/drydock/blueprint/edit/')
|
||||||
|
->setIcon('fa-plus')
|
||||||
|
->setColor(PHUIButtonView::GREEN);
|
||||||
|
|
||||||
|
$app_name = pht('Blueprints');
|
||||||
|
$view = id(new PHUIBigInfoView())
|
||||||
|
->setIcon('fa-map-o')
|
||||||
|
->setTitle(pht('Welcome to %s', $app_name))
|
||||||
|
->setDescription(
|
||||||
|
pht(
|
||||||
|
'Blueprints allow to lease fresh working copies of repositories, '.
|
||||||
|
'on your Drydock devices, when needed by CI/CD workflows, and more. '.
|
||||||
|
'Blueprints lease services defined in your Almanac.'))
|
||||||
|
->addAction($see_almanac_button)
|
||||||
|
->addAction($create_button);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,10 +103,10 @@ final class DrydockAuthorization extends DrydockDAO
|
||||||
* Apply external authorization effects after a user changes the value of a
|
* Apply external authorization effects after a user changes the value of a
|
||||||
* blueprint selector control an object.
|
* blueprint selector control an object.
|
||||||
*
|
*
|
||||||
* @param PhabricatorUser User applying the change.
|
* @param PhabricatorUser $viewer User applying the change.
|
||||||
* @param phid Object PHID change is being applied to.
|
* @param phid $object_phid Object PHID change is being applied to.
|
||||||
* @param list<phid> Old blueprint PHIDs.
|
* @param list<phid> $old Old blueprint PHIDs.
|
||||||
* @param list<phid> New blueprint PHIDs.
|
* @param list<phid> $new New blueprint PHIDs.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function applyAuthorizationChanges(
|
public static function applyAuthorizationChanges(
|
||||||
|
|
|
@ -69,7 +69,7 @@ final class DrydockResource extends DrydockDAO
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCapability($key, $default = null) {
|
public function getCapability($key, $default = null) {
|
||||||
return idx($this->capbilities, $key, $default);
|
return idx($this->capabilities, $key, $default);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getInterface(DrydockLease $lease, $type) {
|
public function getInterface(DrydockLease $lease, $type) {
|
||||||
|
|
|
@ -43,7 +43,7 @@ final class DrydockSlotLock extends DrydockDAO {
|
||||||
/**
|
/**
|
||||||
* Load all locks held by a particular owner.
|
* Load all locks held by a particular owner.
|
||||||
*
|
*
|
||||||
* @param phid Owner PHID.
|
* @param phid $owner_phid Owner PHID.
|
||||||
* @return list<DrydockSlotLock> All held locks.
|
* @return list<DrydockSlotLock> All held locks.
|
||||||
* @task info
|
* @task info
|
||||||
*/
|
*/
|
||||||
|
@ -57,7 +57,7 @@ final class DrydockSlotLock extends DrydockDAO {
|
||||||
/**
|
/**
|
||||||
* Test if a lock is currently free.
|
* Test if a lock is currently free.
|
||||||
*
|
*
|
||||||
* @param string Lock key to test.
|
* @param string $lock Lock key to test.
|
||||||
* @return bool True if the lock is currently free.
|
* @return bool True if the lock is currently free.
|
||||||
* @task info
|
* @task info
|
||||||
*/
|
*/
|
||||||
|
@ -69,7 +69,7 @@ final class DrydockSlotLock extends DrydockDAO {
|
||||||
/**
|
/**
|
||||||
* Test if a list of locks are all currently free.
|
* Test if a list of locks are all currently free.
|
||||||
*
|
*
|
||||||
* @param list<string> List of lock keys to test.
|
* @param list<string> $locks List of lock keys to test.
|
||||||
* @return bool True if all locks are currently free.
|
* @return bool True if all locks are currently free.
|
||||||
* @task info
|
* @task info
|
||||||
*/
|
*/
|
||||||
|
@ -82,7 +82,7 @@ final class DrydockSlotLock extends DrydockDAO {
|
||||||
/**
|
/**
|
||||||
* Load named locks.
|
* Load named locks.
|
||||||
*
|
*
|
||||||
* @param list<string> List of lock keys to load.
|
* @param list<string> $locks List of lock keys to load.
|
||||||
* @return list<DrydockSlotLock> List of held locks.
|
* @return list<DrydockSlotLock> List of held locks.
|
||||||
* @task info
|
* @task info
|
||||||
*/
|
*/
|
||||||
|
@ -114,8 +114,8 @@ final class DrydockSlotLock extends DrydockDAO {
|
||||||
* This method either acquires all the locks or throws an exception (usually
|
* This method either acquires all the locks or throws an exception (usually
|
||||||
* because one or more locks are held).
|
* because one or more locks are held).
|
||||||
*
|
*
|
||||||
* @param phid Lock owner PHID.
|
* @param phid $owner_phid Lock owner PHID.
|
||||||
* @param list<string> List of locks to acquire.
|
* @param list<string> $locks List of locks to acquire.
|
||||||
* @return void
|
* @return void
|
||||||
* @task locks
|
* @task locks
|
||||||
*/
|
*/
|
||||||
|
@ -158,7 +158,7 @@ final class DrydockSlotLock extends DrydockDAO {
|
||||||
/**
|
/**
|
||||||
* Release all locks held by an owner.
|
* Release all locks held by an owner.
|
||||||
*
|
*
|
||||||
* @param phid Lock owner PHID.
|
* @param phid $owner_phid Lock owner PHID.
|
||||||
* @return void
|
* @return void
|
||||||
* @task locks
|
* @task locks
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -168,7 +168,7 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker {
|
||||||
* Find or build a resource which can satisfy a given lease request, then
|
* Find or build a resource which can satisfy a given lease request, then
|
||||||
* acquire the lease.
|
* acquire the lease.
|
||||||
*
|
*
|
||||||
* @param DrydockLease Requested lease.
|
* @param DrydockLease $lease Requested lease.
|
||||||
* @return void
|
* @return void
|
||||||
* @task allocator
|
* @task allocator
|
||||||
*/
|
*/
|
||||||
|
@ -573,7 +573,7 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker {
|
||||||
* Get all the concrete @{class:DrydockBlueprint}s which can possibly
|
* Get all the concrete @{class:DrydockBlueprint}s which can possibly
|
||||||
* build a resource to satisfy a lease.
|
* build a resource to satisfy a lease.
|
||||||
*
|
*
|
||||||
* @param DrydockLease Requested lease.
|
* @param DrydockLease $lease Requested lease.
|
||||||
* @return list<DrydockBlueprint> List of qualifying blueprints.
|
* @return list<DrydockBlueprint> List of qualifying blueprints.
|
||||||
* @task allocator
|
* @task allocator
|
||||||
*/
|
*/
|
||||||
|
@ -645,9 +645,9 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker {
|
||||||
* Load a list of all resources which a given lease can possibly be
|
* Load a list of all resources which a given lease can possibly be
|
||||||
* allocated against.
|
* allocated against.
|
||||||
*
|
*
|
||||||
* @param list<DrydockBlueprint> Blueprints which may produce suitable
|
* @param list<DrydockBlueprint> $blueprints Blueprints which may produce
|
||||||
* resources.
|
* suitable resources.
|
||||||
* @param DrydockLease Requested lease.
|
* @param DrydockLease $lease Requested lease.
|
||||||
* @return list<DrydockResource> Resources which may be able to allocate
|
* @return list<DrydockResource> Resources which may be able to allocate
|
||||||
* the lease.
|
* the lease.
|
||||||
* @task allocator
|
* @task allocator
|
||||||
|
@ -675,8 +675,8 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker {
|
||||||
/**
|
/**
|
||||||
* Remove resources which can not be acquired by a given lease from a list.
|
* Remove resources which can not be acquired by a given lease from a list.
|
||||||
*
|
*
|
||||||
* @param list<DrydockResource> Candidate resources.
|
* @param list<DrydockResource> $resources Candidate resources.
|
||||||
* @param DrydockLease Acquiring lease.
|
* @param DrydockLease $lease Acquiring lease.
|
||||||
* @return list<DrydockResource> Resources which the lease may be able to
|
* @return list<DrydockResource> Resources which the lease may be able to
|
||||||
* acquire.
|
* acquire.
|
||||||
* @task allocator
|
* @task allocator
|
||||||
|
@ -703,9 +703,9 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker {
|
||||||
* Remove blueprints which are too heavily allocated to build a resource for
|
* Remove blueprints which are too heavily allocated to build a resource for
|
||||||
* a lease from a list of blueprints.
|
* a lease from a list of blueprints.
|
||||||
*
|
*
|
||||||
* @param list<DrydockBlueprint> List of blueprints.
|
* @param list<DrydockBlueprint> $blueprints List of blueprints.
|
||||||
* @return list<DrydockBlueprint> List with blueprints that can not allocate
|
* @return list<DrydockBlueprint> $lease List with blueprints that can not
|
||||||
* a resource for the lease right now removed.
|
* allocate a resource for the lease right now removed.
|
||||||
* @task allocator
|
* @task allocator
|
||||||
*/
|
*/
|
||||||
private function removeOverallocatedBlueprints(
|
private function removeOverallocatedBlueprints(
|
||||||
|
@ -731,8 +731,8 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker {
|
||||||
* Rank blueprints by suitability for building a new resource for a
|
* Rank blueprints by suitability for building a new resource for a
|
||||||
* particular lease.
|
* particular lease.
|
||||||
*
|
*
|
||||||
* @param list<DrydockBlueprint> List of blueprints.
|
* @param list<DrydockBlueprint> $blueprints List of blueprints.
|
||||||
* @param DrydockLease Requested lease.
|
* @param DrydockLease $lease Requested lease.
|
||||||
* @return list<DrydockBlueprint> Ranked list of blueprints.
|
* @return list<DrydockBlueprint> Ranked list of blueprints.
|
||||||
* @task allocator
|
* @task allocator
|
||||||
*/
|
*/
|
||||||
|
@ -750,8 +750,8 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker {
|
||||||
/**
|
/**
|
||||||
* Rank resources by suitability for allocating a particular lease.
|
* Rank resources by suitability for allocating a particular lease.
|
||||||
*
|
*
|
||||||
* @param list<DrydockResource> List of resources.
|
* @param list<DrydockResource> $resources List of resources.
|
||||||
* @param DrydockLease Requested lease.
|
* @param DrydockLease $lease Requested lease.
|
||||||
* @return list<DrydockResource> Ranked list of resources.
|
* @return list<DrydockResource> Ranked list of resources.
|
||||||
* @task allocator
|
* @task allocator
|
||||||
*/
|
*/
|
||||||
|
@ -769,8 +769,9 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker {
|
||||||
/**
|
/**
|
||||||
* Perform an actual resource allocation with a particular blueprint.
|
* Perform an actual resource allocation with a particular blueprint.
|
||||||
*
|
*
|
||||||
* @param DrydockBlueprint The blueprint to allocate a resource from.
|
* @param DrydockBlueprint $blueprint The blueprint to allocate a resource
|
||||||
* @param DrydockLease Requested lease.
|
* from.
|
||||||
|
* @param DrydockLease $lease Requested lease.
|
||||||
* @return DrydockResource Allocated resource.
|
* @return DrydockResource Allocated resource.
|
||||||
* @task allocator
|
* @task allocator
|
||||||
*/
|
*/
|
||||||
|
@ -815,9 +816,10 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker {
|
||||||
* Check that the resource a blueprint allocated is roughly the sort of
|
* Check that the resource a blueprint allocated is roughly the sort of
|
||||||
* object we expect.
|
* object we expect.
|
||||||
*
|
*
|
||||||
* @param DrydockBlueprint Blueprint which built the resource.
|
* @param DrydockBlueprint $blueprint Blueprint which built the resource.
|
||||||
* @param wild Thing which the blueprint claims is a valid resource.
|
* @param wild $resource Thing which the blueprint claims is a valid
|
||||||
* @param DrydockLease Lease the resource was allocated for.
|
* resource.
|
||||||
|
* @param DrydockLease $lease Lease the resource was allocated for.
|
||||||
* @return void
|
* @return void
|
||||||
* @task allocator
|
* @task allocator
|
||||||
*/
|
*/
|
||||||
|
@ -899,8 +901,8 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker {
|
||||||
/**
|
/**
|
||||||
* Perform an actual lease acquisition on a particular resource.
|
* Perform an actual lease acquisition on a particular resource.
|
||||||
*
|
*
|
||||||
* @param DrydockResource Resource to acquire a lease on.
|
* @param DrydockResource $resource Resource to acquire a lease on.
|
||||||
* @param DrydockLease Lease to acquire.
|
* @param DrydockLease $lease Lease to acquire.
|
||||||
* @return void
|
* @return void
|
||||||
* @task acquire
|
* @task acquire
|
||||||
*/
|
*/
|
||||||
|
@ -931,9 +933,9 @@ final class DrydockLeaseUpdateWorker extends DrydockWorker {
|
||||||
/**
|
/**
|
||||||
* Make sure that a lease was really acquired properly.
|
* Make sure that a lease was really acquired properly.
|
||||||
*
|
*
|
||||||
* @param DrydockBlueprint Blueprint which created the resource.
|
* @param DrydockBlueprint $blueprint Blueprint which created the resource.
|
||||||
* @param DrydockResource Resource which was acquired.
|
* @param DrydockResource $resource Resource which was acquired.
|
||||||
* @param DrydockLease The lease which was supposedly acquired.
|
* @param DrydockLease $lease The lease which was supposedly acquired.
|
||||||
* @return void
|
* @return void
|
||||||
* @task acquire
|
* @task acquire
|
||||||
*/
|
*/
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue