Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13976778
D13644.id32988.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D13644.id32988.diff
View Options
diff --git a/resources/sql/autopatches/20150606.mlist.1.php b/resources/sql/autopatches/20150606.mlist.1.php
--- a/resources/sql/autopatches/20150606.mlist.1.php
+++ b/resources/sql/autopatches/20150606.mlist.1.php
@@ -99,7 +99,7 @@
echo pht('Updated mailing lists in Herald condition %d.', $id)."\n";
}
-$table = new HeraldAction();
+$table = new HeraldActionRecord();
$conn_w = $table->establishConnection('w');
foreach (new LiskMigrationIterator($table) as $action) {
$name = $action->getAction();
diff --git a/resources/sql/autopatches/20150717.herald.1.sql b/resources/sql/autopatches/20150717.herald.1.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20150717.herald.1.sql
@@ -0,0 +1,2 @@
+RENAME TABLE {$NAMESPACE}_herald.herald_action
+ TO {$NAMESPACE}_herald.herald_actionrecord;
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1007,7 +1007,7 @@
'HarbormasterUploadArtifactBuildStepImplementation' => 'applications/harbormaster/step/HarbormasterUploadArtifactBuildStepImplementation.php',
'HarbormasterWaitForPreviousBuildStepImplementation' => 'applications/harbormaster/step/HarbormasterWaitForPreviousBuildStepImplementation.php',
'HarbormasterWorker' => 'applications/harbormaster/worker/HarbormasterWorker.php',
- 'HeraldAction' => 'applications/herald/storage/HeraldAction.php',
+ 'HeraldActionRecord' => 'applications/herald/storage/HeraldActionRecord.php',
'HeraldAdapter' => 'applications/herald/adapter/HeraldAdapter.php',
'HeraldAlwaysField' => 'applications/herald/field/HeraldAlwaysField.php',
'HeraldAnotherRuleField' => 'applications/herald/field/HeraldAnotherRuleField.php',
@@ -4625,7 +4625,7 @@
'HarbormasterUploadArtifactBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
'HarbormasterWaitForPreviousBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
'HarbormasterWorker' => 'PhabricatorWorker',
- 'HeraldAction' => 'HeraldDAO',
+ 'HeraldActionRecord' => 'HeraldDAO',
'HeraldAdapter' => 'Phobject',
'HeraldAlwaysField' => 'HeraldField',
'HeraldAnotherRuleField' => 'HeraldField',
diff --git a/src/applications/herald/adapter/HeraldAdapter.php b/src/applications/herald/adapter/HeraldAdapter.php
--- a/src/applications/herald/adapter/HeraldAdapter.php
+++ b/src/applications/herald/adapter/HeraldAdapter.php
@@ -690,7 +690,7 @@
public function willSaveAction(
HeraldRule $rule,
- HeraldAction $action) {
+ HeraldActionRecord $action) {
$target = $action->getTarget();
if (is_array($target)) {
@@ -996,7 +996,7 @@
}
private function renderActionAsText(
- HeraldAction $action,
+ HeraldActionRecord $action,
PhabricatorHandleList $handles) {
$rule_global = HeraldRuleTypeConfig::RULE_TYPE_GLOBAL;
@@ -1028,7 +1028,7 @@
}
private function renderActionTargetAsText(
- HeraldAction $action,
+ HeraldActionRecord $action,
PhabricatorHandleList $handles) {
$target = $action->getTarget();
diff --git a/src/applications/herald/controller/HeraldRuleController.php b/src/applications/herald/controller/HeraldRuleController.php
--- a/src/applications/herald/controller/HeraldRuleController.php
+++ b/src/applications/herald/controller/HeraldRuleController.php
@@ -313,7 +313,7 @@
$action[1] = null;
}
- $obj = new HeraldAction();
+ $obj = new HeraldActionRecord();
$obj->setAction($action[0]);
$obj->setTarget($action[1]);
diff --git a/src/applications/herald/query/HeraldRuleQuery.php b/src/applications/herald/query/HeraldRuleQuery.php
--- a/src/applications/herald/query/HeraldRuleQuery.php
+++ b/src/applications/herald/query/HeraldRuleQuery.php
@@ -108,7 +108,7 @@
$rule_ids);
$conditions = mgroup($conditions, 'getRuleID');
- $actions = id(new HeraldAction())->loadAllWhere(
+ $actions = id(new HeraldActionRecord())->loadAllWhere(
'ruleID IN (%Ld)',
$rule_ids);
$actions = mgroup($actions, 'getRuleID');
diff --git a/src/applications/herald/storage/HeraldAction.php b/src/applications/herald/storage/HeraldActionRecord.php
rename from src/applications/herald/storage/HeraldAction.php
rename to src/applications/herald/storage/HeraldActionRecord.php
--- a/src/applications/herald/storage/HeraldAction.php
+++ b/src/applications/herald/storage/HeraldActionRecord.php
@@ -1,6 +1,6 @@
<?php
-final class HeraldAction extends HeraldDAO {
+final class HeraldActionRecord extends HeraldDAO {
protected $ruleID;
diff --git a/src/applications/herald/storage/HeraldRule.php b/src/applications/herald/storage/HeraldRule.php
--- a/src/applications/herald/storage/HeraldRule.php
+++ b/src/applications/herald/storage/HeraldRule.php
@@ -99,14 +99,14 @@
if (!$this->getID()) {
return array();
}
- return id(new HeraldAction())->loadAllWhere(
+ return id(new HeraldActionRecord())->loadAllWhere(
'ruleID = %d',
$this->getID());
}
public function attachActions(array $actions) {
// TODO: validate actions have been attached.
- assert_instances_of($actions, 'HeraldAction');
+ assert_instances_of($actions, 'HeraldActionRecord');
$this->actions = $actions;
return $this;
}
@@ -123,9 +123,9 @@
}
public function saveActions(array $actions) {
- assert_instances_of($actions, 'HeraldAction');
+ assert_instances_of($actions, 'HeraldActionRecord');
return $this->saveChildren(
- id(new HeraldAction())->getTableName(),
+ id(new HeraldActionRecord())->getTableName(),
$actions);
}
@@ -162,7 +162,7 @@
queryfx(
$this->establishConnection('w'),
'DELETE FROM %T WHERE ruleID = %d',
- id(new HeraldAction())->getTableName(),
+ id(new HeraldActionRecord())->getTableName(),
$this->getID());
$result = parent::delete();
$this->saveTransaction();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 19, 3:40 PM (4 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6718861
Default Alt Text
D13644.id32988.diff (5 KB)
Attached To
Mode
D13644: Rename "HeraldAction" to "HeraldActionRecord"
Attached
Detach File
Event Timeline
Log In to Comment