[Phpmyadmin-devel] export and views

Marc Delisle Marc.Delisle at cegepsherbrooke.qc.ca
Sun Oct 15 20:15:06 CEST 2006


Michal Čihař a écrit :
> Hi
> 
> On Fri, 13 Oct 2006 17:37:16 -0400
> Marc Delisle <Marc.Delisle at cegepsherbrooke.qc.ca> wrote:
> 
>> for db export, is there a possible logic path where the $table_select 
>> array would not exist? (It contains the tables chosen by user).
> 
> Maybe when user unselects all tables? Or directly loads export.php?

Direct loading of export.php did not work, at least in 2.9.0.2 (unless 
you know which parameters to pass; in fact, I seem to remember that this 
was documented somewhere?)

When a user unselects all tables, in trunk (9650) it chooses all tables 
:) but I think we should abort in this case...

> 
>> Another point, in this code:
>>
>> // Check if we have something to export
>> if ($export_type == 'database') {
>>      $tables     = PMA_DBI_get_tables($db);
>>      $num_tables = count($tables);
>>      if ($num_tables == 0) {
>>          $message = $strNoTablesFound;
>>          $js_to_run = 'functions.js';
>>          require_once('./libraries/header.inc.php');
>>          if ($export_type == 'server') {
>>              $active_page = 'server_export.php';
>>              require('./server_export.php');
>>          } elseif ($export_type == 'database') {
>>              $active_page = 'db_details_export.php';
>>              require('./db_details_export.php');
>>          } else {
>>              $active_page = 'tbl_properties_export.php';
>>              require('./tbl_properties_export.php');
>>          }
>>          exit();
>>      }
>> }
>>
>> the
>> if ($export_type == 'server') {
>> and the last "else" block can never be reached (if I read correctly).
> 
> Yes, I read it same :-)

In trunk (9650) I deactivated the parts that could not be reached. I 
guess that the "if" that correspond to server or table should be moved 
elsewhere?

Marc




More information about the Developers mailing list