~ubuntu-branches/ubuntu/lucid/phpmyadmin/lucid

« back to all changes in this revision

Viewing changes to libraries/export/texytext.php

  • Committer: Bazaar Package Importer
  • Author(s): Michal Čihař
  • Date: 2010-03-08 15:25:00 UTC
  • mfrom: (1.2.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100308152500-6e8hmuqc5co39de5
Tags: 4:3.3.0-1
* New upstream version.
* Rediff debian/patches.
* Fix permissions on mediawiki export extension.

Show diffs side-by-side

added added

removed removed

Lines of Context:
127
127
{
128
128
    global $what;
129
129
 
130
 
    if (!PMA_exportOutputHandler('== ' . $GLOBALS['strDumpingData'] . ' ' . $table . "\n\n")) {
 
130
    if (! PMA_exportOutputHandler('== ' . $GLOBALS['strDumpingData'] . ' ' . $table . "\n\n")) {
131
131
        return FALSE;
132
132
    }
133
133
 
142
142
            $text_output .= '|' . htmlspecialchars(stripslashes(PMA_DBI_field_name($result, $i)));
143
143
        } // end for
144
144
        $text_output .= "\n|------\n";
145
 
        if (!PMA_exportOutputHandler($text_output)) {
 
145
        if (! PMA_exportOutputHandler($text_output)) {
146
146
            return FALSE;
147
147
        }
148
148
    } // end if
151
151
    while ($row = PMA_DBI_fetch_row($result)) {
152
152
        $text_output = '';
153
153
        for ($j = 0; $j < $fields_cnt; $j++) {
154
 
            if (!isset($row[$j]) || is_null($row[$j])) {
 
154
            if (! isset($row[$j]) || is_null($row[$j])) {
155
155
                $value = $GLOBALS[$what . '_null'];
156
156
            } elseif ($row[$j] == '0' || $row[$j] != '') {
157
157
                $value = $row[$j];
161
161
            $text_output .= '|' . htmlspecialchars($value);
162
162
        } // end for
163
163
        $text_output .= "\n";
164
 
        if (!PMA_exportOutputHandler($text_output)) {
 
164
        if (! PMA_exportOutputHandler($text_output)) {
165
165
            return FALSE;
166
166
        }
167
167
    } // end while
174
174
{
175
175
    global $cfgRelation;
176
176
 
177
 
    if (!PMA_exportOutputHandler('== ' . $GLOBALS['strTableStructure'] . ' ' .$table . "\n\n")) {
 
177
    if (! PMA_exportOutputHandler('== ' . $GLOBALS['strTableStructure'] . ' ' .$table . "\n\n")) {
178
178
        return FALSE;
179
179
    }
180
180
 
200
200
    $fields_cnt  = PMA_DBI_num_rows($result);
201
201
 
202
202
    // Check if we can use Relations (Mike Beck)
203
 
    if ($do_relation && !empty($cfgRelation['relation'])) {
 
203
    if ($do_relation && ! empty($cfgRelation['relation'])) {
204
204
        // Find which tables are related with the current one and write it in
205
205
        // an array
206
206
        $res_rel = PMA_getForeigners($db, $table);
247
247
    }
248
248
    $text_output .= "\n|------\n";
249
249
 
250
 
    if (!PMA_exportOutputHandler($text_output)) {
 
250
    if (! PMA_exportOutputHandler($text_output)) {
251
251
        return FALSE;
252
252
    }
253
253
 
288
288
        if ($zerofill) {
289
289
            $strAttribute = 'UNSIGNED ZEROFILL';
290
290
        }
291
 
        if (!isset($row['Default'])) {
 
291
        if (! isset($row['Default'])) {
292
292
            if ($row['Null'] != 'NO') {
293
293
                $row['Default'] = 'NULL';
294
294
            }
325
325
 
326
326
        $text_output .= "\n";
327
327
 
328
 
        if (!PMA_exportOutputHandler($text_output)) {
 
328
        if (! PMA_exportOutputHandler($text_output)) {
329
329
            return FALSE;
330
330
        }
331
331
    } // end while