diff options
author | Madhura Jayaratne <madhura.cj@gmail.com> | 2015-07-09 14:36:28 +0300 |
---|---|---|
committer | Madhura Jayaratne <madhura.cj@gmail.com> | 2015-07-09 14:36:28 +0300 |
commit | 8c6261c73f01be939864bc7a048273452ad9b58a (patch) | |
tree | 759e96e3485d15c6fb14aae766f0ae266d3b5b98 | |
parent | e4b14c2de31b024bd4a9136b3a9446ecf8a631e0 (diff) |
Underscores are preferred to separate words in configuration storage table names/directives
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
-rw-r--r-- | config.sample.inc.php | 2 | ||||
-rw-r--r-- | doc/config.rst | 8 | ||||
-rw-r--r-- | examples/config.manyhosts.inc.php | 2 | ||||
-rw-r--r-- | libraries/DisplayResults.class.php | 4 | ||||
-rw-r--r-- | libraries/config.default.php | 6 | ||||
-rw-r--r-- | libraries/config/messages.inc.php | 2 | ||||
-rw-r--r-- | libraries/config/setup.forms.php | 2 | ||||
-rw-r--r-- | libraries/display_export.inc.php | 2 | ||||
-rw-r--r-- | libraries/display_export.lib.php | 8 | ||||
-rw-r--r-- | libraries/export.lib.php | 2 | ||||
-rw-r--r-- | libraries/relation.lib.php | 22 | ||||
-rw-r--r-- | sql/create_tables.sql | 4 | ||||
-rw-r--r-- | sql/create_tables_drizzle.sql | 4 | ||||
-rw-r--r-- | tbl_export.php | 6 | ||||
-rw-r--r-- | test/libraries/PMA_relation_cleanup_test.php | 2 |
15 files changed, 38 insertions, 38 deletions
diff --git a/config.sample.inc.php b/config.sample.inc.php index 0004f05cf7..5c73c2e1b9 100644 --- a/config.sample.inc.php +++ b/config.sample.inc.php @@ -63,7 +63,7 @@ $cfg['Servers'][$i]['AllowNoPassword'] = false; // $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; // $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; // $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; -// $cfg['Servers'][$i]['exporttemplates'] = 'pma__exporttemplates'; +// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; /* Contrib / Swekey authentication */ // $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf'; diff --git a/doc/config.rst b/doc/config.rst index 3617bd436a..2d9329c936 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -812,8 +812,8 @@ Server connection settings * put the table name in :config:option:`$cfg['Servers'][$i]['savedsearches']` (e.g. ``pma__savedsearches``) -.. _exporttemplates: -.. config:option:: $cfg['Servers'][$i]['exporttemplates'] +.. _export_templates: +.. config:option:: $cfg['Servers'][$i]['export_templates'] :type: string :default: ``''`` @@ -823,8 +823,8 @@ Server connection settings 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]['exporttemplates']` (e.g. - ``pma__exporttemplates``) + * put the table name in :config:option:`$cfg['Servers'][$i]['export_templates']` (e.g. + ``pma__export_templates``) .. _tracking: .. config:option:: $cfg['Servers'][$i]['tracking'] diff --git a/examples/config.manyhosts.inc.php b/examples/config.manyhosts.inc.php index 6f7ecb66ad..df14e20e40 100644 --- a/examples/config.manyhosts.inc.php +++ b/examples/config.manyhosts.inc.php @@ -49,5 +49,5 @@ foreach ($hosts as $host) { $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; - $cfg['Servers'][$i]['exporttemplates'] = 'pma__exporttemplates'; + $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; } diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 7304502935..3ee40f21d3 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -349,8 +349,8 @@ class PMA_DisplayResults 'config_data' => $json_highlighting_data ); } - if (! empty($cfgRelation['exporttemplates'])) { - $relDb[$cfgRelation['exporttemplates']] = array( + if (! empty($cfgRelation['export_templates'])) { + $relDb[$cfgRelation['export_templates']] = array( 'template_data' => $json_highlighting_data ); } diff --git a/libraries/config.default.php b/libraries/config.default.php index da11c2f1ac..4a5195d442 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -493,11 +493,11 @@ $cfg['Servers'][$i]['designer_settings'] = ''; /** * table to store export templates * - leave blank to disable saved searches feature - * SUGGESTED: 'pma__exporttemplates' + * SUGGESTED: 'pma__export_templates' * - * @global string $cfg['Servers'][$i]['exporttemplates'] + * @global string $cfg['Servers'][$i]['export_templates'] */ -$cfg['Servers'][$i]['exporttemplates'] = ''; +$cfg['Servers'][$i]['export_templates'] = ''; /** * Maximum number of records saved in $cfg['Servers'][$i]['table_uiprefs'] table. diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php index 9d75d2909d..583678ff13 100644 --- a/libraries/config/messages.inc.php +++ b/libraries/config/messages.inc.php @@ -655,7 +655,7 @@ $strConfigServers_savedsearches_desc = __( $strConfigServers_savedsearches_name = __('Export templates table'); $strConfigServers_savedsearches_desc = __( 'Leave blank for no export template support, suggested: ' - . '[kbd]pma__exporttemplates[/kbd].' + . '[kbd]pma__export_templates[/kbd].' ); $strConfigServers_central_columns_name = __('Central columns table'); $strConfigServers_central_columns_desc = __( diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php index 477f48f165..a615488496 100644 --- a/libraries/config/setup.forms.php +++ b/libraries/config/setup.forms.php @@ -84,7 +84,7 @@ $forms['Servers']['Server_pmadb'] = array('Servers' => array(1 => array( 'savedsearches' => 'pma__savedsearches', 'central_columns' => 'pma__central_columns', 'designer_settings' => 'pma__designer_settings', - 'exporttemplates' => 'pma__exporttemplates', + 'export_templates' => 'pma__export_templates', 'MaxTableUiprefs' => 100))); $forms['Servers']['Server_tracking'] = array('Servers' => array(1 => array( 'tracking_version_auto_create', diff --git a/libraries/display_export.inc.php b/libraries/display_export.inc.php index 9d251a3272..4225ad6dec 100644 --- a/libraries/display_export.inc.php +++ b/libraries/display_export.inc.php @@ -42,7 +42,7 @@ if (empty($export_list)) { $html = PMA_getHtmlForExportOptionHeader($export_type, $db, $table); $cfgRelation = PMA_getRelationsParam(); -if ($cfgRelation['exporttemplateswork']) { +if ($cfgRelation['export_templateswork']) { $html .= PMA_getHtmlForExportTemplateLoading($export_type); } diff --git a/libraries/display_export.lib.php b/libraries/display_export.lib.php index e729cc98e4..176cba3959 100644 --- a/libraries/display_export.lib.php +++ b/libraries/display_export.lib.php @@ -199,7 +199,7 @@ function PMA_getHtmlForExportOptionHeader($export_type, $db, $table) */ function PMA_getHtmlForExportTemplateLoading($export_type) { - $html = '<div class="exportoptions" id="exporttemplates">'; + $html = '<div class="exportoptions" id="export_templates">'; $html .= '<h3>' . __('Export templates:') . '</h3>'; $html .= '<div class="floatleft">'; @@ -220,7 +220,7 @@ function PMA_getHtmlForExportTemplateLoading($export_type) $html .= '<h4>' . __('Existing templates:') . '</h4>'; $html .= '<label for="template">' . __('Template:') . '</label>'; $html .= '<select required="required" name="template" id="template">'; - $html .= PMA_getOptionsForExportTemplates($export_type); + $html .= PMA_getOptionsForexport_templates($export_type); $html .= '</select>'; $html .= '<input type="submit" name="updateTemplate" ' . 'id="updateTemplate" value="' . __('Update') . '" />'; @@ -243,7 +243,7 @@ function PMA_getHtmlForExportTemplateLoading($export_type) * * @return string HTML for the options in teplate dropdown */ -function PMA_getOptionsForExportTemplates($export_type) +function PMA_getOptionsForexport_templates($export_type) { $ret = '<option value="">-- ' . __('Select a template') . ' --</option>'; @@ -252,7 +252,7 @@ function PMA_getOptionsForExportTemplates($export_type) $query = "SELECT `id`, `template_name` FROM " . PMA_Util::backquote($cfgRelation['db']) . '.' - . PMA_Util::backquote($cfgRelation['exporttemplates']) + . PMA_Util::backquote($cfgRelation['export_templates']) . " WHERE `username` = " . "'" . PMA_Util::sqlAddSlashes($GLOBALS['cfg']['Server']['user']) . "'" . " AND `export_type` = '" . $export_type . "'" diff --git a/libraries/export.lib.php b/libraries/export.lib.php index 09b6472c11..b612187dde 100644 --- a/libraries/export.lib.php +++ b/libraries/export.lib.php @@ -1028,7 +1028,7 @@ function PMA_getMetadataTypesToExport() 'pdf_pages', 'savedsearches', 'central_columns', - 'exporttemplates', + 'export_templates', ); } ?> diff --git a/libraries/relation.lib.php b/libraries/relation.lib.php index 63e8aff65d..2e3eb62f12 100644 --- a/libraries/relation.lib.php +++ b/libraries/relation.lib.php @@ -326,14 +326,14 @@ function PMA_getRelationsParamDiagnostic($cfgRelation) $messages ); $retval .= PMA_getDiagMessageForParameter( - 'exporttemplates', - isset($cfgRelation['exporttemplates']), + 'export_templates', + isset($cfgRelation['export_templates']), $messages, - 'exporttemplates' + 'export_templates' ); $retval .= PMA_getDiagMessageForFeature( __('Saving export templates'), - 'exporttemplateswork', + 'export_templateswork', $messages ); $retval .= '</table>' . "\n"; @@ -463,7 +463,7 @@ function PMA_checkRelationsParam() $cfgRelation['savedsearcheswork'] = false; $cfgRelation['central_columnswork'] = false; $cfgRelation['designer_settingswork'] = false; - $cfgRelation['exporttemplateswork'] = false; + $cfgRelation['export_templateswork'] = false; $cfgRelation['user'] = null; $cfgRelation['db'] = null; @@ -539,8 +539,8 @@ function PMA_checkRelationsParam() $cfgRelation['central_columns'] = $curr_table[0]; } elseif ($curr_table[0] == $GLOBALS['cfg']['Server']['designer_settings']) { $cfgRelation['designer_settings'] = $curr_table[0]; - } elseif ($curr_table[0] == $GLOBALS['cfg']['Server']['exporttemplates']) { - $cfgRelation['exporttemplates'] = $curr_table[0]; + } elseif ($curr_table[0] == $GLOBALS['cfg']['Server']['export_templates']) { + $cfgRelation['export_templates'] = $curr_table[0]; } } // end while $GLOBALS['dbi']->freeResult($tab_rs); @@ -611,8 +611,8 @@ function PMA_checkRelationsParam() $cfgRelation['designer_settingswork'] = true; } - if (isset($cfgRelation['exporttemplates'])) { - $cfgRelation['exporttemplateswork'] = true; + if (isset($cfgRelation['export_templates'])) { + $cfgRelation['export_templateswork'] = true; } if ($cfgRelation['relwork'] && $cfgRelation['displaywork'] @@ -624,7 +624,7 @@ function PMA_checkRelationsParam() && $cfgRelation['menuswork'] && $cfgRelation['navwork'] && $cfgRelation['savedsearcheswork'] && $cfgRelation['favoritework'] && $cfgRelation['designer_settingswork'] - && $cfgRelation['exporttemplateswork'] + && $cfgRelation['export_templateswork'] ) { $cfgRelation['allworks'] = true; } @@ -1841,7 +1841,7 @@ function PMA_fixPMATables($db, $create = true) 'pma__savedsearches' => 'savedsearches', 'pma__central_columns' => 'central_columns', 'pma__designer_settings' => 'designer_settings', - 'pma__exporttemplates' => 'exporttemplates', + 'pma__export_templates' => 'export_templates', ); $existingTables = $GLOBALS['dbi']->getTables($db, $GLOBALS['controllink']); diff --git a/sql/create_tables.sql b/sql/create_tables.sql index 2815ac8742..fb1894a8e4 100644 --- a/sql/create_tables.sql +++ b/sql/create_tables.sql @@ -339,10 +339,10 @@ CREATE TABLE IF NOT EXISTS `pma__designer_settings` ( -- -------------------------------------------------------- -- --- Table structure for table `pma__exporttemplates` +-- Table structure for table `pma__export_templates` -- -CREATE TABLE IF NOT EXISTS `pma__exporttemplates` ( +CREATE TABLE IF NOT EXISTS `pma__export_templates` ( `id` int(5) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(64) NOT NULL, `export_type` varchar(10) NOT NULL, diff --git a/sql/create_tables_drizzle.sql b/sql/create_tables_drizzle.sql index 472e63c945..c4e523ac6f 100644 --- a/sql/create_tables_drizzle.sql +++ b/sql/create_tables_drizzle.sql @@ -291,10 +291,10 @@ CREATE TABLE IF NOT EXISTS `pma__designer_settings` ( -- -------------------------------------------------------- -- --- Table structure for table `pma__exporttemplates` +-- Table structure for table `pma__export_templates` -- -CREATE TABLE IF NOT EXISTS `pma__exporttemplates` ( +CREATE TABLE IF NOT EXISTS `pma__export_templates` ( `id` int(5) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(64) NOT NULL, `export_type` varchar(10) NOT NULL, diff --git a/tbl_export.php b/tbl_export.php index 3138908980..905b892309 100644 --- a/tbl_export.php +++ b/tbl_export.php @@ -24,7 +24,7 @@ $scripts->addFile('export.js'); $cfgRelation = PMA_getRelationsParam(); // handling export template actions -if (isset($_REQUEST['templateAction']) && $cfgRelation['exporttemplateswork']) { +if (isset($_REQUEST['templateAction']) && $cfgRelation['export_templateswork']) { if (isset($_REQUEST['templateId'])) { $templateId = $_REQUEST['templateId']; @@ -32,7 +32,7 @@ if (isset($_REQUEST['templateAction']) && $cfgRelation['exporttemplateswork']) { } $templateTable = PMA_Util::backquote($cfgRelation['db']) . '.' - . PMA_Util::backquote($cfgRelation['exporttemplates']); + . PMA_Util::backquote($cfgRelation['export_templates']); $user = PMA_Util::sqlAddSlashes($GLOBALS['cfg']['Server']['user']); switch ($_REQUEST['templateAction']) { @@ -77,7 +77,7 @@ if (isset($_REQUEST['templateAction']) && $cfgRelation['exporttemplateswork']) { if ('create' == $_REQUEST['templateAction']) { $response->addJSON( 'data', - PMA_getOptionsForExportTemplates($_REQUEST['exportType']) + PMA_getOptionsForexport_templates($_REQUEST['exportType']) ); } elseif ('load' == $_REQUEST['templateAction']) { $data = null; diff --git a/test/libraries/PMA_relation_cleanup_test.php b/test/libraries/PMA_relation_cleanup_test.php index 3e4a456b85..e254b1d023 100644 --- a/test/libraries/PMA_relation_cleanup_test.php +++ b/test/libraries/PMA_relation_cleanup_test.php @@ -55,7 +55,7 @@ class PMA_Relation_Cleanup_Test extends PHPUnit_Framework_TestCase $GLOBALS['cfg']['Server']['savedsearches'] = 'savedsearches'; $GLOBALS['cfg']['Server']['central_columns'] = 'central_columns'; $GLOBALS['cfg']['Server']['designer_settings'] = 'designer_settings'; - $GLOBALS['cfg']['Server']['exporttemplates'] = 'pma__exporttemplates'; + $GLOBALS['cfg']['Server']['export_templates'] = 'pma__export_templates'; $this->redefineRelation(); } |