From 34db0b775e1513b0afbeafc77f616df5eaea42e4 Mon Sep 17 00:00:00 2001 From: Alex Marin Date: Sat, 16 Jun 2012 17:16:15 +0300 Subject: [PATCH] oop: ExportHtmlword - add cfgRelation --- .../plugins/export/ExportHtmlword.class.php | 37 ++++++++++++++----- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/libraries/plugins/export/ExportHtmlword.class.php b/libraries/plugins/export/ExportHtmlword.class.php index cddcbadc90..c1dfcf3f69 100644 --- a/libraries/plugins/export/ExportHtmlword.class.php +++ b/libraries/plugins/export/ExportHtmlword.class.php @@ -35,6 +35,12 @@ class ExportHtmlword extends ExportPlugin */ private $_what; + /** + * + * @var type + */ + private $_cfgRelation; + /** * Constructor */ @@ -52,9 +58,11 @@ class ExportHtmlword extends ExportPlugin { global $charset_of_file; global $what; + global $cfgRelation; $this->setCharsetOfFile($charset_of_file); $this->setWhat($what); + $this->setCfgRelation($cfgRelation); } /** @@ -369,6 +377,7 @@ class ExportHtmlword extends ExportPlugin $view = false ) { global $cfgRelation; + $this->setCfgRelation($cfgRelation); $schema_insert = ''; @@ -481,7 +490,7 @@ class ExportHtmlword extends ExportPlugin } $schema_insert .= ''; - } // end foreach + } // end foreach $schema_insert .= ''; return $schema_insert; @@ -605,7 +614,7 @@ class ExportHtmlword extends ExportPlugin } /** - * Formats the definition for one column + * Formats the definition for one column * * @param array $column info about this column * @param array $unique_keys unique keys of the table @@ -638,16 +647,16 @@ class ExportHtmlword extends ExportPlugin $fmt_pre = '' . $fmt_pre; $fmt_post = $fmt_post . ''; } - $definition .= '' . $fmt_pre + $definition .= '' . $fmt_pre . htmlspecialchars($column['Field']) . $fmt_post . ''; $definition .= '' . htmlspecialchars($type) . ''; - $definition .= '' - . (($column['Null'] == '' || $column['Null'] == 'NO') - ? __('No') - : __('Yes')) + $definition .= '' + . (($column['Null'] == '' || $column['Null'] == 'NO') + ? __('No') + : __('Yes')) . ''; - $definition .= '' + $definition .= '' . htmlspecialchars( isset($column['Default']) ? $column['Default'] @@ -657,7 +666,7 @@ class ExportHtmlword extends ExportPlugin return $definition; } - + /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */ @@ -681,5 +690,15 @@ class ExportHtmlword extends ExportPlugin { $this->_charsetOfFile = $charsetOfFile; } + + public function getCfgRelation() + { + return $this->_cfgRelation; + } + + private function setCfgRelation($cfgRelation) + { + $this->_cfgRelation = $cfgRelation; + } } ?> \ No newline at end of file