@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Nuance - get some scaffolding up there

Summary:
I updated the wiki too - https://secure.phabricator.com/w/projects/pebkac/ - with what I am thinking right now. Rough plan here is

- next diff:
- implement editors and transactions
- implement "web type" for contact source
- /pebkac/item/new/ will be the entry point for this
- implement "actions" on a contact
- probably some "polish" on the scaffolding laid out here; like "create" permissions maybs
- diffs after that:
- implement "twitter" type for source
- implement email reply handler stuff for item and source

Probs a great time to blast huge holes in all this stuff. :D

Test Plan: these pages load and arc lint doesn't complain

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, epriestley, aran, chad

Differential Revision: https://secure.phabricator.com/D7465

+1809 -49
resources/sprite/apps_blue_2x/pebkac.png resources/sprite/apps_blue_2x/nuance.png
resources/sprite/apps_blue_4x/pebkac.png resources/sprite/apps_blue_4x/nuance.png
resources/sprite/apps_dark_1x/pebkac.png resources/sprite/apps_dark_1x/nuance.png
resources/sprite/apps_dark_2x/pebkac.png resources/sprite/apps_dark_2x/nuance.png
resources/sprite/apps_dark_4x/pebkac.png resources/sprite/apps_dark_4x/nuance.png
resources/sprite/apps_lb_2x/pebkac.png resources/sprite/apps_lb_2x/nuance.png
resources/sprite/apps_lb_4x/pebkac.png resources/sprite/apps_lb_4x/nuance.png
resources/sprite/apps_white_1x/pebkac.png resources/sprite/apps_white_1x/nuance.png
resources/sprite/apps_white_2x/pebkac.png resources/sprite/apps_white_2x/nuance.png
resources/sprite/apps_white_4x/pebkac.png resources/sprite/apps_white_4x/nuance.png
+20 -20
resources/sprite/manifest/apps-large.json
··· 581 581 "rule" : ".apps-new-white-large", 582 582 "hash" : "be597ce11c4d1630f67282cd7b81cc85" 583 583 }, 584 + "apps-nuance-blue-large" : { 585 + "name" : "apps-nuance-blue-large", 586 + "rule" : ".apps-nuance-blue-large, .phabricator-crumb-view:hover .apps-nuance-dark-large", 587 + "hash" : "a6c11b6c091b15c93bb75e40f5014c46" 588 + }, 589 + "apps-nuance-dark-large" : { 590 + "name" : "apps-nuance-dark-large", 591 + "rule" : ".apps-nuance-dark-large", 592 + "hash" : "a179a6802048440f0c4dfd99784ad740" 593 + }, 594 + "apps-nuance-light-large" : { 595 + "name" : "apps-nuance-light-large", 596 + "rule" : ".apps-nuance-light-large", 597 + "hash" : "f6f36066f33b015e0e44e125182db158" 598 + }, 599 + "apps-nuance-white-large" : { 600 + "name" : "apps-nuance-white-large", 601 + "rule" : ".apps-nuance-white-large", 602 + "hash" : "8510afe6941a33000ca02a054a3f78e0" 603 + }, 584 604 "apps-owners-blue-large" : { 585 605 "name" : "apps-owners-blue-large", 586 606 "rule" : ".apps-owners-blue-large, .phabricator-crumb-view:hover .apps-owners-dark-large", ··· 620 640 "name" : "apps-paste-white-large", 621 641 "rule" : ".apps-paste-white-large", 622 642 "hash" : "94cf3ee0f2b15b82ad8f62cb9399ecad" 623 - }, 624 - "apps-pebkac-blue-large" : { 625 - "name" : "apps-pebkac-blue-large", 626 - "rule" : ".apps-pebkac-blue-large, .phabricator-crumb-view:hover .apps-pebkac-dark-large", 627 - "hash" : "7a1010119d4589609f364c603cd03d1b" 628 - }, 629 - "apps-pebkac-dark-large" : { 630 - "name" : "apps-pebkac-dark-large", 631 - "rule" : ".apps-pebkac-dark-large", 632 - "hash" : "617142b451eec10fe60246eec52a99d0" 633 - }, 634 - "apps-pebkac-light-large" : { 635 - "name" : "apps-pebkac-light-large", 636 - "rule" : ".apps-pebkac-light-large", 637 - "hash" : "2319b657d0fe3df60b234e8961c4869e" 638 - }, 639 - "apps-pebkac-white-large" : { 640 - "name" : "apps-pebkac-white-large", 641 - "rule" : ".apps-pebkac-white-large", 642 - "hash" : "25eb13ac78cf507b6ec66016cd477cfe" 643 643 }, 644 644 "apps-people-blue-large" : { 645 645 "name" : "apps-people-blue-large",
+10 -10
resources/sprite/manifest/apps.json
··· 291 291 "rule" : ".apps-new-white", 292 292 "hash" : "dc5ce42c7d60e6ba37b07631b3c3280a" 293 293 }, 294 + "apps-nuance-dark" : { 295 + "name" : "apps-nuance-dark", 296 + "rule" : ".apps-nuance-dark", 297 + "hash" : "e20c19670e1c9b9d1f9267bf7f017aba" 298 + }, 299 + "apps-nuance-white" : { 300 + "name" : "apps-nuance-white", 301 + "rule" : ".apps-nuance-white", 302 + "hash" : "368f1241b438492642520a037a1ac294" 303 + }, 294 304 "apps-owners-dark" : { 295 305 "name" : "apps-owners-dark", 296 306 "rule" : ".apps-owners-dark", ··· 310 320 "name" : "apps-paste-white", 311 321 "rule" : ".apps-paste-white", 312 322 "hash" : "ed5ec1ee39cc2a01f568f91c72141bfb" 313 - }, 314 - "apps-pebkac-dark" : { 315 - "name" : "apps-pebkac-dark", 316 - "rule" : ".apps-pebkac-dark", 317 - "hash" : "4adb4a8f0a8c5bc5462bb806ceafc63f" 318 - }, 319 - "apps-pebkac-white" : { 320 - "name" : "apps-pebkac-white", 321 - "rule" : ".apps-pebkac-white", 322 - "hash" : "35438c7a295df21aa2fa4771a5c3c986" 323 323 }, 324 324 "apps-people-dark" : { 325 325 "name" : "apps-people-dark",
+259
resources/sql/patches/20131106.nuance-v0.sql
··· 1 + CREATE TABLE {$NAMESPACE}_nuance.nuance_item ( 2 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 3 + phid VARCHAR(64) NOT NULL COLLATE utf8_bin, 4 + ownerPHID VARCHAR(64) COLLATE utf8_bin, 5 + requestorPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 6 + sourcePHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 7 + sourceLabel VARCHAR(255), 8 + status INT UNSIGNED NOT NULL, 9 + data longtext NOT NULL COLLATE utf8_bin, 10 + mailKey VARCHAR(20) NOT NULL COLLATE utf8_bin, 11 + dateCreated INT UNSIGNED NOT NULL, 12 + dateModified INT UNSIGNED NOT NULL, 13 + dateNuanced INT UNSIGNED NOT NULL, 14 + UNIQUE KEY `key_phid` (phid), 15 + KEY `key_source` (sourcePHID, status, dateNuanced, id), 16 + KEY `key_owner` (ownerPHID, status, dateNuanced, id), 17 + KEY `key_contacter` (requestorPHID, status, dateNuanced, id) 18 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 19 + 20 + CREATE TABLE {$NAMESPACE}_nuance.nuance_itemtransaction ( 21 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 22 + phid VARCHAR(64) NOT NULL COLLATE utf8_bin, 23 + authorPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 24 + objectPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 25 + viewPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 26 + editPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 27 + commentPHID VARCHAR(64) COLLATE utf8_bin, 28 + commentVersion INT UNSIGNED NOT NULL, 29 + transactionType VARCHAR(32) NOT NULL COLLATE utf8_bin, 30 + oldValue LONGTEXT NOT NULL COLLATE utf8_bin, 31 + newValue LONGTEXT NOT NULL COLLATE utf8_bin, 32 + contentSource LONGTEXT NOT NULL COLLATE utf8_bin, 33 + metadata LONGTEXT NOT NULL COLLATE utf8_bin, 34 + dateCreated INT UNSIGNED NOT NULL, 35 + dateModified INT UNSIGNED NOT NULL, 36 + 37 + UNIQUE KEY `key_phid` (phid), 38 + KEY `key_object` (objectPHID) 39 + 40 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 41 + 42 + CREATE TABLE {$NAMESPACE}_nuance.nuance_itemtransaction_comment ( 43 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 44 + phid VARCHAR(64) NOT NULL COLLATE utf8_bin, 45 + transactionPHID VARCHAR(64) COLLATE utf8_bin, 46 + authorPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 47 + viewPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 48 + editPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 49 + commentVersion INT UNSIGNED NOT NULL, 50 + content LONGTEXT NOT NULL COLLATE utf8_bin, 51 + contentSource LONGTEXT NOT NULL COLLATE utf8_bin, 52 + isDeleted BOOL NOT NULL, 53 + dateCreated INT UNSIGNED NOT NULL, 54 + dateModified INT UNSIGNED NOT NULL, 55 + 56 + UNIQUE KEY `key_phid` (phid), 57 + UNIQUE KEY `key_version` (transactionPHID, commentVersion) 58 + 59 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 60 + 61 + CREATE TABLE {$NAMESPACE}_nuance.nuance_source ( 62 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 63 + phid VARCHAR(64) NOT NULL COLLATE utf8_bin, 64 + name VARCHAR(255), 65 + type INT UNSIGNED NOT NULL, 66 + data longtext NOT NULL COLLATE utf8_bin, 67 + mailKey VARCHAR(20) NOT NULL COLLATE utf8_bin, 68 + viewPolicy VARCHAR(64) NOT NULL, 69 + editPolicy VARCHAR(64) NOT NULL, 70 + dateCreated INT UNSIGNED NOT NULL, 71 + dateModified INT UNSIGNED NOT NULL, 72 + UNIQUE KEY `key_phid` (phid), 73 + KEY `key_type` (type, dateModified) 74 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 75 + 76 + CREATE TABLE {$NAMESPACE}_nuance.nuance_sourcetransaction ( 77 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 78 + phid VARCHAR(64) NOT NULL COLLATE utf8_bin, 79 + authorPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 80 + objectPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 81 + viewPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 82 + editPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 83 + commentPHID VARCHAR(64) COLLATE utf8_bin, 84 + commentVersion INT UNSIGNED NOT NULL, 85 + transactionType VARCHAR(32) NOT NULL COLLATE utf8_bin, 86 + oldValue LONGTEXT NOT NULL COLLATE utf8_bin, 87 + newValue LONGTEXT NOT NULL COLLATE utf8_bin, 88 + contentSource LONGTEXT NOT NULL COLLATE utf8_bin, 89 + metadata LONGTEXT NOT NULL COLLATE utf8_bin, 90 + dateCreated INT UNSIGNED NOT NULL, 91 + dateModified INT UNSIGNED NOT NULL, 92 + 93 + UNIQUE KEY `key_phid` (phid), 94 + KEY `key_object` (objectPHID) 95 + 96 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 97 + 98 + CREATE TABLE {$NAMESPACE}_nuance.nuance_sourcetransaction_comment ( 99 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 100 + phid VARCHAR(64) NOT NULL COLLATE utf8_bin, 101 + transactionPHID VARCHAR(64) COLLATE utf8_bin, 102 + authorPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 103 + viewPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 104 + editPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 105 + commentVersion INT UNSIGNED NOT NULL, 106 + content LONGTEXT NOT NULL COLLATE utf8_bin, 107 + contentSource LONGTEXT NOT NULL COLLATE utf8_bin, 108 + isDeleted BOOL NOT NULL, 109 + dateCreated INT UNSIGNED NOT NULL, 110 + dateModified INT UNSIGNED NOT NULL, 111 + 112 + UNIQUE KEY `key_phid` (phid), 113 + UNIQUE KEY `key_version` (transactionPHID, commentVersion) 114 + 115 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 116 + 117 + CREATE TABLE {$NAMESPACE}_nuance.nuance_queue ( 118 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 119 + phid VARCHAR(64) NOT NULL COLLATE utf8_bin, 120 + name VARCHAR(255), 121 + mailKey VARCHAR(20) NOT NULL COLLATE utf8_bin, 122 + viewPolicy VARCHAR(64) NOT NULL, 123 + editPolicy VARCHAR(64) NOT NULL, 124 + dateCreated INT UNSIGNED NOT NULL, 125 + dateModified INT UNSIGNED NOT NULL, 126 + UNIQUE KEY `key_phid` (phid) 127 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 128 + 129 + CREATE TABLE {$NAMESPACE}_nuance.nuance_queuetransaction ( 130 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 131 + phid VARCHAR(64) NOT NULL COLLATE utf8_bin, 132 + authorPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 133 + objectPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 134 + viewPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 135 + editPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 136 + commentPHID VARCHAR(64) COLLATE utf8_bin, 137 + commentVersion INT UNSIGNED NOT NULL, 138 + transactionType VARCHAR(32) NOT NULL COLLATE utf8_bin, 139 + oldValue LONGTEXT NOT NULL COLLATE utf8_bin, 140 + newValue LONGTEXT NOT NULL COLLATE utf8_bin, 141 + contentSource LONGTEXT NOT NULL COLLATE utf8_bin, 142 + metadata LONGTEXT NOT NULL COLLATE utf8_bin, 143 + dateCreated INT UNSIGNED NOT NULL, 144 + dateModified INT UNSIGNED NOT NULL, 145 + 146 + UNIQUE KEY `key_phid` (phid), 147 + KEY `key_object` (objectPHID) 148 + 149 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 150 + 151 + CREATE TABLE {$NAMESPACE}_nuance.nuance_queuetransaction_comment ( 152 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 153 + phid VARCHAR(64) NOT NULL COLLATE utf8_bin, 154 + transactionPHID VARCHAR(64) COLLATE utf8_bin, 155 + authorPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 156 + viewPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 157 + editPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 158 + commentVersion INT UNSIGNED NOT NULL, 159 + content LONGTEXT NOT NULL COLLATE utf8_bin, 160 + contentSource LONGTEXT NOT NULL COLLATE utf8_bin, 161 + isDeleted BOOL NOT NULL, 162 + dateCreated INT UNSIGNED NOT NULL, 163 + dateModified INT UNSIGNED NOT NULL, 164 + 165 + UNIQUE KEY `key_phid` (phid), 166 + UNIQUE KEY `key_version` (transactionPHID, commentVersion) 167 + 168 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 169 + 170 + CREATE TABLE {$NAMESPACE}_nuance.nuance_queueitem ( 171 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 172 + queuePHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 173 + itemPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 174 + itemStatus INT UNSIGNED NOT NULL, 175 + itemDateNuanced INT UNSIGNED NOT NULL, 176 + dateCreated INT UNSIGNED NOT NULL, 177 + dateModified INT UNSIGNED NOT NULL, 178 + UNIQUE KEY `key_one_per_queue` (itemPHID, queuePHID), 179 + KEY `key_queue` (queuePHID, itemStatus, itemDateNuanced, id) 180 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 181 + 182 + CREATE TABLE {$NAMESPACE}_nuance.nuance_requestor ( 183 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 184 + phid VARCHAR(64) NOT NULL COLLATE utf8_bin, 185 + data longtext NOT NULL COLLATE utf8_bin, 186 + dateCreated INT UNSIGNED NOT NULL, 187 + dateModified INT UNSIGNED NOT NULL, 188 + UNIQUE KEY `key_phid` (phid) 189 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 190 + 191 + CREATE TABLE {$NAMESPACE}_nuance.nuance_requestortransaction ( 192 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 193 + phid VARCHAR(64) NOT NULL COLLATE utf8_bin, 194 + authorPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 195 + objectPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 196 + viewPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 197 + editPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 198 + commentPHID VARCHAR(64) COLLATE utf8_bin, 199 + commentVersion INT UNSIGNED NOT NULL, 200 + transactionType VARCHAR(32) NOT NULL COLLATE utf8_bin, 201 + oldValue LONGTEXT NOT NULL COLLATE utf8_bin, 202 + newValue LONGTEXT NOT NULL COLLATE utf8_bin, 203 + contentSource LONGTEXT NOT NULL COLLATE utf8_bin, 204 + metadata LONGTEXT NOT NULL COLLATE utf8_bin, 205 + dateCreated INT UNSIGNED NOT NULL, 206 + dateModified INT UNSIGNED NOT NULL, 207 + 208 + UNIQUE KEY `key_phid` (phid), 209 + KEY `key_object` (objectPHID) 210 + 211 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 212 + 213 + CREATE TABLE {$NAMESPACE}_nuance.nuance_requestortransaction_comment ( 214 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 215 + phid VARCHAR(64) NOT NULL COLLATE utf8_bin, 216 + transactionPHID VARCHAR(64) COLLATE utf8_bin, 217 + authorPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 218 + viewPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 219 + editPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin, 220 + commentVersion INT UNSIGNED NOT NULL, 221 + content LONGTEXT NOT NULL COLLATE utf8_bin, 222 + contentSource LONGTEXT NOT NULL COLLATE utf8_bin, 223 + isDeleted BOOL NOT NULL, 224 + dateCreated INT UNSIGNED NOT NULL, 225 + dateModified INT UNSIGNED NOT NULL, 226 + 227 + UNIQUE KEY `key_phid` (phid), 228 + UNIQUE KEY `key_version` (transactionPHID, commentVersion) 229 + 230 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 231 + 232 + CREATE TABLE {$NAMESPACE}_nuance.nuance_requestorsource ( 233 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 234 + requestorPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 235 + sourcePHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 236 + sourceKey VARCHAR(128) NOT NULL COLLATE utf8_bin, 237 + data LONGTEXT NOT NULL COLLATE utf8_bin, 238 + dateCreated INT UNSIGNED NOT NULL, 239 + dateModified INT UNSIGNED NOT NULL, 240 + KEY `key_requestor` (requestorPHID, id), 241 + KEY `key_source` (sourcePHID, id), 242 + UNIQUE KEY `key_source_key` (sourcePHID, sourceKey) 243 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 244 + 245 + CREATE TABLE {$NAMESPACE}_nuance.edge ( 246 + src VARCHAR(64) NOT NULL COLLATE utf8_bin, 247 + type VARCHAR(64) NOT NULL COLLATE utf8_bin, 248 + dst VARCHAR(64) NOT NULL COLLATE utf8_bin, 249 + dateCreated INT UNSIGNED NOT NULL, 250 + seq INT UNSIGNED NOT NULL, 251 + dataID INT UNSIGNED, 252 + PRIMARY KEY (src, type, dst), 253 + KEY (src, type, dateCreated, seq) 254 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 255 + 256 + CREATE TABLE {$NAMESPACE}_nuance.edgedata ( 257 + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 258 + data LONGTEXT NOT NULL COLLATE utf8_bin 259 + ) ENGINE=InnoDB, COLLATE utf8_general_ci;
+98
src/__phutil_library_map__.php
··· 830 830 'MetaMTAConstants' => 'applications/metamta/constants/MetaMTAConstants.php', 831 831 'MetaMTANotificationType' => 'applications/metamta/constants/MetaMTANotificationType.php', 832 832 'MetaMTAReceivedMailStatus' => 'applications/metamta/constants/MetaMTAReceivedMailStatus.php', 833 + 'NuanceController' => 'applications/nuance/controller/NuanceController.php', 834 + 'NuanceDAO' => 'applications/nuance/storage/NuanceDAO.php', 835 + 'NuanceItem' => 'applications/nuance/storage/NuanceItem.php', 836 + 'NuanceItemEditController' => 'applications/nuance/controller/NuanceItemEditController.php', 837 + 'NuanceItemEditor' => 'applications/nuance/editor/NuanceItemEditor.php', 838 + 'NuanceItemQuery' => 'applications/nuance/query/NuanceItemQuery.php', 839 + 'NuanceItemTransaction' => 'applications/nuance/storage/NuanceItemTransaction.php', 840 + 'NuanceItemTransactionComment' => 'applications/nuance/storage/NuanceItemTransactionComment.php', 841 + 'NuanceItemTransactionQuery' => 'applications/nuance/query/NuanceItemTransactionQuery.php', 842 + 'NuanceItemViewController' => 'applications/nuance/controller/NuanceItemViewController.php', 843 + 'NuancePHIDTypeItem' => 'applications/nuance/phid/NuancePHIDTypeItem.php', 844 + 'NuancePHIDTypeQueue' => 'applications/nuance/phid/NuancePHIDTypeQueue.php', 845 + 'NuancePHIDTypeRequestor' => 'applications/nuance/phid/NuancePHIDTypeRequestor.php', 846 + 'NuancePHIDTypeSource' => 'applications/nuance/phid/NuancePHIDTypeSource.php', 847 + 'NuanceQuery' => 'applications/nuance/query/NuanceQuery.php', 848 + 'NuanceQueue' => 'applications/nuance/storage/NuanceQueue.php', 849 + 'NuanceQueueEditController' => 'applications/nuance/controller/NuanceQueueEditController.php', 850 + 'NuanceQueueEditor' => 'applications/nuance/editor/NuanceQueueEditor.php', 851 + 'NuanceQueueItem' => 'applications/nuance/storage/NuanceQueueItem.php', 852 + 'NuanceQueueQuery' => 'applications/nuance/query/NuanceQueueQuery.php', 853 + 'NuanceQueueTransaction' => 'applications/nuance/storage/NuanceQueueTransaction.php', 854 + 'NuanceQueueTransactionComment' => 'applications/nuance/storage/NuanceQueueTransactionComment.php', 855 + 'NuanceQueueTransactionQuery' => 'applications/nuance/query/NuanceQueueTransactionQuery.php', 856 + 'NuanceQueueViewController' => 'applications/nuance/controller/NuanceQueueViewController.php', 857 + 'NuanceRequestor' => 'applications/nuance/storage/NuanceRequestor.php', 858 + 'NuanceRequestorEditController' => 'applications/nuance/controller/NuanceRequestorEditController.php', 859 + 'NuanceRequestorEditor' => 'applications/nuance/editor/NuanceRequestorEditor.php', 860 + 'NuanceRequestorQuery' => 'applications/nuance/query/NuanceRequestorQuery.php', 861 + 'NuanceRequestorSource' => 'applications/nuance/storage/NuanceRequestorSource.php', 862 + 'NuanceRequestorTransaction' => 'applications/nuance/storage/NuanceRequestorTransaction.php', 863 + 'NuanceRequestorTransactionComment' => 'applications/nuance/storage/NuanceRequestorTransactionComment.php', 864 + 'NuanceRequestorTransactionQuery' => 'applications/nuance/query/NuanceRequestorTransactionQuery.php', 865 + 'NuanceRequestorViewController' => 'applications/nuance/controller/NuanceRequestorViewController.php', 866 + 'NuanceSource' => 'applications/nuance/storage/NuanceSource.php', 867 + 'NuanceSourceEditController' => 'applications/nuance/controller/NuanceSourceEditController.php', 868 + 'NuanceSourceEditor' => 'applications/nuance/editor/NuanceSourceEditor.php', 869 + 'NuanceSourceQuery' => 'applications/nuance/query/NuanceSourceQuery.php', 870 + 'NuanceSourceTransaction' => 'applications/nuance/storage/NuanceSourceTransaction.php', 871 + 'NuanceSourceTransactionComment' => 'applications/nuance/storage/NuanceSourceTransactionComment.php', 872 + 'NuanceSourceTransactionQuery' => 'applications/nuance/query/NuanceSourceTransactionQuery.php', 873 + 'NuanceSourceViewController' => 'applications/nuance/controller/NuanceSourceViewController.php', 874 + 'NuanceTransaction' => 'applications/nuance/storage/NuanceTransaction.php', 833 875 'OwnersPackageReplyHandler' => 'applications/owners/mail/OwnersPackageReplyHandler.php', 834 876 'PHUI' => 'view/phui/PHUI.php', 835 877 'PHUIBoxExample' => 'applications/uiexample/examples/PHUIBoxExample.php', ··· 928 970 'PhabricatorApplicationMailingLists' => 'applications/mailinglists/application/PhabricatorApplicationMailingLists.php', 929 971 'PhabricatorApplicationManiphest' => 'applications/maniphest/application/PhabricatorApplicationManiphest.php', 930 972 'PhabricatorApplicationMetaMTA' => 'applications/metamta/application/PhabricatorApplicationMetaMTA.php', 973 + 'PhabricatorApplicationNuance' => 'applications/nuance/application/PhabricatorApplicationNuance.php', 931 974 'PhabricatorApplicationOwners' => 'applications/owners/application/PhabricatorApplicationOwners.php', 932 975 'PhabricatorApplicationPHIDTypeApplication' => 'applications/meta/phid/PhabricatorApplicationPHIDTypeApplication.php', 933 976 'PhabricatorApplicationPHPAST' => 'applications/phpast/application/PhabricatorApplicationPHPAST.php', ··· 3097 3140 'ManiphestView' => 'AphrontView', 3098 3141 'MetaMTANotificationType' => 'MetaMTAConstants', 3099 3142 'MetaMTAReceivedMailStatus' => 'MetaMTAConstants', 3143 + 'NuanceController' => 'PhabricatorController', 3144 + 'NuanceDAO' => 'PhabricatorLiskDAO', 3145 + 'NuanceItem' => 3146 + array( 3147 + 0 => 'NuanceDAO', 3148 + 1 => 'PhabricatorPolicyInterface', 3149 + ), 3150 + 'NuanceItemEditController' => 'NuanceController', 3151 + 'NuanceItemEditor' => 'PhabricatorApplicationTransactionEditor', 3152 + 'NuanceItemQuery' => 'NuanceQuery', 3153 + 'NuanceItemTransaction' => 'NuanceTransaction', 3154 + 'NuanceItemTransactionComment' => 'PhabricatorApplicationTransactionComment', 3155 + 'NuanceItemTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 3156 + 'NuanceItemViewController' => 'NuanceController', 3157 + 'NuancePHIDTypeItem' => 'PhabricatorPHIDType', 3158 + 'NuancePHIDTypeQueue' => 'PhabricatorPHIDType', 3159 + 'NuancePHIDTypeRequestor' => 'PhabricatorPHIDType', 3160 + 'NuancePHIDTypeSource' => 'PhabricatorPHIDType', 3161 + 'NuanceQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 3162 + 'NuanceQueue' => 3163 + array( 3164 + 0 => 'NuanceDAO', 3165 + 1 => 'PhabricatorPolicyInterface', 3166 + ), 3167 + 'NuanceQueueEditController' => 'NuanceController', 3168 + 'NuanceQueueEditor' => 'PhabricatorApplicationTransactionEditor', 3169 + 'NuanceQueueItem' => 'NuanceDAO', 3170 + 'NuanceQueueQuery' => 'NuanceQuery', 3171 + 'NuanceQueueTransaction' => 'NuanceTransaction', 3172 + 'NuanceQueueTransactionComment' => 'PhabricatorApplicationTransactionComment', 3173 + 'NuanceQueueTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 3174 + 'NuanceQueueViewController' => 'NuanceController', 3175 + 'NuanceRequestor' => 'NuanceDAO', 3176 + 'NuanceRequestorEditController' => 'NuanceController', 3177 + 'NuanceRequestorEditor' => 'PhabricatorApplicationTransactionEditor', 3178 + 'NuanceRequestorQuery' => 'NuanceQuery', 3179 + 'NuanceRequestorSource' => 'NuanceDAO', 3180 + 'NuanceRequestorTransaction' => 'NuanceTransaction', 3181 + 'NuanceRequestorTransactionComment' => 'PhabricatorApplicationTransactionComment', 3182 + 'NuanceRequestorTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 3183 + 'NuanceRequestorViewController' => 'NuanceController', 3184 + 'NuanceSource' => 3185 + array( 3186 + 0 => 'NuanceDAO', 3187 + 1 => 'PhabricatorPolicyInterface', 3188 + ), 3189 + 'NuanceSourceEditController' => 'NuanceController', 3190 + 'NuanceSourceEditor' => 'PhabricatorApplicationTransactionEditor', 3191 + 'NuanceSourceQuery' => 'NuanceQuery', 3192 + 'NuanceSourceTransaction' => 'NuanceTransaction', 3193 + 'NuanceSourceTransactionComment' => 'PhabricatorApplicationTransactionComment', 3194 + 'NuanceSourceTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 3195 + 'NuanceSourceViewController' => 'NuanceController', 3196 + 'NuanceTransaction' => 'PhabricatorApplicationTransaction', 3100 3197 'OwnersPackageReplyHandler' => 'PhabricatorMailReplyHandler', 3101 3198 'PHUIBoxExample' => 'PhabricatorUIExample', 3102 3199 'PHUIBoxView' => 'AphrontTagView', ··· 3193 3290 'PhabricatorApplicationMailingLists' => 'PhabricatorApplication', 3194 3291 'PhabricatorApplicationManiphest' => 'PhabricatorApplication', 3195 3292 'PhabricatorApplicationMetaMTA' => 'PhabricatorApplication', 3293 + 'PhabricatorApplicationNuance' => 'PhabricatorApplication', 3196 3294 'PhabricatorApplicationOwners' => 'PhabricatorApplication', 3197 3295 'PhabricatorApplicationPHIDTypeApplication' => 'PhabricatorPHIDType', 3198 3296 'PhabricatorApplicationPHPAST' => 'PhabricatorApplication',
+1 -1
src/applications/conpherence/application/PhabricatorApplicationConpherence.php
··· 22 22 } 23 23 24 24 public function getTitleGlyph() { 25 - return "\xE2\x98\x8E"; 25 + return "\xE2\x9C\x86"; 26 26 } 27 27 28 28 public function getApplicationGroup() {
+54
src/applications/nuance/application/PhabricatorApplicationNuance.php
··· 1 + <?php 2 + 3 + final class PhabricatorApplicationNuance extends PhabricatorApplication { 4 + 5 + public function getIconName() { 6 + return 'nuance'; 7 + } 8 + 9 + public function getTitleGlyph() { 10 + return "\xE2\x98\x8E"; 11 + } 12 + 13 + public function isBeta() { 14 + return true; 15 + } 16 + 17 + public function shouldAppearInLaunchView() { 18 + // try to hide this even more for now 19 + return false; 20 + } 21 + 22 + public function canUninstall() { 23 + return true; 24 + } 25 + 26 + public function getRoutes() { 27 + return array( 28 + '/nuance/' => array( 29 + 'item/' => array( 30 + 'view/(?P<id>[1-9]\d*)/' => 'NuanceItemViewController', 31 + 'edit/(?P<id>[1-9]\d*)/' => 'NuanceItemEditController', 32 + 'new/' => 'NuanceItemEditController', 33 + ), 34 + 'source/' => array( 35 + 'view/(?P<id>[1-9]\d*)/' => 'NuanceSourceViewController', 36 + 'edit/(?P<id>[1-9]\d*)/' => 'NuanceSourceEditController', 37 + 'new/' => 'NuanceSourceEditController', 38 + ), 39 + 'queue/' => array( 40 + 'view/(?P<id>[1-9]\d*)/' => 'NuanceQueueViewController', 41 + 'edit/(?P<id>[1-9]\d*)/' => 'NuanceQueueEditController', 42 + 'new/' => 'NuanceQueueEditController', 43 + ), 44 + 'requestor/' => array( 45 + 'view/(?P<id>[1-9]\d*)/' => 'NuanceRequestorViewController', 46 + 'edit/(?P<id>[1-9]\d*)/' => 'NuanceRequestorEditController', 47 + 'new/' => 'NuanceRequestorEditController', 48 + ), 49 + ), 50 + ); 51 + } 52 + 53 + } 54 +
+5
src/applications/nuance/controller/NuanceController.php
··· 1 + <?php 2 + 3 + abstract class NuanceController extends PhabricatorController { 4 + 5 + }
+50
src/applications/nuance/controller/NuanceItemEditController.php
··· 1 + <?php 2 + 3 + final class NuanceItemEditController extends NuanceController { 4 + 5 + private $itemID; 6 + 7 + public function setItemID($item_id) { 8 + $this->itemID = $item_id; 9 + return $this; 10 + } 11 + public function getItemID() { 12 + return $this->itemID; 13 + } 14 + 15 + public function willProcessRequest(array $data) { 16 + $this->setItemID(idx($data, 'id')); 17 + } 18 + 19 + public function processRequest() { 20 + $request = $this->getRequest(); 21 + $user = $request->getUser(); 22 + 23 + $item_id = $this->getItemID(); 24 + $is_new = !$item_id; 25 + 26 + if ($is_new) { 27 + $item = new NuanceItem(); 28 + 29 + } else { 30 + $item = id(new NuanceItemQuery()) 31 + ->setViewer($user) 32 + ->withIDs(array($item_id)) 33 + ->executeOne(); 34 + } 35 + 36 + if (!$item) { 37 + return new Aphront404Response(); 38 + } 39 + 40 + $crumbs = $this->buildApplicationCrumbs(); 41 + $title = 'TODO'; 42 + 43 + return $this->buildApplicationPage( 44 + $crumbs, 45 + array( 46 + 'title' => $title, 47 + 'device' => true)); 48 + } 49 + 50 + }
+42
src/applications/nuance/controller/NuanceItemViewController.php
··· 1 + <?php 2 + 3 + final class NuanceItemViewController extends NuanceController { 4 + 5 + private $itemID; 6 + 7 + public function setItemID($item_id) { 8 + $this->itemID = $item_id; 9 + return $this; 10 + } 11 + public function getItemID() { 12 + return $this->itemID; 13 + } 14 + 15 + public function willProcessRequest(array $data) { 16 + $this->setItemID($data['id']); 17 + } 18 + 19 + public function processRequest() { 20 + $request = $this->getRequest(); 21 + $user = $request->getUser(); 22 + 23 + $item_id = $this->getItemID(); 24 + $item = id(new NuanceItemQuery()) 25 + ->setViewer($user) 26 + ->withIDs(array($item_id)) 27 + ->executeOne(); 28 + 29 + if (!$item) { 30 + return new Aphront404Response(); 31 + } 32 + 33 + $crumbs = $this->buildApplicationCrumbs(); 34 + $title = 'TODO'; 35 + 36 + return $this->buildApplicationPage( 37 + $crumbs, 38 + array( 39 + 'title' => $title, 40 + 'device' => true)); 41 + } 42 + }
+50
src/applications/nuance/controller/NuanceQueueEditController.php
··· 1 + <?php 2 + 3 + final class NuanceQueueEditController extends NuanceController { 4 + 5 + private $queueID; 6 + 7 + public function setQueueID($queue_id) { 8 + $this->queueID = $queue_id; 9 + return $this; 10 + } 11 + public function getQueueID() { 12 + return $this->queueID; 13 + } 14 + 15 + public function willProcessRequest(array $data) { 16 + $this->setQueueID(idx($data, 'id')); 17 + } 18 + 19 + public function processRequest() { 20 + $request = $this->getRequest(); 21 + $user = $request->getUser(); 22 + 23 + $queue_id = $this->getQueueID(); 24 + $is_new = !$queue_id; 25 + 26 + if ($is_new) { 27 + $queue = new NuanceQueue(); 28 + 29 + } else { 30 + $queue = id(new NuanceQueueQuery()) 31 + ->setViewer($user) 32 + ->withIDs(array($queue_id)) 33 + ->executeOne(); 34 + } 35 + 36 + if (!$queue) { 37 + return new Aphront404Response(); 38 + } 39 + 40 + $crumbs = $this->buildApplicationCrumbs(); 41 + $title = 'TODO'; 42 + 43 + return $this->buildApplicationPage( 44 + $crumbs, 45 + array( 46 + 'title' => $title, 47 + 'device' => true)); 48 + } 49 + 50 + }
+42
src/applications/nuance/controller/NuanceQueueViewController.php
··· 1 + <?php 2 + 3 + final class NuanceQueueViewController extends NuanceController { 4 + 5 + private $queueID; 6 + 7 + public function setQueueID($queue_id) { 8 + $this->queueID = $queue_id; 9 + return $this; 10 + } 11 + public function getQueueID() { 12 + return $this->queueID; 13 + } 14 + 15 + public function willProcessRequest(array $data) { 16 + $this->setQueueID($data['id']); 17 + } 18 + 19 + public function processRequest() { 20 + $request = $this->getRequest(); 21 + $user = $request->getUser(); 22 + 23 + $queue_id = $this->getQueueID(); 24 + $queue = id(new NuanceQueueQuery()) 25 + ->setViewer($user) 26 + ->withIDs(array($queue_id)) 27 + ->executeOne(); 28 + 29 + if (!$queue) { 30 + return new Aphront404Response(); 31 + } 32 + 33 + $crumbs = $this->buildApplicationCrumbs(); 34 + $title = 'TODO'; 35 + 36 + return $this->buildApplicationPage( 37 + $crumbs, 38 + array( 39 + 'title' => $title, 40 + 'device' => true)); 41 + } 42 + }
+50
src/applications/nuance/controller/NuanceRequestorEditController.php
··· 1 + <?php 2 + 3 + final class NuanceRequestorEditController extends NuanceController { 4 + 5 + private $requestorID; 6 + 7 + public function setRequestorID($requestor_id) { 8 + $this->requestorID = $requestor_id; 9 + return $this; 10 + } 11 + public function getRequestorID() { 12 + return $this->requestorID; 13 + } 14 + 15 + public function willProcessRequest(array $data) { 16 + $this->setRequestorID(idx($data, 'id')); 17 + } 18 + 19 + public function processRequest() { 20 + $request = $this->getRequest(); 21 + $user = $request->getUser(); 22 + 23 + $requestor_id = $this->getRequestorID(); 24 + $is_new = !$requestor_id; 25 + 26 + if ($is_new) { 27 + $requestor = new NuanceRequestor(); 28 + 29 + } else { 30 + $requestor = id(new NuanceRequestorQuery()) 31 + ->setViewer($user) 32 + ->withIDs(array($requestor_id)) 33 + ->executeOne(); 34 + } 35 + 36 + if (!$requestor) { 37 + return new Aphront404Response(); 38 + } 39 + 40 + $crumbs = $this->buildApplicationCrumbs(); 41 + $title = 'TODO'; 42 + 43 + return $this->buildApplicationPage( 44 + $crumbs, 45 + array( 46 + 'title' => $title, 47 + 'device' => true)); 48 + } 49 + 50 + }
+42
src/applications/nuance/controller/NuanceRequestorViewController.php
··· 1 + <?php 2 + 3 + final class NuanceRequestorViewController extends NuanceController { 4 + 5 + private $requestorID; 6 + 7 + public function setRequestorID($requestor_id) { 8 + $this->requestorID = $requestor_id; 9 + return $this; 10 + } 11 + public function getRequestorID() { 12 + return $this->requestorID; 13 + } 14 + 15 + public function willProcessRequest(array $data) { 16 + $this->setRequestorID($data['id']); 17 + } 18 + 19 + public function processRequest() { 20 + $request = $this->getRequest(); 21 + $user = $request->getUser(); 22 + 23 + $requestor_id = $this->getRequestorID(); 24 + $requestor = id(new NuanceRequestorQuery()) 25 + ->setViewer($user) 26 + ->withIDs(array($requestor_id)) 27 + ->executeOne(); 28 + 29 + if (!$requestor) { 30 + return new Aphront404Response(); 31 + } 32 + 33 + $crumbs = $this->buildApplicationCrumbs(); 34 + $title = 'TODO'; 35 + 36 + return $this->buildApplicationPage( 37 + $crumbs, 38 + array( 39 + 'title' => $title, 40 + 'device' => true)); 41 + } 42 + }
+49
src/applications/nuance/controller/NuanceSourceEditController.php
··· 1 + <?php 2 + 3 + final class NuanceSourceEditController extends NuanceController { 4 + 5 + private $sourceID; 6 + 7 + public function setSourceID($source_id) { 8 + $this->sourceID = $source_id; 9 + return $this; 10 + } 11 + public function getSourceID() { 12 + return $this->sourceID; 13 + } 14 + 15 + public function willProcessRequest(array $data) { 16 + $this->setSourceID(idx($data, 'id')); 17 + } 18 + 19 + public function processRequest() { 20 + $request = $this->getRequest(); 21 + $user = $request->getUser(); 22 + 23 + $source_id = $this->getSourceID(); 24 + $is_new = !$source_id; 25 + 26 + if ($is_new) { 27 + $source = new NuanceSource(); 28 + 29 + } else { 30 + $source = id(new NuanceSourceQuery()) 31 + ->setViewer($user) 32 + ->withIDs(array($source_id)) 33 + ->executeOne(); 34 + } 35 + 36 + if (!$source) { 37 + return new Aphront404Response(); 38 + } 39 + 40 + $crumbs = $this->buildApplicationCrumbs(); 41 + $title = 'TODO'; 42 + 43 + return $this->buildApplicationPage( 44 + $crumbs, 45 + array( 46 + 'title' => $title, 47 + 'device' => true)); 48 + } 49 + }
+42
src/applications/nuance/controller/NuanceSourceViewController.php
··· 1 + <?php 2 + 3 + final class NuanceSourceViewController extends NuanceController { 4 + 5 + private $sourceID; 6 + 7 + public function setSourceID($source_id) { 8 + $this->sourceID = $source_id; 9 + return $this; 10 + } 11 + public function getSourceID() { 12 + return $this->sourceID; 13 + } 14 + 15 + public function willProcessRequest(array $data) { 16 + $this->setSourceID($data['id']); 17 + } 18 + 19 + public function processRequest() { 20 + $request = $this->getRequest(); 21 + $user = $request->getUser(); 22 + 23 + $source_id = $this->getSourceID(); 24 + $source = id(new NuanceSourceQuery()) 25 + ->setViewer($user) 26 + ->withIDs(array($source_id)) 27 + ->executeOne(); 28 + 29 + if (!$source) { 30 + return new Aphront404Response(); 31 + } 32 + 33 + $crumbs = $this->buildApplicationCrumbs(); 34 + $title = 'TODO'; 35 + 36 + return $this->buildApplicationPage( 37 + $crumbs, 38 + array( 39 + 'title' => $title, 40 + 'device' => true)); 41 + } 42 + }
+17
src/applications/nuance/editor/NuanceItemEditor.php
··· 1 + <?php 2 + 3 + final class NuanceItemEditor 4 + extends PhabricatorApplicationTransactionEditor { 5 + 6 + public function getTransactionTypes() { 7 + $types = parent::getTransactionTypes(); 8 + 9 + $types[] = PhabricatorTransactions::TYPE_EDGE; 10 + $types[] = PhabricatorTransactions::TYPE_COMMENT; 11 + $types[] = PhabricatorTransactions::TYPE_VIEW_POLICY; 12 + $types[] = PhabricatorTransactions::TYPE_EDIT_POLICY; 13 + 14 + return $types; 15 + } 16 + 17 + }
+17
src/applications/nuance/editor/NuanceQueueEditor.php
··· 1 + <?php 2 + 3 + final class NuanceQueueEditor 4 + extends PhabricatorApplicationTransactionEditor { 5 + 6 + public function getTransactionTypes() { 7 + $types = parent::getTransactionTypes(); 8 + 9 + $types[] = PhabricatorTransactions::TYPE_EDGE; 10 + $types[] = PhabricatorTransactions::TYPE_COMMENT; 11 + $types[] = PhabricatorTransactions::TYPE_VIEW_POLICY; 12 + $types[] = PhabricatorTransactions::TYPE_EDIT_POLICY; 13 + 14 + return $types; 15 + } 16 + 17 + }
+17
src/applications/nuance/editor/NuanceRequestorEditor.php
··· 1 + <?php 2 + 3 + final class NuanceRequestorEditor 4 + extends PhabricatorApplicationTransactionEditor { 5 + 6 + public function getTransactionTypes() { 7 + $types = parent::getTransactionTypes(); 8 + 9 + $types[] = PhabricatorTransactions::TYPE_EDGE; 10 + $types[] = PhabricatorTransactions::TYPE_COMMENT; 11 + $types[] = PhabricatorTransactions::TYPE_VIEW_POLICY; 12 + $types[] = PhabricatorTransactions::TYPE_EDIT_POLICY; 13 + 14 + return $types; 15 + } 16 + 17 + }
+17
src/applications/nuance/editor/NuanceSourceEditor.php
··· 1 + <?php 2 + 3 + final class NuanceSourceEditor 4 + extends PhabricatorApplicationTransactionEditor { 5 + 6 + public function getTransactionTypes() { 7 + $types = parent::getTransactionTypes(); 8 + 9 + $types[] = PhabricatorTransactions::TYPE_EDGE; 10 + $types[] = PhabricatorTransactions::TYPE_COMMENT; 11 + $types[] = PhabricatorTransactions::TYPE_VIEW_POLICY; 12 + $types[] = PhabricatorTransactions::TYPE_EDIT_POLICY; 13 + 14 + return $types; 15 + } 16 + 17 + }
+46
src/applications/nuance/phid/NuancePHIDTypeItem.php
··· 1 + <?php 2 + 3 + final class NuancePHIDTypeItem 4 + extends PhabricatorPHIDType { 5 + 6 + const TYPECONST = 'NUAI'; 7 + 8 + public function getTypeConstant() { 9 + return self::TYPECONST; 10 + } 11 + 12 + public function getTypeName() { 13 + return pht('Item'); 14 + } 15 + 16 + public function newObject() { 17 + return new NuanceItem(); 18 + } 19 + 20 + protected function buildQueryForObjects( 21 + PhabricatorObjectQuery $query, 22 + array $phids) { 23 + 24 + return id(new NuanceItemQuery()) 25 + ->withPHIDs($phids); 26 + } 27 + 28 + public function loadHandles( 29 + PhabricatorHandleQuery $query, 30 + array $handles, 31 + array $objects) { 32 + 33 + $viewer = $query->getViewer(); 34 + foreach ($handles as $phid => $handle) { 35 + $item = $objects[$phid]; 36 + 37 + $handle->setName($item->getLabel($viewer)); 38 + $handle->setURI($item->getURI()); 39 + } 40 + } 41 + 42 + public function canLoadNamedObject($name) { 43 + return false; 44 + } 45 + 46 + }
+46
src/applications/nuance/phid/NuancePHIDTypeQueue.php
··· 1 + <?php 2 + 3 + final class NuancePHIDTypeQueue 4 + extends PhabricatorPHIDType { 5 + 6 + const TYPECONST = 'NUAQ'; 7 + 8 + public function getTypeConstant() { 9 + return self::TYPECONST; 10 + } 11 + 12 + public function getTypeName() { 13 + return pht('Queue'); 14 + } 15 + 16 + public function newObject() { 17 + return new NuanceQueue(); 18 + } 19 + 20 + protected function buildQueryForObjects( 21 + PhabricatorObjectQuery $query, 22 + array $phids) { 23 + 24 + return id(new NuanceQueueQuery()) 25 + ->withPHIDs($phids); 26 + } 27 + 28 + public function loadHandles( 29 + PhabricatorHandleQuery $query, 30 + array $handles, 31 + array $objects) { 32 + 33 + $viewer = $query->getViewer(); 34 + foreach ($handles as $phid => $handle) { 35 + $queue = $objects[$phid]; 36 + 37 + $handle->setName($queue->getName()); 38 + $handle->setURI($queue->getURI()); 39 + } 40 + } 41 + 42 + public function canLoadNamedObject($name) { 43 + return false; 44 + } 45 + 46 + }
+46
src/applications/nuance/phid/NuancePHIDTypeRequestor.php
··· 1 + <?php 2 + 3 + final class NuancePHIDTypeRequestor 4 + extends PhabricatorPHIDType { 5 + 6 + const TYPECONST = 'NUAR'; 7 + 8 + public function getTypeConstant() { 9 + return self::TYPECONST; 10 + } 11 + 12 + public function getTypeName() { 13 + return pht('Requestor'); 14 + } 15 + 16 + public function newObject() { 17 + return new NuanceRequestor(); 18 + } 19 + 20 + protected function buildQueryForObjects( 21 + PhabricatorObjectQuery $query, 22 + array $phids) { 23 + 24 + return id(new NuanceRequestorQuery()) 25 + ->withPHIDs($phids); 26 + } 27 + 28 + public function loadHandles( 29 + PhabricatorHandleQuery $query, 30 + array $handles, 31 + array $objects) { 32 + 33 + $viewer = $query->getViewer(); 34 + foreach ($handles as $phid => $handle) { 35 + $requestor = $objects[$phid]; 36 + 37 + $handle->setName($requestor->getBestName()); 38 + $handle->setURI($requestor->getURI()); 39 + } 40 + } 41 + 42 + public function canLoadNamedObject($name) { 43 + return false; 44 + } 45 + 46 + }
+46
src/applications/nuance/phid/NuancePHIDTypeSource.php
··· 1 + <?php 2 + 3 + final class NuancePHIDTypeSource 4 + extends PhabricatorPHIDType { 5 + 6 + const TYPECONST = 'NUAS'; 7 + 8 + public function getTypeConstant() { 9 + return self::TYPECONST; 10 + } 11 + 12 + public function getTypeName() { 13 + return pht('Source'); 14 + } 15 + 16 + public function newObject() { 17 + return new NuanceSource(); 18 + } 19 + 20 + protected function buildQueryForObjects( 21 + PhabricatorObjectQuery $query, 22 + array $phids) { 23 + 24 + return id(new NuanceSourceQuery()) 25 + ->withPHIDs($phids); 26 + } 27 + 28 + public function loadHandles( 29 + PhabricatorHandleQuery $query, 30 + array $handles, 31 + array $objects) { 32 + 33 + $viewer = $query->getViewer(); 34 + foreach ($handles as $phid => $handle) { 35 + $source = $objects[$phid]; 36 + 37 + $handle->setName($source->getName()); 38 + $handle->setURI($source->getURI()); 39 + } 40 + } 41 + 42 + public function canLoadNamedObject($name) { 43 + return false; 44 + } 45 + 46 + }
+71
src/applications/nuance/query/NuanceItemQuery.php
··· 1 + <?php 2 + 3 + final class NuanceItemQuery 4 + extends NuanceQuery { 5 + 6 + private $ids; 7 + private $phids; 8 + private $sourceIDs; 9 + 10 + public function withIDs(array $ids) { 11 + $this->ids = $ids; 12 + return $this; 13 + } 14 + 15 + public function withPHIDs(array $phids) { 16 + $this->phids = $phids; 17 + return $this; 18 + } 19 + 20 + public function withSourceIDs($source_ids) { 21 + $this->sourceIDs = $source_ids; 22 + return $this; 23 + } 24 + 25 + 26 + public function loadPage() { 27 + $table = new NuanceItem(); 28 + $conn_r = $table->establishConnection('r'); 29 + 30 + $data = queryfx_all( 31 + $conn_r, 32 + 'SELECT FROM %T %Q %Q %Q', 33 + $table->getTableName(), 34 + $this->buildWhereClause($conn_r), 35 + $this->buildOrderClause($conn_r), 36 + $this->buildLimitClause($conn_r)); 37 + 38 + return $table->loadAllFromArray($data); 39 + } 40 + 41 + protected function buildWhereClause($conn_r) { 42 + $where = array(); 43 + 44 + $where[] = $this->buildPagingClause($conn_r); 45 + 46 + if ($this->sourceID) { 47 + $where[] = qsprintf( 48 + $conn_r, 49 + 'sourceID IN (%Ld)', 50 + $this->sourceIDs); 51 + } 52 + 53 + if ($this->ids) { 54 + $where[] = qsprintf( 55 + $conn_r, 56 + 'id IN (%Ld)', 57 + $this->ids); 58 + } 59 + 60 + if ($this->phids) { 61 + $where[] = qsprintf( 62 + $conn_r, 63 + 'phid IN (%Ls)', 64 + $this->phids); 65 + } 66 + 67 + return $this->formatWhereClause($where); 68 + } 69 + 70 + } 71 +
+10
src/applications/nuance/query/NuanceItemTransactionQuery.php
··· 1 + <?php 2 + 3 + final class NuanceItemTransactionQuery 4 + extends PhabricatorApplicationTransactionQuery { 5 + 6 + public function getTemplateApplicationTransaction() { 7 + return new NuanceItemTransaction(); 8 + } 9 + 10 + }
+11
src/applications/nuance/query/NuanceQuery.php
··· 1 + <?php 2 + 3 + abstract class NuanceQuery 4 + extends PhabricatorCursorPagedPolicyAwareQuery { 5 + 6 + public function getQueryApplicationClass() { 7 + return 'PhabricatorApplicationNuance'; 8 + } 9 + 10 + } 11 +
+57
src/applications/nuance/query/NuanceQueueQuery.php
··· 1 + <?php 2 + 3 + final class NuanceQueueQuery 4 + extends NuanceQuery { 5 + 6 + private $ids; 7 + private $phids; 8 + 9 + public function withIDs(array $ids) { 10 + $this->ids = $ids; 11 + return $this; 12 + } 13 + 14 + public function withPHIDs(array $phids) { 15 + $this->phids = $phids; 16 + return $this; 17 + } 18 + 19 + public function loadPage() { 20 + $table = new NuanceQueue(); 21 + $conn_r = $table->establishConnection('r'); 22 + 23 + $data = queryfx_all( 24 + $conn_r, 25 + 'SELECT FROM %T %Q %Q %Q', 26 + $table->getTableName(), 27 + $this->buildWhereClause($conn_r), 28 + $this->buildOrderClause($conn_r), 29 + $this->buildLimitClause($conn_r)); 30 + 31 + return $table->loadAllFromArray($data); 32 + } 33 + 34 + protected function buildWhereClause($conn_r) { 35 + $where = array(); 36 + 37 + $where[] = $this->buildPagingClause($conn_r); 38 + 39 + if ($this->ids) { 40 + $where[] = qsprintf( 41 + $conn_r, 42 + 'id IN (%Ld)', 43 + $this->ids); 44 + } 45 + 46 + if ($this->phids) { 47 + $where[] = qsprintf( 48 + $conn_r, 49 + 'phid IN (%Ls)', 50 + $this->phids); 51 + } 52 + 53 + return $this->formatWhereClause($where); 54 + } 55 + 56 + } 57 +
+10
src/applications/nuance/query/NuanceQueueTransactionQuery.php
··· 1 + <?php 2 + 3 + final class NuanceQueueTransactionQuery 4 + extends PhabricatorApplicationTransactionQuery { 5 + 6 + public function getTemplateApplicationTransaction() { 7 + return new NuanceQueueTransaction(); 8 + } 9 + 10 + }
+57
src/applications/nuance/query/NuanceRequestorQuery.php
··· 1 + <?php 2 + 3 + final class NuanceRequestorQuery 4 + extends NuanceQuery { 5 + 6 + private $ids; 7 + private $phids; 8 + 9 + public function withIDs(array $ids) { 10 + $this->ids = $ids; 11 + return $this; 12 + } 13 + 14 + public function withPHIDs(array $phids) { 15 + $this->phids = $phids; 16 + return $this; 17 + } 18 + 19 + public function loadPage() { 20 + $table = new NuanceRequestor(); 21 + $conn_r = $table->establishConnection('r'); 22 + 23 + $data = queryfx_all( 24 + $conn_r, 25 + 'SELECT FROM %T %Q %Q %Q', 26 + $table->getTableName(), 27 + $this->buildWhereClause($conn_r), 28 + $this->buildOrderClause($conn_r), 29 + $this->buildLimitClause($conn_r)); 30 + 31 + return $table->loadAllFromArray($data); 32 + } 33 + 34 + protected function buildWhereClause($conn_r) { 35 + $where = array(); 36 + 37 + $where[] = $this->buildPagingClause($conn_r); 38 + 39 + if ($this->ids) { 40 + $where[] = qsprintf( 41 + $conn_r, 42 + 'id IN (%Ld)', 43 + $this->ids); 44 + } 45 + 46 + if ($this->phids) { 47 + $where[] = qsprintf( 48 + $conn_r, 49 + 'phid IN (%Ls)', 50 + $this->phids); 51 + } 52 + 53 + return $this->formatWhereClause($where); 54 + } 55 + 56 + } 57 +
+10
src/applications/nuance/query/NuanceRequestorTransactionQuery.php
··· 1 + <?php 2 + 3 + final class NuanceRequestorTransactionQuery 4 + extends PhabricatorApplicationTransactionQuery { 5 + 6 + public function getTemplateApplicationTransaction() { 7 + return new NuanceRequestorTransaction(); 8 + } 9 + 10 + }
+83
src/applications/nuance/query/NuanceSourceQuery.php
··· 1 + <?php 2 + 3 + final class NuanceSourceQuery 4 + extends NuanceQuery { 5 + 6 + private $ids; 7 + private $phids; 8 + private $creatorPHIDs; 9 + private $types; 10 + 11 + public function withIDs(array $ids) { 12 + $this->ids = $ids; 13 + return $this; 14 + } 15 + 16 + public function withPHIDs(array $phids) { 17 + $this->phids = $phids; 18 + return $this; 19 + } 20 + 21 + public function withCreatorPHIDs(array $phids) { 22 + $this->CreatorPHIDs = $phids; 23 + return $this; 24 + } 25 + 26 + public function withTypes($types) { 27 + $this->types = $types; 28 + return $this; 29 + } 30 + 31 + 32 + public function loadPage() { 33 + $table = new NuanceSource(); 34 + $conn_r = $table->establishConnection('r'); 35 + 36 + $data = queryfx_all( 37 + $conn_r, 38 + 'SELECT FROM %T %Q %Q %Q', 39 + $table->getTableName(), 40 + $this->buildWhereClause($conn_r), 41 + $this->buildOrderClause($conn_r), 42 + $this->buildLimitClause($conn_r)); 43 + 44 + return $table->loadAllFromArray($data); 45 + } 46 + 47 + protected function buildWhereClause($conn_r) { 48 + $where = array(); 49 + 50 + $where[] = $this->buildPagingClause($conn_r); 51 + 52 + if ($this->creatorPHIDs) { 53 + $where[] = qsprintf( 54 + $conn_r, 55 + 'creatorPHID IN (%Ls)', 56 + $this->creatorPHIDs); 57 + } 58 + 59 + if ($this->types) { 60 + $where[] = qsprintf( 61 + $conn_r, 62 + 'type IN (%Ld)', 63 + $this->types); 64 + } 65 + 66 + if ($this->ids) { 67 + $where[] = qsprintf( 68 + $conn_r, 69 + 'id IN (%Ld)', 70 + $this->ids); 71 + } 72 + 73 + if ($this->phids) { 74 + $where[] = qsprintf( 75 + $conn_r, 76 + 'phid IN (%Ls)', 77 + $this->phids); 78 + } 79 + 80 + return $this->formatWhereClause($where); 81 + } 82 + 83 + }
+10
src/applications/nuance/query/NuanceSourceTransactionQuery.php
··· 1 + <?php 2 + 3 + final class NuanceSourceTransactionQuery 4 + extends PhabricatorApplicationTransactionQuery { 5 + 6 + public function getTemplateApplicationTransaction() { 7 + return new NuanceSourceTransaction(); 8 + } 9 + 10 + }
+9
src/applications/nuance/storage/NuanceDAO.php
··· 1 + <?php 2 + 3 + abstract class NuanceDAO extends PhabricatorLiskDAO { 4 + 5 + public function getApplicationName() { 6 + return 'nuance'; 7 + } 8 + 9 + }
+95
src/applications/nuance/storage/NuanceItem.php
··· 1 + <?php 2 + 3 + final class NuanceItem 4 + extends NuanceDAO 5 + implements PhabricatorPolicyInterface { 6 + 7 + protected $ownerPHID; 8 + protected $requestorPHID; 9 + protected $sourcePHID; 10 + protected $sourceLabel; 11 + protected $data; 12 + protected $mailKey; 13 + protected $dateNuanced; 14 + 15 + public function getConfiguration() { 16 + return array( 17 + self::CONFIG_AUX_PHID => true, 18 + self::CONFIG_SERIALIZATION => array( 19 + 'data' => self::SERIALIZATION_JSON, 20 + ), 21 + ) + parent::getConfiguration(); 22 + } 23 + 24 + public function generatePHID() { 25 + return PhabricatorPHID::generateNewPHID( 26 + NuancePHIDTypeItem::TYPECONST); 27 + } 28 + 29 + public function save() { 30 + if (!$this->getMailKey()) { 31 + $this->setMailKey(Filesystem::readRandomCharacters(20)); 32 + } 33 + return parent::save(); 34 + } 35 + 36 + public function getURI() { 37 + return '/nuance/item/view/'.$this->getID().'/'; 38 + } 39 + 40 + public function getLabel(PhabricatorUser $viewer) { 41 + // this is generated at the time the item is created based on 42 + // the configuration from the item source. It is typically 43 + // something like 'Twitter'. 44 + $source_label = $this->getSourceLabel(); 45 + 46 + return pht( 47 + 'Item via %s @ %s.', 48 + $source_label, 49 + phabricator_datetime($this->getDateCreated(), $viewer)); 50 + } 51 + 52 + public function getRequestor() { 53 + return $this->assertAttached($this->requestor); 54 + } 55 + 56 + public function attachRequestor(NuanceRequestor $requestor) { 57 + return $this->requestor = $requestor; 58 + } 59 + 60 + public function getSource() { 61 + return $this->assertAttached($this->source); 62 + } 63 + 64 + public function attachSource(NuanceSource $source) { 65 + $this->source = $source; 66 + } 67 + 68 + public function getCapabilities() { 69 + return array( 70 + PhabricatorPolicyCapability::CAN_VIEW, 71 + PhabricatorPolicyCapability::CAN_EDIT, 72 + ); 73 + } 74 + 75 + public function getPolicy($capability) { 76 + // TODO - this should be based on the queues the item currently resides in 77 + return PhabricatorPolicies::POLICY_NOONE; 78 + } 79 + 80 + public function hasAutomaticCapability($capability, PhabricatorUser $viewer) { 81 + // TODO - requestors should get auto access too! 82 + return $viewer->getPHID() == $this->ownerPHID; 83 + } 84 + 85 + public function describeAutomaticCapability($capability) { 86 + switch ($capability) { 87 + case PhabricatorPolicyCapability::CAN_VIEW: 88 + return pht('Owners of an item can always view it.'); 89 + case PhabricatorPolicyCapability::CAN_EDIT: 90 + return pht('Owners of an item can always edit it.'); 91 + } 92 + return null; 93 + } 94 + 95 + }
+14
src/applications/nuance/storage/NuanceItemTransaction.php
··· 1 + <?php 2 + 3 + final class NuanceItemTransaction 4 + extends NuanceTransaction { 5 + 6 + public function getApplicationTransactionType() { 7 + return NuancePHIDTypeItem::TYPECONST; 8 + } 9 + 10 + public function getApplicationTransactionCommentObject() { 11 + return new NuanceItemTransactionComment(); 12 + } 13 + 14 + }
+10
src/applications/nuance/storage/NuanceItemTransactionComment.php
··· 1 + <?php 2 + 3 + final class NuanceItemTransactionComment 4 + extends PhabricatorApplicationTransactionComment { 5 + 6 + public function getApplicationTransactionObject() { 7 + return new NuanceItemTransaction(); 8 + } 9 + 10 + }
+58
src/applications/nuance/storage/NuanceQueue.php
··· 1 + <?php 2 + 3 + final class NuanceQueue 4 + extends NuanceDAO 5 + implements PhabricatorPolicyInterface { 6 + 7 + protected $name; 8 + protected $mailKey; 9 + protected $viewPolicy; 10 + protected $editPolicy; 11 + 12 + public function getConfiguration() { 13 + return array( 14 + self::CONFIG_AUX_PHID => true, 15 + ) + parent::getConfiguration(); 16 + } 17 + 18 + public function generatePHID() { 19 + return PhabricatorPHID::generateNewPHID( 20 + NuancePHIDTypeQueue::TYPECONST); 21 + } 22 + 23 + public function save() { 24 + if (!$this->getMailKey()) { 25 + $this->setMailKey(Filesystem::readRandomCharacters(20)); 26 + } 27 + return parent::save(); 28 + } 29 + 30 + public function getURI() { 31 + return '/nuance/queue/view/'.$this->getID().'/'; 32 + } 33 + 34 + public function getCapabilities() { 35 + return array( 36 + PhabricatorPolicyCapability::CAN_VIEW, 37 + PhabricatorPolicyCapability::CAN_EDIT, 38 + ); 39 + } 40 + 41 + public function getPolicy($capability) { 42 + switch ($capability) { 43 + case PhabricatorPolicyCapability::CAN_VIEW: 44 + return $this->getViewPolicy(); 45 + case PhabricatorPolicyCapability::CAN_EDIT: 46 + return $this->getEditPolicy(); 47 + } 48 + } 49 + 50 + public function hasAutomaticCapability($capability, PhabricatorUser $viewer) { 51 + return false; 52 + } 53 + 54 + public function describeAutomaticCapability($capability) { 55 + return null; 56 + } 57 + 58 + }
+12
src/applications/nuance/storage/NuanceQueueItem.php
··· 1 + <?php 2 + 3 + final class NuanceQueueItem 4 + extends NuanceDAO { 5 + 6 + protected $queuePHID; 7 + protected $itemPHID; 8 + protected $itemStatus; 9 + protected $itemDateNuanced; 10 + 11 + 12 + }
+14
src/applications/nuance/storage/NuanceQueueTransaction.php
··· 1 + <?php 2 + 3 + final class NuanceQueueTransaction 4 + extends NuanceTransaction { 5 + 6 + public function getApplicationTransactionType() { 7 + return NuancePHIDTypeQueue::TYPECONST; 8 + } 9 + 10 + public function getApplicationTransactionCommentObject() { 11 + return new NuanceQueueTransactionComment(); 12 + } 13 + 14 + }
+10
src/applications/nuance/storage/NuanceQueueTransactionComment.php
··· 1 + <?php 2 + 3 + final class NuanceQueueTransactionComment 4 + extends PhabricatorApplicationTransactionComment { 5 + 6 + public function getApplicationTransactionObject() { 7 + return new NuanceQueueTransaction(); 8 + } 9 + 10 + }
+37
src/applications/nuance/storage/NuanceRequestor.php
··· 1 + <?php 2 + 3 + final class NuanceRequestor 4 + extends NuanceDAO { 5 + 6 + protected $data; 7 + 8 + public function getConfiguration() { 9 + return array( 10 + self::CONFIG_AUX_PHID => true, 11 + self::CONFIG_SERIALIZATION => array( 12 + 'data' => self::SERIALIZATION_JSON, 13 + ), 14 + ) + parent::getConfiguration(); 15 + } 16 + 17 + public function generatePHID() { 18 + return PhabricatorPHID::generateNewPHID( 19 + NuancePHIDTypeRequestor::TYPECONST); 20 + } 21 + 22 + public function save() { 23 + if (!$this->getMailKey()) { 24 + $this->setMailKey(Filesystem::readRandomCharacters(20)); 25 + } 26 + return parent::save(); 27 + } 28 + 29 + public function getURI() { 30 + return '/nuance/requestor/view/'.$this->getID().'/'; 31 + } 32 + 33 + public function getPhabricatorUserPHID() { 34 + return idx($this->getData(), 'phabricatorUserPHID'); 35 + } 36 + 37 + }
+18
src/applications/nuance/storage/NuanceRequestorSource.php
··· 1 + <?php 2 + 3 + final class NuanceRequestorSource 4 + extends NuanceDAO { 5 + 6 + protected $requestorPHID; 7 + protected $sourcePHID; 8 + protected $data; 9 + 10 + public function getConfiguration() { 11 + return array( 12 + self::CONFIG_SERIALIZATION => array( 13 + 'data' => self::SERIALIZATION_JSON, 14 + ), 15 + ) + parent::getConfiguration(); 16 + } 17 + 18 + }
+13
src/applications/nuance/storage/NuanceRequestorTransaction.php
··· 1 + <?php 2 + 3 + final class NuanceRequestorTransaction 4 + extends NuanceTransaction { 5 + 6 + public function getApplicationTransactionType() { 7 + return NuancePHIDTypeRequestor::TYPECONST; 8 + } 9 + 10 + public function getApplicationTransactionCommentObject() { 11 + return new NuanceRequestorTransactionComment(); 12 + } 13 + }
+10
src/applications/nuance/storage/NuanceRequestorTransactionComment.php
··· 1 + <?php 2 + 3 + final class NuanceRequestorTransactionComment 4 + extends PhabricatorApplicationTransactionComment { 5 + 6 + public function getApplicationTransactionObject() { 7 + return new NuanceRequestorTransaction(); 8 + } 9 + 10 + }
+64
src/applications/nuance/storage/NuanceSource.php
··· 1 + <?php 2 + 3 + final class NuanceSource 4 + extends NuanceDAO 5 + implements PhabricatorPolicyInterface { 6 + 7 + protected $name; 8 + protected $type; 9 + protected $data; 10 + protected $mailKey; 11 + protected $viewPolicy; 12 + protected $editPolicy; 13 + 14 + public function getConfiguration() { 15 + return array( 16 + self::CONFIG_AUX_PHID => true, 17 + self::CONFIG_SERIALIZATION => array( 18 + 'data' => self::SERIALIZATION_JSON, 19 + ), 20 + ) + parent::getConfiguration(); 21 + } 22 + 23 + public function generatePHID() { 24 + return PhabricatorPHID::generateNewPHID( 25 + NuancePHIDTypeSource::TYPECONST); 26 + } 27 + 28 + public function save() { 29 + if (!$this->getMailKey()) { 30 + $this->setMailKey(Filesystem::readRandomCharacters(20)); 31 + } 32 + return parent::save(); 33 + } 34 + 35 + public function getURI() { 36 + return '/nuance/source/view/'.$this->getID().'/'; 37 + } 38 + 39 + public function getCapabilities() { 40 + return array( 41 + PhabricatorPolicyCapability::CAN_VIEW, 42 + PhabricatorPolicyCapability::CAN_EDIT, 43 + ); 44 + } 45 + 46 + public function getPolicy($capability) { 47 + switch ($capability) { 48 + case PhabricatorPolicyCapability::CAN_VIEW: 49 + return $this->getViewPolicy(); 50 + case PhabricatorPolicyCapability::CAN_EDIT: 51 + return $this->getEditPolicy(); 52 + } 53 + } 54 + 55 + public function hasAutomaticCapability($capability, PhabricatorUser $viewer) { 56 + return false; 57 + } 58 + 59 + public function describeAutomaticCapability($capability) { 60 + return null; 61 + } 62 + 63 + 64 + }
+14
src/applications/nuance/storage/NuanceSourceTransaction.php
··· 1 + <?php 2 + 3 + final class NuanceSourceTransaction 4 + extends NuanceTransaction { 5 + 6 + public function getApplicationTransactionType() { 7 + return NuancePHIDTypeSource::TYPECONST; 8 + } 9 + 10 + public function getApplicationTransactionCommentObject() { 11 + return new NuanceSourceTransactionComment(); 12 + } 13 + 14 + }
+10
src/applications/nuance/storage/NuanceSourceTransactionComment.php
··· 1 + <?php 2 + 3 + final class NuanceSourceTransactionComment 4 + extends PhabricatorApplicationTransactionComment { 5 + 6 + public function getApplicationTransactionObject() { 7 + return new NuanceSourceTransaction(); 8 + } 9 + 10 + }
+10
src/applications/nuance/storage/NuanceTransaction.php
··· 1 + <?php 2 + 3 + abstract class NuanceTransaction 4 + extends PhabricatorApplicationTransaction { 5 + 6 + public function getApplicationName() { 7 + return 'nuance'; 8 + } 9 + 10 + }
+8
src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
··· 208 208 'type' => 'db', 209 209 'name' => 'policy', 210 210 ), 211 + 'db.nuance' => array( 212 + 'type' => 'db', 213 + 'name' => 'nuance', 214 + ), 211 215 '0000.legacy.sql' => array( 212 216 'type' => 'sql', 213 217 'name' => $this->getPatchPath('0000.legacy.sql'), ··· 1735 1739 '20131106.diffphid.3.key.sql' => array( 1736 1740 'type' => 'sql', 1737 1741 'name' => $this->getPatchPath('20131106.diffphid.3.key.sql'), 1742 + ), 1743 + '20131106.nuance-v0.sql' => array( 1744 + 'type' => 'sql', 1745 + 'name' => $this->getPatchPath('20131106.nuance-v0.sql'), 1738 1746 ), 1739 1747 ); 1740 1748 }
+12 -12
webroot/rsrc/css/sprite-apps-large.css
··· 482 482 background-position: -290px -203px; 483 483 } 484 484 485 - .apps-owners-light-large { 485 + .apps-nuance-light-large { 486 486 background-position: -319px -203px; 487 487 } 488 488 489 - .apps-owners-dark-large { 489 + .apps-nuance-dark-large { 490 490 background-position: -348px -203px; 491 491 } 492 492 493 - .apps-owners-blue-large, .phabricator-crumb-view:hover .apps-owners-dark-large { 493 + .apps-nuance-blue-large, .phabricator-crumb-view:hover .apps-nuance-dark-large { 494 494 background-position: -377px -203px; 495 495 } 496 496 497 - .apps-owners-white-large { 497 + .apps-nuance-white-large { 498 498 background-position: -406px -203px; 499 499 } 500 500 501 - .apps-paste-light-large { 501 + .apps-owners-light-large { 502 502 background-position: 0px -232px; 503 503 } 504 504 505 - .apps-paste-dark-large { 505 + .apps-owners-dark-large { 506 506 background-position: -29px -232px; 507 507 } 508 508 509 - .apps-paste-blue-large, .phabricator-crumb-view:hover .apps-paste-dark-large { 509 + .apps-owners-blue-large, .phabricator-crumb-view:hover .apps-owners-dark-large { 510 510 background-position: -58px -232px; 511 511 } 512 512 513 - .apps-paste-white-large { 513 + .apps-owners-white-large { 514 514 background-position: -87px -232px; 515 515 } 516 516 517 - .apps-pebkac-light-large { 517 + .apps-paste-light-large { 518 518 background-position: -116px -232px; 519 519 } 520 520 521 - .apps-pebkac-dark-large { 521 + .apps-paste-dark-large { 522 522 background-position: -145px -232px; 523 523 } 524 524 525 - .apps-pebkac-blue-large, .phabricator-crumb-view:hover .apps-pebkac-dark-large { 525 + .apps-paste-blue-large, .phabricator-crumb-view:hover .apps-paste-dark-large { 526 526 background-position: -174px -232px; 527 527 } 528 528 529 - .apps-pebkac-white-large { 529 + .apps-paste-white-large { 530 530 background-position: -203px -232px; 531 531 } 532 532
+6 -6
webroot/rsrc/css/sprite-apps.css
··· 250 250 background-position: -75px -75px; 251 251 } 252 252 253 - .apps-owners-dark { 253 + .apps-nuance-dark { 254 254 background-position: -90px -75px; 255 255 } 256 256 257 - .apps-owners-white { 257 + .apps-nuance-white { 258 258 background-position: -105px -75px; 259 259 } 260 260 261 - .apps-paste-dark { 261 + .apps-owners-dark { 262 262 background-position: -120px -75px; 263 263 } 264 264 265 - .apps-paste-white { 265 + .apps-owners-white { 266 266 background-position: -135px -75px; 267 267 } 268 268 269 - .apps-pebkac-dark { 269 + .apps-paste-dark { 270 270 background-position: 0px -90px; 271 271 } 272 272 273 - .apps-pebkac-white { 273 + .apps-paste-white { 274 274 background-position: -15px -90px; 275 275 } 276 276
webroot/rsrc/image/sprite-apps-X2.png

This is a binary file and will not be displayed.

webroot/rsrc/image/sprite-apps-large-X2.png

This is a binary file and will not be displayed.

webroot/rsrc/image/sprite-apps-large.png

This is a binary file and will not be displayed.

webroot/rsrc/image/sprite-apps.png

This is a binary file and will not be displayed.