| | 16 | |
|---|
| | 17 | // Alter file repository to remove path information |
|---|
| | 18 | echo "<h2>" . gettext("Adjusting file repository information") . "</h2>"; |
|---|
| | 19 | |
|---|
| | 20 | // Get all files with path in the location |
|---|
| | 21 | $files = db_query("select ident, location from files where location like \"".path."%\""); |
|---|
| | 22 | |
|---|
| | 23 | // If we have any... |
|---|
| | 24 | if ($files != false && sizeof($files) > 0) { |
|---|
| | 25 | foreach ($files as $file) { |
|---|
| | 26 | |
|---|
| | 27 | $ident = $file->ident; |
|---|
| | 28 | $filename = str_replace(path, "", $file->location); |
|---|
| | 29 | |
|---|
| | 30 | db_query("update files set location = '$filename' where ident = $ident"); |
|---|
| | 31 | echo "<p>" . sprintf(gettext("Updating file %d: %s"),$ident,$filename) . "</p>"; |
|---|
| | 32 | |
|---|
| | 33 | } |
|---|
| | 34 | } |
|---|
| | 35 | |
|---|
| | 36 | // Publish RSS |
|---|
| | 37 | echo "<h2>" . gettext("Publishing RSS") . "</h2>"; |
|---|