Jeremy D commited on 2011-11-06 15:04:11
Showing 1 changed files, with 5 additions and 4 deletions.
... | ... |
@@ -181,7 +181,7 @@ class tbg_converter |
181 | 181 |
|
182 | 182 |
$this->checkTimeout($data[1], $this->substep, $data[2], $count); |
183 | 183 |
} |
184 |
- while ($this->step < count($this->steps)); |
|
184 |
+ while ($this->step < count($this->steps) + 1); |
|
185 | 185 |
} |
186 | 186 |
|
187 | 187 |
/** |
... | ... |
@@ -895,12 +895,13 @@ class mbt_to_tbg extends tbg_converter |
895 | 895 |
$i = 0; |
896 | 896 |
foreach ($this->mantis_db->query($query) as $row) |
897 | 897 |
{ |
898 |
+ // First we have to clean this up. |
|
899 |
+ $row['content'] = $this->tbg_db->quote($row['content']); |
|
900 |
+ |
|
898 | 901 |
$this->tbg_db->query(' |
899 |
- INSERT INTO ' . $this->tbg_db_prefix . 'files (id, uid, scope, real_filename, original_filename, content_type, content, uploaded_at, description) |
|
902 |
+ REPLACE INTO ' . $this->tbg_db_prefix . 'files (id, uid, scope, real_filename, original_filename, content_type, content, uploaded_at, description) |
|
900 | 903 |
VALUES (' . $row['id'] . ', ' . $row['uid'] . ', ' . $row['scope'] . ', "' . $row['real_filename'] . '", "' . $row['original_filename'] . '", "' . $row['content_type'] . '", "' . $row['content'] . '", ' . $row['uploaded_at'] . ', "' . $row['description'] . '")'); |
901 | 904 |
|
902 |
-exit(var_dump($this->tbg_db->errorInfo())); |
|
903 |
- |
|
904 | 905 |
++$i; |
905 | 906 |
} |
906 | 907 |
|
907 | 908 |