@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.

Remove legacy "DashboardInstall" table

Summary: Depends on D20409. Ref T13272. Before "ProfileMenu", dashboards were installed on specific objects using this table. Installs are now handled via ProfileMenu and this table no longer has any meaningful readers. Remove references to the table and destroy it.

Test Plan: Grepped for `DashboardInstall`.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13272

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

+2 -91
+1
resources/sql/autopatches/20190412.dashboard.02.install.sql
··· 1 + DROP TABLE IF EXISTS {$NAMESPACE}_dashboard.dashboard_install;
-2
src/__phutil_library_map__.php
··· 2924 2924 'PhabricatorDashboardHomeInstallWorkflow' => 'applications/dashboard/install/PhabricatorDashboardHomeInstallWorkflow.php', 2925 2925 'PhabricatorDashboardIconSet' => 'applications/dashboard/icon/PhabricatorDashboardIconSet.php', 2926 2926 'PhabricatorDashboardIconTransaction' => 'applications/dashboard/xaction/dashboard/PhabricatorDashboardIconTransaction.php', 2927 - 'PhabricatorDashboardInstall' => 'applications/dashboard/storage/PhabricatorDashboardInstall.php', 2928 2927 'PhabricatorDashboardInstallController' => 'applications/dashboard/controller/dashboard/PhabricatorDashboardInstallController.php', 2929 2928 'PhabricatorDashboardInstallWorkflow' => 'applications/dashboard/install/PhabricatorDashboardInstallWorkflow.php', 2930 2929 'PhabricatorDashboardLayoutMode' => 'applications/dashboard/layoutconfig/PhabricatorDashboardLayoutMode.php', ··· 8922 8921 'PhabricatorDashboardHomeInstallWorkflow' => 'PhabricatorDashboardApplicationInstallWorkflow', 8923 8922 'PhabricatorDashboardIconSet' => 'PhabricatorIconSet', 8924 8923 'PhabricatorDashboardIconTransaction' => 'PhabricatorDashboardTransactionType', 8925 - 'PhabricatorDashboardInstall' => 'PhabricatorDashboardDAO', 8926 8924 'PhabricatorDashboardInstallController' => 'PhabricatorDashboardController', 8927 8925 'PhabricatorDashboardInstallWorkflow' => 'Phobject', 8928 8926 'PhabricatorDashboardLayoutMode' => 'Phobject',
+1 -11
src/applications/dashboard/storage/PhabricatorDashboard.php
··· 172 172 173 173 public function destroyObjectPermanently( 174 174 PhabricatorDestructionEngine $engine) { 175 - 176 - $this->openTransaction(); 177 - $installs = id(new PhabricatorDashboardInstall())->loadAllWhere( 178 - 'dashboardPHID = %s', 179 - $this->getPHID()); 180 - foreach ($installs as $install) { 181 - $install->delete(); 182 - } 183 - 184 - $this->delete(); 185 - $this->saveTransaction(); 175 + $this->delete(); 186 176 } 187 177 188 178
-51
src/applications/dashboard/storage/PhabricatorDashboardInstall.php
··· 1 - <?php 2 - 3 - /** 4 - * An install of a dashboard. Examples might be 5 - * - the home page for a user 6 - * - the profile page for a user 7 - * - the profile page for a project 8 - */ 9 - final class PhabricatorDashboardInstall 10 - extends PhabricatorDashboardDAO { 11 - 12 - protected $installerPHID; 13 - protected $objectPHID; 14 - protected $applicationClass; 15 - protected $dashboardPHID; 16 - 17 - protected function getConfiguration() { 18 - return array( 19 - self::CONFIG_COLUMN_SCHEMA => array( 20 - 'applicationClass' => 'text64', 21 - ), 22 - self::CONFIG_KEY_SCHEMA => array( 23 - 'objectPHID' => array( 24 - 'columns' => array('objectPHID', 'applicationClass'), 25 - 'unique' => true, 26 - ), 27 - ), 28 - ) + parent::getConfiguration(); 29 - } 30 - 31 - public static function getDashboard( 32 - PhabricatorUser $viewer, 33 - $object_phid, 34 - $application_class) { 35 - 36 - $dashboard = null; 37 - $dashboard_install = id(new PhabricatorDashboardInstall()) 38 - ->loadOneWhere( 39 - 'objectPHID = %s AND applicationClass = %s', 40 - $object_phid, 41 - $application_class); 42 - if ($dashboard_install) { 43 - $dashboard = id(new PhabricatorDashboardQuery()) 44 - ->setViewer($viewer) 45 - ->withPHIDs(array($dashboard_install->getDashboardPHID())) 46 - ->executeOne(); 47 - } 48 - 49 - return $dashboard; 50 - } 51 - }
-27
src/applications/guides/module/PhabricatorGuideQuickStartModule.php
··· 103 103 ->setDescription($description); 104 104 $guide_items->addItem($item); 105 105 106 - $title = pht('Build a Dashboard'); 107 - $have_dashboard = (bool)PhabricatorDashboardInstall::getDashboard( 108 - $viewer, 109 - PhabricatorHomeApplication::DASHBOARD_DEFAULT, 110 - 'PhabricatorHomeApplication'); 111 - $href = PhabricatorEnv::getURI('/dashboard/'); 112 - if ($have_dashboard) { 113 - $icon = 'fa-check'; 114 - $icon_bg = 'bg-green'; 115 - $description = pht( 116 - "You've created at least one dashboard."); 117 - } else { 118 - $icon = 'fa-dashboard'; 119 - $icon_bg = 'bg-sky'; 120 - $description = 121 - pht('Customize the default homepage layout and items.'); 122 - } 123 - 124 - $item = id(new PhabricatorGuideItemView()) 125 - ->setTitle($title) 126 - ->setHref($href) 127 - ->setIcon($icon) 128 - ->setIconBackground($icon_bg) 129 - ->setDescription($description); 130 - $guide_items->addItem($item); 131 - 132 - 133 106 $title = pht('Personalize your Install'); 134 107 $wordmark = PhabricatorEnv::getEnvConfig('ui.logo'); 135 108 $href = PhabricatorEnv::getURI('/config/edit/ui.logo/');