mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-03 04:02:43 +01:00
(stable) Promote 2015 Week 47
This commit is contained in:
commit
4659bb6fe2
153 changed files with 3156 additions and 847 deletions
17
.arclint
17
.arclint
|
@ -57,13 +57,6 @@
|
||||||
"type": "phutil-library",
|
"type": "phutil-library",
|
||||||
"include": "(\\.php$)"
|
"include": "(\\.php$)"
|
||||||
},
|
},
|
||||||
"phutil-xhpast": {
|
|
||||||
"type": "phutil-xhpast",
|
|
||||||
"include": "(\\.php$)",
|
|
||||||
"phutil-xhpast.deprecated.functions": {
|
|
||||||
"phutil_escape_html": "The phutil_escape_html() function is deprecated. Raw strings passed to phutil_tag() or hsprintf() are escaped automatically."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"spelling": {
|
"spelling": {
|
||||||
"type": "spelling"
|
"type": "spelling"
|
||||||
},
|
},
|
||||||
|
@ -73,15 +66,7 @@
|
||||||
"xhpast": {
|
"xhpast": {
|
||||||
"type": "xhpast",
|
"type": "xhpast",
|
||||||
"include": "(\\.php$)",
|
"include": "(\\.php$)",
|
||||||
"severity": {
|
"standard": "phutil.xhpast"
|
||||||
"16": "advice",
|
|
||||||
"34": "error"
|
|
||||||
},
|
|
||||||
"xhpast.blacklisted.function": {
|
|
||||||
"eval": "The eval() function should be avoided. It is potentially unsafe and makes debugging more difficult."
|
|
||||||
},
|
|
||||||
"xhpast.php-version": "5.2.3",
|
|
||||||
"xhpast.php-version.windows": "5.3.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
return array(
|
return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'core.pkg.css' => 'e94665e4',
|
'core.pkg.css' => 'e4f1ea81',
|
||||||
'core.pkg.js' => '47dc9ebb',
|
'core.pkg.js' => '47dc9ebb',
|
||||||
'darkconsole.pkg.js' => 'e7393ebb',
|
'darkconsole.pkg.js' => 'e7393ebb',
|
||||||
'differential.pkg.css' => '2de124c9',
|
'differential.pkg.css' => '2de124c9',
|
||||||
|
@ -125,8 +125,8 @@ return array(
|
||||||
'rsrc/css/phui/phui-badge.css' => 'f25c3476',
|
'rsrc/css/phui/phui-badge.css' => 'f25c3476',
|
||||||
'rsrc/css/phui/phui-box.css' => 'a5bb366d',
|
'rsrc/css/phui/phui-box.css' => 'a5bb366d',
|
||||||
'rsrc/css/phui/phui-button.css' => '16020a60',
|
'rsrc/css/phui/phui-button.css' => '16020a60',
|
||||||
'rsrc/css/phui/phui-crumbs-view.css' => 'd842f867',
|
'rsrc/css/phui/phui-crumbs-view.css' => '414406b5',
|
||||||
'rsrc/css/phui/phui-document-pro.css' => '4f2b42e3',
|
'rsrc/css/phui/phui-document-pro.css' => '7f3009ce',
|
||||||
'rsrc/css/phui/phui-document.css' => 'f841ad0a',
|
'rsrc/css/phui/phui-document.css' => 'f841ad0a',
|
||||||
'rsrc/css/phui/phui-feed-story.css' => 'b7b26d23',
|
'rsrc/css/phui/phui-feed-story.css' => 'b7b26d23',
|
||||||
'rsrc/css/phui/phui-fontkit.css' => 'c9d63950',
|
'rsrc/css/phui/phui-fontkit.css' => 'c9d63950',
|
||||||
|
@ -779,9 +779,9 @@ return array(
|
||||||
'phui-calendar-day-css' => 'd1cf6f93',
|
'phui-calendar-day-css' => 'd1cf6f93',
|
||||||
'phui-calendar-list-css' => 'c1c7f338',
|
'phui-calendar-list-css' => 'c1c7f338',
|
||||||
'phui-calendar-month-css' => '476be7e0',
|
'phui-calendar-month-css' => '476be7e0',
|
||||||
'phui-crumbs-view-css' => 'd842f867',
|
'phui-crumbs-view-css' => '414406b5',
|
||||||
'phui-document-view-css' => 'f841ad0a',
|
'phui-document-view-css' => 'f841ad0a',
|
||||||
'phui-document-view-pro-css' => '4f2b42e3',
|
'phui-document-view-pro-css' => '7f3009ce',
|
||||||
'phui-feed-story-css' => 'b7b26d23',
|
'phui-feed-story-css' => 'b7b26d23',
|
||||||
'phui-font-icon-base-css' => 'ecbbb4c2',
|
'phui-font-icon-base-css' => 'ecbbb4c2',
|
||||||
'phui-fontkit-css' => 'c9d63950',
|
'phui-fontkit-css' => 'c9d63950',
|
||||||
|
|
17
resources/sql/autopatches/20151106.editengine.1.table.sql
Normal file
17
resources/sql/autopatches/20151106.editengine.1.table.sql
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
CREATE TABLE {$NAMESPACE}_search.search_editengineconfiguration (
|
||||||
|
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
phid VARBINARY(64) NOT NULL,
|
||||||
|
engineKey VARCHAR(64) NOT NULL COLLATE {$COLLATE_TEXT},
|
||||||
|
builtinKey VARCHAR(64) COLLATE {$COLLATE_TEXT},
|
||||||
|
name VARCHAR(255) NOT NULL COLLATE {$COLLATE_TEXT},
|
||||||
|
viewPolicy VARBINARY(64) NOT NULL,
|
||||||
|
editPolicy VARBINARY(64) NOT NULL,
|
||||||
|
properties LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT},
|
||||||
|
isDisabled BOOL NOT NULL DEFAULT 0,
|
||||||
|
isDefault BOOL NOT NULL DEFAULT 0,
|
||||||
|
dateCreated INT UNSIGNED NOT NULL,
|
||||||
|
dateModified INT UNSIGNED NOT NULL,
|
||||||
|
UNIQUE KEY `key_phid` (phid),
|
||||||
|
UNIQUE KEY `key_engine` (engineKey, builtinKey),
|
||||||
|
KEY `key_default` (engineKey, isDefault, isDisabled)
|
||||||
|
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
|
19
resources/sql/autopatches/20151106.editengine.2.xactions.sql
Normal file
19
resources/sql/autopatches/20151106.editengine.2.xactions.sql
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
CREATE TABLE {$NAMESPACE}_search.search_editengineconfigurationtransaction (
|
||||||
|
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
phid VARBINARY(64) NOT NULL,
|
||||||
|
authorPHID VARBINARY(64) NOT NULL,
|
||||||
|
objectPHID VARBINARY(64) NOT NULL,
|
||||||
|
viewPolicy VARBINARY(64) NOT NULL,
|
||||||
|
editPolicy VARBINARY(64) NOT NULL,
|
||||||
|
commentPHID VARBINARY(64) DEFAULT NULL,
|
||||||
|
commentVersion INT UNSIGNED NOT NULL,
|
||||||
|
transactionType VARCHAR(32) COLLATE {$COLLATE_TEXT} NOT NULL,
|
||||||
|
oldValue LONGTEXT COLLATE {$COLLATE_TEXT} NOT NULL,
|
||||||
|
newValue LONGTEXT COLLATE {$COLLATE_TEXT} NOT NULL,
|
||||||
|
contentSource LONGTEXT COLLATE {$COLLATE_TEXT} NOT NULL,
|
||||||
|
metadata LONGTEXT COLLATE {$COLLATE_TEXT} NOT NULL,
|
||||||
|
dateCreated INT UNSIGNED NOT NULL,
|
||||||
|
dateModified INT UNSIGNED NOT NULL,
|
||||||
|
UNIQUE KEY `key_phid` (`phid`),
|
||||||
|
KEY `key_object` (`objectPHID`)
|
||||||
|
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
|
|
@ -0,0 +1,2 @@
|
||||||
|
ALTER TABLE {$NAMESPACE}_phame.phame_blog
|
||||||
|
ADD mailKey binary(20) NOT NULL;
|
18
resources/sql/autopatches/20151107.phame.blog.mailkey.2.php
Normal file
18
resources/sql/autopatches/20151107.phame.blog.mailkey.2.php
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$table = new PhameBlog();
|
||||||
|
$conn_w = $table->establishConnection('w');
|
||||||
|
$iterator = new LiskMigrationIterator($table);
|
||||||
|
foreach ($iterator as $blog) {
|
||||||
|
$id = $blog->getID();
|
||||||
|
|
||||||
|
echo pht('Adding mail key for Blog %d...', $id);
|
||||||
|
echo "\n";
|
||||||
|
|
||||||
|
queryfx(
|
||||||
|
$conn_w,
|
||||||
|
'UPDATE %T SET mailKey = %s WHERE id = %d',
|
||||||
|
$table->getTableName(),
|
||||||
|
Filesystem::readRandomCharacters(20),
|
||||||
|
$id);
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
ALTER TABLE {$NAMESPACE}_phame.phame_blog
|
||||||
|
DROP joinPolicy;
|
5
resources/sql/autopatches/20151108.xhpast.stderr.sql
Normal file
5
resources/sql/autopatches/20151108.xhpast.stderr.sql
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
ALTER TABLE {$NAMESPACE}_xhpastview.xhpastview_parsetree
|
||||||
|
ADD returnCode INT NOT NULL AFTER input;
|
||||||
|
|
||||||
|
ALTER TABLE {$NAMESPACE}_xhpastview.xhpastview_parsetree
|
||||||
|
ADD stderr longtext NOT NULL AFTER stdout;
|
18
resources/sql/autopatches/20151109.phame.post.comments.1.sql
Normal file
18
resources/sql/autopatches/20151109.phame.post.comments.1.sql
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
CREATE TABLE {$NAMESPACE}_phame.phame_posttransaction_comment (
|
||||||
|
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
phid VARCHAR(64) NOT NULL,
|
||||||
|
transactionPHID VARCHAR(64),
|
||||||
|
authorPHID VARCHAR(64) NOT NULL,
|
||||||
|
viewPolicy VARCHAR(64) NOT NULL,
|
||||||
|
editPolicy VARCHAR(64) NOT NULL,
|
||||||
|
commentVersion INT UNSIGNED NOT NULL,
|
||||||
|
content LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT},
|
||||||
|
contentSource LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT},
|
||||||
|
isDeleted BOOL NOT NULL,
|
||||||
|
dateCreated INT UNSIGNED NOT NULL,
|
||||||
|
dateModified INT UNSIGNED NOT NULL,
|
||||||
|
|
||||||
|
UNIQUE KEY `key_phid` (phid),
|
||||||
|
UNIQUE KEY `key_version` (transactionPHID, commentVersion)
|
||||||
|
|
||||||
|
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
|
|
@ -0,0 +1,8 @@
|
||||||
|
USE {$NAMESPACE}_repository;
|
||||||
|
DELETE x FROM repository_coverage x
|
||||||
|
LEFT JOIN repository_coverage y
|
||||||
|
ON x.branchID = y.branchID
|
||||||
|
AND x.commitID = y.commitID
|
||||||
|
AND x.pathID = y.pathID
|
||||||
|
AND y.id > x.id
|
||||||
|
WHERE y.id IS NOT NULL;
|
2
resources/sql/autopatches/20151109.xhpast.db.1.sql
Normal file
2
resources/sql/autopatches/20151109.xhpast.db.1.sql
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
RENAME TABLE {$NAMESPACE}_xhpastview.xhpastview_parsetree
|
||||||
|
TO {$NAMESPACE}_xhpast.xhpast_parsetree;
|
1
resources/sql/autopatches/20151109.xhpast.db.2.sql
Normal file
1
resources/sql/autopatches/20151109.xhpast.db.2.sql
Normal file
|
@ -0,0 +1 @@
|
||||||
|
DROP DATABASE {$NAMESPACE}_xhpastview;
|
5
resources/sql/autopatches/20151110.daemonenvhash.sql
Normal file
5
resources/sql/autopatches/20151110.daemonenvhash.sql
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
ALTER TABLE {$NAMESPACE}_daemon.daemon_log
|
||||||
|
DROP COLUMN envHash;
|
||||||
|
|
||||||
|
ALTER TABLE {$NAMESPACE}_daemon.daemon_log
|
||||||
|
DROP COLUMN envInfo;
|
16
resources/sql/autopatches/20151112.herald.edge.sql
Normal file
16
resources/sql/autopatches/20151112.herald.edge.sql
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
CREATE TABLE {$NAMESPACE}_herald.edge (
|
||||||
|
src VARBINARY(64) NOT NULL,
|
||||||
|
type INT UNSIGNED NOT NULL,
|
||||||
|
dst VARBINARY(64) NOT NULL,
|
||||||
|
dateCreated INT UNSIGNED NOT NULL,
|
||||||
|
seq INT UNSIGNED NOT NULL,
|
||||||
|
dataID INT UNSIGNED,
|
||||||
|
PRIMARY KEY (src, type, dst),
|
||||||
|
KEY `src` (src, type, dateCreated, seq),
|
||||||
|
UNIQUE KEY `key_dst` (dst, type, src)
|
||||||
|
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
|
||||||
|
|
||||||
|
CREATE TABLE {$NAMESPACE}_herald.edgedata (
|
||||||
|
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
data LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT}
|
||||||
|
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
|
16
resources/sql/autopatches/20151116.owners.edge.sql
Normal file
16
resources/sql/autopatches/20151116.owners.edge.sql
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
CREATE TABLE {$NAMESPACE}_owners.edge (
|
||||||
|
src VARBINARY(64) NOT NULL,
|
||||||
|
type INT UNSIGNED NOT NULL,
|
||||||
|
dst VARBINARY(64) NOT NULL,
|
||||||
|
dateCreated INT UNSIGNED NOT NULL,
|
||||||
|
seq INT UNSIGNED NOT NULL,
|
||||||
|
dataID INT UNSIGNED,
|
||||||
|
PRIMARY KEY (src, type, dst),
|
||||||
|
KEY `src` (src, type, dateCreated, seq),
|
||||||
|
UNIQUE KEY `key_dst` (dst, type, src)
|
||||||
|
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
|
||||||
|
|
||||||
|
CREATE TABLE {$NAMESPACE}_owners.edgedata (
|
||||||
|
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
data LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT}
|
||||||
|
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
|
|
@ -1556,7 +1556,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorActionListView' => 'view/layout/PhabricatorActionListView.php',
|
'PhabricatorActionListView' => 'view/layout/PhabricatorActionListView.php',
|
||||||
'PhabricatorActionView' => 'view/layout/PhabricatorActionView.php',
|
'PhabricatorActionView' => 'view/layout/PhabricatorActionView.php',
|
||||||
'PhabricatorActivitySettingsPanel' => 'applications/settings/panel/PhabricatorActivitySettingsPanel.php',
|
'PhabricatorActivitySettingsPanel' => 'applications/settings/panel/PhabricatorActivitySettingsPanel.php',
|
||||||
'PhabricatorAdministratorsPolicyRule' => 'applications/policy/rule/PhabricatorAdministratorsPolicyRule.php',
|
'PhabricatorAdministratorsPolicyRule' => 'applications/people/policyrule/PhabricatorAdministratorsPolicyRule.php',
|
||||||
'PhabricatorAjaxRequestExceptionHandler' => 'aphront/handler/PhabricatorAjaxRequestExceptionHandler.php',
|
'PhabricatorAjaxRequestExceptionHandler' => 'aphront/handler/PhabricatorAjaxRequestExceptionHandler.php',
|
||||||
'PhabricatorAlmanacApplication' => 'applications/almanac/application/PhabricatorAlmanacApplication.php',
|
'PhabricatorAlmanacApplication' => 'applications/almanac/application/PhabricatorAlmanacApplication.php',
|
||||||
'PhabricatorAmazonAuthProvider' => 'applications/auth/provider/PhabricatorAmazonAuthProvider.php',
|
'PhabricatorAmazonAuthProvider' => 'applications/auth/provider/PhabricatorAmazonAuthProvider.php',
|
||||||
|
@ -1579,8 +1579,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorApplicationDatasource' => 'applications/meta/typeahead/PhabricatorApplicationDatasource.php',
|
'PhabricatorApplicationDatasource' => 'applications/meta/typeahead/PhabricatorApplicationDatasource.php',
|
||||||
'PhabricatorApplicationDetailViewController' => 'applications/meta/controller/PhabricatorApplicationDetailViewController.php',
|
'PhabricatorApplicationDetailViewController' => 'applications/meta/controller/PhabricatorApplicationDetailViewController.php',
|
||||||
'PhabricatorApplicationEditController' => 'applications/meta/controller/PhabricatorApplicationEditController.php',
|
'PhabricatorApplicationEditController' => 'applications/meta/controller/PhabricatorApplicationEditController.php',
|
||||||
'PhabricatorApplicationEditEngine' => 'applications/transactions/editengine/PhabricatorApplicationEditEngine.php',
|
|
||||||
'PhabricatorApplicationEditEngineAPIMethod' => 'applications/transactions/editengine/PhabricatorApplicationEditEngineAPIMethod.php',
|
|
||||||
'PhabricatorApplicationEditHTTPParameterHelpView' => 'applications/transactions/view/PhabricatorApplicationEditHTTPParameterHelpView.php',
|
'PhabricatorApplicationEditHTTPParameterHelpView' => 'applications/transactions/view/PhabricatorApplicationEditHTTPParameterHelpView.php',
|
||||||
'PhabricatorApplicationEmailCommandsController' => 'applications/meta/controller/PhabricatorApplicationEmailCommandsController.php',
|
'PhabricatorApplicationEmailCommandsController' => 'applications/meta/controller/PhabricatorApplicationEmailCommandsController.php',
|
||||||
'PhabricatorApplicationLaunchView' => 'applications/meta/view/PhabricatorApplicationLaunchView.php',
|
'PhabricatorApplicationLaunchView' => 'applications/meta/view/PhabricatorApplicationLaunchView.php',
|
||||||
|
@ -2016,6 +2014,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorDaemonManagementStatusWorkflow' => 'applications/daemon/management/PhabricatorDaemonManagementStatusWorkflow.php',
|
'PhabricatorDaemonManagementStatusWorkflow' => 'applications/daemon/management/PhabricatorDaemonManagementStatusWorkflow.php',
|
||||||
'PhabricatorDaemonManagementStopWorkflow' => 'applications/daemon/management/PhabricatorDaemonManagementStopWorkflow.php',
|
'PhabricatorDaemonManagementStopWorkflow' => 'applications/daemon/management/PhabricatorDaemonManagementStopWorkflow.php',
|
||||||
'PhabricatorDaemonManagementWorkflow' => 'applications/daemon/management/PhabricatorDaemonManagementWorkflow.php',
|
'PhabricatorDaemonManagementWorkflow' => 'applications/daemon/management/PhabricatorDaemonManagementWorkflow.php',
|
||||||
|
'PhabricatorDaemonOverseerModule' => 'infrastructure/daemon/overseer/PhabricatorDaemonOverseerModule.php',
|
||||||
'PhabricatorDaemonReference' => 'infrastructure/daemon/control/PhabricatorDaemonReference.php',
|
'PhabricatorDaemonReference' => 'infrastructure/daemon/control/PhabricatorDaemonReference.php',
|
||||||
'PhabricatorDaemonTaskGarbageCollector' => 'applications/daemon/garbagecollector/PhabricatorDaemonTaskGarbageCollector.php',
|
'PhabricatorDaemonTaskGarbageCollector' => 'applications/daemon/garbagecollector/PhabricatorDaemonTaskGarbageCollector.php',
|
||||||
'PhabricatorDaemonTasksTableView' => 'applications/daemon/view/PhabricatorDaemonTasksTableView.php',
|
'PhabricatorDaemonTasksTableView' => 'applications/daemon/view/PhabricatorDaemonTasksTableView.php',
|
||||||
|
@ -2095,7 +2094,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorDisabledUserController' => 'applications/auth/controller/PhabricatorDisabledUserController.php',
|
'PhabricatorDisabledUserController' => 'applications/auth/controller/PhabricatorDisabledUserController.php',
|
||||||
'PhabricatorDisplayPreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php',
|
'PhabricatorDisplayPreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php',
|
||||||
'PhabricatorDisqusAuthProvider' => 'applications/auth/provider/PhabricatorDisqusAuthProvider.php',
|
'PhabricatorDisqusAuthProvider' => 'applications/auth/provider/PhabricatorDisqusAuthProvider.php',
|
||||||
'PhabricatorDisqusConfigOptions' => 'applications/config/option/PhabricatorDisqusConfigOptions.php',
|
|
||||||
'PhabricatorDivinerApplication' => 'applications/diviner/application/PhabricatorDivinerApplication.php',
|
'PhabricatorDivinerApplication' => 'applications/diviner/application/PhabricatorDivinerApplication.php',
|
||||||
'PhabricatorDoorkeeperApplication' => 'applications/doorkeeper/application/PhabricatorDoorkeeperApplication.php',
|
'PhabricatorDoorkeeperApplication' => 'applications/doorkeeper/application/PhabricatorDoorkeeperApplication.php',
|
||||||
'PhabricatorDraft' => 'applications/draft/storage/PhabricatorDraft.php',
|
'PhabricatorDraft' => 'applications/draft/storage/PhabricatorDraft.php',
|
||||||
|
@ -2111,6 +2109,24 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorEdgeTestCase' => 'infrastructure/edges/__tests__/PhabricatorEdgeTestCase.php',
|
'PhabricatorEdgeTestCase' => 'infrastructure/edges/__tests__/PhabricatorEdgeTestCase.php',
|
||||||
'PhabricatorEdgeType' => 'infrastructure/edges/type/PhabricatorEdgeType.php',
|
'PhabricatorEdgeType' => 'infrastructure/edges/type/PhabricatorEdgeType.php',
|
||||||
'PhabricatorEdgeTypeTestCase' => 'infrastructure/edges/type/__tests__/PhabricatorEdgeTypeTestCase.php',
|
'PhabricatorEdgeTypeTestCase' => 'infrastructure/edges/type/__tests__/PhabricatorEdgeTypeTestCase.php',
|
||||||
|
'PhabricatorEditEngine' => 'applications/transactions/editengine/PhabricatorEditEngine.php',
|
||||||
|
'PhabricatorEditEngineAPIMethod' => 'applications/transactions/editengine/PhabricatorEditEngineAPIMethod.php',
|
||||||
|
'PhabricatorEditEngineConfiguration' => 'applications/transactions/storage/PhabricatorEditEngineConfiguration.php',
|
||||||
|
'PhabricatorEditEngineConfigurationEditController' => 'applications/transactions/controller/PhabricatorEditEngineConfigurationEditController.php',
|
||||||
|
'PhabricatorEditEngineConfigurationEditEngine' => 'applications/transactions/editor/PhabricatorEditEngineConfigurationEditEngine.php',
|
||||||
|
'PhabricatorEditEngineConfigurationEditor' => 'applications/transactions/editor/PhabricatorEditEngineConfigurationEditor.php',
|
||||||
|
'PhabricatorEditEngineConfigurationListController' => 'applications/transactions/controller/PhabricatorEditEngineConfigurationListController.php',
|
||||||
|
'PhabricatorEditEngineConfigurationPHIDType' => 'applications/transactions/phid/PhabricatorEditEngineConfigurationPHIDType.php',
|
||||||
|
'PhabricatorEditEngineConfigurationQuery' => 'applications/transactions/query/PhabricatorEditEngineConfigurationQuery.php',
|
||||||
|
'PhabricatorEditEngineConfigurationSaveController' => 'applications/transactions/controller/PhabricatorEditEngineConfigurationSaveController.php',
|
||||||
|
'PhabricatorEditEngineConfigurationSearchEngine' => 'applications/transactions/query/PhabricatorEditEngineConfigurationSearchEngine.php',
|
||||||
|
'PhabricatorEditEngineConfigurationTransaction' => 'applications/transactions/storage/PhabricatorEditEngineConfigurationTransaction.php',
|
||||||
|
'PhabricatorEditEngineConfigurationTransactionQuery' => 'applications/transactions/query/PhabricatorEditEngineConfigurationTransactionQuery.php',
|
||||||
|
'PhabricatorEditEngineConfigurationViewController' => 'applications/transactions/controller/PhabricatorEditEngineConfigurationViewController.php',
|
||||||
|
'PhabricatorEditEngineController' => 'applications/transactions/controller/PhabricatorEditEngineController.php',
|
||||||
|
'PhabricatorEditEngineListController' => 'applications/transactions/controller/PhabricatorEditEngineListController.php',
|
||||||
|
'PhabricatorEditEngineQuery' => 'applications/transactions/query/PhabricatorEditEngineQuery.php',
|
||||||
|
'PhabricatorEditEngineSearchEngine' => 'applications/transactions/query/PhabricatorEditEngineSearchEngine.php',
|
||||||
'PhabricatorEditField' => 'applications/transactions/editfield/PhabricatorEditField.php',
|
'PhabricatorEditField' => 'applications/transactions/editfield/PhabricatorEditField.php',
|
||||||
'PhabricatorEditType' => 'applications/transactions/edittype/PhabricatorEditType.php',
|
'PhabricatorEditType' => 'applications/transactions/edittype/PhabricatorEditType.php',
|
||||||
'PhabricatorEditor' => 'infrastructure/PhabricatorEditor.php',
|
'PhabricatorEditor' => 'infrastructure/PhabricatorEditor.php',
|
||||||
|
@ -2295,6 +2311,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorInlineCommentInterface' => 'infrastructure/diff/interface/PhabricatorInlineCommentInterface.php',
|
'PhabricatorInlineCommentInterface' => 'infrastructure/diff/interface/PhabricatorInlineCommentInterface.php',
|
||||||
'PhabricatorInlineCommentPreviewController' => 'infrastructure/diff/PhabricatorInlineCommentPreviewController.php',
|
'PhabricatorInlineCommentPreviewController' => 'infrastructure/diff/PhabricatorInlineCommentPreviewController.php',
|
||||||
'PhabricatorInlineSummaryView' => 'infrastructure/diff/view/PhabricatorInlineSummaryView.php',
|
'PhabricatorInlineSummaryView' => 'infrastructure/diff/view/PhabricatorInlineSummaryView.php',
|
||||||
|
'PhabricatorInstructionsEditField' => 'applications/transactions/editfield/PhabricatorInstructionsEditField.php',
|
||||||
'PhabricatorInternationalizationManagementExtractWorkflow' => 'infrastructure/internationalization/management/PhabricatorInternationalizationManagementExtractWorkflow.php',
|
'PhabricatorInternationalizationManagementExtractWorkflow' => 'infrastructure/internationalization/management/PhabricatorInternationalizationManagementExtractWorkflow.php',
|
||||||
'PhabricatorInternationalizationManagementWorkflow' => 'infrastructure/internationalization/management/PhabricatorInternationalizationManagementWorkflow.php',
|
'PhabricatorInternationalizationManagementWorkflow' => 'infrastructure/internationalization/management/PhabricatorInternationalizationManagementWorkflow.php',
|
||||||
'PhabricatorInvalidConfigSetupCheck' => 'applications/config/check/PhabricatorInvalidConfigSetupCheck.php',
|
'PhabricatorInvalidConfigSetupCheck' => 'applications/config/check/PhabricatorInvalidConfigSetupCheck.php',
|
||||||
|
@ -2309,7 +2326,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorLegalpadApplication' => 'applications/legalpad/application/PhabricatorLegalpadApplication.php',
|
'PhabricatorLegalpadApplication' => 'applications/legalpad/application/PhabricatorLegalpadApplication.php',
|
||||||
'PhabricatorLegalpadConfigOptions' => 'applications/legalpad/config/PhabricatorLegalpadConfigOptions.php',
|
'PhabricatorLegalpadConfigOptions' => 'applications/legalpad/config/PhabricatorLegalpadConfigOptions.php',
|
||||||
'PhabricatorLegalpadDocumentPHIDType' => 'applications/legalpad/phid/PhabricatorLegalpadDocumentPHIDType.php',
|
'PhabricatorLegalpadDocumentPHIDType' => 'applications/legalpad/phid/PhabricatorLegalpadDocumentPHIDType.php',
|
||||||
'PhabricatorLegalpadSignaturePolicyRule' => 'applications/policy/rule/PhabricatorLegalpadSignaturePolicyRule.php',
|
'PhabricatorLegalpadSignaturePolicyRule' => 'applications/legalpad/policyrule/PhabricatorLegalpadSignaturePolicyRule.php',
|
||||||
'PhabricatorLibraryTestCase' => '__tests__/PhabricatorLibraryTestCase.php',
|
'PhabricatorLibraryTestCase' => '__tests__/PhabricatorLibraryTestCase.php',
|
||||||
'PhabricatorLipsumArtist' => 'applications/lipsum/image/PhabricatorLipsumArtist.php',
|
'PhabricatorLipsumArtist' => 'applications/lipsum/image/PhabricatorLipsumArtist.php',
|
||||||
'PhabricatorLipsumGenerateWorkflow' => 'applications/lipsum/management/PhabricatorLipsumGenerateWorkflow.php',
|
'PhabricatorLipsumGenerateWorkflow' => 'applications/lipsum/management/PhabricatorLipsumGenerateWorkflow.php',
|
||||||
|
@ -2546,6 +2563,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorOwnersPackageTransactionQuery' => 'applications/owners/query/PhabricatorOwnersPackageTransactionQuery.php',
|
'PhabricatorOwnersPackageTransactionQuery' => 'applications/owners/query/PhabricatorOwnersPackageTransactionQuery.php',
|
||||||
'PhabricatorOwnersPath' => 'applications/owners/storage/PhabricatorOwnersPath.php',
|
'PhabricatorOwnersPath' => 'applications/owners/storage/PhabricatorOwnersPath.php',
|
||||||
'PhabricatorOwnersPathsController' => 'applications/owners/controller/PhabricatorOwnersPathsController.php',
|
'PhabricatorOwnersPathsController' => 'applications/owners/controller/PhabricatorOwnersPathsController.php',
|
||||||
|
'PhabricatorOwnersSchemaSpec' => 'applications/owners/storage/PhabricatorOwnersSchemaSpec.php',
|
||||||
'PhabricatorOwnersSearchField' => 'applications/owners/searchfield/PhabricatorOwnersSearchField.php',
|
'PhabricatorOwnersSearchField' => 'applications/owners/searchfield/PhabricatorOwnersSearchField.php',
|
||||||
'PhabricatorPHDConfigOptions' => 'applications/config/option/PhabricatorPHDConfigOptions.php',
|
'PhabricatorPHDConfigOptions' => 'applications/config/option/PhabricatorPHDConfigOptions.php',
|
||||||
'PhabricatorPHID' => 'applications/phid/storage/PhabricatorPHID.php',
|
'PhabricatorPHID' => 'applications/phid/storage/PhabricatorPHID.php',
|
||||||
|
@ -2641,13 +2659,18 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorPhrictionApplication' => 'applications/phriction/application/PhabricatorPhrictionApplication.php',
|
'PhabricatorPhrictionApplication' => 'applications/phriction/application/PhabricatorPhrictionApplication.php',
|
||||||
'PhabricatorPhrictionConfigOptions' => 'applications/phriction/config/PhabricatorPhrictionConfigOptions.php',
|
'PhabricatorPhrictionConfigOptions' => 'applications/phriction/config/PhabricatorPhrictionConfigOptions.php',
|
||||||
'PhabricatorPhurlApplication' => 'applications/phurl/application/PhabricatorPhurlApplication.php',
|
'PhabricatorPhurlApplication' => 'applications/phurl/application/PhabricatorPhurlApplication.php',
|
||||||
|
'PhabricatorPhurlConfigOptions' => 'applications/config/option/PhabricatorPhurlConfigOptions.php',
|
||||||
'PhabricatorPhurlController' => 'applications/phurl/controller/PhabricatorPhurlController.php',
|
'PhabricatorPhurlController' => 'applications/phurl/controller/PhabricatorPhurlController.php',
|
||||||
'PhabricatorPhurlDAO' => 'applications/phurl/storage/PhabricatorPhurlDAO.php',
|
'PhabricatorPhurlDAO' => 'applications/phurl/storage/PhabricatorPhurlDAO.php',
|
||||||
'PhabricatorPhurlLinkRemarkupRule' => 'applications/phurl/remarkup/PhabricatorPhurlLinkRemarkupRule.php',
|
'PhabricatorPhurlLinkRemarkupRule' => 'applications/phurl/remarkup/PhabricatorPhurlLinkRemarkupRule.php',
|
||||||
'PhabricatorPhurlRemarkupRule' => 'applications/phurl/remarkup/PhabricatorPhurlRemarkupRule.php',
|
'PhabricatorPhurlRemarkupRule' => 'applications/phurl/remarkup/PhabricatorPhurlRemarkupRule.php',
|
||||||
'PhabricatorPhurlSchemaSpec' => 'applications/phurl/storage/PhabricatorPhurlSchemaSpec.php',
|
'PhabricatorPhurlSchemaSpec' => 'applications/phurl/storage/PhabricatorPhurlSchemaSpec.php',
|
||||||
|
'PhabricatorPhurlShortURLController' => 'applications/phurl/controller/PhabricatorPhurlShortURLController.php',
|
||||||
|
'PhabricatorPhurlShortURLDefaultController' => 'applications/phurl/controller/PhabricatorPhurlShortURLDefaultController.php',
|
||||||
'PhabricatorPhurlURL' => 'applications/phurl/storage/PhabricatorPhurlURL.php',
|
'PhabricatorPhurlURL' => 'applications/phurl/storage/PhabricatorPhurlURL.php',
|
||||||
'PhabricatorPhurlURLAccessController' => 'applications/phurl/controller/PhabricatorPhurlURLAccessController.php',
|
'PhabricatorPhurlURLAccessController' => 'applications/phurl/controller/PhabricatorPhurlURLAccessController.php',
|
||||||
|
'PhabricatorPhurlURLCommentController' => 'applications/phurl/controller/PhabricatorPhurlURLCommentController.php',
|
||||||
|
'PhabricatorPhurlURLCreateCapability' => 'applications/phurl/capability/PhabricatorPhurlURLCreateCapability.php',
|
||||||
'PhabricatorPhurlURLEditController' => 'applications/phurl/controller/PhabricatorPhurlURLEditController.php',
|
'PhabricatorPhurlURLEditController' => 'applications/phurl/controller/PhabricatorPhurlURLEditController.php',
|
||||||
'PhabricatorPhurlURLEditor' => 'applications/phurl/editor/PhabricatorPhurlURLEditor.php',
|
'PhabricatorPhurlURLEditor' => 'applications/phurl/editor/PhabricatorPhurlURLEditor.php',
|
||||||
'PhabricatorPhurlURLListController' => 'applications/phurl/controller/PhabricatorPhurlURLListController.php',
|
'PhabricatorPhurlURLListController' => 'applications/phurl/controller/PhabricatorPhurlURLListController.php',
|
||||||
|
@ -2767,7 +2790,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorProjectViewController' => 'applications/project/controller/PhabricatorProjectViewController.php',
|
'PhabricatorProjectViewController' => 'applications/project/controller/PhabricatorProjectViewController.php',
|
||||||
'PhabricatorProjectWatchController' => 'applications/project/controller/PhabricatorProjectWatchController.php',
|
'PhabricatorProjectWatchController' => 'applications/project/controller/PhabricatorProjectWatchController.php',
|
||||||
'PhabricatorProjectsEditField' => 'applications/transactions/editfield/PhabricatorProjectsEditField.php',
|
'PhabricatorProjectsEditField' => 'applications/transactions/editfield/PhabricatorProjectsEditField.php',
|
||||||
'PhabricatorProjectsPolicyRule' => 'applications/policy/rule/PhabricatorProjectsPolicyRule.php',
|
'PhabricatorProjectsPolicyRule' => 'applications/project/policyrule/PhabricatorProjectsPolicyRule.php',
|
||||||
'PhabricatorProtocolAdapter' => 'infrastructure/daemon/bot/adapter/PhabricatorProtocolAdapter.php',
|
'PhabricatorProtocolAdapter' => 'infrastructure/daemon/bot/adapter/PhabricatorProtocolAdapter.php',
|
||||||
'PhabricatorPygmentSetupCheck' => 'applications/config/check/PhabricatorPygmentSetupCheck.php',
|
'PhabricatorPygmentSetupCheck' => 'applications/config/check/PhabricatorPygmentSetupCheck.php',
|
||||||
'PhabricatorQuery' => 'infrastructure/query/PhabricatorQuery.php',
|
'PhabricatorQuery' => 'infrastructure/query/PhabricatorQuery.php',
|
||||||
|
@ -2954,6 +2977,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSetupIssue' => 'applications/config/issue/PhabricatorSetupIssue.php',
|
'PhabricatorSetupIssue' => 'applications/config/issue/PhabricatorSetupIssue.php',
|
||||||
'PhabricatorSetupIssueUIExample' => 'applications/uiexample/examples/PhabricatorSetupIssueUIExample.php',
|
'PhabricatorSetupIssueUIExample' => 'applications/uiexample/examples/PhabricatorSetupIssueUIExample.php',
|
||||||
'PhabricatorSetupIssueView' => 'applications/config/view/PhabricatorSetupIssueView.php',
|
'PhabricatorSetupIssueView' => 'applications/config/view/PhabricatorSetupIssueView.php',
|
||||||
|
'PhabricatorShortSite' => 'aphront/site/PhabricatorShortSite.php',
|
||||||
'PhabricatorSimpleEditType' => 'applications/transactions/edittype/PhabricatorSimpleEditType.php',
|
'PhabricatorSimpleEditType' => 'applications/transactions/edittype/PhabricatorSimpleEditType.php',
|
||||||
'PhabricatorSite' => 'aphront/site/PhabricatorSite.php',
|
'PhabricatorSite' => 'aphront/site/PhabricatorSite.php',
|
||||||
'PhabricatorSlowvoteApplication' => 'applications/slowvote/application/PhabricatorSlowvoteApplication.php',
|
'PhabricatorSlowvoteApplication' => 'applications/slowvote/application/PhabricatorSlowvoteApplication.php',
|
||||||
|
@ -3176,7 +3200,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorUserTitleField' => 'applications/people/customfield/PhabricatorUserTitleField.php',
|
'PhabricatorUserTitleField' => 'applications/people/customfield/PhabricatorUserTitleField.php',
|
||||||
'PhabricatorUserTransaction' => 'applications/people/storage/PhabricatorUserTransaction.php',
|
'PhabricatorUserTransaction' => 'applications/people/storage/PhabricatorUserTransaction.php',
|
||||||
'PhabricatorUsersEditField' => 'applications/transactions/editfield/PhabricatorUsersEditField.php',
|
'PhabricatorUsersEditField' => 'applications/transactions/editfield/PhabricatorUsersEditField.php',
|
||||||
'PhabricatorUsersPolicyRule' => 'applications/policy/rule/PhabricatorUsersPolicyRule.php',
|
'PhabricatorUsersPolicyRule' => 'applications/people/policyrule/PhabricatorUsersPolicyRule.php',
|
||||||
'PhabricatorUsersSearchField' => 'applications/people/searchfield/PhabricatorUsersSearchField.php',
|
'PhabricatorUsersSearchField' => 'applications/people/searchfield/PhabricatorUsersSearchField.php',
|
||||||
'PhabricatorVCSResponse' => 'applications/repository/response/PhabricatorVCSResponse.php',
|
'PhabricatorVCSResponse' => 'applications/repository/response/PhabricatorVCSResponse.php',
|
||||||
'PhabricatorVeryWowEnglishTranslation' => 'infrastructure/internationalization/translation/PhabricatorVeryWowEnglishTranslation.php',
|
'PhabricatorVeryWowEnglishTranslation' => 'infrastructure/internationalization/translation/PhabricatorVeryWowEnglishTranslation.php',
|
||||||
|
@ -3224,13 +3248,13 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorWorkingCopyDiscoveryTestCase' => 'applications/repository/engine/__tests__/PhabricatorWorkingCopyDiscoveryTestCase.php',
|
'PhabricatorWorkingCopyDiscoveryTestCase' => 'applications/repository/engine/__tests__/PhabricatorWorkingCopyDiscoveryTestCase.php',
|
||||||
'PhabricatorWorkingCopyPullTestCase' => 'applications/repository/engine/__tests__/PhabricatorWorkingCopyPullTestCase.php',
|
'PhabricatorWorkingCopyPullTestCase' => 'applications/repository/engine/__tests__/PhabricatorWorkingCopyPullTestCase.php',
|
||||||
'PhabricatorWorkingCopyTestCase' => 'applications/repository/engine/__tests__/PhabricatorWorkingCopyTestCase.php',
|
'PhabricatorWorkingCopyTestCase' => 'applications/repository/engine/__tests__/PhabricatorWorkingCopyTestCase.php',
|
||||||
|
'PhabricatorXHPASTDAO' => 'applications/phpast/storage/PhabricatorXHPASTDAO.php',
|
||||||
|
'PhabricatorXHPASTParseTree' => 'applications/phpast/storage/PhabricatorXHPASTParseTree.php',
|
||||||
'PhabricatorXHPASTViewController' => 'applications/phpast/controller/PhabricatorXHPASTViewController.php',
|
'PhabricatorXHPASTViewController' => 'applications/phpast/controller/PhabricatorXHPASTViewController.php',
|
||||||
'PhabricatorXHPASTViewDAO' => 'applications/phpast/storage/PhabricatorXHPASTViewDAO.php',
|
|
||||||
'PhabricatorXHPASTViewFrameController' => 'applications/phpast/controller/PhabricatorXHPASTViewFrameController.php',
|
'PhabricatorXHPASTViewFrameController' => 'applications/phpast/controller/PhabricatorXHPASTViewFrameController.php',
|
||||||
'PhabricatorXHPASTViewFramesetController' => 'applications/phpast/controller/PhabricatorXHPASTViewFramesetController.php',
|
'PhabricatorXHPASTViewFramesetController' => 'applications/phpast/controller/PhabricatorXHPASTViewFramesetController.php',
|
||||||
'PhabricatorXHPASTViewInputController' => 'applications/phpast/controller/PhabricatorXHPASTViewInputController.php',
|
'PhabricatorXHPASTViewInputController' => 'applications/phpast/controller/PhabricatorXHPASTViewInputController.php',
|
||||||
'PhabricatorXHPASTViewPanelController' => 'applications/phpast/controller/PhabricatorXHPASTViewPanelController.php',
|
'PhabricatorXHPASTViewPanelController' => 'applications/phpast/controller/PhabricatorXHPASTViewPanelController.php',
|
||||||
'PhabricatorXHPASTViewParseTree' => 'applications/phpast/storage/PhabricatorXHPASTViewParseTree.php',
|
|
||||||
'PhabricatorXHPASTViewRunController' => 'applications/phpast/controller/PhabricatorXHPASTViewRunController.php',
|
'PhabricatorXHPASTViewRunController' => 'applications/phpast/controller/PhabricatorXHPASTViewRunController.php',
|
||||||
'PhabricatorXHPASTViewStreamController' => 'applications/phpast/controller/PhabricatorXHPASTViewStreamController.php',
|
'PhabricatorXHPASTViewStreamController' => 'applications/phpast/controller/PhabricatorXHPASTViewStreamController.php',
|
||||||
'PhabricatorXHPASTViewTreeController' => 'applications/phpast/controller/PhabricatorXHPASTViewTreeController.php',
|
'PhabricatorXHPASTViewTreeController' => 'applications/phpast/controller/PhabricatorXHPASTViewTreeController.php',
|
||||||
|
@ -3248,6 +3272,7 @@ phutil_register_library_map(array(
|
||||||
'PhameBasicTemplateBlogSkin' => 'applications/phame/skins/PhameBasicTemplateBlogSkin.php',
|
'PhameBasicTemplateBlogSkin' => 'applications/phame/skins/PhameBasicTemplateBlogSkin.php',
|
||||||
'PhameBlog' => 'applications/phame/storage/PhameBlog.php',
|
'PhameBlog' => 'applications/phame/storage/PhameBlog.php',
|
||||||
'PhameBlogController' => 'applications/phame/controller/blog/PhameBlogController.php',
|
'PhameBlogController' => 'applications/phame/controller/blog/PhameBlogController.php',
|
||||||
|
'PhameBlogCreateCapability' => 'applications/phame/capability/PhameBlogCreateCapability.php',
|
||||||
'PhameBlogDeleteController' => 'applications/phame/controller/blog/PhameBlogDeleteController.php',
|
'PhameBlogDeleteController' => 'applications/phame/controller/blog/PhameBlogDeleteController.php',
|
||||||
'PhameBlogEditController' => 'applications/phame/controller/blog/PhameBlogEditController.php',
|
'PhameBlogEditController' => 'applications/phame/controller/blog/PhameBlogEditController.php',
|
||||||
'PhameBlogEditor' => 'applications/phame/editor/PhameBlogEditor.php',
|
'PhameBlogEditor' => 'applications/phame/editor/PhameBlogEditor.php',
|
||||||
|
@ -3255,23 +3280,28 @@ phutil_register_library_map(array(
|
||||||
'PhameBlogListController' => 'applications/phame/controller/blog/PhameBlogListController.php',
|
'PhameBlogListController' => 'applications/phame/controller/blog/PhameBlogListController.php',
|
||||||
'PhameBlogLiveController' => 'applications/phame/controller/blog/PhameBlogLiveController.php',
|
'PhameBlogLiveController' => 'applications/phame/controller/blog/PhameBlogLiveController.php',
|
||||||
'PhameBlogQuery' => 'applications/phame/query/PhameBlogQuery.php',
|
'PhameBlogQuery' => 'applications/phame/query/PhameBlogQuery.php',
|
||||||
|
'PhameBlogReplyHandler' => 'applications/phame/mail/PhameBlogReplyHandler.php',
|
||||||
'PhameBlogSearchEngine' => 'applications/phame/query/PhameBlogSearchEngine.php',
|
'PhameBlogSearchEngine' => 'applications/phame/query/PhameBlogSearchEngine.php',
|
||||||
'PhameBlogSite' => 'applications/phame/site/PhameBlogSite.php',
|
'PhameBlogSite' => 'applications/phame/site/PhameBlogSite.php',
|
||||||
'PhameBlogSkin' => 'applications/phame/skins/PhameBlogSkin.php',
|
'PhameBlogSkin' => 'applications/phame/skins/PhameBlogSkin.php',
|
||||||
'PhameBlogTransaction' => 'applications/phame/storage/PhameBlogTransaction.php',
|
'PhameBlogTransaction' => 'applications/phame/storage/PhameBlogTransaction.php',
|
||||||
|
'PhameBlogTransactionQuery' => 'applications/phame/query/PhameBlogTransactionQuery.php',
|
||||||
'PhameBlogViewController' => 'applications/phame/controller/blog/PhameBlogViewController.php',
|
'PhameBlogViewController' => 'applications/phame/controller/blog/PhameBlogViewController.php',
|
||||||
'PhameCelerityResources' => 'applications/phame/celerity/PhameCelerityResources.php',
|
'PhameCelerityResources' => 'applications/phame/celerity/PhameCelerityResources.php',
|
||||||
'PhameConduitAPIMethod' => 'applications/phame/conduit/PhameConduitAPIMethod.php',
|
'PhameConduitAPIMethod' => 'applications/phame/conduit/PhameConduitAPIMethod.php',
|
||||||
|
'PhameConstants' => 'applications/phame/constants/PhameConstants.php',
|
||||||
'PhameController' => 'applications/phame/controller/PhameController.php',
|
'PhameController' => 'applications/phame/controller/PhameController.php',
|
||||||
'PhameCreatePostConduitAPIMethod' => 'applications/phame/conduit/PhameCreatePostConduitAPIMethod.php',
|
'PhameCreatePostConduitAPIMethod' => 'applications/phame/conduit/PhameCreatePostConduitAPIMethod.php',
|
||||||
'PhameDAO' => 'applications/phame/storage/PhameDAO.php',
|
'PhameDAO' => 'applications/phame/storage/PhameDAO.php',
|
||||||
'PhamePost' => 'applications/phame/storage/PhamePost.php',
|
'PhamePost' => 'applications/phame/storage/PhamePost.php',
|
||||||
|
'PhamePostCommentController' => 'applications/phame/controller/post/PhamePostCommentController.php',
|
||||||
'PhamePostController' => 'applications/phame/controller/post/PhamePostController.php',
|
'PhamePostController' => 'applications/phame/controller/post/PhamePostController.php',
|
||||||
'PhamePostDeleteController' => 'applications/phame/controller/post/PhamePostDeleteController.php',
|
'PhamePostDeleteController' => 'applications/phame/controller/post/PhamePostDeleteController.php',
|
||||||
'PhamePostEditController' => 'applications/phame/controller/post/PhamePostEditController.php',
|
'PhamePostEditController' => 'applications/phame/controller/post/PhamePostEditController.php',
|
||||||
'PhamePostEditor' => 'applications/phame/editor/PhamePostEditor.php',
|
'PhamePostEditor' => 'applications/phame/editor/PhamePostEditor.php',
|
||||||
'PhamePostFramedController' => 'applications/phame/controller/post/PhamePostFramedController.php',
|
'PhamePostFramedController' => 'applications/phame/controller/post/PhamePostFramedController.php',
|
||||||
'PhamePostListController' => 'applications/phame/controller/post/PhamePostListController.php',
|
'PhamePostListController' => 'applications/phame/controller/post/PhamePostListController.php',
|
||||||
|
'PhamePostMailReceiver' => 'applications/phame/mail/PhamePostMailReceiver.php',
|
||||||
'PhamePostNewController' => 'applications/phame/controller/post/PhamePostNewController.php',
|
'PhamePostNewController' => 'applications/phame/controller/post/PhamePostNewController.php',
|
||||||
'PhamePostNotLiveController' => 'applications/phame/controller/post/PhamePostNotLiveController.php',
|
'PhamePostNotLiveController' => 'applications/phame/controller/post/PhamePostNotLiveController.php',
|
||||||
'PhamePostPreviewController' => 'applications/phame/controller/post/PhamePostPreviewController.php',
|
'PhamePostPreviewController' => 'applications/phame/controller/post/PhamePostPreviewController.php',
|
||||||
|
@ -3280,6 +3310,7 @@ phutil_register_library_map(array(
|
||||||
'PhamePostReplyHandler' => 'applications/phame/mail/PhamePostReplyHandler.php',
|
'PhamePostReplyHandler' => 'applications/phame/mail/PhamePostReplyHandler.php',
|
||||||
'PhamePostSearchEngine' => 'applications/phame/query/PhamePostSearchEngine.php',
|
'PhamePostSearchEngine' => 'applications/phame/query/PhamePostSearchEngine.php',
|
||||||
'PhamePostTransaction' => 'applications/phame/storage/PhamePostTransaction.php',
|
'PhamePostTransaction' => 'applications/phame/storage/PhamePostTransaction.php',
|
||||||
|
'PhamePostTransactionComment' => 'applications/phame/storage/PhamePostTransactionComment.php',
|
||||||
'PhamePostTransactionQuery' => 'applications/phame/query/PhamePostTransactionQuery.php',
|
'PhamePostTransactionQuery' => 'applications/phame/query/PhamePostTransactionQuery.php',
|
||||||
'PhamePostUnpublishController' => 'applications/phame/controller/post/PhamePostUnpublishController.php',
|
'PhamePostUnpublishController' => 'applications/phame/controller/post/PhamePostUnpublishController.php',
|
||||||
'PhamePostView' => 'applications/phame/view/PhamePostView.php',
|
'PhamePostView' => 'applications/phame/view/PhamePostView.php',
|
||||||
|
@ -3400,7 +3431,6 @@ phutil_register_library_map(array(
|
||||||
'PhortuneMerchantTransactionQuery' => 'applications/phortune/query/PhortuneMerchantTransactionQuery.php',
|
'PhortuneMerchantTransactionQuery' => 'applications/phortune/query/PhortuneMerchantTransactionQuery.php',
|
||||||
'PhortuneMerchantViewController' => 'applications/phortune/controller/PhortuneMerchantViewController.php',
|
'PhortuneMerchantViewController' => 'applications/phortune/controller/PhortuneMerchantViewController.php',
|
||||||
'PhortuneMonthYearExpiryControl' => 'applications/phortune/control/PhortuneMonthYearExpiryControl.php',
|
'PhortuneMonthYearExpiryControl' => 'applications/phortune/control/PhortuneMonthYearExpiryControl.php',
|
||||||
'PhortuneNotImplementedException' => 'applications/phortune/exception/PhortuneNotImplementedException.php',
|
|
||||||
'PhortuneOrderTableView' => 'applications/phortune/view/PhortuneOrderTableView.php',
|
'PhortuneOrderTableView' => 'applications/phortune/view/PhortuneOrderTableView.php',
|
||||||
'PhortunePayPalPaymentProvider' => 'applications/phortune/provider/PhortunePayPalPaymentProvider.php',
|
'PhortunePayPalPaymentProvider' => 'applications/phortune/provider/PhortunePayPalPaymentProvider.php',
|
||||||
'PhortunePaymentMethod' => 'applications/phortune/storage/PhortunePaymentMethod.php',
|
'PhortunePaymentMethod' => 'applications/phortune/storage/PhortunePaymentMethod.php',
|
||||||
|
@ -3728,6 +3758,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorCustomFieldInterface',
|
'PhabricatorCustomFieldInterface',
|
||||||
'PhabricatorApplicationTransactionInterface',
|
'PhabricatorApplicationTransactionInterface',
|
||||||
'AlmanacPropertyInterface',
|
'AlmanacPropertyInterface',
|
||||||
|
'PhabricatorDestructibleInterface',
|
||||||
),
|
),
|
||||||
'AlmanacBindingEditController' => 'AlmanacServiceController',
|
'AlmanacBindingEditController' => 'AlmanacServiceController',
|
||||||
'AlmanacBindingEditor' => 'PhabricatorApplicationTransactionEditor',
|
'AlmanacBindingEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||||
|
@ -5045,6 +5076,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorFlaggableInterface',
|
'PhabricatorFlaggableInterface',
|
||||||
'PhabricatorPolicyInterface',
|
'PhabricatorPolicyInterface',
|
||||||
'PhabricatorDestructibleInterface',
|
'PhabricatorDestructibleInterface',
|
||||||
|
'PhabricatorSubscribableInterface',
|
||||||
),
|
),
|
||||||
'HeraldRuleController' => 'HeraldController',
|
'HeraldRuleController' => 'HeraldController',
|
||||||
'HeraldRuleEditor' => 'PhabricatorApplicationTransactionEditor',
|
'HeraldRuleEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||||
|
@ -5490,7 +5522,7 @@ phutil_register_library_map(array(
|
||||||
'PasteCreateMailReceiver' => 'PhabricatorMailReceiver',
|
'PasteCreateMailReceiver' => 'PhabricatorMailReceiver',
|
||||||
'PasteDefaultEditCapability' => 'PhabricatorPolicyCapability',
|
'PasteDefaultEditCapability' => 'PhabricatorPolicyCapability',
|
||||||
'PasteDefaultViewCapability' => 'PhabricatorPolicyCapability',
|
'PasteDefaultViewCapability' => 'PhabricatorPolicyCapability',
|
||||||
'PasteEditConduitAPIMethod' => 'PhabricatorApplicationEditEngineAPIMethod',
|
'PasteEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod',
|
||||||
'PasteEmbedView' => 'AphrontView',
|
'PasteEmbedView' => 'AphrontView',
|
||||||
'PasteInfoConduitAPIMethod' => 'PasteConduitAPIMethod',
|
'PasteInfoConduitAPIMethod' => 'PasteConduitAPIMethod',
|
||||||
'PasteMailReceiver' => 'PhabricatorObjectMailReceiver',
|
'PasteMailReceiver' => 'PhabricatorObjectMailReceiver',
|
||||||
|
@ -5534,8 +5566,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorApplicationDatasource' => 'PhabricatorTypeaheadDatasource',
|
'PhabricatorApplicationDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||||
'PhabricatorApplicationDetailViewController' => 'PhabricatorApplicationsController',
|
'PhabricatorApplicationDetailViewController' => 'PhabricatorApplicationsController',
|
||||||
'PhabricatorApplicationEditController' => 'PhabricatorApplicationsController',
|
'PhabricatorApplicationEditController' => 'PhabricatorApplicationsController',
|
||||||
'PhabricatorApplicationEditEngine' => 'Phobject',
|
|
||||||
'PhabricatorApplicationEditEngineAPIMethod' => 'ConduitAPIMethod',
|
|
||||||
'PhabricatorApplicationEditHTTPParameterHelpView' => 'AphrontView',
|
'PhabricatorApplicationEditHTTPParameterHelpView' => 'AphrontView',
|
||||||
'PhabricatorApplicationEmailCommandsController' => 'PhabricatorApplicationsController',
|
'PhabricatorApplicationEmailCommandsController' => 'PhabricatorApplicationsController',
|
||||||
'PhabricatorApplicationLaunchView' => 'AphrontTagView',
|
'PhabricatorApplicationLaunchView' => 'AphrontTagView',
|
||||||
|
@ -6051,6 +6081,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorDaemonManagementStatusWorkflow' => 'PhabricatorDaemonManagementWorkflow',
|
'PhabricatorDaemonManagementStatusWorkflow' => 'PhabricatorDaemonManagementWorkflow',
|
||||||
'PhabricatorDaemonManagementStopWorkflow' => 'PhabricatorDaemonManagementWorkflow',
|
'PhabricatorDaemonManagementStopWorkflow' => 'PhabricatorDaemonManagementWorkflow',
|
||||||
'PhabricatorDaemonManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
'PhabricatorDaemonManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
||||||
|
'PhabricatorDaemonOverseerModule' => 'PhutilDaemonOverseerModule',
|
||||||
'PhabricatorDaemonReference' => 'Phobject',
|
'PhabricatorDaemonReference' => 'Phobject',
|
||||||
'PhabricatorDaemonTaskGarbageCollector' => 'PhabricatorGarbageCollector',
|
'PhabricatorDaemonTaskGarbageCollector' => 'PhabricatorGarbageCollector',
|
||||||
'PhabricatorDaemonTasksTableView' => 'AphrontView',
|
'PhabricatorDaemonTasksTableView' => 'AphrontView',
|
||||||
|
@ -6147,7 +6178,6 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorDisabledUserController' => 'PhabricatorAuthController',
|
'PhabricatorDisabledUserController' => 'PhabricatorAuthController',
|
||||||
'PhabricatorDisplayPreferencesSettingsPanel' => 'PhabricatorSettingsPanel',
|
'PhabricatorDisplayPreferencesSettingsPanel' => 'PhabricatorSettingsPanel',
|
||||||
'PhabricatorDisqusAuthProvider' => 'PhabricatorOAuth2AuthProvider',
|
'PhabricatorDisqusAuthProvider' => 'PhabricatorOAuth2AuthProvider',
|
||||||
'PhabricatorDisqusConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
|
||||||
'PhabricatorDivinerApplication' => 'PhabricatorApplication',
|
'PhabricatorDivinerApplication' => 'PhabricatorApplication',
|
||||||
'PhabricatorDoorkeeperApplication' => 'PhabricatorApplication',
|
'PhabricatorDoorkeeperApplication' => 'PhabricatorApplication',
|
||||||
'PhabricatorDraft' => 'PhabricatorDraftDAO',
|
'PhabricatorDraft' => 'PhabricatorDraftDAO',
|
||||||
|
@ -6163,6 +6193,31 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorEdgeTestCase' => 'PhabricatorTestCase',
|
'PhabricatorEdgeTestCase' => 'PhabricatorTestCase',
|
||||||
'PhabricatorEdgeType' => 'Phobject',
|
'PhabricatorEdgeType' => 'Phobject',
|
||||||
'PhabricatorEdgeTypeTestCase' => 'PhabricatorTestCase',
|
'PhabricatorEdgeTypeTestCase' => 'PhabricatorTestCase',
|
||||||
|
'PhabricatorEditEngine' => array(
|
||||||
|
'Phobject',
|
||||||
|
'PhabricatorPolicyInterface',
|
||||||
|
),
|
||||||
|
'PhabricatorEditEngineAPIMethod' => 'ConduitAPIMethod',
|
||||||
|
'PhabricatorEditEngineConfiguration' => array(
|
||||||
|
'PhabricatorSearchDAO',
|
||||||
|
'PhabricatorApplicationTransactionInterface',
|
||||||
|
'PhabricatorPolicyInterface',
|
||||||
|
),
|
||||||
|
'PhabricatorEditEngineConfigurationEditController' => 'PhabricatorEditEngineController',
|
||||||
|
'PhabricatorEditEngineConfigurationEditEngine' => 'PhabricatorEditEngine',
|
||||||
|
'PhabricatorEditEngineConfigurationEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||||
|
'PhabricatorEditEngineConfigurationListController' => 'PhabricatorEditEngineController',
|
||||||
|
'PhabricatorEditEngineConfigurationPHIDType' => 'PhabricatorPHIDType',
|
||||||
|
'PhabricatorEditEngineConfigurationQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
|
'PhabricatorEditEngineConfigurationSaveController' => 'PhabricatorEditEngineController',
|
||||||
|
'PhabricatorEditEngineConfigurationSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||||
|
'PhabricatorEditEngineConfigurationTransaction' => 'PhabricatorApplicationTransaction',
|
||||||
|
'PhabricatorEditEngineConfigurationTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||||
|
'PhabricatorEditEngineConfigurationViewController' => 'PhabricatorEditEngineController',
|
||||||
|
'PhabricatorEditEngineController' => 'PhabricatorApplicationTransactionController',
|
||||||
|
'PhabricatorEditEngineListController' => 'PhabricatorEditEngineController',
|
||||||
|
'PhabricatorEditEngineQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
|
'PhabricatorEditEngineSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||||
'PhabricatorEditField' => 'Phobject',
|
'PhabricatorEditField' => 'Phobject',
|
||||||
'PhabricatorEditType' => 'Phobject',
|
'PhabricatorEditType' => 'Phobject',
|
||||||
'PhabricatorEditor' => 'Phobject',
|
'PhabricatorEditor' => 'Phobject',
|
||||||
|
@ -6383,6 +6438,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorInlineCommentInterface' => 'PhabricatorMarkupInterface',
|
'PhabricatorInlineCommentInterface' => 'PhabricatorMarkupInterface',
|
||||||
'PhabricatorInlineCommentPreviewController' => 'PhabricatorController',
|
'PhabricatorInlineCommentPreviewController' => 'PhabricatorController',
|
||||||
'PhabricatorInlineSummaryView' => 'AphrontView',
|
'PhabricatorInlineSummaryView' => 'AphrontView',
|
||||||
|
'PhabricatorInstructionsEditField' => 'PhabricatorEditField',
|
||||||
'PhabricatorInternationalizationManagementExtractWorkflow' => 'PhabricatorInternationalizationManagementWorkflow',
|
'PhabricatorInternationalizationManagementExtractWorkflow' => 'PhabricatorInternationalizationManagementWorkflow',
|
||||||
'PhabricatorInternationalizationManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
'PhabricatorInternationalizationManagementWorkflow' => 'PhabricatorManagementWorkflow',
|
||||||
'PhabricatorInvalidConfigSetupCheck' => 'PhabricatorSetupCheck',
|
'PhabricatorInvalidConfigSetupCheck' => 'PhabricatorSetupCheck',
|
||||||
|
@ -6665,6 +6721,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorOwnersPackageTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
'PhabricatorOwnersPackageTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||||
'PhabricatorOwnersPath' => 'PhabricatorOwnersDAO',
|
'PhabricatorOwnersPath' => 'PhabricatorOwnersDAO',
|
||||||
'PhabricatorOwnersPathsController' => 'PhabricatorOwnersController',
|
'PhabricatorOwnersPathsController' => 'PhabricatorOwnersController',
|
||||||
|
'PhabricatorOwnersSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
'PhabricatorOwnersSearchField' => 'PhabricatorSearchTokenizerField',
|
'PhabricatorOwnersSearchField' => 'PhabricatorSearchTokenizerField',
|
||||||
'PhabricatorPHDConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
'PhabricatorPHDConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
||||||
'PhabricatorPHID' => 'Phobject',
|
'PhabricatorPHID' => 'Phobject',
|
||||||
|
@ -6701,7 +6758,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorPasteController' => 'PhabricatorController',
|
'PhabricatorPasteController' => 'PhabricatorController',
|
||||||
'PhabricatorPasteDAO' => 'PhabricatorLiskDAO',
|
'PhabricatorPasteDAO' => 'PhabricatorLiskDAO',
|
||||||
'PhabricatorPasteEditController' => 'PhabricatorPasteController',
|
'PhabricatorPasteEditController' => 'PhabricatorPasteController',
|
||||||
'PhabricatorPasteEditEngine' => 'PhabricatorApplicationEditEngine',
|
'PhabricatorPasteEditEngine' => 'PhabricatorEditEngine',
|
||||||
'PhabricatorPasteEditor' => 'PhabricatorApplicationTransactionEditor',
|
'PhabricatorPasteEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||||
'PhabricatorPasteListController' => 'PhabricatorPasteController',
|
'PhabricatorPasteListController' => 'PhabricatorPasteController',
|
||||||
'PhabricatorPastePastePHIDType' => 'PhabricatorPHIDType',
|
'PhabricatorPastePastePHIDType' => 'PhabricatorPHIDType',
|
||||||
|
@ -6770,11 +6827,14 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorPhrictionApplication' => 'PhabricatorApplication',
|
'PhabricatorPhrictionApplication' => 'PhabricatorApplication',
|
||||||
'PhabricatorPhrictionConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
'PhabricatorPhrictionConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
||||||
'PhabricatorPhurlApplication' => 'PhabricatorApplication',
|
'PhabricatorPhurlApplication' => 'PhabricatorApplication',
|
||||||
|
'PhabricatorPhurlConfigOptions' => 'PhabricatorApplicationConfigOptions',
|
||||||
'PhabricatorPhurlController' => 'PhabricatorController',
|
'PhabricatorPhurlController' => 'PhabricatorController',
|
||||||
'PhabricatorPhurlDAO' => 'PhabricatorLiskDAO',
|
'PhabricatorPhurlDAO' => 'PhabricatorLiskDAO',
|
||||||
'PhabricatorPhurlLinkRemarkupRule' => 'PhutilRemarkupRule',
|
'PhabricatorPhurlLinkRemarkupRule' => 'PhutilRemarkupRule',
|
||||||
'PhabricatorPhurlRemarkupRule' => 'PhabricatorObjectRemarkupRule',
|
'PhabricatorPhurlRemarkupRule' => 'PhabricatorObjectRemarkupRule',
|
||||||
'PhabricatorPhurlSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
'PhabricatorPhurlSchemaSpec' => 'PhabricatorConfigSchemaSpec',
|
||||||
|
'PhabricatorPhurlShortURLController' => 'PhabricatorPhurlController',
|
||||||
|
'PhabricatorPhurlShortURLDefaultController' => 'PhabricatorPhurlController',
|
||||||
'PhabricatorPhurlURL' => array(
|
'PhabricatorPhurlURL' => array(
|
||||||
'PhabricatorPhurlDAO',
|
'PhabricatorPhurlDAO',
|
||||||
'PhabricatorPolicyInterface',
|
'PhabricatorPolicyInterface',
|
||||||
|
@ -6788,6 +6848,8 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSpacesInterface',
|
'PhabricatorSpacesInterface',
|
||||||
),
|
),
|
||||||
'PhabricatorPhurlURLAccessController' => 'PhabricatorPhurlController',
|
'PhabricatorPhurlURLAccessController' => 'PhabricatorPhurlController',
|
||||||
|
'PhabricatorPhurlURLCommentController' => 'PhabricatorPhurlController',
|
||||||
|
'PhabricatorPhurlURLCreateCapability' => 'PhabricatorPolicyCapability',
|
||||||
'PhabricatorPhurlURLEditController' => 'PhabricatorPhurlController',
|
'PhabricatorPhurlURLEditController' => 'PhabricatorPhurlController',
|
||||||
'PhabricatorPhurlURLEditor' => 'PhabricatorApplicationTransactionEditor',
|
'PhabricatorPhurlURLEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||||
'PhabricatorPhurlURLListController' => 'PhabricatorPhurlController',
|
'PhabricatorPhurlURLListController' => 'PhabricatorPhurlController',
|
||||||
|
@ -7163,6 +7225,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSetupIssue' => 'Phobject',
|
'PhabricatorSetupIssue' => 'Phobject',
|
||||||
'PhabricatorSetupIssueUIExample' => 'PhabricatorUIExample',
|
'PhabricatorSetupIssueUIExample' => 'PhabricatorUIExample',
|
||||||
'PhabricatorSetupIssueView' => 'AphrontView',
|
'PhabricatorSetupIssueView' => 'AphrontView',
|
||||||
|
'PhabricatorShortSite' => 'PhabricatorSite',
|
||||||
'PhabricatorSimpleEditType' => 'PhabricatorEditType',
|
'PhabricatorSimpleEditType' => 'PhabricatorEditType',
|
||||||
'PhabricatorSite' => 'AphrontSite',
|
'PhabricatorSite' => 'AphrontSite',
|
||||||
'PhabricatorSlowvoteApplication' => 'PhabricatorApplication',
|
'PhabricatorSlowvoteApplication' => 'PhabricatorApplication',
|
||||||
|
@ -7479,13 +7542,13 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorWorkingCopyDiscoveryTestCase' => 'PhabricatorWorkingCopyTestCase',
|
'PhabricatorWorkingCopyDiscoveryTestCase' => 'PhabricatorWorkingCopyTestCase',
|
||||||
'PhabricatorWorkingCopyPullTestCase' => 'PhabricatorWorkingCopyTestCase',
|
'PhabricatorWorkingCopyPullTestCase' => 'PhabricatorWorkingCopyTestCase',
|
||||||
'PhabricatorWorkingCopyTestCase' => 'PhabricatorTestCase',
|
'PhabricatorWorkingCopyTestCase' => 'PhabricatorTestCase',
|
||||||
|
'PhabricatorXHPASTDAO' => 'PhabricatorLiskDAO',
|
||||||
|
'PhabricatorXHPASTParseTree' => 'PhabricatorXHPASTDAO',
|
||||||
'PhabricatorXHPASTViewController' => 'PhabricatorController',
|
'PhabricatorXHPASTViewController' => 'PhabricatorController',
|
||||||
'PhabricatorXHPASTViewDAO' => 'PhabricatorLiskDAO',
|
|
||||||
'PhabricatorXHPASTViewFrameController' => 'PhabricatorXHPASTViewController',
|
'PhabricatorXHPASTViewFrameController' => 'PhabricatorXHPASTViewController',
|
||||||
'PhabricatorXHPASTViewFramesetController' => 'PhabricatorXHPASTViewController',
|
'PhabricatorXHPASTViewFramesetController' => 'PhabricatorXHPASTViewController',
|
||||||
'PhabricatorXHPASTViewInputController' => 'PhabricatorXHPASTViewPanelController',
|
'PhabricatorXHPASTViewInputController' => 'PhabricatorXHPASTViewPanelController',
|
||||||
'PhabricatorXHPASTViewPanelController' => 'PhabricatorXHPASTViewController',
|
'PhabricatorXHPASTViewPanelController' => 'PhabricatorXHPASTViewController',
|
||||||
'PhabricatorXHPASTViewParseTree' => 'PhabricatorXHPASTViewDAO',
|
|
||||||
'PhabricatorXHPASTViewRunController' => 'PhabricatorXHPASTViewController',
|
'PhabricatorXHPASTViewRunController' => 'PhabricatorXHPASTViewController',
|
||||||
'PhabricatorXHPASTViewStreamController' => 'PhabricatorXHPASTViewPanelController',
|
'PhabricatorXHPASTViewStreamController' => 'PhabricatorXHPASTViewPanelController',
|
||||||
'PhabricatorXHPASTViewTreeController' => 'PhabricatorXHPASTViewPanelController',
|
'PhabricatorXHPASTViewTreeController' => 'PhabricatorXHPASTViewPanelController',
|
||||||
|
@ -7511,6 +7574,7 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorApplicationTransactionInterface',
|
'PhabricatorApplicationTransactionInterface',
|
||||||
),
|
),
|
||||||
'PhameBlogController' => 'PhameController',
|
'PhameBlogController' => 'PhameController',
|
||||||
|
'PhameBlogCreateCapability' => 'PhabricatorPolicyCapability',
|
||||||
'PhameBlogDeleteController' => 'PhameBlogController',
|
'PhameBlogDeleteController' => 'PhameBlogController',
|
||||||
'PhameBlogEditController' => 'PhameBlogController',
|
'PhameBlogEditController' => 'PhameBlogController',
|
||||||
'PhameBlogEditor' => 'PhabricatorApplicationTransactionEditor',
|
'PhameBlogEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||||
|
@ -7518,13 +7582,16 @@ phutil_register_library_map(array(
|
||||||
'PhameBlogListController' => 'PhameBlogController',
|
'PhameBlogListController' => 'PhameBlogController',
|
||||||
'PhameBlogLiveController' => 'PhameBlogController',
|
'PhameBlogLiveController' => 'PhameBlogController',
|
||||||
'PhameBlogQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
'PhameBlogQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||||
|
'PhameBlogReplyHandler' => 'PhabricatorApplicationTransactionReplyHandler',
|
||||||
'PhameBlogSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
'PhameBlogSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||||
'PhameBlogSite' => 'PhameSite',
|
'PhameBlogSite' => 'PhameSite',
|
||||||
'PhameBlogSkin' => 'PhabricatorController',
|
'PhameBlogSkin' => 'PhabricatorController',
|
||||||
'PhameBlogTransaction' => 'PhabricatorApplicationTransaction',
|
'PhameBlogTransaction' => 'PhabricatorApplicationTransaction',
|
||||||
|
'PhameBlogTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||||
'PhameBlogViewController' => 'PhameBlogController',
|
'PhameBlogViewController' => 'PhameBlogController',
|
||||||
'PhameCelerityResources' => 'CelerityResources',
|
'PhameCelerityResources' => 'CelerityResources',
|
||||||
'PhameConduitAPIMethod' => 'ConduitAPIMethod',
|
'PhameConduitAPIMethod' => 'ConduitAPIMethod',
|
||||||
|
'PhameConstants' => 'Phobject',
|
||||||
'PhameController' => 'PhabricatorController',
|
'PhameController' => 'PhabricatorController',
|
||||||
'PhameCreatePostConduitAPIMethod' => 'PhameConduitAPIMethod',
|
'PhameCreatePostConduitAPIMethod' => 'PhameConduitAPIMethod',
|
||||||
'PhameDAO' => 'PhabricatorLiskDAO',
|
'PhameDAO' => 'PhabricatorLiskDAO',
|
||||||
|
@ -7538,12 +7605,14 @@ phutil_register_library_map(array(
|
||||||
'PhabricatorSubscribableInterface',
|
'PhabricatorSubscribableInterface',
|
||||||
'PhabricatorTokenReceiverInterface',
|
'PhabricatorTokenReceiverInterface',
|
||||||
),
|
),
|
||||||
|
'PhamePostCommentController' => 'PhamePostController',
|
||||||
'PhamePostController' => 'PhameController',
|
'PhamePostController' => 'PhameController',
|
||||||
'PhamePostDeleteController' => 'PhamePostController',
|
'PhamePostDeleteController' => 'PhamePostController',
|
||||||
'PhamePostEditController' => 'PhamePostController',
|
'PhamePostEditController' => 'PhamePostController',
|
||||||
'PhamePostEditor' => 'PhabricatorApplicationTransactionEditor',
|
'PhamePostEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||||
'PhamePostFramedController' => 'PhamePostController',
|
'PhamePostFramedController' => 'PhamePostController',
|
||||||
'PhamePostListController' => 'PhamePostController',
|
'PhamePostListController' => 'PhamePostController',
|
||||||
|
'PhamePostMailReceiver' => 'PhabricatorObjectMailReceiver',
|
||||||
'PhamePostNewController' => 'PhamePostController',
|
'PhamePostNewController' => 'PhamePostController',
|
||||||
'PhamePostNotLiveController' => 'PhamePostController',
|
'PhamePostNotLiveController' => 'PhamePostController',
|
||||||
'PhamePostPreviewController' => 'PhamePostController',
|
'PhamePostPreviewController' => 'PhamePostController',
|
||||||
|
@ -7552,6 +7621,7 @@ phutil_register_library_map(array(
|
||||||
'PhamePostReplyHandler' => 'PhabricatorApplicationTransactionReplyHandler',
|
'PhamePostReplyHandler' => 'PhabricatorApplicationTransactionReplyHandler',
|
||||||
'PhamePostSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
'PhamePostSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||||
'PhamePostTransaction' => 'PhabricatorApplicationTransaction',
|
'PhamePostTransaction' => 'PhabricatorApplicationTransaction',
|
||||||
|
'PhamePostTransactionComment' => 'PhabricatorApplicationTransactionComment',
|
||||||
'PhamePostTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
'PhamePostTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||||
'PhamePostUnpublishController' => 'PhamePostController',
|
'PhamePostUnpublishController' => 'PhamePostController',
|
||||||
'PhamePostView' => 'AphrontView',
|
'PhamePostView' => 'AphrontView',
|
||||||
|
@ -7708,7 +7778,6 @@ phutil_register_library_map(array(
|
||||||
'PhortuneMerchantTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
'PhortuneMerchantTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||||
'PhortuneMerchantViewController' => 'PhortuneMerchantController',
|
'PhortuneMerchantViewController' => 'PhortuneMerchantController',
|
||||||
'PhortuneMonthYearExpiryControl' => 'AphrontFormControl',
|
'PhortuneMonthYearExpiryControl' => 'AphrontFormControl',
|
||||||
'PhortuneNotImplementedException' => 'Exception',
|
|
||||||
'PhortuneOrderTableView' => 'AphrontView',
|
'PhortuneOrderTableView' => 'AphrontView',
|
||||||
'PhortunePayPalPaymentProvider' => 'PhortunePaymentProvider',
|
'PhortunePayPalPaymentProvider' => 'PhortunePaymentProvider',
|
||||||
'PhortunePaymentMethod' => array(
|
'PhortunePaymentMethod' => array(
|
||||||
|
|
44
src/aphront/site/PhabricatorShortSite.php
Normal file
44
src/aphront/site/PhabricatorShortSite.php
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorShortSite extends PhabricatorSite {
|
||||||
|
|
||||||
|
public function getDescription() {
|
||||||
|
return pht('Serves shortened URLs.');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPriority() {
|
||||||
|
return 2500;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function newSiteForRequest(AphrontRequest $request) {
|
||||||
|
$host = $request->getHost();
|
||||||
|
|
||||||
|
$uri = PhabricatorEnv::getEnvConfig('phurl.short-uri');
|
||||||
|
if (!strlen($uri)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$phurl_installed = PhabricatorApplication::isClassInstalled(
|
||||||
|
'PhabricatorPhurlApplication');
|
||||||
|
if (!$phurl_installed) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->isHostMatch($host, array($uri))) {
|
||||||
|
return new PhabricatorShortSite();
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRoutingMaps() {
|
||||||
|
$app = PhabricatorApplication::getByClass('PhabricatorPhurlApplication');
|
||||||
|
|
||||||
|
$maps = array();
|
||||||
|
$maps[] = $this->newRoutingMap()
|
||||||
|
->setApplication($app)
|
||||||
|
->setRoutes($app->getShortRoutes());
|
||||||
|
return $maps;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -6,7 +6,8 @@ final class AlmanacBinding
|
||||||
PhabricatorPolicyInterface,
|
PhabricatorPolicyInterface,
|
||||||
PhabricatorCustomFieldInterface,
|
PhabricatorCustomFieldInterface,
|
||||||
PhabricatorApplicationTransactionInterface,
|
PhabricatorApplicationTransactionInterface,
|
||||||
AlmanacPropertyInterface {
|
AlmanacPropertyInterface,
|
||||||
|
PhabricatorDestructibleInterface {
|
||||||
|
|
||||||
protected $servicePHID;
|
protected $servicePHID;
|
||||||
protected $devicePHID;
|
protected $devicePHID;
|
||||||
|
@ -204,4 +205,14 @@ final class AlmanacBinding
|
||||||
return $timeline;
|
return $timeline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -( PhabricatorDestructibleInterface )----------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
public function destroyObjectPermanently(
|
||||||
|
PhabricatorDestructionEngine $engine) {
|
||||||
|
|
||||||
|
$this->delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,8 @@ final class PhabricatorJIRAAuthProvider extends PhabricatorOAuth1AuthProvider {
|
||||||
const PROPERTY_JIRA_URI = 'oauth1:jira:uri';
|
const PROPERTY_JIRA_URI = 'oauth1:jira:uri';
|
||||||
const PROPERTY_PUBLIC_KEY = 'oauth1:jira:key:public';
|
const PROPERTY_PUBLIC_KEY = 'oauth1:jira:key:public';
|
||||||
const PROPERTY_PRIVATE_KEY = 'oauth1:jira:key:private';
|
const PROPERTY_PRIVATE_KEY = 'oauth1:jira:key:private';
|
||||||
|
const PROPERTY_REPORT_LINK = 'oauth1:jira:report:link';
|
||||||
|
const PROPERTY_REPORT_COMMENT = 'oauth1:jira:report:comment';
|
||||||
|
|
||||||
|
|
||||||
public function readFormValuesFromProvider() {
|
public function readFormValuesFromProvider() {
|
||||||
|
@ -100,6 +102,10 @@ final class PhabricatorJIRAAuthProvider extends PhabricatorOAuth1AuthProvider {
|
||||||
return array(
|
return array(
|
||||||
self::PROPERTY_JIRA_NAME => $name,
|
self::PROPERTY_JIRA_NAME => $name,
|
||||||
self::PROPERTY_JIRA_URI => $request->getStr(self::PROPERTY_JIRA_URI),
|
self::PROPERTY_JIRA_URI => $request->getStr(self::PROPERTY_JIRA_URI),
|
||||||
|
self::PROPERTY_REPORT_LINK =>
|
||||||
|
$request->getInt(self::PROPERTY_REPORT_LINK, 0),
|
||||||
|
self::PROPERTY_REPORT_COMMENT =>
|
||||||
|
$request->getInt(self::PROPERTY_REPORT_COMMENT, 0),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,6 +181,7 @@ final class PhabricatorJIRAAuthProvider extends PhabricatorOAuth1AuthProvider {
|
||||||
'JIRA 5 or earlier.'));
|
'JIRA 5 or earlier.'));
|
||||||
|
|
||||||
$is_setup = $this->isSetup();
|
$is_setup = $this->isSetup();
|
||||||
|
$viewer = $request->getViewer();
|
||||||
|
|
||||||
$e_required = $request->isFormPost() ? null : true;
|
$e_required = $request->isFormPost() ? null : true;
|
||||||
|
|
||||||
|
@ -249,11 +256,40 @@ final class PhabricatorJIRAAuthProvider extends PhabricatorOAuth1AuthProvider {
|
||||||
id(new AphrontFormStaticControl())
|
id(new AphrontFormStaticControl())
|
||||||
->setLabel(pht('Public Key'))
|
->setLabel(pht('Public Key'))
|
||||||
->setValue($pkey));
|
->setValue($pkey));
|
||||||
|
|
||||||
|
$form
|
||||||
|
->appendRemarkupInstructions(
|
||||||
|
pht(
|
||||||
|
'= Integration Options = '."\n".
|
||||||
|
'Configure how to record Revisions on JIRA tasks.'."\n\n".
|
||||||
|
'Note you\'ll have to restart the daemons for this to take '.
|
||||||
|
'effect.'))
|
||||||
|
->appendChild(
|
||||||
|
id(new AphrontFormCheckboxControl())
|
||||||
|
->addCheckbox(
|
||||||
|
self::PROPERTY_REPORT_LINK,
|
||||||
|
1,
|
||||||
|
new PHUIRemarkupView(
|
||||||
|
$viewer,
|
||||||
|
pht(
|
||||||
|
'Create **Issue Link** to the Revision, as an "implemented '.
|
||||||
|
'in" relationship.')),
|
||||||
|
$this->shouldCreateJIRALink()))
|
||||||
|
->appendChild(
|
||||||
|
id(new AphrontFormCheckboxControl())
|
||||||
|
->addCheckbox(
|
||||||
|
self::PROPERTY_REPORT_COMMENT,
|
||||||
|
1,
|
||||||
|
new PHUIRemarkupView(
|
||||||
|
$viewer,
|
||||||
|
pht(
|
||||||
|
'**Post a comment** in the JIRA task, similar to the '.
|
||||||
|
'emails Phabricator sends.')),
|
||||||
|
$this->shouldCreateJIRAComment()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JIRA uses a setup step to generate public/private keys.
|
* JIRA uses a setup step to generate public/private keys.
|
||||||
*/
|
*/
|
||||||
|
@ -286,4 +322,14 @@ final class PhabricatorJIRAAuthProvider extends PhabricatorOAuth1AuthProvider {
|
||||||
return $adapter->newJIRAFuture($path, $method, $params);
|
return $adapter->newJIRAFuture($path, $method, $params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function shouldCreateJIRALink() {
|
||||||
|
$config = $this->getProviderConfig();
|
||||||
|
return $config->getProperty(self::PROPERTY_REPORT_LINK, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function shouldCreateJIRAComment() {
|
||||||
|
$config = $this->getProviderConfig();
|
||||||
|
return $config->getProperty(self::PROPERTY_REPORT_COMMENT, true);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -635,8 +635,12 @@ abstract class PhabricatorApplication
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getEditRoutePattern($base) {
|
protected function getEditRoutePattern($base = null) {
|
||||||
return $base.'(?:(?P<id>[0-9]\d*)/)?(?:(?P<editAction>parameters)/)?';
|
return $base.'(?:(?P<id>[0-9]\d*)/)?(?:(?P<editAction>parameters)/)?';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getQueryRoutePattern($base = null) {
|
||||||
|
return $base.'(?:query/(?P<queryKey>[^/]+)/)?';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,6 @@ final class PhabricatorAccessControlTestCase extends PhabricatorTestCase {
|
||||||
$env->overrideEnvConfig('phabricator.base-uri', 'http://'.$host);
|
$env->overrideEnvConfig('phabricator.base-uri', 'http://'.$host);
|
||||||
$env->overrideEnvConfig('policy.allow-public', false);
|
$env->overrideEnvConfig('policy.allow-public', false);
|
||||||
$env->overrideEnvConfig('auth.require-email-verification', false);
|
$env->overrideEnvConfig('auth.require-email-verification', false);
|
||||||
$env->overrideEnvConfig('auth.email-domains', array());
|
|
||||||
$env->overrideEnvConfig('security.require-multi-factor-auth', false);
|
$env->overrideEnvConfig('security.require-multi-factor-auth', false);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,15 @@ final class PhabricatorCalendarApplication extends PhabricatorApplication {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getHelpDocumentationArticles(PhabricatorUser $viewer) {
|
||||||
|
return array(
|
||||||
|
array(
|
||||||
|
'name' => pht('Calendar User Guide'),
|
||||||
|
'href' => PhabricatorEnv::getDoclink('Calendar User Guide'),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function getQuickCreateItems(PhabricatorUser $viewer) {
|
public function getQuickCreateItems(PhabricatorUser $viewer) {
|
||||||
$items = array();
|
$items = array();
|
||||||
|
|
||||||
|
|
|
@ -436,9 +436,9 @@ final class PhabricatorCalendarEventEditor
|
||||||
$body = parent::buildMailBody($object, $xactions);
|
$body = parent::buildMailBody($object, $xactions);
|
||||||
|
|
||||||
if (strlen($description)) {
|
if (strlen($description)) {
|
||||||
$body->addTextSection(
|
$body->addRemarkupSection(
|
||||||
pht('EVENT DESCRIPTION'),
|
pht('EVENT DESCRIPTION'),
|
||||||
$object->getDescription());
|
$description);
|
||||||
}
|
}
|
||||||
|
|
||||||
$body->addLinkSection(
|
$body->addLinkSection(
|
||||||
|
|
|
@ -19,20 +19,20 @@ final class ConduitQueryConduitAPIMethod extends ConduitAPIMethod {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function execute(ConduitAPIRequest $request) {
|
protected function execute(ConduitAPIRequest $request) {
|
||||||
$classes = id(new PhutilClassMapQuery())
|
$methods = id(new PhabricatorConduitMethodQuery())
|
||||||
->setAncestorClass('ConduitAPIMethod')
|
->setViewer($request->getUser())
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$names_to_params = array();
|
$map = array();
|
||||||
foreach ($classes as $class) {
|
foreach ($methods as $method) {
|
||||||
$names_to_params[$class->getAPIMethodName()] = array(
|
$map[$method->getAPIMethodName()] = array(
|
||||||
'description' => $class->getMethodDescription(),
|
'description' => $method->getMethodDescription(),
|
||||||
'params' => $class->getParamTypes(),
|
'params' => $method->getParamTypes(),
|
||||||
'return' => $class->getReturnType(),
|
'return' => $method->getReturnType(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $names_to_params;
|
return $map;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,6 +115,43 @@ final class PhabricatorConduitMethodQuery
|
||||||
return $methods;
|
return $methods;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function willFilterPage(array $methods) {
|
||||||
|
$application_phids = array();
|
||||||
|
foreach ($methods as $method) {
|
||||||
|
$application = $method->getApplication();
|
||||||
|
if ($application === null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$application_phids[] = $application->getPHID();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($application_phids) {
|
||||||
|
$applications = id(new PhabricatorApplicationQuery())
|
||||||
|
->setParentQuery($this)
|
||||||
|
->setViewer($this->getViewer())
|
||||||
|
->withPHIDs($application_phids)
|
||||||
|
->execute();
|
||||||
|
$applications = mpull($applications, null, 'getPHID');
|
||||||
|
} else {
|
||||||
|
$applications = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove methods which belong to an application the viewer can not see.
|
||||||
|
foreach ($methods as $key => $method) {
|
||||||
|
$application = $method->getApplication();
|
||||||
|
if ($application === null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($applications[$application->getPHID()])) {
|
||||||
|
$this->didRejectResult($method);
|
||||||
|
unset($methods[$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $methods;
|
||||||
|
}
|
||||||
|
|
||||||
public function getQueryApplicationClass() {
|
public function getQueryApplicationClass() {
|
||||||
return 'PhabricatorConduitApplication';
|
return 'PhabricatorConduitApplication';
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,6 @@ final class PhabricatorDaemonsSetupCheck extends PhabricatorSetupCheck {
|
||||||
}
|
}
|
||||||
|
|
||||||
$phd_user = PhabricatorEnv::getEnvConfig('phd.user');
|
$phd_user = PhabricatorEnv::getEnvConfig('phd.user');
|
||||||
$environment_hash = PhabricatorEnv::calculateEnvironmentHash();
|
|
||||||
$all_daemons = id(new PhabricatorDaemonLogQuery())
|
$all_daemons = id(new PhabricatorDaemonLogQuery())
|
||||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||||
->withStatus(PhabricatorDaemonLogQuery::STATUS_ALIVE)
|
->withStatus(PhabricatorDaemonLogQuery::STATUS_ALIVE)
|
||||||
|
@ -91,107 +90,6 @@ final class PhabricatorDaemonsSetupCheck extends PhabricatorSetupCheck {
|
||||||
->addCommand('phabricator/ $ ./bin/phd restart');
|
->addCommand('phabricator/ $ ./bin/phd restart');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($daemon->getEnvHash() != $environment_hash) {
|
|
||||||
$doc_href = PhabricatorEnv::getDocLink(
|
|
||||||
'Managing Daemons with phd');
|
|
||||||
|
|
||||||
$summary = pht(
|
|
||||||
'At least one daemon is currently running with different '.
|
|
||||||
'configuration than the Phabricator web application.');
|
|
||||||
|
|
||||||
$list_section = null;
|
|
||||||
$env_info = $daemon->getEnvInfo();
|
|
||||||
if ($env_info) {
|
|
||||||
$issues = PhabricatorEnv::compareEnvironmentInfo(
|
|
||||||
PhabricatorEnv::calculateEnvironmentInfo(),
|
|
||||||
$env_info);
|
|
||||||
|
|
||||||
if ($issues) {
|
|
||||||
foreach ($issues as $key => $issue) {
|
|
||||||
$issues[$key] = phutil_tag('li', array(), $issue);
|
|
||||||
}
|
|
||||||
|
|
||||||
$list_section = array(
|
|
||||||
pht(
|
|
||||||
'The configurations differ in the following %s way(s):',
|
|
||||||
phutil_count($issues)),
|
|
||||||
phutil_tag(
|
|
||||||
'ul',
|
|
||||||
array(),
|
|
||||||
$issues),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$message = pht(
|
|
||||||
'At least one daemon is currently running with a different '.
|
|
||||||
'configuration (config checksum %s) than the web application '.
|
|
||||||
'(config checksum %s).'.
|
|
||||||
"\n\n%s".
|
|
||||||
'This usually means that you have just made a configuration change '.
|
|
||||||
'from the web UI, but have not yet restarted the daemons. You '.
|
|
||||||
'need to restart the daemons after making configuration changes '.
|
|
||||||
'so they will pick up the new values: until you do, they will '.
|
|
||||||
'continue operating with the old settings.'.
|
|
||||||
"\n\n".
|
|
||||||
'(If you plan to make more changes, you can restart the daemons '.
|
|
||||||
'once after you finish making all of your changes.)'.
|
|
||||||
"\n\n".
|
|
||||||
'Use %s to restart daemons. You can find a list of running daemons '.
|
|
||||||
'in the %s, which will also help you identify which daemon (or '.
|
|
||||||
'daemons) have divergent configuration. For more information about '.
|
|
||||||
'managing the daemons, see %s in the documentation.'.
|
|
||||||
"\n\n".
|
|
||||||
'This can also happen if you use the %s environmental variable to '.
|
|
||||||
'choose a configuration file, but the daemons run with a different '.
|
|
||||||
'value than the web application. If restarting the daemons does '.
|
|
||||||
'not resolve this issue and you use %s to select configuration, '.
|
|
||||||
'check that it is set consistently.'.
|
|
||||||
"\n\n".
|
|
||||||
'A third possible cause is that you run several machines, and '.
|
|
||||||
'the %s configuration file differs between them. This file is '.
|
|
||||||
'updated when you edit configuration from the CLI with %s. If '.
|
|
||||||
'restarting the daemons does not resolve this issue and you '.
|
|
||||||
'run multiple machines, check that all machines have identical '.
|
|
||||||
'%s configuration files.'.
|
|
||||||
"\n\n".
|
|
||||||
'This issue is not severe, but usually indicates that something '.
|
|
||||||
'is not configured the way you expect, and may cause the daemons '.
|
|
||||||
'to exhibit different behavior than the web application does.',
|
|
||||||
|
|
||||||
phutil_tag('tt', array(), substr($daemon->getEnvHash(), 0, 12)),
|
|
||||||
phutil_tag('tt', array(), substr($environment_hash, 0, 12)),
|
|
||||||
$list_section,
|
|
||||||
phutil_tag('tt', array(), 'bin/phd restart'),
|
|
||||||
phutil_tag(
|
|
||||||
'a',
|
|
||||||
array(
|
|
||||||
'href' => '/daemon/',
|
|
||||||
'target' => '_blank',
|
|
||||||
),
|
|
||||||
pht('Daemon Console')),
|
|
||||||
phutil_tag(
|
|
||||||
'a',
|
|
||||||
array(
|
|
||||||
'href' => $doc_href,
|
|
||||||
'target' => '_blank',
|
|
||||||
),
|
|
||||||
pht('Managing Daemons with phd')),
|
|
||||||
phutil_tag('tt', array(), 'PHABRICATOR_ENV'),
|
|
||||||
phutil_tag('tt', array(), 'PHABRICATOR_ENV'),
|
|
||||||
phutil_tag('tt', array(), 'phabricator/conf/local/local.json'),
|
|
||||||
phutil_tag('tt', array(), 'bin/config'),
|
|
||||||
phutil_tag('tt', array(), 'phabricator/conf/local/local.json'));
|
|
||||||
|
|
||||||
$this->newIssue('daemons.need-restarting')
|
|
||||||
->setName(pht('Daemons and Web Have Different Config'))
|
|
||||||
->setSummary($summary)
|
|
||||||
->setMessage($message)
|
|
||||||
->addCommand('phabricator/ $ ./bin/phd restart');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -292,6 +292,10 @@ final class PhabricatorExtraConfigSetupCheck extends PhabricatorSetupCheck {
|
||||||
'gcdaemon.ttl.task-archive' => $gc_reason,
|
'gcdaemon.ttl.task-archive' => $gc_reason,
|
||||||
'gcdaemon.ttl.general-cache' => $gc_reason,
|
'gcdaemon.ttl.general-cache' => $gc_reason,
|
||||||
'gcdaemon.ttl.conduit-logs' => $gc_reason,
|
'gcdaemon.ttl.conduit-logs' => $gc_reason,
|
||||||
|
|
||||||
|
'phd.variant-config' => pht(
|
||||||
|
'This configuration is no longer relevant because daemons '.
|
||||||
|
'restart automatically on configuration changes.'),
|
||||||
);
|
);
|
||||||
|
|
||||||
return $ancient_config;
|
return $ancient_config;
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
final class PhabricatorDisqusConfigOptions
|
|
||||||
extends PhabricatorApplicationConfigOptions {
|
|
||||||
|
|
||||||
public function getName() {
|
|
||||||
return pht('Integration with Disqus');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getDescription() {
|
|
||||||
return pht('Disqus authentication and integration options.');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getFontIcon() {
|
|
||||||
return 'fa-comment';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getGroup() {
|
|
||||||
return 'core';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getOptions() {
|
|
||||||
return array(
|
|
||||||
$this->newOption('disqus.shortname', 'string', null)
|
|
||||||
->setSummary(pht('Shortname for Disqus comment widget.'))
|
|
||||||
->setDescription(
|
|
||||||
pht(
|
|
||||||
"Website shortname to use for Disqus comment widget in Phame. ".
|
|
||||||
"For more information, see:\n\n".
|
|
||||||
"[[http://docs.disqus.com/help/4/ | Disqus Quick Start Guide]]\n".
|
|
||||||
"[[http://docs.disqus.com/help/68/ | Information on Shortnames]]")),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -73,13 +73,6 @@ final class PhabricatorPHDConfigOptions
|
||||||
"trace mode. See also '%s'.",
|
"trace mode. See also '%s'.",
|
||||||
'phd debug',
|
'phd debug',
|
||||||
'phd.verbose')),
|
'phd.verbose')),
|
||||||
$this->newOption('phd.variant-config', 'list<string>', array())
|
|
||||||
->setDescription(
|
|
||||||
pht(
|
|
||||||
'Specify config keys that can safely vary between the web tier '.
|
|
||||||
'and the daemons. Primarily, this is a way to suppress the '.
|
|
||||||
'"Daemons and Web Have Different Config" setup issue on a per '.
|
|
||||||
'config key basis.')),
|
|
||||||
$this->newOption('phd.garbage-collection', 'wild', array())
|
$this->newOption('phd.garbage-collection', 'wild', array())
|
||||||
->setLocked(true)
|
->setLocked(true)
|
||||||
->setLockedMessage(
|
->setLockedMessage(
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorPhurlConfigOptions
|
||||||
|
extends PhabricatorApplicationConfigOptions {
|
||||||
|
|
||||||
|
public function getName() {
|
||||||
|
return pht('Phurl');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDescription() {
|
||||||
|
return pht('Options for Phurl.');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFontIcon() {
|
||||||
|
return 'fa-link';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getGroup() {
|
||||||
|
return 'apps';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getOptions() {
|
||||||
|
return array(
|
||||||
|
$this->newOption('phurl.short-uri', 'string', null)
|
||||||
|
->setLocked(true)
|
||||||
|
->setSummary(pht('URI that Phurl will use to shorten URLs.'))
|
||||||
|
->setDescription(
|
||||||
|
pht(
|
||||||
|
'Set the URI that Phurl will use to share shortened URLs.'))
|
||||||
|
->addExample(
|
||||||
|
'https://some-very-short-domain.museum/',
|
||||||
|
pht('Valid Setting')),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -623,7 +623,6 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
|
||||||
|
|
||||||
switch ($xaction->getTransactionType()) {
|
switch ($xaction->getTransactionType()) {
|
||||||
case ConpherenceTransaction::TYPE_PICTURE:
|
case ConpherenceTransaction::TYPE_PICTURE:
|
||||||
return array($xaction->getNewValue()->getPHID());
|
|
||||||
case ConpherenceTransaction::TYPE_PICTURE_CROP:
|
case ConpherenceTransaction::TYPE_PICTURE_CROP:
|
||||||
return array($xaction->getNewValue());
|
return array($xaction->getNewValue());
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,14 +58,6 @@ final class PhabricatorDaemonLogViewController
|
||||||
}
|
}
|
||||||
|
|
||||||
$header->addTag($tag);
|
$header->addTag($tag);
|
||||||
$env_hash = PhabricatorEnv::calculateEnvironmentHash();
|
|
||||||
if ($log->getEnvHash() != $env_hash) {
|
|
||||||
$tag = id(new PHUITagView())
|
|
||||||
->setType(PHUITagView::TYPE_STATE)
|
|
||||||
->setBackgroundColor(PHUITagView::COLOR_YELLOW)
|
|
||||||
->setName(pht('Stale Config'));
|
|
||||||
$header->addTag($tag);
|
|
||||||
}
|
|
||||||
|
|
||||||
$properties = $this->buildPropertyListView($log);
|
$properties = $this->buildPropertyListView($log);
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,6 @@ final class PhabricatorDaemonEventListener extends PhabricatorEventListener {
|
||||||
->setHost(php_uname('n'))
|
->setHost(php_uname('n'))
|
||||||
->setPID(getmypid())
|
->setPID(getmypid())
|
||||||
->setRunningAsUser($current_user['name'])
|
->setRunningAsUser($current_user['name'])
|
||||||
->setEnvHash(PhabricatorEnv::calculateEnvironmentHash())
|
|
||||||
->setEnvInfo(PhabricatorEnv::calculateEnvironmentInfo())
|
|
||||||
->setStatus(PhabricatorDaemonLog::STATUS_RUNNING)
|
->setStatus(PhabricatorDaemonLog::STATUS_RUNNING)
|
||||||
->setArgv($event->getValue('argv'))
|
->setArgv($event->getValue('argv'))
|
||||||
->setExplicitArgv($event->getValue('explicitArgv'))
|
->setExplicitArgv($event->getValue('explicitArgv'))
|
||||||
|
|
|
@ -17,8 +17,6 @@ final class PhabricatorDaemonLog extends PhabricatorDaemonDAO
|
||||||
protected $runningAsUser;
|
protected $runningAsUser;
|
||||||
protected $argv;
|
protected $argv;
|
||||||
protected $explicitArgv = array();
|
protected $explicitArgv = array();
|
||||||
protected $envHash;
|
|
||||||
protected $envInfo;
|
|
||||||
protected $status;
|
protected $status;
|
||||||
|
|
||||||
protected function getConfiguration() {
|
protected function getConfiguration() {
|
||||||
|
@ -26,14 +24,12 @@ final class PhabricatorDaemonLog extends PhabricatorDaemonDAO
|
||||||
self::CONFIG_SERIALIZATION => array(
|
self::CONFIG_SERIALIZATION => array(
|
||||||
'argv' => self::SERIALIZATION_JSON,
|
'argv' => self::SERIALIZATION_JSON,
|
||||||
'explicitArgv' => self::SERIALIZATION_JSON,
|
'explicitArgv' => self::SERIALIZATION_JSON,
|
||||||
'envInfo' => self::SERIALIZATION_JSON,
|
|
||||||
),
|
),
|
||||||
self::CONFIG_COLUMN_SCHEMA => array(
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
'daemon' => 'text255',
|
'daemon' => 'text255',
|
||||||
'host' => 'text255',
|
'host' => 'text255',
|
||||||
'pid' => 'uint32',
|
'pid' => 'uint32',
|
||||||
'runningAsUser' => 'text255?',
|
'runningAsUser' => 'text255?',
|
||||||
'envHash' => 'bytes40',
|
|
||||||
'status' => 'text8',
|
'status' => 'text8',
|
||||||
'daemonID' => 'text64',
|
'daemonID' => 'text64',
|
||||||
),
|
),
|
||||||
|
|
|
@ -17,7 +17,6 @@ final class PhabricatorDaemonLogListView extends AphrontView {
|
||||||
throw new PhutilInvalidStateException('setUser');
|
throw new PhutilInvalidStateException('setUser');
|
||||||
}
|
}
|
||||||
|
|
||||||
$env_hash = PhabricatorEnv::calculateEnvironmentHash();
|
|
||||||
$list = new PHUIObjectItemListView();
|
$list = new PHUIObjectItemListView();
|
||||||
$list->setFlush(true);
|
$list->setFlush(true);
|
||||||
foreach ($this->daemonLogs as $log) {
|
foreach ($this->daemonLogs as $log) {
|
||||||
|
@ -33,15 +32,8 @@ final class PhabricatorDaemonLogListView extends AphrontView {
|
||||||
$status = $log->getStatus();
|
$status = $log->getStatus();
|
||||||
switch ($status) {
|
switch ($status) {
|
||||||
case PhabricatorDaemonLog::STATUS_RUNNING:
|
case PhabricatorDaemonLog::STATUS_RUNNING:
|
||||||
if ($env_hash != $log->getEnvHash()) {
|
|
||||||
$item->setStatusIcon('fa-warning yellow');
|
|
||||||
$item->addAttribute(pht(
|
|
||||||
'This daemon is running with an out of date configuration and '.
|
|
||||||
'should be restarted.'));
|
|
||||||
} else {
|
|
||||||
$item->setStatusIcon('fa-rocket green');
|
$item->setStatusIcon('fa-rocket green');
|
||||||
$item->addAttribute(pht('This daemon is running.'));
|
$item->addAttribute(pht('This daemon is running.'));
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case PhabricatorDaemonLog::STATUS_DEAD:
|
case PhabricatorDaemonLog::STATUS_DEAD:
|
||||||
$item->setStatusIcon('fa-warning red');
|
$item->setStatusIcon('fa-warning red');
|
||||||
|
|
|
@ -387,7 +387,6 @@ final class DifferentialChangesetViewController extends DifferentialController {
|
||||||
$inlines = array();
|
$inlines = array();
|
||||||
foreach ($messages as $message) {
|
foreach ($messages as $message) {
|
||||||
$description = $message->getProperty('description');
|
$description = $message->getProperty('description');
|
||||||
$description = '%%%'.$description.'%%%';
|
|
||||||
|
|
||||||
$inlines[] = id(clone $template)
|
$inlines[] = id(clone $template)
|
||||||
->setSyntheticAuthor(pht('Lint: %s', $message->getName()))
|
->setSyntheticAuthor(pht('Lint: %s', $message->getName()))
|
||||||
|
|
|
@ -1298,15 +1298,6 @@ final class DifferentialTransactionEditor
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function extractFilePHIDsFromCustomTransaction(
|
|
||||||
PhabricatorLiskDAO $object,
|
|
||||||
PhabricatorApplicationTransaction $xaction) {
|
|
||||||
|
|
||||||
switch ($xaction->getTransactionType()) {}
|
|
||||||
|
|
||||||
return parent::extractFilePHIDsFromCustomTransaction($object, $xaction);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function expandCustomRemarkupBlockTransactions(
|
protected function expandCustomRemarkupBlockTransactions(
|
||||||
PhabricatorLiskDAO $object,
|
PhabricatorLiskDAO $object,
|
||||||
array $xactions,
|
array $xactions,
|
||||||
|
|
|
@ -20,11 +20,17 @@ final class DiffusionUpdateCoverageConduitAPIMethod
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function defineParamTypes() {
|
protected function defineParamTypes() {
|
||||||
|
$modes = array(
|
||||||
|
'overwrite',
|
||||||
|
'update',
|
||||||
|
);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'repositoryPHID' => 'required phid',
|
'repositoryPHID' => 'required phid',
|
||||||
'branch' => 'required string',
|
'branch' => 'required string',
|
||||||
'commit' => 'required string',
|
'commit' => 'required string',
|
||||||
'coverage' => 'required map<string, string>',
|
'coverage' => 'required map<string, string>',
|
||||||
|
'mode' => 'optional '.$this->formatStringConstants($modes),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,16 +83,31 @@ final class DiffusionUpdateCoverageConduitAPIMethod
|
||||||
$table_name = 'repository_coverage';
|
$table_name = 'repository_coverage';
|
||||||
|
|
||||||
$conn->openTransaction();
|
$conn->openTransaction();
|
||||||
|
$mode = $request->getValue('mode');
|
||||||
|
switch ($mode) {
|
||||||
|
case '':
|
||||||
|
case 'overwrite':
|
||||||
|
// sets the coverage for the whole branch, deleting all previous
|
||||||
|
// coverage information
|
||||||
queryfx(
|
queryfx(
|
||||||
$conn,
|
$conn,
|
||||||
'DELETE FROM %T WHERE branchID = %d',
|
'DELETE FROM %T WHERE branchID = %d',
|
||||||
$table_name,
|
$table_name,
|
||||||
$branch->getID());
|
$branch->getID());
|
||||||
|
break;
|
||||||
|
case 'update':
|
||||||
|
// sets the coverage for the provided files on the specified commit
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$conn->killTransaction();
|
||||||
|
throw new Exception(pht('Invalid mode "%s".', $mode));
|
||||||
|
}
|
||||||
|
|
||||||
foreach (PhabricatorLiskDAO::chunkSQL($sql) as $chunk) {
|
foreach (PhabricatorLiskDAO::chunkSQL($sql) as $chunk) {
|
||||||
queryfx(
|
queryfx(
|
||||||
$conn,
|
$conn,
|
||||||
'INSERT INTO %T (branchID, pathID, commitID, coverage) VALUES %Q',
|
'INSERT INTO %T (branchID, pathID, commitID, coverage) VALUES %Q'.
|
||||||
|
' ON DUPLICATE KEY UPDATE coverage=VALUES(coverage)',
|
||||||
$table_name,
|
$table_name,
|
||||||
$chunk);
|
$chunk);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,7 @@ final class DiffusionBrowseTableView extends DiffusionView {
|
||||||
$rows = array();
|
$rows = array();
|
||||||
$show_edit = false;
|
$show_edit = false;
|
||||||
foreach ($this->paths as $path) {
|
foreach ($this->paths as $path) {
|
||||||
|
$full_path = $base_path.$path->getPath();
|
||||||
$history_link = $this->linkHistory($path->getPath());
|
|
||||||
|
|
||||||
$dir_slash = null;
|
$dir_slash = null;
|
||||||
$file_type = $path->getFileType();
|
$file_type = $path->getFileType();
|
||||||
|
@ -40,11 +39,13 @@ final class DiffusionBrowseTableView extends DiffusionView {
|
||||||
$dir_slash = '/';
|
$dir_slash = '/';
|
||||||
|
|
||||||
$browse_link = phutil_tag('strong', array(), $this->linkBrowse(
|
$browse_link = phutil_tag('strong', array(), $this->linkBrowse(
|
||||||
$base_path.$path->getPath().$dir_slash,
|
$full_path.$dir_slash,
|
||||||
array(
|
array(
|
||||||
'type' => $file_type,
|
'type' => $file_type,
|
||||||
'name' => $browse_text,
|
'name' => $browse_text,
|
||||||
)));
|
)));
|
||||||
|
|
||||||
|
$history_path = $full_path.'/';
|
||||||
} else if ($file_type == DifferentialChangeType::FILE_SUBMODULE) {
|
} else if ($file_type == DifferentialChangeType::FILE_SUBMODULE) {
|
||||||
$browse_text = $path->getPath().'/';
|
$browse_text = $path->getPath().'/';
|
||||||
$browse_link = phutil_tag('strong', array(), $this->linkBrowse(
|
$browse_link = phutil_tag('strong', array(), $this->linkBrowse(
|
||||||
|
@ -55,16 +56,22 @@ final class DiffusionBrowseTableView extends DiffusionView {
|
||||||
'hash' => $path->getHash(),
|
'hash' => $path->getHash(),
|
||||||
'external' => $path->getExternalURI(),
|
'external' => $path->getExternalURI(),
|
||||||
)));
|
)));
|
||||||
|
|
||||||
|
$history_path = $full_path.'/';
|
||||||
} else {
|
} else {
|
||||||
$browse_text = $path->getPath();
|
$browse_text = $path->getPath();
|
||||||
$browse_link = $this->linkBrowse(
|
$browse_link = $this->linkBrowse(
|
||||||
$base_path.$path->getPath(),
|
$full_path,
|
||||||
array(
|
array(
|
||||||
'type' => $file_type,
|
'type' => $file_type,
|
||||||
'name' => $browse_text,
|
'name' => $browse_text,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$history_path = $full_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$history_link = $this->linkHistory($history_path);
|
||||||
|
|
||||||
$dict = array(
|
$dict = array(
|
||||||
'lint' => celerity_generate_unique_node_id(),
|
'lint' => celerity_generate_unique_node_id(),
|
||||||
'commit' => celerity_generate_unique_node_id(),
|
'commit' => celerity_generate_unique_node_id(),
|
||||||
|
@ -73,7 +80,7 @@ final class DiffusionBrowseTableView extends DiffusionView {
|
||||||
'details' => celerity_generate_unique_node_id(),
|
'details' => celerity_generate_unique_node_id(),
|
||||||
);
|
);
|
||||||
|
|
||||||
$need_pull[$base_path.$path->getPath().$dir_slash] = $dict;
|
$need_pull[$full_path.$dir_slash] = $dict;
|
||||||
foreach ($dict as $k => $uniq) {
|
foreach ($dict as $k => $uniq) {
|
||||||
$dict[$k] = phutil_tag('span', array('id' => $uniq), '');
|
$dict[$k] = phutil_tag('span', array('id' => $uniq), '');
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,14 @@ final class DoorkeeperJIRAFeedWorker extends DoorkeeperFeedWorker {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$do_anything = ($this->shouldPostComment() || $this->shouldPostLink());
|
||||||
|
if (!$do_anything) {
|
||||||
|
$this->log(
|
||||||
|
"%s\n",
|
||||||
|
pht('JIRA integration is configured not to post anything.'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$xobjs = id(new DoorkeeperExternalObjectQuery())
|
$xobjs = id(new DoorkeeperExternalObjectQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->withPHIDs($jira_issue_phids)
|
->withPHIDs($jira_issue_phids)
|
||||||
|
@ -60,7 +68,6 @@ final class DoorkeeperJIRAFeedWorker extends DoorkeeperFeedWorker {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$story_text = $this->renderStoryText();
|
|
||||||
|
|
||||||
$xobjs = mgroup($xobjs, 'getApplicationDomain');
|
$xobjs = mgroup($xobjs, 'getApplicationDomain');
|
||||||
foreach ($xobjs as $domain => $xobj_list) {
|
foreach ($xobjs as $domain => $xobj_list) {
|
||||||
|
@ -84,13 +91,16 @@ final class DoorkeeperJIRAFeedWorker extends DoorkeeperFeedWorker {
|
||||||
foreach ($xobj_list as $xobj) {
|
foreach ($xobj_list as $xobj) {
|
||||||
foreach ($accounts as $account) {
|
foreach ($accounts as $account) {
|
||||||
try {
|
try {
|
||||||
$provider->newJIRAFuture(
|
$jira_key = $xobj->getObjectID();
|
||||||
$account,
|
|
||||||
'rest/api/2/issue/'.$xobj->getObjectID().'/comment',
|
if ($this->shouldPostComment()) {
|
||||||
'POST',
|
$this->postComment($account, $jira_key);
|
||||||
array(
|
}
|
||||||
'body' => $story_text,
|
|
||||||
))->resolveJSON();
|
if ($this->shouldPostLink()) {
|
||||||
|
$this->postLink($account, $jira_key);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
} catch (HTTPFutureResponseStatus $ex) {
|
} catch (HTTPFutureResponseStatus $ex) {
|
||||||
phlog($ex);
|
phlog($ex);
|
||||||
|
@ -169,14 +179,70 @@ final class DoorkeeperJIRAFeedWorker extends DoorkeeperFeedWorker {
|
||||||
return $try_users;
|
return $try_users;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function shouldPostComment() {
|
||||||
|
return $this->getProvider()->shouldCreateJIRAComment();
|
||||||
|
}
|
||||||
|
|
||||||
|
private function shouldPostLink() {
|
||||||
|
return $this->getProvider()->shouldCreateJIRALink();
|
||||||
|
}
|
||||||
|
|
||||||
|
private function postComment($account, $jira_key) {
|
||||||
|
$provider = $this->getProvider();
|
||||||
|
|
||||||
|
$provider->newJIRAFuture(
|
||||||
|
$account,
|
||||||
|
'rest/api/2/issue/'.$jira_key.'/comment',
|
||||||
|
'POST',
|
||||||
|
array(
|
||||||
|
'body' => $this->renderStoryText(),
|
||||||
|
))->resolveJSON();
|
||||||
|
}
|
||||||
|
|
||||||
private function renderStoryText() {
|
private function renderStoryText() {
|
||||||
$object = $this->getStoryObject();
|
$object = $this->getStoryObject();
|
||||||
$publisher = $this->getPublisher();
|
$publisher = $this->getPublisher();
|
||||||
|
|
||||||
$text = $publisher->getStoryText($object);
|
$text = $publisher->getStoryText($object);
|
||||||
$uri = $publisher->getObjectURI($object);
|
|
||||||
|
|
||||||
return $text."\n\n".$uri;
|
if ($this->shouldPostLink()) {
|
||||||
|
return $text;
|
||||||
|
} else {
|
||||||
|
// include the link in the comment
|
||||||
|
return $text."\n\n".$publisher->getObjectURI($object);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function postLink($account, $jira_key) {
|
||||||
|
$provider = $this->getProvider();
|
||||||
|
$object = $this->getStoryObject();
|
||||||
|
$publisher = $this->getPublisher();
|
||||||
|
$icon_uri = celerity_get_resource_uri('rsrc/favicons/favicon-16x16.png');
|
||||||
|
|
||||||
|
$provider->newJIRAFuture(
|
||||||
|
$account,
|
||||||
|
'rest/api/2/issue/'.$jira_key.'/remotelink',
|
||||||
|
'POST',
|
||||||
|
|
||||||
|
// format documented at http://bit.ly/1K5T0Li
|
||||||
|
array(
|
||||||
|
'globalId' => $object->getPHID(),
|
||||||
|
'application' => array(
|
||||||
|
'type' => 'com.phacility.phabricator',
|
||||||
|
'name' => 'Phabricator',
|
||||||
|
),
|
||||||
|
'relationship' => 'implemented in',
|
||||||
|
'object' => array(
|
||||||
|
'url' => $publisher->getObjectURI($object),
|
||||||
|
'title' => $publisher->getObjectTitle($object),
|
||||||
|
'icon' => array(
|
||||||
|
'url16x16' => $icon_uri,
|
||||||
|
'title' => 'Phabricator',
|
||||||
|
),
|
||||||
|
'status' => array(
|
||||||
|
'resolved' => $publisher->isObjectClosed($object),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
))->resolveJSON();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,10 +47,10 @@ final class PhabricatorHeraldApplication extends PhabricatorApplication {
|
||||||
|
|
||||||
public function getRoutes() {
|
public function getRoutes() {
|
||||||
return array(
|
return array(
|
||||||
|
'/H(?P<id>[1-9]\d*)' => 'HeraldRuleViewController',
|
||||||
'/herald/' => array(
|
'/herald/' => array(
|
||||||
'(?:query/(?P<queryKey>[^/]+)/)?' => 'HeraldRuleListController',
|
'(?:query/(?P<queryKey>[^/]+)/)?' => 'HeraldRuleListController',
|
||||||
'new/' => 'HeraldNewController',
|
'new/' => 'HeraldNewController',
|
||||||
'rule/(?P<id>[1-9]\d*)/' => 'HeraldRuleViewController',
|
|
||||||
'edit/(?:(?P<id>[1-9]\d*)/)?' => 'HeraldRuleController',
|
'edit/(?:(?P<id>[1-9]\d*)/)?' => 'HeraldRuleController',
|
||||||
'disable/(?P<id>[1-9]\d*)/(?P<action>\w+)/'
|
'disable/(?P<id>[1-9]\d*)/(?P<action>\w+)/'
|
||||||
=> 'HeraldDisableController',
|
=> 'HeraldDisableController',
|
||||||
|
|
|
@ -25,7 +25,7 @@ final class HeraldDisableController extends HeraldController {
|
||||||
HeraldManageGlobalRulesCapability::CAPABILITY);
|
HeraldManageGlobalRulesCapability::CAPABILITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
$view_uri = $this->getApplicationURI("rule/{$id}/");
|
$view_uri = '/'.$rule->getMonogram();
|
||||||
|
|
||||||
$is_disable = ($action === 'disable');
|
$is_disable = ($action === 'disable');
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ final class HeraldRuleController extends HeraldController {
|
||||||
if (!$rule) {
|
if (!$rule) {
|
||||||
return new Aphront404Response();
|
return new Aphront404Response();
|
||||||
}
|
}
|
||||||
$cancel_uri = $this->getApplicationURI("rule/{$id}/");
|
$cancel_uri = '/'.$rule->getMonogram();
|
||||||
} else {
|
} else {
|
||||||
$new_uri = $this->getApplicationURI('new/');
|
$new_uri = $this->getApplicationURI('new/');
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ final class HeraldRuleController extends HeraldController {
|
||||||
list($e_name, $errors) = $this->saveRule($adapter, $rule, $request);
|
list($e_name, $errors) = $this->saveRule($adapter, $rule, $request);
|
||||||
if (!$errors) {
|
if (!$errors) {
|
||||||
$id = $rule->getID();
|
$id = $rule->getID();
|
||||||
$uri = $this->getApplicationURI("rule/{$id}/");
|
$uri = '/'.$rule->getMonogram();
|
||||||
return id(new AphrontRedirectResponse())->setURI($uri);
|
return id(new AphrontRedirectResponse())->setURI($uri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ final class HeraldRuleViewController extends HeraldController {
|
||||||
$view = id(new PhabricatorActionListView())
|
$view = id(new PhabricatorActionListView())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setObject($rule)
|
->setObject($rule)
|
||||||
->setObjectURI($this->getApplicationURI("rule/{$id}/"));
|
->setObjectURI('/'.$rule->getMonogram());
|
||||||
|
|
||||||
$can_edit = PhabricatorPolicyFilter::hasCapability(
|
$can_edit = PhabricatorPolicyFilter::hasCapability(
|
||||||
$viewer,
|
$viewer,
|
||||||
|
|
|
@ -32,12 +32,12 @@ final class HeraldRulePHIDType extends PhabricatorPHIDType {
|
||||||
foreach ($handles as $phid => $handle) {
|
foreach ($handles as $phid => $handle) {
|
||||||
$rule = $objects[$phid];
|
$rule = $objects[$phid];
|
||||||
|
|
||||||
$id = $rule->getID();
|
$monogram = $rule->getMonogram();
|
||||||
$name = $rule->getName();
|
$name = $rule->getName();
|
||||||
|
|
||||||
$handle->setName("H{$id}");
|
$handle->setName($monogram);
|
||||||
$handle->setFullName("H{$id} {$name}");
|
$handle->setFullName("{$monogram} {$name}");
|
||||||
$handle->setURI("/herald/rule/{$id}/");
|
$handle->setURI("/{$monogram}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -173,12 +173,12 @@ final class HeraldRuleSearchEngine extends PhabricatorApplicationSearchEngine {
|
||||||
$list = id(new PHUIObjectItemListView())
|
$list = id(new PHUIObjectItemListView())
|
||||||
->setUser($viewer);
|
->setUser($viewer);
|
||||||
foreach ($rules as $rule) {
|
foreach ($rules as $rule) {
|
||||||
$id = $rule->getID();
|
$monogram = $rule->getMonogram();
|
||||||
|
|
||||||
$item = id(new PHUIObjectItemView())
|
$item = id(new PHUIObjectItemView())
|
||||||
->setObjectName("H{$id}")
|
->setObjectName($monogram)
|
||||||
->setHeader($rule->getName())
|
->setHeader($rule->getName())
|
||||||
->setHref($this->getApplicationURI("rule/{$id}/"));
|
->setHref("/{$monogram}");
|
||||||
|
|
||||||
if ($rule->isPersonalRule()) {
|
if ($rule->isPersonalRule()) {
|
||||||
$item->addIcon('fa-user', pht('Personal Rule'));
|
$item->addIcon('fa-user', pht('Personal Rule'));
|
||||||
|
|
|
@ -5,7 +5,8 @@ final class HeraldRule extends HeraldDAO
|
||||||
PhabricatorApplicationTransactionInterface,
|
PhabricatorApplicationTransactionInterface,
|
||||||
PhabricatorFlaggableInterface,
|
PhabricatorFlaggableInterface,
|
||||||
PhabricatorPolicyInterface,
|
PhabricatorPolicyInterface,
|
||||||
PhabricatorDestructibleInterface {
|
PhabricatorDestructibleInterface,
|
||||||
|
PhabricatorSubscribableInterface {
|
||||||
|
|
||||||
const TABLE_RULE_APPLIED = 'herald_ruleapplied';
|
const TABLE_RULE_APPLIED = 'herald_ruleapplied';
|
||||||
|
|
||||||
|
@ -320,8 +321,25 @@ final class HeraldRule extends HeraldDAO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -( PhabricatorSubscribableInterface )----------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
public function isAutomaticallySubscribed($phid) {
|
||||||
|
return $this->isPersonalRule() && $phid == $this->getAuthorPHID();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function shouldShowSubscribersProperty() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function shouldAllowSubscription($phid) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorDestructibleInterface )----------------------------------- */
|
/* -( PhabricatorDestructibleInterface )----------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
public function destroyObjectPermanently(
|
public function destroyObjectPermanently(
|
||||||
PhabricatorDestructionEngine $engine) {
|
PhabricatorDestructionEngine $engine) {
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ final class HeraldSchemaSpec extends PhabricatorConfigSchemaSpec {
|
||||||
'unique' => true,
|
'unique' => true,
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
$this->buildEdgeSchemata(new HeraldRule());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,6 @@ final class PhabricatorLegalpadSignaturePolicyRule
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->withPHIDs($value)
|
->withPHIDs($value)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
return mpull($handles, 'getFullName', 'getPHID');
|
return mpull($handles, 'getFullName', 'getPHID');
|
||||||
}
|
}
|
||||||
|
|
|
@ -839,9 +839,9 @@ final class ManiphestTransaction
|
||||||
|
|
||||||
case self::TYPE_MERGED_FROM:
|
case self::TYPE_MERGED_FROM:
|
||||||
return pht(
|
return pht(
|
||||||
'%s merged %d task(s) %s into %s.',
|
'%s merged %s task(s) %s into %s.',
|
||||||
$this->renderHandleLink($author_phid),
|
$this->renderHandleLink($author_phid),
|
||||||
count($new),
|
phutil_count($new),
|
||||||
$this->renderHandleList($new),
|
$this->renderHandleList($new),
|
||||||
$this->renderHandleLink($object_phid));
|
$this->renderHandleLink($object_phid));
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@ abstract class PhabricatorObjectMailReceiver extends PhabricatorMailReceiver {
|
||||||
|
|
||||||
$expect_hash = self::computeMailHash($object->getMailKey(), $check_phid);
|
$expect_hash = self::computeMailHash($object->getMailKey(), $check_phid);
|
||||||
|
|
||||||
if ($expect_hash != $parts['hash']) {
|
if (!phutil_hashes_are_identical($expect_hash, $parts['hash'])) {
|
||||||
throw new PhabricatorMetaMTAReceivedMailProcessingException(
|
throw new PhabricatorMetaMTAReceivedMailProcessingException(
|
||||||
MetaMTAReceivedMailStatus::STATUS_HASH_MISMATCH,
|
MetaMTAReceivedMailStatus::STATUS_HASH_MISMATCH,
|
||||||
pht(
|
pht(
|
||||||
|
|
|
@ -43,16 +43,16 @@ final class PhabricatorMetaMTAMailBody extends Phobject {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addRemarkupSection($text) {
|
public function addRemarkupSection($header, $text) {
|
||||||
try {
|
try {
|
||||||
$engine = PhabricatorMarkupEngine::newMarkupEngine(array());
|
$engine = PhabricatorMarkupEngine::newMarkupEngine(array());
|
||||||
$engine->setConfig('viewer', $this->getViewer());
|
$engine->setConfig('viewer', $this->getViewer());
|
||||||
$engine->setMode(PhutilRemarkupEngine::MODE_TEXT);
|
$engine->setMode(PhutilRemarkupEngine::MODE_TEXT);
|
||||||
$styled_text = $engine->markupText($text);
|
$styled_text = $engine->markupText($text);
|
||||||
$this->sections[] = $styled_text;
|
$this->addPlaintextSection($header, $styled_text);
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
phlog($ex);
|
phlog($ex);
|
||||||
$this->sections[] = $text;
|
$this->addTextSection($header, $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -63,14 +63,10 @@ final class PhabricatorMetaMTAMailBody extends Phobject {
|
||||||
'uri.base',
|
'uri.base',
|
||||||
PhabricatorEnv::getProductionURI('/'));
|
PhabricatorEnv::getProductionURI('/'));
|
||||||
$html = $mail_engine->markupText($text);
|
$html = $mail_engine->markupText($text);
|
||||||
$this->htmlSections[] = $html;
|
$this->addHTMLSection($header, $html);
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
phlog($ex);
|
phlog($ex);
|
||||||
$this->htmlSections[] = phutil_escape_html_newlines(
|
$this->addHTMLSection($header, $text);
|
||||||
phutil_tag(
|
|
||||||
'div',
|
|
||||||
array(),
|
|
||||||
$text));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -121,12 +117,16 @@ final class PhabricatorMetaMTAMailBody extends Phobject {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addHTMLSection($header, $html_fragment) {
|
public function addHTMLSection($header, $html_fragment) {
|
||||||
|
if ($header !== null) {
|
||||||
|
$header = phutil_tag('strong', array(), $header);
|
||||||
|
}
|
||||||
|
|
||||||
$this->htmlSections[] = array(
|
$this->htmlSections[] = array(
|
||||||
phutil_tag(
|
phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
array(),
|
array(),
|
||||||
array(
|
array(
|
||||||
phutil_tag('strong', array(), $header),
|
$header,
|
||||||
phutil_tag('div', array(), $html_fragment),
|
phutil_tag('div', array(), $html_fragment),
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
|
@ -212,5 +212,4 @@ final class PhabricatorMetaMTAMailBody extends Phobject {
|
||||||
private function indent($text) {
|
private function indent($text) {
|
||||||
return rtrim(" ".str_replace("\n", "\n ", $text));
|
return rtrim(" ".str_replace("\n", "\n ", $text));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,18 +205,6 @@ final class PhabricatorOwnersPackageTransactionEditor
|
||||||
return $errors;
|
return $errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function extractFilePHIDsFromCustomTransaction(
|
|
||||||
PhabricatorLiskDAO $object,
|
|
||||||
PhabricatorApplicationTransaction $xaction) {
|
|
||||||
|
|
||||||
switch ($xaction->getTransactionType()) {
|
|
||||||
case PhabricatorOwnersPackageTransaction::TYPE_DESCRIPTION:
|
|
||||||
return array($xaction->getNewValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
return parent::extractFilePHIDsFromCustomTransaction($object, $xaction);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function shouldSendMail(
|
protected function shouldSendMail(
|
||||||
PhabricatorLiskDAO $object,
|
PhabricatorLiskDAO $object,
|
||||||
array $xactions) {
|
array $xactions) {
|
||||||
|
|
|
@ -208,4 +208,16 @@ final class PhabricatorOwnersPackageTransaction
|
||||||
return parent::renderChangeDetails($viewer);
|
return parent::renderChangeDetails($viewer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getRemarkupBlocks() {
|
||||||
|
$blocks = parent::getRemarkupBlocks();
|
||||||
|
|
||||||
|
switch ($this->getTransactionType()) {
|
||||||
|
case self::TYPE_DESCRIPTION:
|
||||||
|
$blocks[] = $this->getNewValue();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $blocks;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhabricatorOwnersSchemaSpec
|
||||||
|
extends PhabricatorConfigSchemaSpec {
|
||||||
|
|
||||||
|
public function buildSchemata() {
|
||||||
|
$this->buildEdgeSchemata(new PhabricatorOwnersPackage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
final class PasteEditConduitAPIMethod
|
final class PasteEditConduitAPIMethod
|
||||||
extends PhabricatorApplicationEditEngineAPIMethod {
|
extends PhabricatorEditEngineAPIMethod {
|
||||||
|
|
||||||
public function getAPIMethodName() {
|
public function getAPIMethodName() {
|
||||||
return 'paste.edit';
|
return 'paste.edit';
|
||||||
|
|
|
@ -1,7 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
final class PhabricatorPasteEditEngine
|
final class PhabricatorPasteEditEngine
|
||||||
extends PhabricatorApplicationEditEngine {
|
extends PhabricatorEditEngine {
|
||||||
|
|
||||||
|
const ENGINECONST = 'paste.paste';
|
||||||
|
|
||||||
|
public function getEngineName() {
|
||||||
|
return pht('Pastes');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getEngineApplicationClass() {
|
||||||
|
return 'PhabricatorPasteApplication';
|
||||||
|
}
|
||||||
|
|
||||||
protected function newEditableObject() {
|
protected function newEditableObject() {
|
||||||
return PhabricatorPaste::initializeNewPaste($this->getViewer());
|
return PhabricatorPaste::initializeNewPaste($this->getViewer());
|
||||||
|
@ -24,7 +34,7 @@ final class PhabricatorPasteEditEngine
|
||||||
return $object->getMonogram();
|
return $object->getMonogram();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getObjectCreateShortText($object) {
|
protected function getObjectCreateShortText() {
|
||||||
return pht('Create Paste');
|
return pht('Create Paste');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ final class PhabricatorPhameApplication extends PhabricatorApplication {
|
||||||
'framed/(?P<id>\d+)/' => 'PhamePostFramedController',
|
'framed/(?P<id>\d+)/' => 'PhamePostFramedController',
|
||||||
'new/' => 'PhamePostNewController',
|
'new/' => 'PhamePostNewController',
|
||||||
'move/(?P<id>\d+)/' => 'PhamePostNewController',
|
'move/(?P<id>\d+)/' => 'PhamePostNewController',
|
||||||
|
'comment/(?P<id>[1-9]\d*)/' => 'PhamePostCommentController',
|
||||||
),
|
),
|
||||||
'blog/' => array(
|
'blog/' => array(
|
||||||
'(?:(?P<filter>user|all)/)?' => 'PhameBlogListController',
|
'(?:(?P<filter>user|all)/)?' => 'PhameBlogListController',
|
||||||
|
@ -102,4 +103,13 @@ final class PhabricatorPhameApplication extends PhabricatorApplication {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getCustomCapabilities() {
|
||||||
|
return array(
|
||||||
|
PhameBlogCreateCapability::CAPABILITY => array(
|
||||||
|
'default' => PhabricatorPolicies::POLICY_USER,
|
||||||
|
'caption' => pht('Default create policy for blogs.'),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhameBlogCreateCapability
|
||||||
|
extends PhabricatorPolicyCapability {
|
||||||
|
|
||||||
|
const CAPABILITY = 'phame.blog.default.create';
|
||||||
|
|
||||||
|
public function getCapabilityName() {
|
||||||
|
return pht('Can Create Blogs');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function describeCapabilityRejection() {
|
||||||
|
return pht('You do not have permission to create a blog.');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -73,7 +73,8 @@ final class PhameCreatePostConduitAPIMethod extends PhameConduitAPIMethod {
|
||||||
->withPHIDs(array($blog_phid))
|
->withPHIDs(array($blog_phid))
|
||||||
->requireCapabilities(
|
->requireCapabilities(
|
||||||
array(
|
array(
|
||||||
PhabricatorPolicyCapability::CAN_JOIN,
|
PhabricatorPolicyCapability::CAN_VIEW,
|
||||||
|
PhabricatorPolicyCapability::CAN_EDIT,
|
||||||
))
|
))
|
||||||
->executeOne();
|
->executeOne();
|
||||||
|
|
||||||
|
@ -85,7 +86,7 @@ final class PhameCreatePostConduitAPIMethod extends PhameConduitAPIMethod {
|
||||||
$is_draft = $request->getValue('isDraft', false);
|
$is_draft = $request->getValue('isDraft', false);
|
||||||
if (!$is_draft) {
|
if (!$is_draft) {
|
||||||
$post->setDatePublished(time());
|
$post->setDatePublished(time());
|
||||||
$post->setVisibility(PhamePost::VISIBILITY_PUBLISHED);
|
$post->setVisibility(PhameConstants::VISIBILITY_PUBLISHED);
|
||||||
}
|
}
|
||||||
$post->setTitle($title);
|
$post->setTitle($title);
|
||||||
$phame_title = $request->getValue(
|
$phame_title = $request->getValue(
|
||||||
|
|
|
@ -65,9 +65,9 @@ final class PhameQueryPostsConduitAPIMethod extends PhameConduitAPIMethod {
|
||||||
|
|
||||||
$published = $request->getValue('published', null);
|
$published = $request->getValue('published', null);
|
||||||
if ($published === true) {
|
if ($published === true) {
|
||||||
$query->withVisibility(PhamePost::VISIBILITY_PUBLISHED);
|
$query->withVisibility(PhameConstants::VISIBILITY_PUBLISHED);
|
||||||
} else if ($published === false) {
|
} else if ($published === false) {
|
||||||
$query->withVisibility(PhamePost::VISIBILITY_DRAFT);
|
$query->withVisibility(PhameConstants::VISIBILITY_DRAFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
$published_after = $request->getValue('publishedAfter', null);
|
$published_after = $request->getValue('publishedAfter', null);
|
||||||
|
|
23
src/applications/phame/constants/PhameConstants.php
Normal file
23
src/applications/phame/constants/PhameConstants.php
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhameConstants extends Phobject {
|
||||||
|
|
||||||
|
const VISIBILITY_DRAFT = 0;
|
||||||
|
const VISIBILITY_PUBLISHED = 1;
|
||||||
|
|
||||||
|
public static function getPhamePostStatusMap() {
|
||||||
|
return array(
|
||||||
|
self::VISIBILITY_PUBLISHED => pht('Published'),
|
||||||
|
self::VISIBILITY_DRAFT => pht('Draft'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getPhamePostStatusName($status) {
|
||||||
|
$map = array(
|
||||||
|
self::VISIBILITY_PUBLISHED => pht('Published'),
|
||||||
|
self::VISIBILITY_DRAFT => pht('Draft'),
|
||||||
|
);
|
||||||
|
return idx($map, $status, pht('Unknown'));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -92,15 +92,22 @@ abstract class PhameController extends PhabricatorController {
|
||||||
|
|
||||||
protected function buildApplicationCrumbs() {
|
protected function buildApplicationCrumbs() {
|
||||||
$crumbs = parent::buildApplicationCrumbs();
|
$crumbs = parent::buildApplicationCrumbs();
|
||||||
|
|
||||||
|
$can_create = $this->hasApplicationCapability(
|
||||||
|
PhameBlogCreateCapability::CAPABILITY);
|
||||||
|
|
||||||
$crumbs->addAction(
|
$crumbs->addAction(
|
||||||
id(new PHUIListItemView())
|
id(new PHUIListItemView())
|
||||||
->setName(pht('New Blog'))
|
->setName(pht('New Blog'))
|
||||||
->setHref($this->getApplicationURI('/blog/new'))
|
->setHref($this->getApplicationURI('/blog/new/'))
|
||||||
->setIcon('fa-plus-square'));
|
->setIcon('fa-plus-square')
|
||||||
|
->setDisabled(!$can_create)
|
||||||
|
->setWorkflow(!$can_create));
|
||||||
|
|
||||||
$crumbs->addAction(
|
$crumbs->addAction(
|
||||||
id(new PHUIListItemView())
|
id(new PHUIListItemView())
|
||||||
->setName(pht('New Post'))
|
->setName(pht('New Post'))
|
||||||
->setHref($this->getApplicationURI('/post/new'))
|
->setHref($this->getApplicationURI('/post/new/'))
|
||||||
->setIcon('fa-pencil'));
|
->setIcon('fa-pencil'));
|
||||||
return $crumbs;
|
return $crumbs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,14 +28,20 @@ final class PhameBlogEditController
|
||||||
$blog->getPHID(),
|
$blog->getPHID(),
|
||||||
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST);
|
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST);
|
||||||
$v_projects = array_reverse($v_projects);
|
$v_projects = array_reverse($v_projects);
|
||||||
|
$v_cc = PhabricatorSubscribersQuery::loadSubscribersForPHID(
|
||||||
|
$blog->getPHID());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
$this->requireApplicationCapability(
|
||||||
|
PhameBlogCreateCapability::CAPABILITY);
|
||||||
|
|
||||||
$blog = PhameBlog::initializeNewBlog($viewer);
|
$blog = PhameBlog::initializeNewBlog($viewer);
|
||||||
|
|
||||||
$submit_button = pht('Create Blog');
|
$submit_button = pht('Create Blog');
|
||||||
$page_title = pht('Create Blog');
|
$page_title = pht('Create Blog');
|
||||||
$cancel_uri = $this->getApplicationURI();
|
$cancel_uri = $this->getApplicationURI();
|
||||||
$v_projects = array();
|
$v_projects = array();
|
||||||
|
$v_cc = array();
|
||||||
}
|
}
|
||||||
$name = $blog->getName();
|
$name = $blog->getName();
|
||||||
$description = $blog->getDescription();
|
$description = $blog->getDescription();
|
||||||
|
@ -43,7 +49,6 @@ final class PhameBlogEditController
|
||||||
$skin = $blog->getSkin();
|
$skin = $blog->getSkin();
|
||||||
$can_view = $blog->getViewPolicy();
|
$can_view = $blog->getViewPolicy();
|
||||||
$can_edit = $blog->getEditPolicy();
|
$can_edit = $blog->getEditPolicy();
|
||||||
$can_join = $blog->getJoinPolicy();
|
|
||||||
|
|
||||||
$e_name = true;
|
$e_name = true;
|
||||||
$e_custom_domain = null;
|
$e_custom_domain = null;
|
||||||
|
@ -56,8 +61,8 @@ final class PhameBlogEditController
|
||||||
$skin = $request->getStr('skin');
|
$skin = $request->getStr('skin');
|
||||||
$can_view = $request->getStr('can_view');
|
$can_view = $request->getStr('can_view');
|
||||||
$can_edit = $request->getStr('can_edit');
|
$can_edit = $request->getStr('can_edit');
|
||||||
$can_join = $request->getStr('can_join');
|
|
||||||
$v_projects = $request->getArr('projects');
|
$v_projects = $request->getArr('projects');
|
||||||
|
$v_cc = $request->getArr('cc');
|
||||||
|
|
||||||
$xactions = array(
|
$xactions = array(
|
||||||
id(new PhameBlogTransaction())
|
id(new PhameBlogTransaction())
|
||||||
|
@ -79,8 +84,8 @@ final class PhameBlogEditController
|
||||||
->setTransactionType(PhabricatorTransactions::TYPE_EDIT_POLICY)
|
->setTransactionType(PhabricatorTransactions::TYPE_EDIT_POLICY)
|
||||||
->setNewValue($can_edit),
|
->setNewValue($can_edit),
|
||||||
id(new PhameBlogTransaction())
|
id(new PhameBlogTransaction())
|
||||||
->setTransactionType(PhabricatorTransactions::TYPE_JOIN_POLICY)
|
->setTransactionType(PhabricatorTransactions::TYPE_SUBSCRIBERS)
|
||||||
->setNewValue($can_join),
|
->setNewValue(array('=' => $v_cc)),
|
||||||
);
|
);
|
||||||
|
|
||||||
$proj_edge_type = PhabricatorProjectObjectHasProjectEdgeType::EDGECONST;
|
$proj_edge_type = PhabricatorProjectObjectHasProjectEdgeType::EDGECONST;
|
||||||
|
@ -136,6 +141,13 @@ final class PhameBlogEditController
|
||||||
->setID('blog-description')
|
->setID('blog-description')
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setDisableMacros(true))
|
->setDisableMacros(true))
|
||||||
|
->appendControl(
|
||||||
|
id(new AphrontFormTokenizerControl())
|
||||||
|
->setLabel(pht('Subscribers'))
|
||||||
|
->setName('cc')
|
||||||
|
->setValue($v_cc)
|
||||||
|
->setUser($viewer)
|
||||||
|
->setDatasource(new PhabricatorMetaMTAMailableDatasource()))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormPolicyControl())
|
id(new AphrontFormPolicyControl())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
|
@ -153,14 +165,6 @@ final class PhameBlogEditController
|
||||||
->setPolicies($policies)
|
->setPolicies($policies)
|
||||||
->setValue($can_edit)
|
->setValue($can_edit)
|
||||||
->setName('can_edit'))
|
->setName('can_edit'))
|
||||||
->appendChild(
|
|
||||||
id(new AphrontFormPolicyControl())
|
|
||||||
->setUser($viewer)
|
|
||||||
->setCapability(PhabricatorPolicyCapability::CAN_JOIN)
|
|
||||||
->setPolicyObject($blog)
|
|
||||||
->setPolicies($policies)
|
|
||||||
->setValue($can_join)
|
|
||||||
->setName('can_join'))
|
|
||||||
->appendControl(
|
->appendControl(
|
||||||
id(new AphrontFormTokenizerControl())
|
id(new AphrontFormTokenizerControl())
|
||||||
->setLabel(pht('Projects'))
|
->setLabel(pht('Projects'))
|
||||||
|
|
|
@ -21,7 +21,7 @@ final class PhameBlogFeedController extends PhameBlogController {
|
||||||
$posts = id(new PhamePostQuery())
|
$posts = id(new PhamePostQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->withBlogPHIDs(array($blog->getPHID()))
|
->withBlogPHIDs(array($blog->getPHID()))
|
||||||
->withVisibility(PhamePost::VISIBILITY_PUBLISHED)
|
->withVisibility(PhameConstants::VISIBILITY_PUBLISHED)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$blog_uri = PhabricatorEnv::getProductionURI(
|
$blog_uri = PhabricatorEnv::getProductionURI(
|
||||||
|
|
|
@ -39,8 +39,11 @@ final class PhameBlogViewController extends PhameBlogController {
|
||||||
->appendChild($post_list);
|
->appendChild($post_list);
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
$crumbs->addTextCrumb(pht('Blogs'), $this->getApplicationURI('blog/'));
|
$crumbs->addTextCrumb(
|
||||||
$crumbs->addTextCrumb($blog->getName(), $this->getApplicationURI());
|
pht('Blogs'),
|
||||||
|
$this->getApplicationURI('blog/'));
|
||||||
|
$crumbs->addTextCrumb(
|
||||||
|
$blog->getName());
|
||||||
|
|
||||||
$object_box = id(new PHUIObjectBoxView())
|
$object_box = id(new PHUIObjectBoxView())
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
|
@ -100,10 +103,6 @@ final class PhameBlogViewController extends PhameBlogController {
|
||||||
pht('Editable By'),
|
pht('Editable By'),
|
||||||
$descriptions[PhabricatorPolicyCapability::CAN_EDIT]);
|
$descriptions[PhabricatorPolicyCapability::CAN_EDIT]);
|
||||||
|
|
||||||
$properties->addProperty(
|
|
||||||
pht('Joinable By'),
|
|
||||||
$descriptions[PhabricatorPolicyCapability::CAN_JOIN]);
|
|
||||||
|
|
||||||
$engine = id(new PhabricatorMarkupEngine())
|
$engine = id(new PhabricatorMarkupEngine())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->addObject($blog, PhameBlog::MARKUP_FIELD_DESCRIPTION)
|
->addObject($blog, PhameBlog::MARKUP_FIELD_DESCRIPTION)
|
||||||
|
@ -136,18 +135,13 @@ final class PhameBlogViewController extends PhameBlogController {
|
||||||
$blog,
|
$blog,
|
||||||
PhabricatorPolicyCapability::CAN_EDIT);
|
PhabricatorPolicyCapability::CAN_EDIT);
|
||||||
|
|
||||||
$can_join = PhabricatorPolicyFilter::hasCapability(
|
|
||||||
$viewer,
|
|
||||||
$blog,
|
|
||||||
PhabricatorPolicyCapability::CAN_JOIN);
|
|
||||||
|
|
||||||
$actions->addAction(
|
$actions->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
->setIcon('fa-plus')
|
->setIcon('fa-plus')
|
||||||
->setHref($this->getApplicationURI('post/edit/?blog='.$blog->getID()))
|
->setHref($this->getApplicationURI('post/edit/?blog='.$blog->getID()))
|
||||||
->setName(pht('Write Post'))
|
->setName(pht('Write Post'))
|
||||||
->setDisabled(!$can_join)
|
->setDisabled(!$can_edit)
|
||||||
->setWorkflow(!$can_join));
|
->setWorkflow(!$can_edit));
|
||||||
|
|
||||||
$actions->addAction(
|
$actions->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhamePostCommentController
|
||||||
|
extends PhamePostController {
|
||||||
|
|
||||||
|
public function handleRequest(AphrontRequest $request) {
|
||||||
|
$viewer = $request->getViewer();
|
||||||
|
$id = $request->getURIData('id');
|
||||||
|
|
||||||
|
if (!$request->isFormPost()) {
|
||||||
|
return new Aphront400Response();
|
||||||
|
}
|
||||||
|
|
||||||
|
$post = id(new PhamePostQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withIDs(array($id))
|
||||||
|
->executeOne();
|
||||||
|
if (!$post) {
|
||||||
|
return new Aphront404Response();
|
||||||
|
}
|
||||||
|
|
||||||
|
$is_preview = $request->isPreviewRequest();
|
||||||
|
$draft = PhabricatorDraft::buildFromRequest($request);
|
||||||
|
|
||||||
|
$view_uri = $this->getApplicationURI('post/view/'.$post->getID().'/');
|
||||||
|
|
||||||
|
$xactions = array();
|
||||||
|
$xactions[] = id(new PhamePostTransaction())
|
||||||
|
->setTransactionType(PhabricatorTransactions::TYPE_COMMENT)
|
||||||
|
->attachComment(
|
||||||
|
id(new PhamePostTransactionComment())
|
||||||
|
->setContent($request->getStr('comment')));
|
||||||
|
|
||||||
|
$editor = id(new PhamePostEditor())
|
||||||
|
->setActor($viewer)
|
||||||
|
->setContinueOnNoEffect($request->isContinueRequest())
|
||||||
|
->setContentSourceFromRequest($request)
|
||||||
|
->setIsPreview($is_preview);
|
||||||
|
|
||||||
|
try {
|
||||||
|
$xactions = $editor->applyTransactions($post, $xactions);
|
||||||
|
} catch (PhabricatorApplicationTransactionNoEffectException $ex) {
|
||||||
|
return id(new PhabricatorApplicationTransactionNoEffectResponse())
|
||||||
|
->setCancelURI($view_uri)
|
||||||
|
->setException($ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($draft) {
|
||||||
|
$draft->replaceOrDelete();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->isAjax() && $is_preview) {
|
||||||
|
return id(new PhabricatorApplicationTransactionResponse())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->setTransactions($xactions)
|
||||||
|
->setIsPreview($is_preview);
|
||||||
|
} else {
|
||||||
|
return id(new AphrontRedirectResponse())
|
||||||
|
->setURI($view_uri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -27,6 +27,8 @@ final class PhamePostEditController extends PhamePostController {
|
||||||
$post->getPHID(),
|
$post->getPHID(),
|
||||||
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST);
|
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST);
|
||||||
$v_projects = array_reverse($v_projects);
|
$v_projects = array_reverse($v_projects);
|
||||||
|
$v_cc = PhabricatorSubscribersQuery::loadSubscribersForPHID(
|
||||||
|
$post->getPHID());
|
||||||
} else {
|
} else {
|
||||||
$blog = id(new PhameBlogQuery())
|
$blog = id(new PhameBlogQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
|
@ -34,25 +36,26 @@ final class PhamePostEditController extends PhamePostController {
|
||||||
->requireCapabilities(
|
->requireCapabilities(
|
||||||
array(
|
array(
|
||||||
PhabricatorPolicyCapability::CAN_VIEW,
|
PhabricatorPolicyCapability::CAN_VIEW,
|
||||||
PhabricatorPolicyCapability::CAN_JOIN,
|
PhabricatorPolicyCapability::CAN_EDIT,
|
||||||
))
|
))
|
||||||
->executeOne();
|
->executeOne();
|
||||||
if (!$blog) {
|
if (!$blog) {
|
||||||
return new Aphront404Response();
|
return new Aphront404Response();
|
||||||
}
|
}
|
||||||
$v_projects = array();
|
$v_projects = array();
|
||||||
|
$v_cc = array();
|
||||||
|
|
||||||
$post = PhamePost::initializePost($viewer, $blog);
|
$post = PhamePost::initializePost($viewer, $blog);
|
||||||
$cancel_uri = $this->getApplicationURI('/blog/view/'.$blog->getID().'/');
|
$cancel_uri = $this->getApplicationURI('/blog/view/'.$blog->getID().'/');
|
||||||
|
|
||||||
$submit_button = pht('Save Draft');
|
$submit_button = pht('Create Post');
|
||||||
$page_title = pht('Create Post');
|
$page_title = pht('Create Post');
|
||||||
}
|
}
|
||||||
|
|
||||||
$title = $post->getTitle();
|
$title = $post->getTitle();
|
||||||
$phame_title = $post->getPhameTitle();
|
$phame_title = $post->getPhameTitle();
|
||||||
$body = $post->getBody();
|
$body = $post->getBody();
|
||||||
$comments_widget = $post->getCommentsWidget();
|
$visibility = $post->getVisibility();
|
||||||
|
|
||||||
$e_title = true;
|
$e_title = true;
|
||||||
$e_phame_title = true;
|
$e_phame_title = true;
|
||||||
|
@ -62,8 +65,9 @@ final class PhamePostEditController extends PhamePostController {
|
||||||
$phame_title = $request->getStr('phame_title');
|
$phame_title = $request->getStr('phame_title');
|
||||||
$phame_title = PhabricatorSlug::normalize($phame_title);
|
$phame_title = PhabricatorSlug::normalize($phame_title);
|
||||||
$body = $request->getStr('body');
|
$body = $request->getStr('body');
|
||||||
$comments_widget = $request->getStr('comments_widget');
|
|
||||||
$v_projects = $request->getArr('projects');
|
$v_projects = $request->getArr('projects');
|
||||||
|
$v_cc = $request->getArr('cc');
|
||||||
|
$visibility = $request->getInt('visibility');
|
||||||
|
|
||||||
$xactions = array(
|
$xactions = array(
|
||||||
id(new PhamePostTransaction())
|
id(new PhamePostTransaction())
|
||||||
|
@ -76,8 +80,12 @@ final class PhamePostEditController extends PhamePostController {
|
||||||
->setTransactionType(PhamePostTransaction::TYPE_BODY)
|
->setTransactionType(PhamePostTransaction::TYPE_BODY)
|
||||||
->setNewValue($body),
|
->setNewValue($body),
|
||||||
id(new PhamePostTransaction())
|
id(new PhamePostTransaction())
|
||||||
->setTransactionType(PhamePostTransaction::TYPE_COMMENTS_WIDGET)
|
->setTransactionType(PhamePostTransaction::TYPE_VISIBILITY)
|
||||||
->setNewValue($comments_widget),
|
->setNewValue($visibility),
|
||||||
|
id(new PhamePostTransaction())
|
||||||
|
->setTransactionType(PhabricatorTransactions::TYPE_SUBSCRIBERS)
|
||||||
|
->setNewValue(array('=' => $v_cc)),
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$proj_edge_type = PhabricatorProjectObjectHasProjectEdgeType::EDGECONST;
|
$proj_edge_type = PhabricatorProjectObjectHasProjectEdgeType::EDGECONST;
|
||||||
|
@ -134,6 +142,12 @@ final class PhamePostEditController extends PhamePostController {
|
||||||
'with underscores for spaces. '.
|
'with underscores for spaces. '.
|
||||||
'Formatting is enforced.'))
|
'Formatting is enforced.'))
|
||||||
->setError($e_phame_title))
|
->setError($e_phame_title))
|
||||||
|
->appendChild(
|
||||||
|
id(new AphrontFormSelectControl())
|
||||||
|
->setLabel(pht('Visibility'))
|
||||||
|
->setName('visibility')
|
||||||
|
->setvalue($visibility)
|
||||||
|
->setOptions(PhameConstants::getPhamePostStatusMap()))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new PhabricatorRemarkupControl())
|
id(new PhabricatorRemarkupControl())
|
||||||
->setLabel(pht('Body'))
|
->setLabel(pht('Body'))
|
||||||
|
@ -143,18 +157,19 @@ final class PhamePostEditController extends PhamePostController {
|
||||||
->setID('post-body')
|
->setID('post-body')
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setDisableMacros(true))
|
->setDisableMacros(true))
|
||||||
|
->appendControl(
|
||||||
|
id(new AphrontFormTokenizerControl())
|
||||||
|
->setLabel(pht('Subscribers'))
|
||||||
|
->setName('cc')
|
||||||
|
->setValue($v_cc)
|
||||||
|
->setUser($viewer)
|
||||||
|
->setDatasource(new PhabricatorMetaMTAMailableDatasource()))
|
||||||
->appendControl(
|
->appendControl(
|
||||||
id(new AphrontFormTokenizerControl())
|
id(new AphrontFormTokenizerControl())
|
||||||
->setLabel(pht('Projects'))
|
->setLabel(pht('Projects'))
|
||||||
->setName('projects')
|
->setName('projects')
|
||||||
->setValue($v_projects)
|
->setValue($v_projects)
|
||||||
->setDatasource(new PhabricatorProjectDatasource()))
|
->setDatasource(new PhabricatorProjectDatasource()))
|
||||||
->appendChild(
|
|
||||||
id(new AphrontFormSelectControl())
|
|
||||||
->setLabel(pht('Comments Widget'))
|
|
||||||
->setName('comments_widget')
|
|
||||||
->setvalue($comments_widget)
|
|
||||||
->setOptions($post->getCommentsWidgetOptionsForSelect()))
|
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormSubmitControl())
|
id(new AphrontFormSubmitControl())
|
||||||
->addCancelButton($cancel_uri)
|
->addCancelButton($cancel_uri)
|
||||||
|
|
|
@ -30,7 +30,7 @@ final class PhamePostNewController extends PhamePostController {
|
||||||
->withIDs(array($request->getInt('blog')))
|
->withIDs(array($request->getInt('blog')))
|
||||||
->requireCapabilities(
|
->requireCapabilities(
|
||||||
array(
|
array(
|
||||||
PhabricatorPolicyCapability::CAN_JOIN,
|
PhabricatorPolicyCapability::CAN_EDIT,
|
||||||
))
|
))
|
||||||
->executeOne();
|
->executeOne();
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ final class PhamePostNewController extends PhamePostController {
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->requireCapabilities(
|
->requireCapabilities(
|
||||||
array(
|
array(
|
||||||
PhabricatorPolicyCapability::CAN_JOIN,
|
PhabricatorPolicyCapability::CAN_EDIT,
|
||||||
))
|
))
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ final class PhamePostNewController extends PhamePostController {
|
||||||
$notification = id(new PHUIInfoView())
|
$notification = id(new PHUIInfoView())
|
||||||
->setSeverity(PHUIInfoView::SEVERITY_NODATA)
|
->setSeverity(PHUIInfoView::SEVERITY_NODATA)
|
||||||
->appendChild(
|
->appendChild(
|
||||||
pht('You do not have permission to join any blogs. Create a blog '.
|
pht('You do not have permission to post to any blogs. Create a blog '.
|
||||||
'first, then you can post to it.'));
|
'first, then you can post to it.'));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -21,9 +21,17 @@ final class PhamePostPublishController extends PhamePostController {
|
||||||
$view_uri = $this->getApplicationURI('/post/view/'.$post->getID().'/');
|
$view_uri = $this->getApplicationURI('/post/view/'.$post->getID().'/');
|
||||||
|
|
||||||
if ($request->isFormPost()) {
|
if ($request->isFormPost()) {
|
||||||
$post->setVisibility(PhamePost::VISIBILITY_PUBLISHED);
|
$xactions = array();
|
||||||
$post->setDatePublished(time());
|
$xactions[] = id(new PhamePostTransaction())
|
||||||
$post->save();
|
->setTransactionType(PhamePostTransaction::TYPE_VISIBILITY)
|
||||||
|
->setNewValue(PhameConstants::VISIBILITY_PUBLISHED);
|
||||||
|
|
||||||
|
id(new PhamePostEditor())
|
||||||
|
->setActor($viewer)
|
||||||
|
->setContentSourceFromRequest($request)
|
||||||
|
->setContinueOnNoEffect(true)
|
||||||
|
->setContinueOnMissingFields(true)
|
||||||
|
->applyTransactions($post, $xactions);
|
||||||
|
|
||||||
return id(new AphrontRedirectResponse())->setURI($view_uri);
|
return id(new AphrontRedirectResponse())->setURI($view_uri);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,17 @@ final class PhamePostUnpublishController extends PhamePostController {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->isFormPost()) {
|
if ($request->isFormPost()) {
|
||||||
$post->setVisibility(PhamePost::VISIBILITY_DRAFT);
|
$xactions = array();
|
||||||
$post->setDatePublished(0);
|
$xactions[] = id(new PhamePostTransaction())
|
||||||
$post->save();
|
->setTransactionType(PhamePostTransaction::TYPE_VISIBILITY)
|
||||||
|
->setNewValue(PhameConstants::VISIBILITY_DRAFT);
|
||||||
|
|
||||||
|
id(new PhamePostEditor())
|
||||||
|
->setActor($viewer)
|
||||||
|
->setContentSourceFromRequest($request)
|
||||||
|
->setContinueOnNoEffect(true)
|
||||||
|
->setContinueOnMissingFields(true)
|
||||||
|
->applyTransactions($post, $xactions);
|
||||||
|
|
||||||
return id(new AphrontRedirectResponse())
|
return id(new AphrontRedirectResponse())
|
||||||
->setURI($this->getApplicationURI('/post/view/'.$post->getID().'/'));
|
->setURI($this->getApplicationURI('/post/view/'.$post->getID().'/'));
|
||||||
|
|
|
@ -14,7 +14,18 @@ final class PhamePostViewController extends PhamePostController {
|
||||||
return new Aphront404Response();
|
return new Aphront404Response();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$blog = $post->getBlog();
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
|
if ($blog) {
|
||||||
|
$crumbs->addTextCrumb(
|
||||||
|
$blog->getName(),
|
||||||
|
$this->getApplicationURI('blog/view/'.$blog->getID().'/'));
|
||||||
|
} else {
|
||||||
|
$crumbs->addTextCrumb(
|
||||||
|
pht('[No Blog]'),
|
||||||
|
null);
|
||||||
|
}
|
||||||
$crumbs->addTextCrumb(
|
$crumbs->addTextCrumb(
|
||||||
$post->getTitle(),
|
$post->getTitle(),
|
||||||
$this->getApplicationURI('post/view/'.$post->getID().'/'));
|
$this->getApplicationURI('post/view/'.$post->getID().'/'));
|
||||||
|
@ -76,13 +87,24 @@ final class PhamePostViewController extends PhamePostController {
|
||||||
),
|
),
|
||||||
$engine->getOutput($post, PhamePost::MARKUP_FIELD_BODY)));
|
$engine->getOutput($post, PhamePost::MARKUP_FIELD_BODY)));
|
||||||
|
|
||||||
|
$timeline = $this->buildTransactionTimeline(
|
||||||
|
$post,
|
||||||
|
id(new PhamePostTransactionQuery())
|
||||||
|
->withTransactionTypes(array(PhabricatorTransactions::TYPE_COMMENT)));
|
||||||
|
$timeline = phutil_tag_div('phui-document-view-pro-box', $timeline);
|
||||||
|
|
||||||
|
$add_comment = $this->buildCommentForm($post);
|
||||||
|
|
||||||
return $this->newPage()
|
return $this->newPage()
|
||||||
->setTitle($post->getTitle())
|
->setTitle($post->getTitle())
|
||||||
->addClass('pro-white-background')
|
->addClass('pro-white-background')
|
||||||
|
->setPageObjectPHIDs(array($post->getPHID()))
|
||||||
->setCrumbs($crumbs)
|
->setCrumbs($crumbs)
|
||||||
->appendChild(
|
->appendChild(
|
||||||
array(
|
array(
|
||||||
$document,
|
$document,
|
||||||
|
$timeline,
|
||||||
|
$add_comment,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,6 +145,7 @@ final class PhamePostViewController extends PhamePostController {
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
->setIcon('fa-eye')
|
->setIcon('fa-eye')
|
||||||
->setHref($this->getApplicationURI('post/publish/'.$id.'/'))
|
->setHref($this->getApplicationURI('post/publish/'.$id.'/'))
|
||||||
|
->setDisabled(!$can_edit)
|
||||||
->setName(pht('Preview / Publish')));
|
->setName(pht('Preview / Publish')));
|
||||||
} else {
|
} else {
|
||||||
$actions->addAction(
|
$actions->addAction(
|
||||||
|
@ -130,6 +153,7 @@ final class PhamePostViewController extends PhamePostController {
|
||||||
->setIcon('fa-eye-slash')
|
->setIcon('fa-eye-slash')
|
||||||
->setHref($this->getApplicationURI('post/unpublish/'.$id.'/'))
|
->setHref($this->getApplicationURI('post/unpublish/'.$id.'/'))
|
||||||
->setName(pht('Unpublish'))
|
->setName(pht('Unpublish'))
|
||||||
|
->setDisabled(!$can_edit)
|
||||||
->setWorkflow(true));
|
->setWorkflow(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,4 +214,27 @@ final class PhamePostViewController extends PhamePostController {
|
||||||
return $properties;
|
return $properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function buildCommentForm(PhamePost $post) {
|
||||||
|
$viewer = $this->getViewer();
|
||||||
|
|
||||||
|
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
|
||||||
|
|
||||||
|
$add_comment_header = $is_serious
|
||||||
|
? pht('Add Comment')
|
||||||
|
: pht('Derp Text');
|
||||||
|
|
||||||
|
$draft = PhabricatorDraft::newFromUserAndKey(
|
||||||
|
$viewer, $post->getPHID());
|
||||||
|
|
||||||
|
$box = id(new PhabricatorApplicationTransactionCommentView())
|
||||||
|
->setUser($viewer)
|
||||||
|
->setObjectPHID($post->getPHID())
|
||||||
|
->setDraft($draft)
|
||||||
|
->setHeaderText($add_comment_header)
|
||||||
|
->setAction($this->getApplicationURI('post/comment/'.$post->getID().'/'))
|
||||||
|
->setSubmitButtonName(pht('Add Comment'));
|
||||||
|
|
||||||
|
return phutil_tag_div('phui-document-view-pro-box', $box);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@ final class PhameBlogEditor
|
||||||
$types[] = PhameBlogTransaction::TYPE_SKIN;
|
$types[] = PhameBlogTransaction::TYPE_SKIN;
|
||||||
$types[] = PhabricatorTransactions::TYPE_VIEW_POLICY;
|
$types[] = PhabricatorTransactions::TYPE_VIEW_POLICY;
|
||||||
$types[] = PhabricatorTransactions::TYPE_EDIT_POLICY;
|
$types[] = PhabricatorTransactions::TYPE_EDIT_POLICY;
|
||||||
$types[] = PhabricatorTransactions::TYPE_JOIN_POLICY;
|
|
||||||
|
|
||||||
return $types;
|
return $types;
|
||||||
}
|
}
|
||||||
|
@ -94,6 +93,7 @@ final class PhameBlogEditor
|
||||||
|
|
||||||
$errors = parent::validateTransaction($object, $type, $xactions);
|
$errors = parent::validateTransaction($object, $type, $xactions);
|
||||||
|
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case PhameBlogTransaction::TYPE_NAME:
|
case PhameBlogTransaction::TYPE_NAME:
|
||||||
$missing = $this->validateIsEmptyTextField(
|
$missing = $this->validateIsEmptyTextField(
|
||||||
|
@ -112,6 +112,9 @@ final class PhameBlogEditor
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PhameBlogTransaction::TYPE_DOMAIN:
|
case PhameBlogTransaction::TYPE_DOMAIN:
|
||||||
|
if (!$xactions) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$custom_domain = last($xactions)->getNewValue();
|
$custom_domain = last($xactions)->getNewValue();
|
||||||
if (empty($custom_domain)) {
|
if (empty($custom_domain)) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -158,15 +161,66 @@ final class PhameBlogEditor
|
||||||
protected function shouldSendMail(
|
protected function shouldSendMail(
|
||||||
PhabricatorLiskDAO $object,
|
PhabricatorLiskDAO $object,
|
||||||
array $xactions) {
|
array $xactions) {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function shouldPublishFeedStory(
|
protected function shouldPublishFeedStory(
|
||||||
PhabricatorLiskDAO $object,
|
PhabricatorLiskDAO $object,
|
||||||
array $xactions) {
|
array $xactions) {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getMailTo(PhabricatorLiskDAO $object) {
|
||||||
|
$phids = array();
|
||||||
|
$phids[] = $this->requireActor()->getPHID();
|
||||||
|
$phids[] = $object->getCreatorPHID();
|
||||||
|
|
||||||
|
return $phids;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
|
||||||
|
$phid = $object->getPHID();
|
||||||
|
$name = $object->getName();
|
||||||
|
|
||||||
|
return id(new PhabricatorMetaMTAMail())
|
||||||
|
->setSubject($name)
|
||||||
|
->addHeader('Thread-Topic', $phid);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function buildReplyHandler(PhabricatorLiskDAO $object) {
|
||||||
|
return id(new PhameBlogReplyHandler())
|
||||||
|
->setMailReceiver($object);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function buildMailBody(
|
||||||
|
PhabricatorLiskDAO $object,
|
||||||
|
array $xactions) {
|
||||||
|
|
||||||
|
$body = parent::buildMailBody($object, $xactions);
|
||||||
|
|
||||||
|
$body->addLinkSection(
|
||||||
|
pht('BLOG DETAIL'),
|
||||||
|
PhabricatorEnv::getProductionURI($object->getViewURI()));
|
||||||
|
|
||||||
|
return $body;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMailTagsMap() {
|
||||||
|
return array(
|
||||||
|
PhameBlogTransaction::MAILTAG_DETAILS =>
|
||||||
|
pht("A blog's details change."),
|
||||||
|
PhameBlogTransaction::MAILTAG_SUBSCRIBERS =>
|
||||||
|
pht("A blog's subscribers change."),
|
||||||
|
PhameBlogTransaction::MAILTAG_OTHER =>
|
||||||
|
pht('Other blog activity not listed above occurs.'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getMailSubjectPrefix() {
|
||||||
|
return '[Phame]';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function supportsSearch() {
|
protected function supportsSearch() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,8 @@ final class PhamePostEditor
|
||||||
$types[] = PhamePostTransaction::TYPE_TITLE;
|
$types[] = PhamePostTransaction::TYPE_TITLE;
|
||||||
$types[] = PhamePostTransaction::TYPE_PHAME_TITLE;
|
$types[] = PhamePostTransaction::TYPE_PHAME_TITLE;
|
||||||
$types[] = PhamePostTransaction::TYPE_BODY;
|
$types[] = PhamePostTransaction::TYPE_BODY;
|
||||||
$types[] = PhamePostTransaction::TYPE_COMMENTS_WIDGET;
|
$types[] = PhamePostTransaction::TYPE_VISIBILITY;
|
||||||
|
$types[] = PhabricatorTransactions::TYPE_COMMENT;
|
||||||
|
|
||||||
return $types;
|
return $types;
|
||||||
}
|
}
|
||||||
|
@ -33,8 +34,8 @@ final class PhamePostEditor
|
||||||
return $object->getPhameTitle();
|
return $object->getPhameTitle();
|
||||||
case PhamePostTransaction::TYPE_BODY:
|
case PhamePostTransaction::TYPE_BODY:
|
||||||
return $object->getBody();
|
return $object->getBody();
|
||||||
case PhamePostTransaction::TYPE_COMMENTS_WIDGET:
|
case PhamePostTransaction::TYPE_VISIBILITY:
|
||||||
return $object->getCommentsWidget();
|
return $object->getVisibility();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +47,7 @@ final class PhamePostEditor
|
||||||
case PhamePostTransaction::TYPE_TITLE:
|
case PhamePostTransaction::TYPE_TITLE:
|
||||||
case PhamePostTransaction::TYPE_PHAME_TITLE:
|
case PhamePostTransaction::TYPE_PHAME_TITLE:
|
||||||
case PhamePostTransaction::TYPE_BODY:
|
case PhamePostTransaction::TYPE_BODY:
|
||||||
case PhamePostTransaction::TYPE_COMMENTS_WIDGET:
|
case PhamePostTransaction::TYPE_VISIBILITY:
|
||||||
return $xaction->getNewValue();
|
return $xaction->getNewValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,8 +63,13 @@ final class PhamePostEditor
|
||||||
return $object->setPhameTitle($xaction->getNewValue());
|
return $object->setPhameTitle($xaction->getNewValue());
|
||||||
case PhamePostTransaction::TYPE_BODY:
|
case PhamePostTransaction::TYPE_BODY:
|
||||||
return $object->setBody($xaction->getNewValue());
|
return $object->setBody($xaction->getNewValue());
|
||||||
case PhamePostTransaction::TYPE_COMMENTS_WIDGET:
|
case PhamePostTransaction::TYPE_VISIBILITY:
|
||||||
return $object->setCommentsWidget($xaction->getNewValue());
|
if ($xaction->getNewValue() == PhameConstants::VISIBILITY_DRAFT) {
|
||||||
|
$object->setDatePublished(0);
|
||||||
|
} else {
|
||||||
|
$object->setDatePublished(time());
|
||||||
|
}
|
||||||
|
return $object->setVisibility($xaction->getNewValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::applyCustomInternalTransaction($object, $xaction);
|
return parent::applyCustomInternalTransaction($object, $xaction);
|
||||||
|
@ -77,7 +83,7 @@ final class PhamePostEditor
|
||||||
case PhamePostTransaction::TYPE_TITLE:
|
case PhamePostTransaction::TYPE_TITLE:
|
||||||
case PhamePostTransaction::TYPE_PHAME_TITLE:
|
case PhamePostTransaction::TYPE_PHAME_TITLE:
|
||||||
case PhamePostTransaction::TYPE_BODY:
|
case PhamePostTransaction::TYPE_BODY:
|
||||||
case PhamePostTransaction::TYPE_COMMENTS_WIDGET:
|
case PhamePostTransaction::TYPE_VISIBILITY:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,6 +115,9 @@ final class PhamePostEditor
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PhamePostTransaction::TYPE_PHAME_TITLE:
|
case PhamePostTransaction::TYPE_PHAME_TITLE:
|
||||||
|
if (!$xactions) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$missing = $this->validateIsEmptyTextField(
|
$missing = $this->validateIsEmptyTextField(
|
||||||
$object->getPhameTitle(),
|
$object->getPhameTitle(),
|
||||||
$xactions);
|
$xactions);
|
||||||
|
@ -171,8 +180,11 @@ final class PhamePostEditor
|
||||||
|
|
||||||
$blog_phid = $object->getBlogPHID();
|
$blog_phid = $object->getBlogPHID();
|
||||||
if ($blog_phid) {
|
if ($blog_phid) {
|
||||||
$phids[] = PhabricatorSubscribersQuery::loadSubscribersForPHID(
|
$cc_phids = PhabricatorSubscribersQuery::loadSubscribersForPHID(
|
||||||
$blog_phid);
|
$blog_phid);
|
||||||
|
foreach ($cc_phids as $cc) {
|
||||||
|
$phids[] = $cc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $phids;
|
return $phids;
|
||||||
}
|
}
|
||||||
|
@ -197,6 +209,10 @@ final class PhamePostEditor
|
||||||
|
|
||||||
$body = parent::buildMailBody($object, $xactions);
|
$body = parent::buildMailBody($object, $xactions);
|
||||||
|
|
||||||
|
if ($this->getIsNewObject()) {
|
||||||
|
$body->addRemarkupSection(null, $object->getBody());
|
||||||
|
}
|
||||||
|
|
||||||
$body->addLinkSection(
|
$body->addLinkSection(
|
||||||
pht('POST DETAIL'),
|
pht('POST DETAIL'),
|
||||||
PhabricatorEnv::getProductionURI($object->getViewURI()));
|
PhabricatorEnv::getProductionURI($object->getViewURI()));
|
||||||
|
|
21
src/applications/phame/mail/PhameBlogReplyHandler.php
Normal file
21
src/applications/phame/mail/PhameBlogReplyHandler.php
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhameBlogReplyHandler
|
||||||
|
extends PhabricatorApplicationTransactionReplyHandler {
|
||||||
|
|
||||||
|
public function validateMailReceiver($mail_receiver) {
|
||||||
|
if (!($mail_receiver instanceof PhameBlog)) {
|
||||||
|
throw new Exception(
|
||||||
|
pht('Mail receiver is not a %s.', 'PhameBlog'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getObjectPrefix() {
|
||||||
|
return PhabricatorPhameBlogPHIDType::TYPECONST;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function shouldCreateCommentFromMailBody() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
28
src/applications/phame/mail/PhamePostMailReceiver.php
Normal file
28
src/applications/phame/mail/PhamePostMailReceiver.php
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhamePostMailReceiver
|
||||||
|
extends PhabricatorObjectMailReceiver {
|
||||||
|
|
||||||
|
public function isEnabled() {
|
||||||
|
return PhabricatorApplication::isClassInstalled(
|
||||||
|
'PhabricatorPhameApplication');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getObjectPattern() {
|
||||||
|
return 'POST[1-9]\d*';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function loadObject($pattern, PhabricatorUser $viewer) {
|
||||||
|
$id = (int)substr($pattern, 4);
|
||||||
|
|
||||||
|
return id(new PhamePostQuery())
|
||||||
|
->setViewer($viewer)
|
||||||
|
->withIDs(array($id))
|
||||||
|
->executeOne();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getTransactionReplyHandler() {
|
||||||
|
return new PhamePostReplyHandler();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -14,8 +14,4 @@ final class PhamePostReplyHandler
|
||||||
return PhabricatorPhamePostPHIDType::TYPECONST;
|
return PhabricatorPhamePostPHIDType::TYPECONST;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function shouldCreateCommentFromMailBody() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
10
src/applications/phame/query/PhameBlogTransactionQuery.php
Normal file
10
src/applications/phame/query/PhameBlogTransactionQuery.php
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhameBlogTransactionQuery
|
||||||
|
extends PhabricatorApplicationTransactionQuery {
|
||||||
|
|
||||||
|
public function getTemplateApplicationTransaction() {
|
||||||
|
return new PhameBlogTransaction();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -32,8 +32,8 @@ final class PhamePostSearchEngine
|
||||||
->setLabel(pht('Visibility'))
|
->setLabel(pht('Visibility'))
|
||||||
->setOptions(array(
|
->setOptions(array(
|
||||||
'' => pht('All'),
|
'' => pht('All'),
|
||||||
PhamePost::VISIBILITY_PUBLISHED => pht('Live'),
|
PhameConstants::VISIBILITY_PUBLISHED => pht('Published'),
|
||||||
PhamePost::VISIBILITY_DRAFT => pht('Draft'),
|
PhameConstants::VISIBILITY_DRAFT => pht('Draft'),
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ final class PhamePostSearchEngine
|
||||||
protected function getBuiltinQueryNames() {
|
protected function getBuiltinQueryNames() {
|
||||||
$names = array(
|
$names = array(
|
||||||
'all' => pht('All Posts'),
|
'all' => pht('All Posts'),
|
||||||
'live' => pht('Live Posts'),
|
'live' => pht('Published Posts'),
|
||||||
'draft' => pht('Draft Posts'),
|
'draft' => pht('Draft Posts'),
|
||||||
);
|
);
|
||||||
return $names;
|
return $names;
|
||||||
|
@ -60,10 +60,10 @@ final class PhamePostSearchEngine
|
||||||
return $query;
|
return $query;
|
||||||
case 'live':
|
case 'live':
|
||||||
return $query->setParameter(
|
return $query->setParameter(
|
||||||
'visibility', PhamePost::VISIBILITY_PUBLISHED);
|
'visibility', PhameConstants::VISIBILITY_PUBLISHED);
|
||||||
case 'draft':
|
case 'draft':
|
||||||
return $query->setParameter(
|
return $query->setParameter(
|
||||||
'visibility', PhamePost::VISIBILITY_DRAFT);
|
'visibility', PhameConstants::VISIBILITY_DRAFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::buildSavedQueryFromBuiltin($query_key);
|
return parent::buildSavedQueryFromBuiltin($query_key);
|
||||||
|
@ -81,15 +81,20 @@ final class PhamePostSearchEngine
|
||||||
|
|
||||||
foreach ($posts as $post) {
|
foreach ($posts as $post) {
|
||||||
$id = $post->getID();
|
$id = $post->getID();
|
||||||
$blog = $viewer->renderHandle($post->getBlogPHID())->render();
|
$blog = $post->getBlog();
|
||||||
|
if ($blog) {
|
||||||
|
$blog_name = $viewer->renderHandle($post->getBlogPHID())->render();
|
||||||
|
$blog_name = pht('Blog: %s', $blog_name);
|
||||||
|
} else {
|
||||||
|
$blog_name = pht('[No Blog]');
|
||||||
|
}
|
||||||
$item = id(new PHUIObjectItemView())
|
$item = id(new PHUIObjectItemView())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setObject($post)
|
->setObject($post)
|
||||||
->setHeader($post->getTitle())
|
->setHeader($post->getTitle())
|
||||||
->setStatusIcon('fa-star')
|
->setStatusIcon('fa-star')
|
||||||
->setHref($this->getApplicationURI("/post/view/{$id}/"))
|
->setHref($this->getApplicationURI("/post/view/{$id}/"))
|
||||||
->addAttribute(
|
->addAttribute($blog_name);
|
||||||
pht('Blog: %s', $blog));
|
|
||||||
if ($post->isDraft()) {
|
if ($post->isDraft()) {
|
||||||
$item->setStatusIcon('fa-star-o grey');
|
$item->setStatusIcon('fa-star-o grey');
|
||||||
$item->setDisabled(true);
|
$item->setDisabled(true);
|
||||||
|
|
|
@ -20,7 +20,7 @@ final class PhameBlog extends PhameDAO
|
||||||
protected $creatorPHID;
|
protected $creatorPHID;
|
||||||
protected $viewPolicy;
|
protected $viewPolicy;
|
||||||
protected $editPolicy;
|
protected $editPolicy;
|
||||||
protected $joinPolicy;
|
protected $mailKey;
|
||||||
|
|
||||||
private static $requestBlog;
|
private static $requestBlog;
|
||||||
|
|
||||||
|
@ -34,10 +34,10 @@ final class PhameBlog extends PhameDAO
|
||||||
'name' => 'text64',
|
'name' => 'text64',
|
||||||
'description' => 'text',
|
'description' => 'text',
|
||||||
'domain' => 'text128?',
|
'domain' => 'text128?',
|
||||||
|
'mailKey' => 'bytes20',
|
||||||
|
|
||||||
// T6203/NULLABILITY
|
// T6203/NULLABILITY
|
||||||
// These policies should always be non-null.
|
// These policies should always be non-null.
|
||||||
'joinPolicy' => 'policy?',
|
|
||||||
'editPolicy' => 'policy?',
|
'editPolicy' => 'policy?',
|
||||||
'viewPolicy' => 'policy?',
|
'viewPolicy' => 'policy?',
|
||||||
),
|
),
|
||||||
|
@ -55,6 +55,13 @@ final class PhameBlog extends PhameDAO
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function save() {
|
||||||
|
if (!$this->getMailKey()) {
|
||||||
|
$this->setMailKey(Filesystem::readRandomCharacters(20));
|
||||||
|
}
|
||||||
|
return parent::save();
|
||||||
|
}
|
||||||
|
|
||||||
public function generatePHID() {
|
public function generatePHID() {
|
||||||
return PhabricatorPHID::generateNewPHID(
|
return PhabricatorPHID::generateNewPHID(
|
||||||
PhabricatorPhameBlogPHIDType::TYPECONST);
|
PhabricatorPhameBlogPHIDType::TYPECONST);
|
||||||
|
@ -64,8 +71,7 @@ final class PhameBlog extends PhameDAO
|
||||||
$blog = id(new PhameBlog())
|
$blog = id(new PhameBlog())
|
||||||
->setCreatorPHID($actor->getPHID())
|
->setCreatorPHID($actor->getPHID())
|
||||||
->setViewPolicy(PhabricatorPolicies::getMostOpenPolicy())
|
->setViewPolicy(PhabricatorPolicies::getMostOpenPolicy())
|
||||||
->setEditPolicy(PhabricatorPolicies::POLICY_USER)
|
->setEditPolicy(PhabricatorPolicies::POLICY_USER);
|
||||||
->setJoinPolicy(PhabricatorPolicies::POLICY_USER);
|
|
||||||
return $blog;
|
return $blog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,6 +220,11 @@ final class PhameBlog extends PhameDAO
|
||||||
return $base;
|
return $base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getViewURI() {
|
||||||
|
$uri = '/phame/blog/view/'.$this->getID().'/';
|
||||||
|
return PhabricatorEnv::getProductionURI($uri);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface Implementation )-------------------------- */
|
/* -( PhabricatorPolicyInterface Implementation )-------------------------- */
|
||||||
|
|
||||||
|
@ -222,7 +233,6 @@ final class PhameBlog extends PhameDAO
|
||||||
return array(
|
return array(
|
||||||
PhabricatorPolicyCapability::CAN_VIEW,
|
PhabricatorPolicyCapability::CAN_VIEW,
|
||||||
PhabricatorPolicyCapability::CAN_EDIT,
|
PhabricatorPolicyCapability::CAN_EDIT,
|
||||||
PhabricatorPolicyCapability::CAN_JOIN,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,14 +243,11 @@ final class PhameBlog extends PhameDAO
|
||||||
return $this->getViewPolicy();
|
return $this->getViewPolicy();
|
||||||
case PhabricatorPolicyCapability::CAN_EDIT:
|
case PhabricatorPolicyCapability::CAN_EDIT:
|
||||||
return $this->getEditPolicy();
|
return $this->getEditPolicy();
|
||||||
case PhabricatorPolicyCapability::CAN_JOIN:
|
|
||||||
return $this->getJoinPolicy();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hasAutomaticCapability($capability, PhabricatorUser $user) {
|
public function hasAutomaticCapability($capability, PhabricatorUser $user) {
|
||||||
$can_edit = PhabricatorPolicyCapability::CAN_EDIT;
|
$can_edit = PhabricatorPolicyCapability::CAN_EDIT;
|
||||||
$can_join = PhabricatorPolicyCapability::CAN_JOIN;
|
|
||||||
|
|
||||||
switch ($capability) {
|
switch ($capability) {
|
||||||
case PhabricatorPolicyCapability::CAN_VIEW:
|
case PhabricatorPolicyCapability::CAN_VIEW:
|
||||||
|
@ -248,15 +255,6 @@ final class PhameBlog extends PhameDAO
|
||||||
if (PhabricatorPolicyFilter::hasCapability($user, $this, $can_edit)) {
|
if (PhabricatorPolicyFilter::hasCapability($user, $this, $can_edit)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (PhabricatorPolicyFilter::hasCapability($user, $this, $can_join)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case PhabricatorPolicyCapability::CAN_JOIN:
|
|
||||||
// Users who can edit a blog can always post to it.
|
|
||||||
if (PhabricatorPolicyFilter::hasCapability($user, $this, $can_edit)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,10 +266,7 @@ final class PhameBlog extends PhameDAO
|
||||||
switch ($capability) {
|
switch ($capability) {
|
||||||
case PhabricatorPolicyCapability::CAN_VIEW:
|
case PhabricatorPolicyCapability::CAN_VIEW:
|
||||||
return pht(
|
return pht(
|
||||||
'Users who can edit or post on a blog can always view it.');
|
'Users who can edit a blog can always view it.');
|
||||||
case PhabricatorPolicyCapability::CAN_JOIN:
|
|
||||||
return pht(
|
|
||||||
'Users who can edit a blog can always post on it.');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -8,6 +8,10 @@ final class PhameBlogTransaction
|
||||||
const TYPE_DOMAIN = 'phame.blog.domain';
|
const TYPE_DOMAIN = 'phame.blog.domain';
|
||||||
const TYPE_SKIN = 'phame.blog.skin';
|
const TYPE_SKIN = 'phame.blog.skin';
|
||||||
|
|
||||||
|
const MAILTAG_DETAILS = 'phame-blog-details';
|
||||||
|
const MAILTAG_SUBSCRIBERS = 'phame-blog-subscribers';
|
||||||
|
const MAILTAG_OTHER = 'phame-blog-other';
|
||||||
|
|
||||||
public function getApplicationName() {
|
public function getApplicationName() {
|
||||||
return 'phame';
|
return 'phame';
|
||||||
}
|
}
|
||||||
|
@ -44,6 +48,26 @@ final class PhameBlogTransaction
|
||||||
return parent::getIcon();
|
return parent::getIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getMailTags() {
|
||||||
|
$tags = parent::getMailTags();
|
||||||
|
|
||||||
|
switch ($this->getTransactionType()) {
|
||||||
|
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||||
|
$tags[] = self::MAILTAG_SUBSCRIBERS;
|
||||||
|
break;
|
||||||
|
case self::TYPE_NAME:
|
||||||
|
case self::TYPE_DESCRIPTION:
|
||||||
|
case self::TYPE_DOMAIN:
|
||||||
|
case self::TYPE_SKIN:
|
||||||
|
$tags[] = self::MAILTAG_DETAILS;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$tags[] = self::MAILTAG_OTHER;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $tags;
|
||||||
|
}
|
||||||
|
|
||||||
public function getTitle() {
|
public function getTitle() {
|
||||||
$author_phid = $this->getAuthorPHID();
|
$author_phid = $this->getAuthorPHID();
|
||||||
$object_phid = $this->getObjectPHID();
|
$object_phid = $this->getObjectPHID();
|
||||||
|
@ -53,7 +77,7 @@ final class PhameBlogTransaction
|
||||||
|
|
||||||
$type = $this->getTransactionType();
|
$type = $this->getTransactionType();
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case self:TYPE_NAME:
|
case self::TYPE_NAME:
|
||||||
if ($old === null) {
|
if ($old === null) {
|
||||||
return pht(
|
return pht(
|
||||||
'%s created this blog.',
|
'%s created this blog.',
|
||||||
|
|
|
@ -13,9 +13,6 @@ final class PhamePost extends PhameDAO
|
||||||
const MARKUP_FIELD_BODY = 'markup:body';
|
const MARKUP_FIELD_BODY = 'markup:body';
|
||||||
const MARKUP_FIELD_SUMMARY = 'markup:summary';
|
const MARKUP_FIELD_SUMMARY = 'markup:summary';
|
||||||
|
|
||||||
const VISIBILITY_DRAFT = 0;
|
|
||||||
const VISIBILITY_PUBLISHED = 1;
|
|
||||||
|
|
||||||
protected $bloggerPHID;
|
protected $bloggerPHID;
|
||||||
protected $title;
|
protected $title;
|
||||||
protected $phameTitle;
|
protected $phameTitle;
|
||||||
|
@ -37,7 +34,7 @@ final class PhamePost extends PhameDAO
|
||||||
->setBlogPHID($blog->getPHID())
|
->setBlogPHID($blog->getPHID())
|
||||||
->setBlog($blog)
|
->setBlog($blog)
|
||||||
->setDatePublished(0)
|
->setDatePublished(0)
|
||||||
->setVisibility(self::VISIBILITY_DRAFT);
|
->setVisibility(PhameConstants::VISIBILITY_PUBLISHED);
|
||||||
return $post;
|
return $post;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +63,7 @@ final class PhamePost extends PhameDAO
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isDraft() {
|
public function isDraft() {
|
||||||
return $this->getVisibility() == self::VISIBILITY_DRAFT;
|
return $this->getVisibility() == PhameConstants::VISIBILITY_DRAFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getHumanName() {
|
public function getHumanName() {
|
||||||
|
@ -79,20 +76,6 @@ final class PhamePost extends PhameDAO
|
||||||
return $name;
|
return $name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCommentsWidget($widget) {
|
|
||||||
$config_data = $this->getConfigData();
|
|
||||||
$config_data['comments_widget'] = $widget;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getCommentsWidget() {
|
|
||||||
$config_data = $this->getConfigData();
|
|
||||||
if (empty($config_data)) {
|
|
||||||
return 'none';
|
|
||||||
}
|
|
||||||
return idx($config_data, 'comments_widget', 'none');
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getConfiguration() {
|
protected function getConfiguration() {
|
||||||
return array(
|
return array(
|
||||||
self::CONFIG_AUX_PHID => true,
|
self::CONFIG_AUX_PHID => true,
|
||||||
|
@ -165,31 +148,6 @@ final class PhamePost extends PhameDAO
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getVisibilityOptionsForSelect() {
|
|
||||||
return array(
|
|
||||||
self::VISIBILITY_DRAFT => pht('Draft: visible only to me.'),
|
|
||||||
self::VISIBILITY_PUBLISHED => pht(
|
|
||||||
'Published: visible to the whole world.'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getCommentsWidgetOptionsForSelect() {
|
|
||||||
$current = $this->getCommentsWidget();
|
|
||||||
$options = array();
|
|
||||||
|
|
||||||
if ($current == 'facebook' ||
|
|
||||||
PhabricatorFacebookAuthProvider::getFacebookApplicationID()) {
|
|
||||||
$options['facebook'] = pht('Facebook');
|
|
||||||
}
|
|
||||||
if ($current == 'disqus' ||
|
|
||||||
PhabricatorEnv::getEnvConfig('disqus.shortname')) {
|
|
||||||
$options['disqus'] = pht('Disqus');
|
|
||||||
}
|
|
||||||
$options['none'] = pht('None');
|
|
||||||
|
|
||||||
return $options;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* -( PhabricatorPolicyInterface Implementation )-------------------------- */
|
/* -( PhabricatorPolicyInterface Implementation )-------------------------- */
|
||||||
|
|
||||||
|
@ -209,18 +167,23 @@ final class PhamePost extends PhameDAO
|
||||||
case PhabricatorPolicyCapability::CAN_VIEW:
|
case PhabricatorPolicyCapability::CAN_VIEW:
|
||||||
if (!$this->isDraft() && $this->getBlog()) {
|
if (!$this->isDraft() && $this->getBlog()) {
|
||||||
return $this->getBlog()->getViewPolicy();
|
return $this->getBlog()->getViewPolicy();
|
||||||
|
} else if ($this->getBlog()) {
|
||||||
|
return $this->getBlog()->getEditPolicy();
|
||||||
} else {
|
} else {
|
||||||
return PhabricatorPolicies::POLICY_NOONE;
|
return PhabricatorPolicies::POLICY_NOONE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PhabricatorPolicyCapability::CAN_EDIT:
|
case PhabricatorPolicyCapability::CAN_EDIT:
|
||||||
|
if ($this->getBlog()) {
|
||||||
|
return $this->getBlog()->getEditPolicy();
|
||||||
|
} else {
|
||||||
return PhabricatorPolicies::POLICY_NOONE;
|
return PhabricatorPolicies::POLICY_NOONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function hasAutomaticCapability($capability, PhabricatorUser $user) {
|
public function hasAutomaticCapability($capability, PhabricatorUser $user) {
|
||||||
// A blog post's author can always view it, and is the only user allowed
|
// A blog post's author can always view it.
|
||||||
// to edit it.
|
|
||||||
|
|
||||||
switch ($capability) {
|
switch ($capability) {
|
||||||
case PhabricatorPolicyCapability::CAN_VIEW:
|
case PhabricatorPolicyCapability::CAN_VIEW:
|
||||||
|
|
|
@ -6,7 +6,7 @@ final class PhamePostTransaction
|
||||||
const TYPE_TITLE = 'phame.post.title';
|
const TYPE_TITLE = 'phame.post.title';
|
||||||
const TYPE_PHAME_TITLE = 'phame.post.phame.title';
|
const TYPE_PHAME_TITLE = 'phame.post.phame.title';
|
||||||
const TYPE_BODY = 'phame.post.body';
|
const TYPE_BODY = 'phame.post.body';
|
||||||
const TYPE_COMMENTS_WIDGET = 'phame.post.comments.widget';
|
const TYPE_VISIBILITY = 'phame.post.visibility';
|
||||||
|
|
||||||
const MAILTAG_CONTENT = 'phame-post-content';
|
const MAILTAG_CONTENT = 'phame-post-content';
|
||||||
const MAILTAG_COMMENT = 'phame-post-comment';
|
const MAILTAG_COMMENT = 'phame-post-comment';
|
||||||
|
@ -20,6 +20,10 @@ final class PhamePostTransaction
|
||||||
return PhabricatorPhamePostPHIDType::TYPECONST;
|
return PhabricatorPhamePostPHIDType::TYPECONST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getApplicationTransactionCommentObject() {
|
||||||
|
return new PhamePostTransactionComment();
|
||||||
|
}
|
||||||
|
|
||||||
public function getRemarkupBlocks() {
|
public function getRemarkupBlocks() {
|
||||||
$blocks = parent::getRemarkupBlocks();
|
$blocks = parent::getRemarkupBlocks();
|
||||||
|
|
||||||
|
@ -54,7 +58,7 @@ final class PhamePostTransaction
|
||||||
break;
|
break;
|
||||||
case self::TYPE_PHAME_TITLE:
|
case self::TYPE_PHAME_TITLE:
|
||||||
case self::TYPE_BODY:
|
case self::TYPE_BODY:
|
||||||
case self::TYPE_COMMENTS_WIDGET:
|
case self::TYPE_VISIBILITY:
|
||||||
return 'fa-pencil';
|
return 'fa-pencil';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -65,7 +69,6 @@ final class PhamePostTransaction
|
||||||
$tags = parent::getMailTags();
|
$tags = parent::getMailTags();
|
||||||
|
|
||||||
switch ($this->getTransactionType()) {
|
switch ($this->getTransactionType()) {
|
||||||
case self::TYPE_COMMENTS_WIDGET:
|
|
||||||
case PhabricatorTransactions::TYPE_COMMENT:
|
case PhabricatorTransactions::TYPE_COMMENT:
|
||||||
$tags[] = self::MAILTAG_COMMENT;
|
$tags[] = self::MAILTAG_COMMENT;
|
||||||
break;
|
break;
|
||||||
|
@ -108,18 +111,23 @@ final class PhamePostTransaction
|
||||||
'%s updated the blog post.',
|
'%s updated the blog post.',
|
||||||
$this->renderHandleLink($author_phid));
|
$this->renderHandleLink($author_phid));
|
||||||
break;
|
break;
|
||||||
|
case self::TYPE_VISIBILITY:
|
||||||
|
if ($new == PhameConstants::VISIBILITY_DRAFT) {
|
||||||
|
return pht(
|
||||||
|
'%s marked this post as a draft.',
|
||||||
|
$this->renderHandleLink($author_phid));
|
||||||
|
} else {
|
||||||
|
return pht(
|
||||||
|
'%s published this post.',
|
||||||
|
$this->renderHandleLink($author_phid));
|
||||||
|
}
|
||||||
|
break;
|
||||||
case self::TYPE_PHAME_TITLE:
|
case self::TYPE_PHAME_TITLE:
|
||||||
return pht(
|
return pht(
|
||||||
'%s updated the post\'s Phame title to "%s".',
|
'%s updated the post\'s Phame title to "%s".',
|
||||||
$this->renderHandleLink($author_phid),
|
$this->renderHandleLink($author_phid),
|
||||||
rtrim($new, '/'));
|
rtrim($new, '/'));
|
||||||
break;
|
break;
|
||||||
case self::TYPE_COMMENTS_WIDGET:
|
|
||||||
return pht(
|
|
||||||
'%s updated the post\'s comment widget to "%s".',
|
|
||||||
$this->renderHandleLink($author_phid),
|
|
||||||
$new);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::getTitle();
|
return parent::getTitle();
|
||||||
|
@ -153,37 +161,57 @@ final class PhamePostTransaction
|
||||||
$this->renderHandleLink($author_phid),
|
$this->renderHandleLink($author_phid),
|
||||||
$this->renderHandleLink($object_phid));
|
$this->renderHandleLink($object_phid));
|
||||||
break;
|
break;
|
||||||
|
case self::TYPE_VISIBILITY:
|
||||||
|
if ($new == PhameConstants::VISIBILITY_DRAFT) {
|
||||||
|
return pht(
|
||||||
|
'%s marked %s as a draft.',
|
||||||
|
$this->renderHandleLink($author_phid),
|
||||||
|
$this->renderHandleLink($object_phid));
|
||||||
|
} else {
|
||||||
|
return pht(
|
||||||
|
'%s published %s.',
|
||||||
|
$this->renderHandleLink($author_phid),
|
||||||
|
$this->renderHandleLink($object_phid));
|
||||||
|
}
|
||||||
|
break;
|
||||||
case self::TYPE_PHAME_TITLE:
|
case self::TYPE_PHAME_TITLE:
|
||||||
return pht(
|
return pht(
|
||||||
'%s updated the Phame title for %s.',
|
'%s updated the Phame title for %s.',
|
||||||
$this->renderHandleLink($author_phid),
|
$this->renderHandleLink($author_phid),
|
||||||
$this->renderHandleLink($object_phid));
|
$this->renderHandleLink($object_phid));
|
||||||
break;
|
break;
|
||||||
case self::TYPE_COMMENTS_WIDGET:
|
|
||||||
return pht(
|
|
||||||
'%s updated the comments widget for %s.',
|
|
||||||
$this->renderHandleLink($author_phid),
|
|
||||||
$this->renderHandleLink($object_phid));
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::getTitleForFeed();
|
return parent::getTitleForFeed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBodyForFeed(PhabricatorFeedStory $story) {
|
public function getBodyForFeed(PhabricatorFeedStory $story) {
|
||||||
$new = $this->getNewValue();
|
$text = null;
|
||||||
|
|
||||||
$body = null;
|
|
||||||
|
|
||||||
switch ($this->getTransactionType()) {
|
switch ($this->getTransactionType()) {
|
||||||
case self::TYPE_TITLE:
|
case self::TYPE_TITLE:
|
||||||
|
if ($this->getOldValue() === null) {
|
||||||
|
$post = $story->getPrimaryObject();
|
||||||
|
$text = $post->getBody();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case self::TYPE_VISIBILITY:
|
||||||
|
if ($this->getNewValue() == PhameConstants::VISIBILITY_PUBLISHED) {
|
||||||
|
$post = $story->getPrimaryObject();
|
||||||
|
$text = $post->getBody();
|
||||||
|
}
|
||||||
|
break;
|
||||||
case self::TYPE_BODY:
|
case self::TYPE_BODY:
|
||||||
|
$text = $this->getNewValue();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen($text)) {
|
||||||
return phutil_escape_html_newlines(
|
return phutil_escape_html_newlines(
|
||||||
id(new PhutilUTF8StringTruncator())
|
id(new PhutilUTF8StringTruncator())
|
||||||
->setMaximumGlyphs(128)
|
->setMaximumGlyphs(128)
|
||||||
->truncateString($new));
|
->truncateString($text));
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::getBodyForFeed($story);
|
return parent::getBodyForFeed($story);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +229,6 @@ final class PhamePostTransaction
|
||||||
return parent::getColor();
|
return parent::getColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function hasChangeDetails() {
|
public function hasChangeDetails() {
|
||||||
switch ($this->getTransactionType()) {
|
switch ($this->getTransactionType()) {
|
||||||
case self::TYPE_BODY:
|
case self::TYPE_BODY:
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
final class PhamePostTransactionComment
|
||||||
|
extends PhabricatorApplicationTransactionComment {
|
||||||
|
|
||||||
|
public function getApplicationTransactionObject() {
|
||||||
|
return new PhamePostTransaction();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -101,24 +101,6 @@ final class PhamePostView extends AphrontView {
|
||||||
$this->getSummary());
|
$this->getSummary());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function renderComments() {
|
|
||||||
$post = $this->getPost();
|
|
||||||
|
|
||||||
switch ($post->getCommentsWidget()) {
|
|
||||||
case 'facebook':
|
|
||||||
$comments = $this->renderFacebookComments();
|
|
||||||
break;
|
|
||||||
case 'disqus':
|
|
||||||
$comments = $this->renderDisqusComments();
|
|
||||||
break;
|
|
||||||
case 'none':
|
|
||||||
default:
|
|
||||||
$comments = null;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return $comments;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function render() {
|
public function render() {
|
||||||
return phutil_tag(
|
return phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
|
@ -129,7 +111,6 @@ final class PhamePostView extends AphrontView {
|
||||||
$this->renderTitle(),
|
$this->renderTitle(),
|
||||||
$this->renderDatePublished(),
|
$this->renderDatePublished(),
|
||||||
$this->renderBody(),
|
$this->renderBody(),
|
||||||
$this->renderComments(),
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,96 +127,4 @@ final class PhamePostView extends AphrontView {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderFacebookComments() {
|
|
||||||
$fb_id = PhabricatorFacebookAuthProvider::getFacebookApplicationID();
|
|
||||||
if (!$fb_id) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$fb_root = phutil_tag('div',
|
|
||||||
array(
|
|
||||||
'id' => 'fb-root',
|
|
||||||
),
|
|
||||||
'');
|
|
||||||
|
|
||||||
$c_uri = '//connect.facebook.net/en_US/all.js#xfbml=1&appId='.$fb_id;
|
|
||||||
$fb_js = CelerityStaticResourceResponse::renderInlineScript(
|
|
||||||
jsprintf(
|
|
||||||
'(function(d, s, id) {'.
|
|
||||||
' var js, fjs = d.getElementsByTagName(s)[0];'.
|
|
||||||
' if (d.getElementById(id)) return;'.
|
|
||||||
' js = d.createElement(s); js.id = id;'.
|
|
||||||
' js.src = %s;'.
|
|
||||||
' fjs.parentNode.insertBefore(js, fjs);'.
|
|
||||||
'}(document, \'script\', \'facebook-jssdk\'));',
|
|
||||||
$c_uri));
|
|
||||||
|
|
||||||
|
|
||||||
$uri = $this->getSkin()->getURI('post/'.$this->getPost()->getPhameTitle());
|
|
||||||
|
|
||||||
require_celerity_resource('phame-css');
|
|
||||||
$fb_comments = phutil_tag('div',
|
|
||||||
array(
|
|
||||||
'class' => 'fb-comments',
|
|
||||||
'data-href' => $uri,
|
|
||||||
'data-num-posts' => 5,
|
|
||||||
),
|
|
||||||
'');
|
|
||||||
|
|
||||||
return phutil_tag(
|
|
||||||
'div',
|
|
||||||
array(
|
|
||||||
'class' => 'phame-comments-facebook',
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
$fb_root,
|
|
||||||
$fb_js,
|
|
||||||
$fb_comments,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
private function renderDisqusComments() {
|
|
||||||
$disqus_shortname = PhabricatorEnv::getEnvConfig('disqus.shortname');
|
|
||||||
if (!$disqus_shortname) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$post = $this->getPost();
|
|
||||||
|
|
||||||
$disqus_thread = phutil_tag('div',
|
|
||||||
array(
|
|
||||||
'id' => 'disqus_thread',
|
|
||||||
));
|
|
||||||
|
|
||||||
// protip - try some var disqus_developer = 1; action to test locally
|
|
||||||
$disqus_js = CelerityStaticResourceResponse::renderInlineScript(
|
|
||||||
jsprintf(
|
|
||||||
' var disqus_shortname = %s;'.
|
|
||||||
' var disqus_identifier = %s;'.
|
|
||||||
' var disqus_url = %s;'.
|
|
||||||
' var disqus_title = %s;'.
|
|
||||||
'(function() {'.
|
|
||||||
' var dsq = document.createElement("script");'.
|
|
||||||
' dsq.type = "text/javascript";'.
|
|
||||||
' dsq.async = true;'.
|
|
||||||
' dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js";'.
|
|
||||||
'(document.getElementsByTagName("head")[0] ||'.
|
|
||||||
' document.getElementsByTagName("body")[0]).appendChild(dsq);'.
|
|
||||||
'})();',
|
|
||||||
$disqus_shortname,
|
|
||||||
$post->getPHID(),
|
|
||||||
$this->getSkin()->getURI('post/'.$this->getPost()->getPhameTitle()),
|
|
||||||
$post->getTitle()));
|
|
||||||
|
|
||||||
return phutil_tag(
|
|
||||||
'div',
|
|
||||||
array(
|
|
||||||
'class' => 'phame-comments-disqus',
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
$disqus_thread,
|
|
||||||
$disqus_js,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,19 +120,31 @@ final class PholioMockEditor extends PhabricatorApplicationTransactionEditor {
|
||||||
PhabricatorLiskDAO $object,
|
PhabricatorLiskDAO $object,
|
||||||
PhabricatorApplicationTransaction $xaction) {
|
PhabricatorApplicationTransaction $xaction) {
|
||||||
|
|
||||||
|
$images = $this->getNewImages();
|
||||||
|
$images = mpull($images, null, 'getPHID');
|
||||||
|
|
||||||
switch ($xaction->getTransactionType()) {
|
switch ($xaction->getTransactionType()) {
|
||||||
case PholioTransaction::TYPE_IMAGE_FILE:
|
case PholioTransaction::TYPE_IMAGE_FILE:
|
||||||
$new = $xaction->getNewValue();
|
$file_phids = array();
|
||||||
$phids = array();
|
foreach ($xaction->getNewValue() as $image_phid) {
|
||||||
foreach ($new as $key => $images) {
|
$image = idx($images, $image_phid);
|
||||||
$phids[] = mpull($images, 'getFilePHID');
|
if (!$image) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
return array_mergev($phids);
|
$file_phids[] = $image->getFilePHID();
|
||||||
|
}
|
||||||
|
return $file_phids;
|
||||||
case PholioTransaction::TYPE_IMAGE_REPLACE:
|
case PholioTransaction::TYPE_IMAGE_REPLACE:
|
||||||
return array($xaction->getNewValue()->getFilePHID());
|
$image_phid = $xaction->getNewValue();
|
||||||
|
$image = idx($images, $image_phid);
|
||||||
|
|
||||||
|
if ($image) {
|
||||||
|
return array($image->getFilePHID());
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return array();
|
return parent::extractFilePHIDsFromCustomTransaction($object, $xaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ final class PhortuneCartEditor
|
||||||
"%s",
|
"%s",
|
||||||
$issues);
|
$issues);
|
||||||
|
|
||||||
$body->addRemarkupSection($overview);
|
$body->addRemarkupSection(null, $overview);
|
||||||
|
|
||||||
$body->addLinkSection(
|
$body->addLinkSection(
|
||||||
pht('PAY NOW'),
|
pht('PAY NOW'),
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
final class PhortuneNotImplementedException extends Exception {
|
|
||||||
|
|
||||||
public function __construct(PhortunePaymentProvider $provider) {
|
|
||||||
return parent::__construct(
|
|
||||||
pht(
|
|
||||||
"Provider '%s' does not implement this method.",
|
|
||||||
get_class($provider)));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -109,7 +109,7 @@ abstract class PhortunePaymentProvider extends Phobject {
|
||||||
abstract public function canRunConfigurationTest();
|
abstract public function canRunConfigurationTest();
|
||||||
|
|
||||||
public function runConfigurationTest() {
|
public function runConfigurationTest() {
|
||||||
throw new PhortuneNotImplementedException($this);
|
throw new PhutilMethodNotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ abstract class PhortunePaymentProvider extends Phobject {
|
||||||
* @task addmethod
|
* @task addmethod
|
||||||
*/
|
*/
|
||||||
public function translateCreatePaymentMethodErrorCode($error_code) {
|
public function translateCreatePaymentMethodErrorCode($error_code) {
|
||||||
throw new PhortuneNotImplementedException($this);
|
throw new PhutilMethodNotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ abstract class PhortunePaymentProvider extends Phobject {
|
||||||
* @task addmethod
|
* @task addmethod
|
||||||
*/
|
*/
|
||||||
public function getCreatePaymentMethodErrorMessage($error_code) {
|
public function getCreatePaymentMethodErrorMessage($error_code) {
|
||||||
throw new PhortuneNotImplementedException($this);
|
throw new PhutilMethodNotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ abstract class PhortunePaymentProvider extends Phobject {
|
||||||
* @task addmethod
|
* @task addmethod
|
||||||
*/
|
*/
|
||||||
public function validateCreatePaymentMethodToken(array $token) {
|
public function validateCreatePaymentMethodToken(array $token) {
|
||||||
throw new PhortuneNotImplementedException($this);
|
throw new PhutilMethodNotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ abstract class PhortunePaymentProvider extends Phobject {
|
||||||
AphrontRequest $request,
|
AphrontRequest $request,
|
||||||
PhortunePaymentMethod $method,
|
PhortunePaymentMethod $method,
|
||||||
array $token) {
|
array $token) {
|
||||||
throw new PhortuneNotImplementedException($this);
|
throw new PhutilMethodNotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -206,12 +206,12 @@ abstract class PhortunePaymentProvider extends Phobject {
|
||||||
public function renderCreatePaymentMethodForm(
|
public function renderCreatePaymentMethodForm(
|
||||||
AphrontRequest $request,
|
AphrontRequest $request,
|
||||||
array $errors) {
|
array $errors) {
|
||||||
throw new PhortuneNotImplementedException($this);
|
throw new PhutilMethodNotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDefaultPaymentMethodDisplayName(
|
public function getDefaultPaymentMethodDisplayName(
|
||||||
PhortunePaymentMethod $method) {
|
PhortunePaymentMethod $method) {
|
||||||
throw new PhortuneNotImplementedException($this);
|
throw new PhutilMethodNotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ abstract class PhortunePaymentProvider extends Phobject {
|
||||||
public function processControllerRequest(
|
public function processControllerRequest(
|
||||||
PhortuneProviderActionController $controller,
|
PhortuneProviderActionController $controller,
|
||||||
AphrontRequest $request) {
|
AphrontRequest $request) {
|
||||||
throw new PhortuneNotImplementedException($this);
|
throw new PhutilMethodNotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
abstract class PhabricatorXHPASTViewController extends PhabricatorController {
|
abstract class PhabricatorXHPASTViewController extends PhabricatorController {
|
||||||
|
|
||||||
public function buildStandardPageResponse($view, array $data) {
|
public function buildStandardPageResponse($view, array $data) {
|
||||||
|
|
||||||
$page = $this->buildStandardPageView();
|
$page = $this->buildStandardPageView();
|
||||||
|
|
||||||
$page->setApplicationName('XHPASTView');
|
$page->setApplicationName('XHPASTView');
|
||||||
|
|
|
@ -14,7 +14,7 @@ final class PhabricatorXHPASTViewFrameController
|
||||||
phutil_tag(
|
phutil_tag(
|
||||||
'iframe',
|
'iframe',
|
||||||
array(
|
array(
|
||||||
'src' => '/xhpast/frameset/'.$id.'/',
|
'src' => "/xhpast/frameset/{$id}/",
|
||||||
'frameborder' => '0',
|
'frameborder' => '0',
|
||||||
'style' => 'width: 100%; height: 800px;',
|
'style' => 'width: 100%; height: 800px;',
|
||||||
'',
|
'',
|
||||||
|
|
|
@ -10,9 +10,9 @@ final class PhabricatorXHPASTViewFramesetController
|
||||||
public function handleRequest(AphrontRequest $request) {
|
public function handleRequest(AphrontRequest $request) {
|
||||||
$id = $request->getURIData('id');
|
$id = $request->getURIData('id');
|
||||||
|
|
||||||
$response = new AphrontWebpageResponse();
|
return id(new AphrontWebpageResponse())
|
||||||
$response->setFrameable(true);
|
->setFrameable(true)
|
||||||
$response->setContent(phutil_tag(
|
->setContent(phutil_tag(
|
||||||
'frameset',
|
'frameset',
|
||||||
array('cols' => '33%, 34%, 33%'),
|
array('cols' => '33%, 34%, 33%'),
|
||||||
array(
|
array(
|
||||||
|
@ -20,7 +20,5 @@ final class PhabricatorXHPASTViewFramesetController
|
||||||
phutil_tag('frame', array('src' => "/xhpast/tree/{$id}/")),
|
phutil_tag('frame', array('src' => "/xhpast/tree/{$id}/")),
|
||||||
phutil_tag('frame', array('src' => "/xhpast/stream/{$id}/")),
|
phutil_tag('frame', array('src' => "/xhpast/stream/{$id}/")),
|
||||||
)));
|
)));
|
||||||
|
|
||||||
return $response;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,9 @@ abstract class PhabricatorXHPASTViewPanelController
|
||||||
|
|
||||||
public function willProcessRequest(array $data) {
|
public function willProcessRequest(array $data) {
|
||||||
$this->id = $data['id'];
|
$this->id = $data['id'];
|
||||||
$this->storageTree = id(new PhabricatorXHPASTViewParseTree())
|
$this->storageTree = id(new PhabricatorXHPASTParseTree())
|
||||||
->load($this->id);
|
->load($this->id);
|
||||||
|
|
||||||
if (!$this->storageTree) {
|
if (!$this->storageTree) {
|
||||||
throw new Exception(pht('No such AST!'));
|
throw new Exception(pht('No such AST!'));
|
||||||
}
|
}
|
||||||
|
@ -65,10 +66,9 @@ li span {
|
||||||
'</html>',
|
'</html>',
|
||||||
$content);
|
$content);
|
||||||
|
|
||||||
$response = new AphrontWebpageResponse();
|
return id(new AphrontWebpageResponse())
|
||||||
$response->setFrameable(true);
|
->setFrameable(true)
|
||||||
$response->setContent($content);
|
->setContent($content);
|
||||||
return $response;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,17 +13,21 @@ final class PhabricatorXHPASTViewRunController
|
||||||
$resolved = $future->resolve();
|
$resolved = $future->resolve();
|
||||||
|
|
||||||
// This is just to let it throw exceptions if stuff is broken.
|
// This is just to let it throw exceptions if stuff is broken.
|
||||||
$parse_tree = XHPASTTree::newFromDataAndResolvedExecFuture(
|
try {
|
||||||
$source,
|
XHPASTTree::newFromDataAndResolvedExecFuture($source, $resolved);
|
||||||
$resolved);
|
} catch (XHPASTSyntaxErrorException $ex) {
|
||||||
|
// This is possibly expected.
|
||||||
|
}
|
||||||
|
|
||||||
list($err, $stdout, $stderr) = $resolved;
|
list($err, $stdout, $stderr) = $resolved;
|
||||||
|
|
||||||
$storage_tree = new PhabricatorXHPASTViewParseTree();
|
$storage_tree = id(new PhabricatorXHPASTParseTree())
|
||||||
$storage_tree->setInput($source);
|
->setInput($source)
|
||||||
$storage_tree->setStdout($stdout);
|
->setReturnCode($err)
|
||||||
$storage_tree->setAuthorPHID($viewer->getPHID());
|
->setStdout($stdout)
|
||||||
$storage_tree->save();
|
->setStderr($stderr)
|
||||||
|
->setAuthorPHID($viewer->getPHID())
|
||||||
|
->save();
|
||||||
|
|
||||||
return id(new AphrontRedirectResponse())
|
return id(new AphrontRedirectResponse())
|
||||||
->setURI('/xhpast/view/'.$storage_tree->getID().'/');
|
->setURI('/xhpast/view/'.$storage_tree->getID().'/');
|
||||||
|
|
|
@ -6,11 +6,17 @@ final class PhabricatorXHPASTViewStreamController
|
||||||
public function handleRequest(AphrontRequest $request) {
|
public function handleRequest(AphrontRequest $request) {
|
||||||
$storage = $this->getStorageTree();
|
$storage = $this->getStorageTree();
|
||||||
$input = $storage->getInput();
|
$input = $storage->getInput();
|
||||||
|
$err = $storage->getReturnCode();
|
||||||
$stdout = $storage->getStdout();
|
$stdout = $storage->getStdout();
|
||||||
|
$stderr = $storage->getStderr();
|
||||||
|
|
||||||
|
try {
|
||||||
$tree = XHPASTTree::newFromDataAndResolvedExecFuture(
|
$tree = XHPASTTree::newFromDataAndResolvedExecFuture(
|
||||||
$input,
|
$input,
|
||||||
array(0, $stdout, ''));
|
array($err, $stdout, $stderr));
|
||||||
|
} catch (XHPASTSyntaxErrorException $ex) {
|
||||||
|
return $this->buildXHPASTViewPanelResponse($ex->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
$tokens = array();
|
$tokens = array();
|
||||||
foreach ($tree->getRawTokenStream() as $id => $token) {
|
foreach ($tree->getRawTokenStream() as $id => $token) {
|
||||||
|
|
|
@ -10,18 +10,23 @@ final class PhabricatorXHPASTViewTreeController
|
||||||
public function handleRequest(AphrontRequest $request) {
|
public function handleRequest(AphrontRequest $request) {
|
||||||
$storage = $this->getStorageTree();
|
$storage = $this->getStorageTree();
|
||||||
$input = $storage->getInput();
|
$input = $storage->getInput();
|
||||||
|
$err = $storage->getReturnCode();
|
||||||
$stdout = $storage->getStdout();
|
$stdout = $storage->getStdout();
|
||||||
|
$stderr = $storage->getStderr();
|
||||||
|
|
||||||
|
try {
|
||||||
$tree = XHPASTTree::newFromDataAndResolvedExecFuture(
|
$tree = XHPASTTree::newFromDataAndResolvedExecFuture(
|
||||||
$input,
|
$input,
|
||||||
array(0, $stdout, ''));
|
array($err, $stdout, $stderr));
|
||||||
|
} catch (XHPASTSyntaxErrorException $ex) {
|
||||||
|
return $this->buildXHPASTViewPanelResponse($ex->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
$tree = phutil_tag('ul', array(), $this->buildTree($tree->getRootNode()));
|
$tree = phutil_tag('ul', array(), $this->buildTree($tree->getRootNode()));
|
||||||
return $this->buildXHPASTViewPanelResponse($tree);
|
return $this->buildXHPASTViewPanelResponse($tree);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function buildTree($root) {
|
protected function buildTree($root) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$name = $root->getTypeName();
|
$name = $root->getTypeName();
|
||||||
$title = $root->getDescription();
|
$title = $root->getDescription();
|
||||||
|
|
8
src/applications/phpast/storage/PhabricatorXHPASTDAO.php
Normal file
8
src/applications/phpast/storage/PhabricatorXHPASTDAO.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
abstract class PhabricatorXHPASTDAO extends PhabricatorLiskDAO {
|
||||||
|
|
||||||
|
public function getApplicationName() {
|
||||||
|
return 'xhpast';
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,18 +1,21 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
final class PhabricatorXHPASTViewParseTree extends PhabricatorXHPASTViewDAO {
|
final class PhabricatorXHPASTParseTree extends PhabricatorXHPASTDAO {
|
||||||
|
|
||||||
protected $authorPHID;
|
protected $authorPHID;
|
||||||
|
|
||||||
protected $input;
|
protected $input;
|
||||||
|
protected $returnCode;
|
||||||
protected $stdout;
|
protected $stdout;
|
||||||
|
protected $stderr;
|
||||||
|
|
||||||
protected function getConfiguration() {
|
protected function getConfiguration() {
|
||||||
return array(
|
return array(
|
||||||
self::CONFIG_COLUMN_SCHEMA => array(
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||||||
'authorPHID' => 'phid?',
|
'authorPHID' => 'phid?',
|
||||||
'input' => 'text',
|
'input' => 'text',
|
||||||
|
'returnCode' => 'sint32',
|
||||||
'stdout' => 'text',
|
'stdout' => 'text',
|
||||||
|
'stderr' => 'text',
|
||||||
),
|
),
|
||||||
) + parent::getConfiguration();
|
) + parent::getConfiguration();
|
||||||
}
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue