From 6f9d95970b4a1c6221cb52d20a6dde756f60c8eb Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 2 Jan 2010 13:34:47 +0000 Subject: [PATCH] rfe #2890226 [view] enable VIEW rename --- ChangeLog | 1 + lang/afrikaans-utf-8.inc.php | 1 + lang/albanian-utf-8.inc.php | 1 + lang/arabic-utf-8.inc.php | 1 + lang/azerbaijani-utf-8.inc.php | 1 + lang/bangla-utf-8.inc.php | 1 + lang/basque-utf-8.inc.php | 1 + lang/belarusian_cyrillic-utf-8.inc.php | 1 + lang/belarusian_latin-utf-8.inc.php | 1 + lang/bosnian-utf-8.inc.php | 1 + lang/brazilian_portuguese-utf-8.inc.php | 1 + lang/bulgarian-utf-8.inc.php | 1 + lang/catalan-utf-8.inc.php | 1 + lang/chinese_simplified-utf-8.inc.php | 1 + lang/chinese_traditional-utf-8.inc.php | 1 + lang/croatian-utf-8.inc.php | 1 + lang/czech-utf-8.inc.php | 1 + lang/danish-utf-8.inc.php | 1 + lang/dutch-utf-8.inc.php | 1 + lang/english-utf-8.inc.php | 1 + lang/estonian-utf-8.inc.php | 1 + lang/finnish-utf-8.inc.php | 1 + lang/french-utf-8.inc.php | 3 +- lang/galician-utf-8.inc.php | 1 + lang/georgian-utf-8.inc.php | 1 + lang/german-utf-8.inc.php | 1 + lang/greek-utf-8.inc.php | 1 + lang/hebrew-utf-8.inc.php | 1 + lang/hindi-utf-8.inc.php | 1 + lang/hungarian-utf-8.inc.php | 1 + lang/indonesian-utf-8.inc.php | 1 + lang/italian-utf-8.inc.php | 1 + lang/japanese-utf-8.inc.php | 1 + lang/korean-utf-8.inc.php | 1 + lang/latvian-utf-8.inc.php | 1 + lang/lithuanian-utf-8.inc.php | 1 + lang/macedonian_cyrillic-utf-8.inc.php | 1 + lang/malay-utf-8.inc.php | 1 + lang/mongolian-utf-8.inc.php | 1 + lang/norwegian-utf-8.inc.php | 1 + lang/persian-utf-8.inc.php | 1 + lang/polish-utf-8.inc.php | 1 + lang/portuguese-utf-8.inc.php | 1 + lang/romanian-utf-8.inc.php | 1 + lang/russian-utf-8.inc.php | 1 + lang/serbian_cyrillic-utf-8.inc.php | 1 + lang/serbian_latin-utf-8.inc.php | 1 + lang/sinhala-utf-8.inc.php | 1 + lang/slovak-utf-8.inc.php | 1 + lang/slovenian-utf-8.inc.php | 1 + lang/spanish-utf-8.inc.php | 1 + lang/swedish-utf-8.inc.php | 1 + lang/tatarish-utf-8.inc.php | 1 + lang/thai-utf-8.inc.php | 1 + lang/turkish-utf-8.inc.php | 1 + lang/ukrainian-utf-8.inc.php | 1 + lang/uzbek_cyrillic-utf-8.inc.php | 1 + lang/uzbek_latin-utf-8.inc.php | 1 + libraries/Table.class.php | 14 ++- libraries/common.lib.php | 5 +- libraries/tbl_links.inc.php | 9 ++ view_operations.php | 111 ++++++++++++++++++++++++ 62 files changed, 193 insertions(+), 6 deletions(-) create mode 100644 view_operations.php diff --git a/ChangeLog b/ChangeLog index db339463d..e23baeeaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ $Id$ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyAdmin/ChangeLog $ 3.4.0.0 (not yet released) ++ rfe #2890226 [view] enable VIEW rename 3.3.0.0 (not yet released) + rfe #2308632 [edit] Use hex for (var)binary fields, diff --git a/lang/afrikaans-utf-8.inc.php b/lang/afrikaans-utf-8.inc.php index ae73d3b44..6085fe565 100644 --- a/lang/afrikaans-utf-8.inc.php +++ b/lang/afrikaans-utf-8.inc.php @@ -1639,4 +1639,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/albanian-utf-8.inc.php b/lang/albanian-utf-8.inc.php index a16a88bc9..599817405 100644 --- a/lang/albanian-utf-8.inc.php +++ b/lang/albanian-utf-8.inc.php @@ -1637,4 +1637,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/arabic-utf-8.inc.php b/lang/arabic-utf-8.inc.php index 62d2c92d0..19352b92a 100644 --- a/lang/arabic-utf-8.inc.php +++ b/lang/arabic-utf-8.inc.php @@ -1641,4 +1641,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/azerbaijani-utf-8.inc.php b/lang/azerbaijani-utf-8.inc.php index fdf1bac4c..312703239 100644 --- a/lang/azerbaijani-utf-8.inc.php +++ b/lang/azerbaijani-utf-8.inc.php @@ -1636,4 +1636,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/bangla-utf-8.inc.php b/lang/bangla-utf-8.inc.php index 9c684824a..06b4e17ad 100644 --- a/lang/bangla-utf-8.inc.php +++ b/lang/bangla-utf-8.inc.php @@ -1638,4 +1638,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/basque-utf-8.inc.php b/lang/basque-utf-8.inc.php index 424af2934..9700a5b3d 100644 --- a/lang/basque-utf-8.inc.php +++ b/lang/basque-utf-8.inc.php @@ -1633,4 +1633,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/belarusian_cyrillic-utf-8.inc.php b/lang/belarusian_cyrillic-utf-8.inc.php index cfadd37d1..2b63b72df 100644 --- a/lang/belarusian_cyrillic-utf-8.inc.php +++ b/lang/belarusian_cyrillic-utf-8.inc.php @@ -1633,4 +1633,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/belarusian_latin-utf-8.inc.php b/lang/belarusian_latin-utf-8.inc.php index 5723a3fa1..7184be33a 100644 --- a/lang/belarusian_latin-utf-8.inc.php +++ b/lang/belarusian_latin-utf-8.inc.php @@ -1645,4 +1645,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/bosnian-utf-8.inc.php b/lang/bosnian-utf-8.inc.php index dd42ccd86..07e6ea151 100644 --- a/lang/bosnian-utf-8.inc.php +++ b/lang/bosnian-utf-8.inc.php @@ -1639,4 +1639,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/brazilian_portuguese-utf-8.inc.php b/lang/brazilian_portuguese-utf-8.inc.php index ccfe3ef16..c78b1231f 100644 --- a/lang/brazilian_portuguese-utf-8.inc.php +++ b/lang/brazilian_portuguese-utf-8.inc.php @@ -1633,4 +1633,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/bulgarian-utf-8.inc.php b/lang/bulgarian-utf-8.inc.php index e200880c6..25c070b91 100644 --- a/lang/bulgarian-utf-8.inc.php +++ b/lang/bulgarian-utf-8.inc.php @@ -1639,4 +1639,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/catalan-utf-8.inc.php b/lang/catalan-utf-8.inc.php index fe12724f1..2bf330ca9 100644 --- a/lang/catalan-utf-8.inc.php +++ b/lang/catalan-utf-8.inc.php @@ -1625,4 +1625,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/chinese_simplified-utf-8.inc.php b/lang/chinese_simplified-utf-8.inc.php index 82704c638..7e0df58f3 100644 --- a/lang/chinese_simplified-utf-8.inc.php +++ b/lang/chinese_simplified-utf-8.inc.php @@ -1638,4 +1638,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/chinese_traditional-utf-8.inc.php b/lang/chinese_traditional-utf-8.inc.php index 1fa2df833..3b664150c 100644 --- a/lang/chinese_traditional-utf-8.inc.php +++ b/lang/chinese_traditional-utf-8.inc.php @@ -1640,4 +1640,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/croatian-utf-8.inc.php b/lang/croatian-utf-8.inc.php index 6f691bf78..fe7627525 100644 --- a/lang/croatian-utf-8.inc.php +++ b/lang/croatian-utf-8.inc.php @@ -1633,4 +1633,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/czech-utf-8.inc.php b/lang/czech-utf-8.inc.php index b44b78cfe..577aa7922 100644 --- a/lang/czech-utf-8.inc.php +++ b/lang/czech-utf-8.inc.php @@ -1627,4 +1627,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/danish-utf-8.inc.php b/lang/danish-utf-8.inc.php index e39dd11cc..8813a89da 100644 --- a/lang/danish-utf-8.inc.php +++ b/lang/danish-utf-8.inc.php @@ -1636,4 +1636,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/dutch-utf-8.inc.php b/lang/dutch-utf-8.inc.php index 1feb72f3d..11d2586cb 100644 --- a/lang/dutch-utf-8.inc.php +++ b/lang/dutch-utf-8.inc.php @@ -1632,4 +1632,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/english-utf-8.inc.php b/lang/english-utf-8.inc.php index d53482485..8500bbfa7 100644 --- a/lang/english-utf-8.inc.php +++ b/lang/english-utf-8.inc.php @@ -755,6 +755,7 @@ $strRemoveSelectedUsers = 'Remove selected users'; $strRenameDatabaseOK = 'Database %s has been renamed to %s'; $strRenameTableOK = 'Table %s has been renamed to %s'; $strRenameTable = 'Rename table to'; +$strRenameView = 'Rename view to'; $strRepair = 'Repair'; $strRepairTable = 'Repair table'; $strReplaceNULLBy = 'Replace NULL by'; diff --git a/lang/estonian-utf-8.inc.php b/lang/estonian-utf-8.inc.php index c38da331d..276d21be3 100644 --- a/lang/estonian-utf-8.inc.php +++ b/lang/estonian-utf-8.inc.php @@ -1638,4 +1638,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/finnish-utf-8.inc.php b/lang/finnish-utf-8.inc.php index 832d96ca7..cdc678014 100644 --- a/lang/finnish-utf-8.inc.php +++ b/lang/finnish-utf-8.inc.php @@ -1631,4 +1631,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/french-utf-8.inc.php b/lang/french-utf-8.inc.php index e05558358..6749aeaaf 100644 --- a/lang/french-utf-8.inc.php +++ b/lang/french-utf-8.inc.php @@ -750,8 +750,9 @@ $strRemoveCRLF = 'Enlève les caractères de fin de ligne (CRLF) à l\'intérieu $strRemovePartitioning = 'Supprimer le partitionnement'; $strRemoveSelectedUsers = 'Effacer les utilisateurs sélectionnés.'; $strRenameDatabaseOK = 'La base de données %s a été renommée en %s'; -$strRenameTable = 'Changer le nom de la table pour'; +$strRenameTable = 'Changer le nom de la table pour'; $strRenameTableOK = 'La table %s se nomme maintenant %s'; +$strRenameView = 'Changer le nom de la vue pour'; $strRepair = 'Réparer'; $strRepairTable = 'Réparer la table'; $strReplaceNULLBy = 'Remplacer NULL par'; diff --git a/lang/galician-utf-8.inc.php b/lang/galician-utf-8.inc.php index 34906c22c..6d440e07a 100644 --- a/lang/galician-utf-8.inc.php +++ b/lang/galician-utf-8.inc.php @@ -1619,4 +1619,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/georgian-utf-8.inc.php b/lang/georgian-utf-8.inc.php index 7e35b352d..52718b569 100644 --- a/lang/georgian-utf-8.inc.php +++ b/lang/georgian-utf-8.inc.php @@ -1636,4 +1636,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/german-utf-8.inc.php b/lang/german-utf-8.inc.php index 258a65f76..db219d35f 100644 --- a/lang/german-utf-8.inc.php +++ b/lang/german-utf-8.inc.php @@ -1636,4 +1636,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/greek-utf-8.inc.php b/lang/greek-utf-8.inc.php index 540268e43..8e06ace9d 100644 --- a/lang/greek-utf-8.inc.php +++ b/lang/greek-utf-8.inc.php @@ -1638,4 +1638,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/hebrew-utf-8.inc.php b/lang/hebrew-utf-8.inc.php index ef6e59734..152dcc950 100644 --- a/lang/hebrew-utf-8.inc.php +++ b/lang/hebrew-utf-8.inc.php @@ -1634,4 +1634,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/hindi-utf-8.inc.php b/lang/hindi-utf-8.inc.php index ff6369575..15048d049 100644 --- a/lang/hindi-utf-8.inc.php +++ b/lang/hindi-utf-8.inc.php @@ -1640,4 +1640,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/hungarian-utf-8.inc.php b/lang/hungarian-utf-8.inc.php index 2a41fb58c..493cf2101 100644 --- a/lang/hungarian-utf-8.inc.php +++ b/lang/hungarian-utf-8.inc.php @@ -1633,4 +1633,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/indonesian-utf-8.inc.php b/lang/indonesian-utf-8.inc.php index a6d896e5c..784bf925b 100644 --- a/lang/indonesian-utf-8.inc.php +++ b/lang/indonesian-utf-8.inc.php @@ -1633,4 +1633,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/italian-utf-8.inc.php b/lang/italian-utf-8.inc.php index 57b32c8a9..626bf52f7 100644 --- a/lang/italian-utf-8.inc.php +++ b/lang/italian-utf-8.inc.php @@ -1633,4 +1633,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/japanese-utf-8.inc.php b/lang/japanese-utf-8.inc.php index 40f8886e6..a1d9585ba 100644 --- a/lang/japanese-utf-8.inc.php +++ b/lang/japanese-utf-8.inc.php @@ -1638,4 +1638,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/korean-utf-8.inc.php b/lang/korean-utf-8.inc.php index 898267abc..c4cb9bb7c 100644 --- a/lang/korean-utf-8.inc.php +++ b/lang/korean-utf-8.inc.php @@ -1635,4 +1635,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/latvian-utf-8.inc.php b/lang/latvian-utf-8.inc.php index 4f8a1e63c..81c09c137 100644 --- a/lang/latvian-utf-8.inc.php +++ b/lang/latvian-utf-8.inc.php @@ -1638,4 +1638,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/lithuanian-utf-8.inc.php b/lang/lithuanian-utf-8.inc.php index 41a1845f5..87de1b532 100644 --- a/lang/lithuanian-utf-8.inc.php +++ b/lang/lithuanian-utf-8.inc.php @@ -1632,4 +1632,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/macedonian_cyrillic-utf-8.inc.php b/lang/macedonian_cyrillic-utf-8.inc.php index f6f7492bd..086f0c759 100644 --- a/lang/macedonian_cyrillic-utf-8.inc.php +++ b/lang/macedonian_cyrillic-utf-8.inc.php @@ -1639,4 +1639,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/malay-utf-8.inc.php b/lang/malay-utf-8.inc.php index e9ff2a4ab..6578dfbb4 100644 --- a/lang/malay-utf-8.inc.php +++ b/lang/malay-utf-8.inc.php @@ -1652,4 +1652,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/mongolian-utf-8.inc.php b/lang/mongolian-utf-8.inc.php index 217885d20..db73a5a8f 100644 --- a/lang/mongolian-utf-8.inc.php +++ b/lang/mongolian-utf-8.inc.php @@ -1638,4 +1638,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/norwegian-utf-8.inc.php b/lang/norwegian-utf-8.inc.php index 4e8997c8a..f85463ddb 100644 --- a/lang/norwegian-utf-8.inc.php +++ b/lang/norwegian-utf-8.inc.php @@ -1628,4 +1628,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/persian-utf-8.inc.php b/lang/persian-utf-8.inc.php index 8cdb22e1e..ab661a8ea 100644 --- a/lang/persian-utf-8.inc.php +++ b/lang/persian-utf-8.inc.php @@ -1641,4 +1641,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/polish-utf-8.inc.php b/lang/polish-utf-8.inc.php index d01750ccb..191155144 100644 --- a/lang/polish-utf-8.inc.php +++ b/lang/polish-utf-8.inc.php @@ -1624,4 +1624,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/portuguese-utf-8.inc.php b/lang/portuguese-utf-8.inc.php index 93503f040..3812dd5bd 100644 --- a/lang/portuguese-utf-8.inc.php +++ b/lang/portuguese-utf-8.inc.php @@ -1642,4 +1642,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/romanian-utf-8.inc.php b/lang/romanian-utf-8.inc.php index 95c74f4a3..e49c9dbcd 100644 --- a/lang/romanian-utf-8.inc.php +++ b/lang/romanian-utf-8.inc.php @@ -1632,4 +1632,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/russian-utf-8.inc.php b/lang/russian-utf-8.inc.php index 09f873856..80859f3d1 100644 --- a/lang/russian-utf-8.inc.php +++ b/lang/russian-utf-8.inc.php @@ -1633,4 +1633,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/serbian_cyrillic-utf-8.inc.php b/lang/serbian_cyrillic-utf-8.inc.php index 0a98864aa..d256ac214 100644 --- a/lang/serbian_cyrillic-utf-8.inc.php +++ b/lang/serbian_cyrillic-utf-8.inc.php @@ -1636,4 +1636,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/serbian_latin-utf-8.inc.php b/lang/serbian_latin-utf-8.inc.php index 4320a3b1c..db9c2a430 100644 --- a/lang/serbian_latin-utf-8.inc.php +++ b/lang/serbian_latin-utf-8.inc.php @@ -1636,4 +1636,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/sinhala-utf-8.inc.php b/lang/sinhala-utf-8.inc.php index 0a4452b80..521e1fe50 100644 --- a/lang/sinhala-utf-8.inc.php +++ b/lang/sinhala-utf-8.inc.php @@ -1640,4 +1640,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/slovak-utf-8.inc.php b/lang/slovak-utf-8.inc.php index 60154f030..80fa66483 100644 --- a/lang/slovak-utf-8.inc.php +++ b/lang/slovak-utf-8.inc.php @@ -1632,4 +1632,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/slovenian-utf-8.inc.php b/lang/slovenian-utf-8.inc.php index 4f68530b3..36ec43cee 100644 --- a/lang/slovenian-utf-8.inc.php +++ b/lang/slovenian-utf-8.inc.php @@ -1635,4 +1635,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/spanish-utf-8.inc.php b/lang/spanish-utf-8.inc.php index 41edc315b..3ea34572e 100644 --- a/lang/spanish-utf-8.inc.php +++ b/lang/spanish-utf-8.inc.php @@ -1627,4 +1627,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/swedish-utf-8.inc.php b/lang/swedish-utf-8.inc.php index fb4749114..01a39b8d3 100644 --- a/lang/swedish-utf-8.inc.php +++ b/lang/swedish-utf-8.inc.php @@ -1628,4 +1628,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/tatarish-utf-8.inc.php b/lang/tatarish-utf-8.inc.php index 6db861a46..7386c2835 100644 --- a/lang/tatarish-utf-8.inc.php +++ b/lang/tatarish-utf-8.inc.php @@ -1632,4 +1632,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/thai-utf-8.inc.php b/lang/thai-utf-8.inc.php index 0b9bcf93b..5c6223902 100644 --- a/lang/thai-utf-8.inc.php +++ b/lang/thai-utf-8.inc.php @@ -1637,4 +1637,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/turkish-utf-8.inc.php b/lang/turkish-utf-8.inc.php index 0b503d7e7..588f627b6 100644 --- a/lang/turkish-utf-8.inc.php +++ b/lang/turkish-utf-8.inc.php @@ -1627,4 +1627,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/ukrainian-utf-8.inc.php b/lang/ukrainian-utf-8.inc.php index b93cda9e0..1b54b6d0e 100644 --- a/lang/ukrainian-utf-8.inc.php +++ b/lang/ukrainian-utf-8.inc.php @@ -1635,4 +1635,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/uzbek_cyrillic-utf-8.inc.php b/lang/uzbek_cyrillic-utf-8.inc.php index 2f6176241..6c7000018 100644 --- a/lang/uzbek_cyrillic-utf-8.inc.php +++ b/lang/uzbek_cyrillic-utf-8.inc.php @@ -1632,4 +1632,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/lang/uzbek_latin-utf-8.inc.php b/lang/uzbek_latin-utf-8.inc.php index 324846859..9418b0970 100644 --- a/lang/uzbek_latin-utf-8.inc.php +++ b/lang/uzbek_latin-utf-8.inc.php @@ -1632,4 +1632,5 @@ $strTrackingYouCanExecute = 'You can execute the dump by creating and using a te $strTrackingCommentOut = 'Comment out these two lines if you do not need them.'; //to translate $strTrackingReportForTable = 'Tracking report for table `%s`'; //to translate $strDeleteTrackingData = 'Delete tracking data for this table'; //to translate +$strRenameView = 'Rename view to'; //to translate ?> diff --git a/libraries/Table.class.php b/libraries/Table.class.php index b1f01df75..2c6208a25 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -971,9 +971,10 @@ class PMA_Table * * @param string new table name * @param string new database name + * @param boolean is this for a VIEW rename? * @return boolean success */ - function rename($new_name, $new_db = null) + function rename($new_name, $new_db = null, $is_view = false) { if (null !== $new_db && $new_db !== $this->getDbName()) { // Ensure the target is valid @@ -996,9 +997,16 @@ class PMA_Table return false; } - $GLOBALS['sql_query'] = ' - RENAME TABLE ' . $this->getFullName(true) . ' + if (! $is_view) { + $GLOBALS['sql_query'] = ' + RENAME TABLE ' . $this->getFullName(true) . ' TO ' . $new_table->getFullName(true) . ';'; + } else { + $GLOBALS['sql_query'] = ' + ALTER TABLE ' . $this->getFullName(true) . ' + RENAME ' . $new_table->getFullName(true) . ';'; + } + // I don't think a specific error message for views is necessary if (! PMA_DBI_query($GLOBALS['sql_query'])) { $this->errors[] = sprintf($GLOBALS['strErrorRenamingTable'], $this->getFullName(), $new_table->getFullName()); return false; diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 743f95642..e3483fd15 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1000,11 +1000,12 @@ if (!$jsonly) * @param string $message the message to display * @param string $sql_query the query to display * @param string $type the type (level) of the message + * @param boolean $is_view is this a message after a VIEW operation? * @global array the configuration array * @uses $cfg * @access public */ -function PMA_showMessage($message, $sql_query = null, $type = 'notice') +function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view = false) { global $cfg; @@ -1022,7 +1023,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice') // Corrects the tooltip text via JS if required // @todo this is REALLY the wrong place to do this - very unexpected here - if (strlen($GLOBALS['table']) && $cfg['ShowTooltip']) { + if (! $is_view && strlen($GLOBALS['table']) && $cfg['ShowTooltip']) { $tooltip = PMA_Table::sGetToolTip($GLOBALS['db'], $GLOBALS['table']); $uni_tbl = PMA_jsFormat($GLOBALS['db'] . '.' . $GLOBALS['table'], false); echo "\n"; diff --git a/libraries/tbl_links.inc.php b/libraries/tbl_links.inc.php index b6c91215b..13dbaf816 100644 --- a/libraries/tbl_links.inc.php +++ b/libraries/tbl_links.inc.php @@ -108,6 +108,15 @@ if (! $tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_ } } +/** + * Views support a limited number of operations + */ +if ($tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_schema)) { + $tabs['operation']['icon'] = 'b_tblops.png'; + $tabs['operation']['link'] = 'view_operations.php'; + $tabs['operation']['text'] = $strOperations; +} + /** * no drop in information_schema */ diff --git a/view_operations.php b/view_operations.php new file mode 100644 index 000000000..5c3257d02 --- /dev/null +++ b/view_operations.php @@ -0,0 +1,111 @@ +rename($_REQUEST['new_name'], null, $is_view = true)) { + $_message .= $pma_table->getLastMessage(); + $result = true; + $GLOBALS['table'] = $pma_table->getName(); + $reread_info = true; + $reload = true; + } else { + $_message .= $pma_table->getLastError(); + $result = false; + } + } +} + +/** + * Displays top menu links + */ +require_once './libraries/tbl_links.inc.php'; + +if (isset($result)) { + // set to success by default, because result set could be empty + // (for example, a table rename) + $_type = 'success'; + if (empty($_message)) { + $_message = $result ? $strSuccess : $strError; + // $result should exist, regardless of $_message + $_type = $result ? 'success' : 'error'; + } + if (! empty($warning_messages)) { + $_message = new PMA_Message; + $_message->addMessages($warning_messages); + $_message->isWarning(true); + unset($warning_messages); + } + PMA_showMessage($_message, $sql_query, $_type, $is_view = true); + unset($_message, $_type); +} + +$url_params['goto'] = 'view_operations.php'; +$url_params['back'] = 'view_operations.php'; + +/** + * Displays the page + */ +?> + +
+
+ + +
+ + + + + + + +
+
+
+
+ +
+
+
+ +