From f1e31ba69f56f4c5356e8f2c2fbd72c1959ae0bc Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Mon, 30 Mar 2015 14:28:12 -0500 Subject: [PATCH] oops: file: Record importing backend on import --- setup/cli/modules/file.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup/cli/modules/file.php b/setup/cli/modules/file.php index f5057230a..b1a2f9be6 100644 --- a/setup/cli/modules/file.php +++ b/setup/cli/modules/file.php @@ -374,6 +374,14 @@ class FileManager extends Module { )); } } + + // Update file to record current backend + $sql = 'UPDATE '.FILE_TABLE.' SET bk=' + .db_input($bk->getBkChar()) + .' WHERE id='.db_input($f->getId()); + if (!db_query($sql) || db_affected_rows()!=1) + return false; + } // end try catch (Exception $ex) { if ($bk) $bk->unlink(); -- GitLab