diff --git a/libraries/schema/Dia_Relation_Schema.class.php b/libraries/schema/Dia_Relation_Schema.class.php index af9ce2066..97ac28a19 100644 --- a/libraries/schema/Dia_Relation_Schema.class.php +++ b/libraries/schema/Dia_Relation_Schema.class.php @@ -175,7 +175,7 @@ class PMA_DIA extends XMLWriter if(ob_get_clean()){ ob_end_clean(); } - //header('Content-type: text/xml'); + header('Content-type: application/x-dia-diagram'); header('Content-Disposition: attachment; filename="'.$fileName.'.dia"'); $output = $this->flush(); print $output; @@ -227,7 +227,7 @@ class Table_Stats $sql = 'DESCRIBE ' . PMA_backquote($tableName); $result = PMA_DBI_try_query($sql, null, PMA_DBI_QUERY_STORE); if (!$result || !PMA_DBI_num_rows($result)) { - //$dia->Error(sprintf(__('The %s table doesn\'t exist!'), $tableName)); + $dia->dieSchema($pageNumber,"DIA",sprintf(__('The %s table doesn\'t exist!'), $tableName)); } /* * load fields @@ -253,7 +253,7 @@ class Table_Stats . ' AND pdf_page_number = ' . $pageNumber; $result = PMA_query_as_controluser($sql, false, PMA_DBI_QUERY_STORE); if (!$result || !PMA_DBI_num_rows($result)) { - // $dia->Error(sprintf(__('Please configure the coordinates for table %s'), $tableName)); + $dia->dieSchema($pageNumber,"DIA",sprintf(__('Please configure the coordinates for table %s'), $tableName)); } list($this->x, $this->y) = PMA_DBI_fetch_row($result); $this->x = (double) $this->x; @@ -713,10 +713,10 @@ class PMA_Dia_Relation_Schema extends PMA_Export_Relation_Schema $dia->endDiaDoc(); $dia->showOutput($db.'-'.$this->pageNumber); exit(); - print '
'; - print_r(get_object_vars($dia)); - print_r(get_object_vars($this)); - print ''; + // print '
'; + //print_r(get_object_vars($dia)); + //print_r(get_object_vars($this)); + //print ''; } /** diff --git a/libraries/schema/Eps_Relation_Schema.class.php b/libraries/schema/Eps_Relation_Schema.class.php index d22e43ce1..07c3417d2 100644 --- a/libraries/schema/Eps_Relation_Schema.class.php +++ b/libraries/schema/Eps_Relation_Schema.class.php @@ -338,7 +338,7 @@ class PMA_EPS // if(ob_get_clean()){ //ob_end_clean(); //} - //header('Content-type: text/xml'); + header('Content-type: image/x-eps'); header('Content-Disposition: attachment; filename="'.$fileName.'.eps"'); $output = $this->stringCommands; print $output; @@ -400,7 +400,7 @@ class Table_Stats $sql = 'DESCRIBE ' . PMA_backquote($tableName); $result = PMA_DBI_try_query($sql, null, PMA_DBI_QUERY_STORE); if (!$result || !PMA_DBI_num_rows($result)) { - $eps->dieSchema(sprintf(__('The %s table doesn\'t exist!'), $tableName)); + $eps->dieSchema($pageNumber,"EPS",sprintf(__('The %s table doesn\'t exist!'), $tableName)); } /* @@ -441,7 +441,7 @@ class Table_Stats $result = PMA_query_as_controluser($sql, false, PMA_DBI_QUERY_STORE); if (!$result || !PMA_DBI_num_rows($result)) { - //$eps->dieSchema(sprintf(__('Please configure the coordinates for table %s'), $tableName)); + $eps->dieSchema($pageNumber,"EPS",sprintf(__('Please configure the coordinates for table %s'), $tableName)); } list($this->x, $this->y) = PMA_DBI_fetch_row($result); $this->x = (double) $this->x; @@ -797,11 +797,11 @@ class PMA_Eps_Relation_Schema extends PMA_Export_Relation_Schema $eps->endEpsDoc(); $eps->showOutput($db.'-'.$this->pageNumber); exit(); - print '
'; - print_r(get_object_vars($eps)); - print_r($alltables); - print_r(get_object_vars($this)); - print ''; + //print '
'; + //print_r(get_object_vars($eps)); + //print_r($alltables); + //print_r(get_object_vars($this)); + //print ''; } diff --git a/libraries/schema/Pdf_Relation_Schema.class.php b/libraries/schema/Pdf_Relation_Schema.class.php index 28424bffa..829798137 100644 --- a/libraries/schema/Pdf_Relation_Schema.class.php +++ b/libraries/schema/Pdf_Relation_Schema.class.php @@ -75,6 +75,17 @@ class PMA_PDF extends TCPDF parent::_putpages(); } + // added because tcpdf for PHP 5 has a protected $buffer + public function getBuffer() + { + return $this->buffer; + } + + public function getState() + { + return $this->state; + } + /** * Sets the scaling factor, defines minimum coordinates and margins * @@ -196,44 +207,6 @@ class PMA_PDF extends TCPDF * Displays an error message * * @param string error_message the error mesage - * @global array the PMA configuration array - * @global integer the current server id - * @global string the current language - * @global string the charset to convert to - * @global string the current database name - * @global string the current charset - * @global string the current text direction - * @global string a localized string - * @global string an other localized string - * @access public - */ -/* function PMA_PDF_die($error_message = '') - { - global $cfg; - global $server, $lang, $convcharset, $db; - global $charset, $text_dir; - - require_once './libraries/header.inc.php'; - - echo '
PDF - ' . __('Error') . '
' . "\n"; - if (!empty($error_message)) { - $error_message = htmlspecialchars($error_message); - } - echo '' . "\n"; - echo ' ' . $error_message . "\n"; - echo '
' . "\n"; - - echo '' . __('Back') . ''; - echo "\n"; - - require_once './libraries/footer.inc.php'; - }*/ // end of the "PMA_PDF_die()" function - /** - * Aliases the "Error()" function from the TCPDF class to the - * "PMA_PDF_die()" one - * - * @param string error_message the error mesage * @access public * @see PMA_Export_Relation_Schema::dieSchema */ @@ -480,8 +453,16 @@ class PMA_PDF extends TCPDF } /** - * Draws tables schema + * Table preferences/statistics + * + * This class preserves the table co-ordinates,fields + * and helps in drawing/generating the Tables in PDF document. * + * @name Table_Stats + * @author Muhammad Adnan'; - print_r(get_object_vars($svg)); + //print ''; } diff --git a/libraries/schema/User_Schema.class.php b/libraries/schema/User_Schema.class.php index 63020a206..93b5c9dad 100644 --- a/libraries/schema/User_Schema.class.php +++ b/libraries/schema/User_Schema.class.php @@ -92,7 +92,7 @@ class PMA_User_Schema'; + // print_r(get_object_vars($svg)); //print_r($alltables); - print_r($this); - print ''; + // print_r($this); + // print '