Index: trunk/extensions/DataTransclusion/ImportMAB2.php |
— | — | @@ -90,19 +90,22 @@ |
91 | 91 | |
92 | 92 | $src = $this->mArgs[0]; |
93 | 93 | $dir = $this->mArgs[1]; |
94 | | - $this->blob_table = $this->mArgs[2]; |
95 | | - $this->index_table = $this->mArgs[3]; |
96 | 94 | |
97 | 95 | if ( !isset( $wgDataTransclusionSources[ $src ] ) ) { |
98 | 96 | throw new MWException( "unknown transclusion data source '$src', not found in \$wgDataTransclusionSources" ); |
99 | 97 | } |
100 | 98 | |
| 99 | + $this->output( "using settings for data transclusion source \"$src\".\n" ); |
| 100 | + |
101 | 101 | $this->source = DataTransclusionHandler::getDataSource( $src ); |
102 | 102 | |
103 | 103 | if ( !( $this->source instanceof DBDataTransclusionSource ) ) { |
104 | 104 | throw new MWException( "bad data source '$src': not compatible with DBDataTransclusionSource" ); |
105 | 105 | } |
106 | 106 | |
| 107 | + $this->blob_table = $this->mArgs[2]; |
| 108 | + $this->index_table = $this->mArgs[3]; |
| 109 | + |
107 | 110 | if ( $this->hasOption( 'prefix' ) ) { |
108 | 111 | $prefix = $this->getOption( "prefix" ); |
109 | 112 | $this->blob_table = $prefix . $this->blob_table; |
— | — | @@ -113,10 +116,16 @@ |
114 | 117 | $this->index_table = $db->tableName( $this->index_table ); |
115 | 118 | } |
116 | 119 | |
117 | | - if ( $this->hasOption('create') && !$this->debug ) { |
118 | | - $this->createTables( $this->blob_table, $this->index_table ); |
119 | | - } else if ( $this->hasOption('truncate') && !$this->debug ) { |
120 | | - $this->truncateTables( $this->blob_table, $this->index_table ); |
| 120 | + if ( !$this->debug ) { |
| 121 | + $this->output( "using tables {$this->blob_table} and {$this->index_table}.\n" ); |
| 122 | + |
| 123 | + if ( $this->hasOption('create') ) { |
| 124 | + $this->output( "creating tables if neccessary.\n" ); |
| 125 | + $this->createTables( $this->blob_table, $this->index_table ); |
| 126 | + } else if ( $this->hasOption('truncate') ) { |
| 127 | + $this->output( "truncating tables.\n" ); |
| 128 | + $this->truncateTables( $this->blob_table, $this->index_table ); |
| 129 | + } |
121 | 130 | } |
122 | 131 | |
123 | 132 | $this->id_map = array(); |
— | — | @@ -354,7 +363,7 @@ |
355 | 364 | } |
356 | 365 | |
357 | 366 | if ( !$found ) { |
358 | | - $this->output( "ignoring record #$id from file $file\n" ); |
| 367 | + $this->output( "ignoring record #$id\n" ); |
359 | 368 | continue; |
360 | 369 | } |
361 | 370 | } |