Skip to content

Commit

Permalink
Remove references to designer_coords and designerwork
Browse files Browse the repository at this point in the history
Signed-off-by: Bimal Yashodha <[email protected]>
  • Loading branch information
kb-yashodha committed Jun 16, 2014
1 parent efa630d commit 48dd4f3
Show file tree
Hide file tree
Showing 19 changed files with 29 additions and 188 deletions.
1 change: 0 additions & 1 deletion config.sample.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
// $cfg['Servers'][$i]['history'] = 'pma__history';
// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
// $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
// $cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
// $cfg['Servers'][$i]['recent'] = 'pma__recent';
// $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
Expand Down
2 changes: 1 addition & 1 deletion db_qbe.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
/**
* Displays the Query by example form
*/
if ($cfgRelation['designerwork']) {
if ($cfgRelation['pdfwork']) {
$url = 'pmd_general.php' . PMA_URL_getCommon(
array_merge(
$url_params,
Expand Down
22 changes: 2 additions & 20 deletions doc/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,8 @@ Server connection settings
:default: ``''``

Since release 2.3.0 you can have phpMyAdmin create :term:`PDF` pages
showing the relations between your tables. To do this it needs two tables
showing the relations between your tables. Further, the designer interface
permits visually managing the relations. To do this it needs two tables
"pdf\_pages" (storing information about the available :term:`PDF` pages)
and "table\_coords" (storing coordinates where each table will be placed on
a :term:`PDF` schema output). You must be using the "relation" feature.
Expand Down Expand Up @@ -870,25 +871,6 @@ Server connection settings
* set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
* put the table name in :config:option:`$cfg['Servers'][$i]['userconfig']`



.. _designer_coords:
.. config:option:: $cfg['Servers'][$i]['designer_coords']
:type: string
:default: ``''``

Since release 2.10.0 a Designer interface is available; it permits to
visually manage the relations.

To allow the usage of this functionality:

* set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
* put the table name in :config:option:`$cfg['Servers'][$i]['designer\_coords']`
(e.g. ``pma__designer_coords``)



.. config:option:: $cfg['Servers'][$i]['MaxTableUiprefs']
:type: integer
Expand Down
1 change: 0 additions & 1 deletion examples/config.manyhosts.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['users'] = 'pma__users';
Expand Down
18 changes: 0 additions & 18 deletions examples/create_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -201,24 +201,6 @@ CREATE TABLE IF NOT EXISTS `pma__table_info` (

-- --------------------------------------------------------

--
-- Table structure for table `pma__designer_coords`
--

CREATE TABLE IF NOT EXISTS `pma__designer_coords` (
`db_name` varchar(64) NOT NULL default '',
`table_name` varchar(64) NOT NULL default '',
`x` INT,
`y` INT,
`v` TINYINT,
`h` TINYINT,
PRIMARY KEY (`db_name`,`table_name`)
)
COMMENT='Table coordinates for Designer'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;

-- --------------------------------------------------------

--
-- Table structure for table `pma__tracking`
--
Expand Down
18 changes: 0 additions & 18 deletions examples/create_tables_drizzle.sql
Original file line number Diff line number Diff line change
Expand Up @@ -174,24 +174,6 @@ CREATE TABLE IF NOT EXISTS `pma__table_info` (

-- --------------------------------------------------------

--
-- Table structure for table `pma__designer_coords`
--

CREATE TABLE IF NOT EXISTS `pma__designer_coords` (
`db_name` varchar(64) NOT NULL default '',
`table_name` varchar(64) NOT NULL default '',
`x` INT,
`y` INT,
`v` INT,
`h` INT,
PRIMARY KEY (`db_name`,`table_name`)
)
COMMENT='Table coordinates for Designer'
COLLATE utf8_bin;

-- --------------------------------------------------------

--
-- Table structure for table `pma__tracking`
--
Expand Down
2 changes: 1 addition & 1 deletion libraries/Menu.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ private function _getDbTabs()
$tabs['tracking']['link'] = 'db_tracking.php';
}

if (! $db_is_system_schema && $cfgRelation['designerwork']) {
if (! $db_is_system_schema && $cfgRelation['pdfwork']) {
$tabs['designer']['text'] = __('Designer');
$tabs['designer']['icon'] = 'b_relations.png';
$tabs['designer']['link'] = 'pmd_general.php';
Expand Down
7 changes: 0 additions & 7 deletions libraries/Table.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1232,13 +1232,6 @@ static public function moveCopy($source_db, $source_table, $target_db,
'db_name' => $target_db,
'table_name' => $target_table
);
PMA_Table::duplicateInfo(
'designerwork',
'designer_coords',
$get_fields,
$where_fields,
$new_fields
);

/**
* @todo Can't get duplicating PDFs the right way. The
Expand Down
11 changes: 1 addition & 10 deletions libraries/config.default.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@
$cfg['Servers'][$i]['table_info'] = '';

/**
* table to describe the tables position for the PDF schema
* table to describe the tables position for the designer and PDF schema
* - leave blank for no PDF schema support
* SUGGESTED: 'pma__table_coords'
*
Expand Down Expand Up @@ -397,15 +397,6 @@
*/
$cfg['Servers'][$i]['history'] = '';

/**
* table to store the coordinates for Designer
* - leave blank for no Designer feature
* SUGGESTED: 'pma__designer_coords'
*
* @global string $cfg['Servers'][$i]['designer_coords']
*/
$cfg['Servers'][$i]['designer_coords'] = '';

/**
* table to store recently used tables
* - leave blank for no "persistent" recently used tables
Expand Down
7 changes: 1 addition & 6 deletions libraries/config/messages.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -591,11 +591,6 @@
. 'controlhost equals host.'
);
$strConfigServers_controlport_name = __('Control port');
$strConfigServers_designer_coords_desc = __(
'Leave blank for no Designer support, suggested: '
. '[kbd]pma__designer_coords[/kbd].'
);
$strConfigServers_designer_coords_name = __('Designer table');
$strConfigServers_hide_db_desc
= __('Hide databases matching regular expression (PCRE).');
$strConfigServers_hide_db_name = __('Hide databases');
Expand Down Expand Up @@ -667,7 +662,7 @@
$strConfigServers_table_coords_desc = __(
'Leave blank for no PDF schema support, suggested: [kbd]pma__table_coords[/kbd].'
);
$strConfigServers_table_coords_name = __('PDF schema: table coordinates');
$strConfigServers_table_coords_name = __('Designer and PDF schema: table coordinates');
$strConfigServers_table_info_desc = __(
'Table to describe the display columns, leave blank for no support; '
. 'suggested: [kbd]pma__table_info[/kbd].'
Expand Down
1 change: 0 additions & 1 deletion libraries/config/setup.forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
'tracking' => 'pma__tracking',
'table_coords' => 'pma__table_coords',
'pdf_pages' => 'pma__pdf_pages',
'designer_coords' => 'pma__designer_coords',
'savedsearches' => 'pma__savedsearches',
'central_columns' => 'pma__central_columns',
'MaxTableUiprefs' => 100)));
Expand Down
10 changes: 5 additions & 5 deletions libraries/pmd_common.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ function PMA_getScriptTabs()
function PMA_getTablePositions($pg)
{
$cfgRelation = PMA_getRelationsParam();
if (! $cfgRelation['designerwork']) {
if (! $cfgRelation['pdfwork']) {
return null;
}

Expand Down Expand Up @@ -280,7 +280,7 @@ function PMA_getTablePositions($pg)
function PMA_getPageName($pg)
{
$cfgRelation = PMA_getRelationsParam();
if (! $cfgRelation['designerwork']) {
if (! $cfgRelation['pdfwork']) {
return null;
}

Expand All @@ -302,7 +302,7 @@ function PMA_getPageName($pg)
function PMA_deletePage($pg)
{
$cfgRelation = PMA_getRelationsParam();
if (! $cfgRelation['designerwork']) {
if (! $cfgRelation['pdfwork']) {
return null;
}

Expand Down Expand Up @@ -335,7 +335,7 @@ function PMA_deletePage($pg)
function getFirstPage($db)
{
$cfgRelation = PMA_getRelationsParam();
if (! $cfgRelation['designerwork']) {
if (! $cfgRelation['pdfwork']) {
return null;
}

Expand Down Expand Up @@ -380,7 +380,7 @@ function createNewPage($pageName)
function getTables($pg)
{
$cfgRelation = PMA_getRelationsParam();
if (! $cfgRelation['designerwork']) {
if (! $cfgRelation['pdfwork']) {
return null;
}

Expand Down
39 changes: 5 additions & 34 deletions libraries/relation.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function PMA_getRelationsParamDiagnostic($cfgRelation)
'pdf_pages'
);
$retval .= PMA_getDiagMessageForFeature(
__('Creation of PDFs'),
__('Designer and creation of PDFs'),
'pdfwork',
$messages
);
Expand Down Expand Up @@ -198,17 +198,6 @@ function PMA_getRelationsParamDiagnostic($cfgRelation)
'historywork',
$messages
);
$retval .= PMA_getDiagMessageForParameter(
'designer_coords',
isset($cfgRelation['designer_coords']),
$messages,
'designer_coords'
);
$retval .= PMA_getDiagMessageForFeature(
__('Designer'),
'designerwork',
$messages
);
$retval .= PMA_getDiagMessageForParameter(
'recent',
isset($cfgRelation['recent']),
Expand Down Expand Up @@ -413,7 +402,6 @@ function PMA_checkRelationsParam()
$cfgRelation['recentwork'] = false;
$cfgRelation['uiprefswork'] = false;
$cfgRelation['trackingwork'] = false;
$cfgRelation['designerwork'] = false;
$cfgRelation['userconfigwork'] = false;
$cfgRelation['menuswork'] = false;
$cfgRelation['navwork'] = false;
Expand All @@ -422,7 +410,7 @@ function PMA_checkRelationsParam()
$cfgRelation['central_columnswork'] = false;
$cfgRelation['user'] = null;
$cfgRelation['db'] = null;

if ($GLOBALS['server'] == 0
|| empty($GLOBALS['cfg']['Server']['pmadb'])
|| ! $GLOBALS['dbi']->selectDb(
Expand Down Expand Up @@ -468,8 +456,6 @@ function PMA_checkRelationsParam()
$cfgRelation['table_info'] = $curr_table[0];
} elseif ($curr_table[0] == $GLOBALS['cfg']['Server']['table_coords']) {
$cfgRelation['table_coords'] = $curr_table[0];
} elseif ($curr_table[0] == $GLOBALS['cfg']['Server']['designer_coords']) {
$cfgRelation['designer_coords'] = $curr_table[0];
} elseif ($curr_table[0] == $GLOBALS['cfg']['Server']['column_info']) {
$cfgRelation['column_info'] = $curr_table[0];
} elseif ($curr_table[0] == $GLOBALS['cfg']['Server']['pdf_pages']) {
Expand Down Expand Up @@ -534,12 +520,6 @@ function PMA_checkRelationsParam()
$cfgRelation['userconfigwork'] = true;
}

// we do not absolutely need that the internal relations or the PDF
// schema feature be activated
if (isset($cfgRelation['designer_coords'])) {
$cfgRelation['designerwork'] = true;
}

if (isset($cfgRelation['bookmark'])) {
$cfgRelation['bookmarkwork'] = true;
}
Expand All @@ -555,7 +535,7 @@ function PMA_checkRelationsParam()
if (isset($cfgRelation['savedsearches'])) {
$cfgRelation['savedsearcheswork'] = true;
}

if (isset($cfgRelation['central_columns'])) {
$cfgRelation['central_columnswork'] = true;
}
Expand All @@ -565,9 +545,9 @@ function PMA_checkRelationsParam()
&& $cfgRelation['mimework'] && $cfgRelation['historywork']
&& $cfgRelation['recentwork'] && $cfgRelation['uiprefswork']
&& $cfgRelation['trackingwork'] && $cfgRelation['userconfigwork']
&& $cfgRelation['bookmarkwork'] && $cfgRelation['designerwork']
&& $cfgRelation['bookmarkwork'] && $cfgRelation['central_columnswork']
&& $cfgRelation['menuswork'] && $cfgRelation['navwork']
&& $cfgRelation['savedsearcheswork'] && $cfgRelation['central_columnswork']
&& $cfgRelation['savedsearcheswork']
) {
$cfgRelation['allworks'] = true;
}
Expand Down Expand Up @@ -1514,15 +1494,6 @@ function PMA_REL_renameTable($source_db, $target_db, $source_table, $target_tabl
'db_name', 'table_name'
);
}

if ($GLOBALS['cfgRelation']['designerwork']) {
PMA_REL_renameSingleTable(
'designer_coords',
$source_db, $target_db,
$source_table, $target_table,
'db_name', 'table_name'
);
}
}

/**
Expand Down
15 changes: 0 additions & 15 deletions libraries/relation_cleanup.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,6 @@ function PMA_relationsCleanupTable($db, $table)
PMA_queryAsControlUser($remove_query);
}

if ($cfgRelation['designerwork']) {
$remove_query = 'DELETE FROM ' . PMA_Util::backquote($cfgRelation['db'])
. '.' . PMA_Util::backquote($cfgRelation['designer_coords'])
. ' WHERE db_name = \'' . PMA_Util::sqlAddSlashes($db) . '\''
. ' AND table_name = \'' . PMA_Util::sqlAddSlashes($table) . '\'';
PMA_queryAsControlUser($remove_query);
}

if ($cfgRelation['relwork']) {
$remove_query = 'DELETE FROM ' . PMA_Util::backquote($cfgRelation['db'])
. '.' . PMA_Util::backquote($cfgRelation['relation'])
Expand Down Expand Up @@ -160,13 +152,6 @@ function PMA_relationsCleanupDatabase($db)
PMA_queryAsControlUser($remove_query);
}

if ($cfgRelation['designerwork']) {
$remove_query = 'DELETE FROM ' . PMA_Util::backquote($cfgRelation['db'])
. '.' . PMA_Util::backquote($cfgRelation['designer_coords'])
. ' WHERE db_name = \'' . PMA_Util::sqlAddSlashes($db) . '\'';
PMA_queryAsControlUser($remove_query);
}

if ($cfgRelation['relwork']) {
$remove_query = 'DELETE FROM ' . PMA_Util::backquote($cfgRelation['db'])
. '.' . PMA_Util::backquote($cfgRelation['relation'])
Expand Down
2 changes: 1 addition & 1 deletion pmd_save_pos.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

$cfgRelation = PMA_getRelationsParam();

if (! $cfgRelation['designerwork']) {
if (! $cfgRelation['pdfwork']) {
PMD_errorSave();
}

Expand Down
Loading

0 comments on commit 48dd4f3

Please sign in to comment.