]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
remove _all_ file URLs not just the duplicates
authorMikael Nordfeldth <mmn@hethane.se>
Wed, 27 May 2015 19:54:51 +0000 (21:54 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Wed, 27 May 2015 19:54:51 +0000 (21:54 +0200)
classes/File.php

index 0018a03e32f9bc632452dbf93b6e3c7df05fee15..9a8f9eaf53b6786438184f1a66a5767e41408027 100644 (file)
@@ -639,6 +639,8 @@ class File extends Managed_DataObject
                 print "\nWarning! URL suddenly disappeared from database: {$file->url}\n";
             }
         }
+        echo "...and now all the non-duplicates which are longer than 191 characters...\n";
+        $file->query('UPDATE file SET url=LEFT(url, 191) WHERE LENGTH(url)>191');
 
         echo "\n...now running hacky pre-schemaupdate change for $table:";
         // We have to create a urlhash that is _not_ the primary key,