mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-14 02:42:40 +01:00
ad01e26af7
Summary: Ref T11957. Needs some more polish, but I think everything here is square. Test Plan: Add personal/global items to home, test mobile. Test workboards / colors. Reviewers: epriestley Reviewed By: epriestley Subscribers: 20after4, rfreebern, Korvin Maniphest Tasks: T11957 Differential Revision: https://secure.phabricator.com/D17259
45 lines
1.3 KiB
PHP
45 lines
1.3 KiB
PHP
<?php
|
|
|
|
$table = new PhabricatorDashboard();
|
|
$conn = $table->establishConnection('r');
|
|
$table_name = 'dashboard_install';
|
|
|
|
$search_table = new PhabricatorProfileMenuItemConfiguration();
|
|
$search_conn = $search_table->establishConnection('w');
|
|
$search_table_name = 'search_profilepanelconfiguration';
|
|
|
|
$viewer = PhabricatorUser::getOmnipotentUser();
|
|
$profile_phid = id(new PhabricatorHomeApplication())->getPHID();
|
|
$menu_item_key = PhabricatorDashboardProfileMenuItem::MENUITEMKEY;
|
|
|
|
foreach (new LiskRawMigrationIterator($conn, $table_name) as $install) {
|
|
|
|
$dashboard_phid = $install['dashboardPHID'];
|
|
$new_phid = id(new PhabricatorProfileMenuItemConfiguration())->generatePHID();
|
|
$menu_item_properties = json_encode(
|
|
array('dashboardPHID' => $dashboard_phid, 'name' => ''));
|
|
|
|
$custom_phid = $install['objectPHID'];
|
|
if ($custom_phid == 'dashboard:default') {
|
|
$custom_phid = null;
|
|
}
|
|
|
|
$menu_item_order = 0;
|
|
|
|
queryfx(
|
|
$search_conn,
|
|
'INSERT INTO %T (phid, profilePHID, menuItemKey, menuItemProperties, '.
|
|
'visibility, dateCreated, dateModified, menuItemOrder, customPHID) VALUES '.
|
|
'(%s, %s, %s, %s, %s, %d, %d, %d, %ns)',
|
|
$search_table_name,
|
|
$new_phid,
|
|
$profile_phid,
|
|
$menu_item_key,
|
|
$menu_item_properties,
|
|
'visible',
|
|
PhabricatorTime::getNow(),
|
|
PhabricatorTime::getNow(),
|
|
$menu_item_order,
|
|
$custom_phid);
|
|
|
|
}
|