diff --git a/libraries/relation.lib.php b/libraries/relation.lib.php index c24c2491e7..bc86994b12 100644 --- a/libraries/relation.lib.php +++ b/libraries/relation.lib.php @@ -1068,10 +1068,9 @@ function PMA_REL_renameField($db, $table, $field, $new_name) * @param string $newpage * @param array $cfgRelation * @param string $db - * @param string $query_default_option * @return string $pdf_page_number */ -function PMA_REL_create_page($newpage, $cfgRelation, $db, $query_default_option) +function PMA_REL_create_page($newpage, $cfgRelation, $db) { if (! isset($newpage) || $newpage == '') { $newpage = __('no description'); diff --git a/libraries/schema/User_Schema.class.php b/libraries/schema/User_Schema.class.php index 94850c263a..dc86c4c6f6 100644 --- a/libraries/schema/User_Schema.class.php +++ b/libraries/schema/User_Schema.class.php @@ -64,8 +64,7 @@ class PMA_User_Schema $this->pageNumber = PMA_REL_create_page( $_POST['newpage'], $cfgRelation, - $db, - $query_default_option + $db ); $this->autoLayoutForeign = isset($_POST['auto_layout_foreign']) ? "1":NULL; $this->autoLayoutInternal = isset($_POST['auto_layout_internal']) ? "1":NULL; diff --git a/pmd_pdf.php b/pmd_pdf.php index d697dd58cc..adf5fac13d 100644 --- a/pmd_pdf.php +++ b/pmd_pdf.php @@ -8,7 +8,7 @@ include_once 'pmd_common.php'; /** - * If called directly from the designer, first save the positions + * If called directly from the designer, first save the positions */ if (! isset($scale)) { $no_die_save_pos = 1; @@ -25,11 +25,7 @@ if (isset($mode)) { $scale_q = PMA_sqlAddSlashes($scale); if ('create_export' == $mode) { - /* - * @see pdf_pages.php - */ - $query_default_option = PMA_DBI_QUERY_STORE; - $pdf_page_number = PMA_REL_create_page($newpage, $cfgRelation, $db, $query_default_option); + $pdf_page_number = PMA_REL_create_page($newpage, $cfgRelation, $db); if ($pdf_page_number > 0) { $message = PMA_Message::success(__('Page has been created')); $mode = 'export'; @@ -57,7 +53,7 @@ if (isset($mode)) { ' . $pmd_table . '.`table_name` = ' . $pma_table . '.`table_name` AND ' . $pmd_table . '.`db_name`=\''. PMA_sqlAddSlashes($db) .'\' - AND pdf_page_number = ' . $pdf_page_number_q . ';', true, PMA_DBI_QUERY_STORE); + AND pdf_page_number = ' . $pdf_page_number_q . ';', true, PMA_DBI_QUERY_STORE); } } @@ -68,20 +64,20 @@ require_once './libraries/header_meta_style.inc.php';
-display(); } ?>
-'; echo '
' . __('Import/Export coordinates for PDF schema') . ''; $choices = array(); -$table_info_result = PMA_query_as_controluser('SELECT * FROM ' +$table_info_result = PMA_query_as_controluser('SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages']) . ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\''); diff --git a/schema_edit.php b/schema_edit.php index 4ab41d4539..3662b0b161 100644 --- a/schema_edit.php +++ b/schema_edit.php @@ -20,19 +20,12 @@ require_once './libraries/db_info.inc.php'; /** * Includ settings for relation stuff - * get all variables needed for exporting relational schema + * get all variables needed for exporting relational schema * in $cfgRelation */ require_once './libraries/relation.lib.php'; $cfgRelation = PMA_getRelationsParam(); -/** - * This is to avoid "Command out of sync" errors. Before switching this to - * a value of 0 (for MYSQLI_USE_RESULT), please check the logic - * to free results wherever needed. - */ -$query_default_option = PMA_DBI_QUERY_STORE; - /** * Now in ./libraries/relation.lib.php we check for all tables * that we need, but if we don't find them we are quiet about it @@ -79,14 +72,14 @@ if ($cfgRelation['pdfwork']) { * and tables which will be exported as Relational schema * you can set the table positions on the paper via scratchboard * for table positions, put the x,y co-ordinates - * + * * @param string $do It tells what the Schema is supposed to do - * create and select a page, generate schema etc + * create and select a page, generate schema etc */ if (isset($_REQUEST['do'])) { $user_schema->setAction($_REQUEST['do']); $user_schema->processUserChoice(); - } + } /** * Show some possibility to select a page for the export of relation schema @@ -96,14 +89,14 @@ if ($cfgRelation['pdfwork']) { $user_schema->selectPage(); /** - * Create a new page where relations will be drawn + * Create a new page where relations will be drawn */ $user_schema->showCreatePageDialog($db); /** - * After selection of page or creating a page - * It will show you the list of tables + * After selection of page or creating a page + * It will show you the list of tables * A dashboard will also be shown where you can position the tables */ @@ -114,7 +107,7 @@ if ($cfgRelation['pdfwork']) { || ($_REQUEST['do']== 'selectpage' && isset($user_schema->chosenPage) && $user_schema->chosenPage != 0) || ($_REQUEST['do'] == 'createpage' && isset($user_schema->chosenPage) && $user_schema->chosenPage != 0))) { - /** + /** * show Export schema generation options */ $user_schema->displaySchemaGenerationOptions(); diff --git a/schema_export.php b/schema_export.php index 3e1067d55e..2abe91f9e6 100644 --- a/schema_export.php +++ b/schema_export.php @@ -13,7 +13,7 @@ require './libraries/StorageEngine.class.php'; /** * Include settings for relation stuff - * get all variables needed for exporting relational schema + * get all variables needed for exporting relational schema * in $cfgRelation */ require_once './libraries/relation.lib.php'; @@ -21,14 +21,6 @@ $cfgRelation = PMA_getRelationsParam(); require_once './libraries/transformations.lib.php'; require_once './libraries/Index.class.php'; - -/** - * This is to avoid "Command out of sync" errors. Before switching this to - * a value of 0 (for MYSQLI_USE_RESULT), please check the logic - * to free results wherever needed. - */ -$query_default_option = PMA_DBI_QUERY_STORE; - include_once("./libraries/schema/Export_Relation_Schema.class.php"); /** @@ -47,4 +39,4 @@ if (!file_exists('./libraries/schema/' . $path . '_Relation_Schema.class.php')) PMA_Export_Relation_Schema::dieSchema($_POST['chpage'],$export_type,__('File doesn\'t exist')); } include("./libraries/schema/".$path."_Relation_Schema.class.php"); -$obj_schema = eval("new PMA_".$path."_Relation_Schema();"); \ No newline at end of file +$obj_schema = eval("new PMA_".$path."_Relation_Schema();");