aboutsummaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorhannes <h@nnesmannerhe.im>2016-01-25 19:00:05 +0000
committerhannes <h@nnesmannerhe.im>2016-01-25 19:00:05 +0000
commitca0c792ed38d9a8447018fdaaf8544c78b399e24 (patch)
tree7dce0ab82ff6469ef9c2af1d285078f399bc820e /classes
parent48e1a2431bb439ea71eac6d888c0fb939c6b5fea (diff)
downloadgnu-social-ca0c792ed38d9a8447018fdaaf8544c78b399e24.tar
gnu-social-ca0c792ed38d9a8447018fdaaf8544c78b399e24.zip
File and File_redirection records are saved in File_redirection::where() now
Diffstat (limited to 'classes')
-rw-r--r--classes/File.php14
1 files changed, 1 insertions, 13 deletions
diff --git a/classes/File.php b/classes/File.php
index 83c76195b6..46eae4d9a9 100644
--- a/classes/File.php
+++ b/classes/File.php
@@ -150,18 +150,6 @@ class File extends Managed_DataObject
$redir = File_redirection::where($given_url);
$file = $redir->getFile();
- // If we still don't have a File object, let's create one now!
- if (empty($file->id)) {
- if ($redir->url === $given_url || !$followRedirects) {
- // Save the File object based on our lookup trace
- $file->saveFile();
- } else {
- $file->saveFile();
- $redir->file_id = $file->id;
- $redir->insert();
- }
- }
-
if (!$file instanceof File || empty($file->id)) {
// This should not happen
throw new ServerException('URL processing failed without new File object');
@@ -674,4 +662,4 @@ class File extends Managed_DataObject
echo "DONE.\n";
echo "Resuming core schema upgrade...";
}
-}
+} \ No newline at end of file