Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhura Jayaratne <madhura.cj@gmail.com>2015-06-18 12:52:32 +0300
committerMadhura Jayaratne <madhura.cj@gmail.com>2015-06-18 12:52:32 +0300
commit365d98d4c6b19f9289161bbd9471d9f0bf542c95 (patch)
tree3f6c966eb184747c93f57127dcc11e6d738aae08
parent6d8bceea8af031e429e07141d2991844cdabcb35 (diff)
Revert "Remove unused parameter $db"
This reverts commit d862940cb397cd9e69bba4d356a2e6b7b12dc3ca.
-rw-r--r--libraries/plugins/SchemaPlugin.class.php4
-rw-r--r--libraries/plugins/schema/Export_Relation_Schema.class.php5
-rw-r--r--libraries/plugins/schema/SchemaDia.class.php6
-rw-r--r--libraries/plugins/schema/SchemaEps.class.php6
-rw-r--r--libraries/plugins/schema/SchemaPdf.class.php6
-rw-r--r--libraries/plugins/schema/SchemaSvg.class.php6
-rw-r--r--libraries/plugins/schema/dia/Dia_Relation_Schema.class.php6
-rw-r--r--libraries/plugins/schema/eps/Eps_Relation_Schema.class.php6
-rw-r--r--libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php5
-rw-r--r--libraries/plugins/schema/svg/Svg_Relation_Schema.class.php6
-rw-r--r--schema_export.php2
11 files changed, 40 insertions, 18 deletions
diff --git a/libraries/plugins/SchemaPlugin.class.php b/libraries/plugins/SchemaPlugin.class.php
index 83d3246563..c4774ef620 100644
--- a/libraries/plugins/SchemaPlugin.class.php
+++ b/libraries/plugins/SchemaPlugin.class.php
@@ -48,9 +48,11 @@ abstract class SchemaPlugin
/**
* Exports the schema into the specified format.
*
+ * @param string $db database name
+ *
* @return bool Whether it succeeded
*/
- public abstract function exportSchema();
+ public abstract function exportSchema($db);
/**
* Adds export options common to all plugins.
diff --git a/libraries/plugins/schema/Export_Relation_Schema.class.php b/libraries/plugins/schema/Export_Relation_Schema.class.php
index bc31708ef7..987d7498e8 100644
--- a/libraries/plugins/schema/Export_Relation_Schema.class.php
+++ b/libraries/plugins/schema/Export_Relation_Schema.class.php
@@ -22,15 +22,18 @@ class PMA_Export_Relation_Schema
/**
* Constructor.
*
+ * @param string $db database name
* @param object $diagram schema diagram
*/
- function __construct($diagram)
+ function __construct($db, $diagram)
{
+ $this->db = $db;
$this->diagram = $diagram;
$this->setPageNumber($_REQUEST['page_number']);
$this->setOffline(isset($_REQUEST['offline_export']));
}
+ protected $db;
protected $diagram;
protected $showColor;
diff --git a/libraries/plugins/schema/SchemaDia.class.php b/libraries/plugins/schema/SchemaDia.class.php
index 3a1b5656fb..c29ab65dc8 100644
--- a/libraries/plugins/schema/SchemaDia.class.php
+++ b/libraries/plugins/schema/SchemaDia.class.php
@@ -104,11 +104,13 @@ class SchemaDia extends SchemaPlugin
/**
* Exports the schema into DIA format.
*
+ * @param string $db database name
+ *
* @return bool Whether it succeeded
*/
- public function exportSchema()
+ public function exportSchema($db)
{
- $export = new PMA_Dia_Relation_Schema();
+ $export = new PMA_Dia_Relation_Schema($db);
$export->showOutput();
}
}
diff --git a/libraries/plugins/schema/SchemaEps.class.php b/libraries/plugins/schema/SchemaEps.class.php
index 9858fc708c..7c2d916631 100644
--- a/libraries/plugins/schema/SchemaEps.class.php
+++ b/libraries/plugins/schema/SchemaEps.class.php
@@ -89,11 +89,13 @@ class SchemaEps extends SchemaPlugin
/**
* Exports the schema into EPS format.
*
+ * @param string $db database name
+ *
* @return bool Whether it succeeded
*/
- public function exportSchema()
+ public function exportSchema($db)
{
- $export = new PMA_Eps_Relation_Schema();
+ $export = new PMA_Eps_Relation_Schema($db);
$export->showOutput();
}
}
diff --git a/libraries/plugins/schema/SchemaPdf.class.php b/libraries/plugins/schema/SchemaPdf.class.php
index 11c603cb9e..fbc3341fe8 100644
--- a/libraries/plugins/schema/SchemaPdf.class.php
+++ b/libraries/plugins/schema/SchemaPdf.class.php
@@ -131,11 +131,13 @@ class SchemaPdf extends SchemaPlugin
/**
* Exports the schema into PDF format.
*
+ * @param string $db database name
+ *
* @return bool Whether it succeeded
*/
- public function exportSchema()
+ public function exportSchema($db)
{
- $export = new PMA_Pdf_Relation_Schema();
+ $export = new PMA_Pdf_Relation_Schema($db);
$export->showOutput();
}
}
diff --git a/libraries/plugins/schema/SchemaSvg.class.php b/libraries/plugins/schema/SchemaSvg.class.php
index 70753be540..306a5c44f7 100644
--- a/libraries/plugins/schema/SchemaSvg.class.php
+++ b/libraries/plugins/schema/SchemaSvg.class.php
@@ -77,11 +77,13 @@ class SchemaSvg extends SchemaPlugin
/**
* Exports the schema into SVG format.
*
+ * @param string $db database name
+ *
* @return bool Whether it succeeded
*/
- public function exportSchema()
+ public function exportSchema($db)
{
- $export = new PMA_Svg_Relation_Schema();
+ $export = new PMA_Svg_Relation_Schema($db);
$export->showOutput();
}
}
diff --git a/libraries/plugins/schema/dia/Dia_Relation_Schema.class.php b/libraries/plugins/schema/dia/Dia_Relation_Schema.class.php
index a7d85b9d8b..fe2f0ab7ee 100644
--- a/libraries/plugins/schema/dia/Dia_Relation_Schema.class.php
+++ b/libraries/plugins/schema/dia/Dia_Relation_Schema.class.php
@@ -218,11 +218,13 @@ class PMA_Dia_Relation_Schema extends PMA_Export_Relation_Schema
* Upon instantiation This outputs the Dia XML document
* that user can download
*
+ * @param string $db database name
+ *
* @see PMA_DIA,Table_Stats_Dia,Relation_Stats_Dia
*/
- function __construct()
+ function __construct($db)
{
- parent::__construct(new PMA_DIA());
+ parent::__construct($db, new PMA_DIA());
$this->setShowColor(isset($_REQUEST['dia_show_color']));
$this->setShowKeys(isset($_REQUEST['dia_show_keys']));
diff --git a/libraries/plugins/schema/eps/Eps_Relation_Schema.class.php b/libraries/plugins/schema/eps/Eps_Relation_Schema.class.php
index 5b8366f8fc..93d3ef3fd5 100644
--- a/libraries/plugins/schema/eps/Eps_Relation_Schema.class.php
+++ b/libraries/plugins/schema/eps/Eps_Relation_Schema.class.php
@@ -328,11 +328,13 @@ class PMA_Eps_Relation_Schema extends PMA_Export_Relation_Schema
* Upon instantiation This starts writing the EPS document
* user will be prompted for download as .eps extension
*
+ * @param string $db database name
+ *
* @see PMA_EPS
*/
- function __construct()
+ function __construct($db)
{
- parent::__construct(new PMA_EPS());
+ parent::__construct($db, new PMA_EPS());
$this->setShowColor(isset($_REQUEST['eps_show_color']));
$this->setShowKeys(isset($_REQUEST['eps_show_keys']));
diff --git a/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php b/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php
index e43df4b60b..c4ade595f2 100644
--- a/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php
+++ b/libraries/plugins/schema/pdf/Pdf_Relation_Schema.class.php
@@ -452,10 +452,12 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema
/**
* The "PMA_Pdf_Relation_Schema" constructor
*
+ * @param string $db database name
+ *
* @access private
* @see PMA_Schema_PDF
*/
- function __construct()
+ function __construct($db)
{
$this->setShowGrid(isset($_REQUEST['pdf_show_grid']));
$this->setShowColor(isset($_REQUEST['pdf_show_color']));
@@ -469,6 +471,7 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema
// Initializes a new document
parent::__construct(
+ $db,
new PMA_Schema_PDF(
$this->orientation, 'mm', $this->paper,
$this->pageNumber, $this->_withDoc
diff --git a/libraries/plugins/schema/svg/Svg_Relation_Schema.class.php b/libraries/plugins/schema/svg/Svg_Relation_Schema.class.php
index da753a2dd8..b449d7b130 100644
--- a/libraries/plugins/schema/svg/Svg_Relation_Schema.class.php
+++ b/libraries/plugins/schema/svg/Svg_Relation_Schema.class.php
@@ -302,11 +302,13 @@ class PMA_Svg_Relation_Schema extends PMA_Export_Relation_Schema
* Upon instantiation This starts writing the SVG XML document
* user will be prompted for download as .svg extension
*
+ * @param string $db database name
+ *
* @see PMA_SVG
*/
- function __construct()
+ function __construct($db)
{
- parent::__construct(new PMA_SVG());
+ parent::__construct($db, new PMA_SVG());
$this->setShowColor(isset($_REQUEST['svg_show_color']));
$this->setShowKeys(isset($_REQUEST['svg_show_keys']));
diff --git a/schema_export.php b/schema_export.php
index ed468706ff..ec1c4e0b54 100644
--- a/schema_export.php
+++ b/schema_export.php
@@ -62,5 +62,5 @@ function PMA_processExportSchema($export_type)
}
$GLOBALS['dbi']->selectDb($GLOBALS['db']);
- $export_plugin->exportSchema();
+ $export_plugin->exportSchema($GLOBALS['db']);
}