From dd2cf47fdeb990a45b34d5b321e46ee691f72a5f Mon Sep 17 00:00:00 2001 From: "J.M" Date: Thu, 28 Jun 2012 14:46:11 +0200 Subject: [PATCH 1/3] Fix bug #3538655 with a workaround, revert this commit when PMA drops PHP5.2 support --- libraries/plugins/PluginObserver.class.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libraries/plugins/PluginObserver.class.php b/libraries/plugins/PluginObserver.class.php index 190f02d747..6e56e8d201 100644 --- a/libraries/plugins/PluginObserver.class.php +++ b/libraries/plugins/PluginObserver.class.php @@ -43,12 +43,19 @@ abstract class PluginObserver implements SplObserver * This method is called when any PluginManager to which the observer * is attached calls PluginManager::notify() * + * TODO Declare this function abstract, removing its body, + * as soon as we drop support for PHP 5.2.x. + * See bug #3538655. + * * @param SplSubject $subject The PluginManager notifying the observer * of an update. * * @return void */ - abstract public function update (SplSubject $subject); + public function update (SplSubject $subject) + { + throw new Exception('PluginObserver::update must be overridden in child classes.'); + } /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */ @@ -78,4 +85,4 @@ abstract class PluginObserver implements SplObserver $this->_pluginManager = $_pluginManager; } } -?> \ No newline at end of file +?> From c1b8b9ca867a0bd16f04680877b5ac04185afa1f Mon Sep 17 00:00:00 2001 From: Alex Marin Date: Fri, 29 Jun 2012 12:28:57 +0300 Subject: [PATCH 2/3] oop: rename database bug --- db_operations.php | 1 + 1 file changed, 1 insertion(+) diff --git a/db_operations.php b/db_operations.php index 7ce004833c..79a6129858 100644 --- a/db_operations.php +++ b/db_operations.php @@ -134,6 +134,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) { $tables_full = PMA_DBI_get_tables_full($db); $views = array(); + require_once "libraries/plugin_interface.lib.php"; // remove all foreign key constraints, otherwise we can get errors $export_sql_plugin = PMA_getPlugin( "export", From e8ef29f92fb39083c53ed9bee958fd317b699155 Mon Sep 17 00:00:00 2001 From: Alex Marin Date: Fri, 29 Jun 2012 15:28:54 +0300 Subject: [PATCH 3/3] oop: fix bug #3538914 upload progress --- libraries/display_import_ajax.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/display_import_ajax.lib.php b/libraries/display_import_ajax.lib.php index 8d0d4156e3..4948ac2189 100644 --- a/libraries/display_import_ajax.lib.php +++ b/libraries/display_import_ajax.lib.php @@ -121,6 +121,6 @@ function PMA_import_nopluginCheck() function PMA_importAjaxStatus($id) { header('Content-type: application/json'); - echo json_encode(PMA_getUploadStatus($id)); + echo json_encode($_SESSION[$SESSION_KEY]["handler"]::getUploadStatus($id)); } ?>