diff --git a/src/File.php b/src/File.php index 50e01d98..b6b14de9 100644 --- a/src/File.php +++ b/src/File.php @@ -711,8 +711,6 @@ protected function onBeforeWrite() // This logic is also used in the Folder subclass, but we're querying // for duplicates on the File base class here (including the Folder subclass). - // TODO Add read lock to avoid other processes creating files with the same name - // before this process has a chance to persist in the database. $existingFile = File::get()->filter([ 'Name' => $newName, 'ParentID' => (int) $this->ParentID @@ -1301,7 +1299,6 @@ public function getTag() */ public function BackLinkTracking() { - // @todo - Implement PolymorphicManyManyList to replace this $list = ArrayList::create(); foreach ($this->BackLinks() as $link) { // Ensure parent record exists diff --git a/src/Upload.php b/src/Upload.php index 64a70650..2970108f 100644 --- a/src/Upload.php +++ b/src/Upload.php @@ -27,7 +27,6 @@ * (see http://doc.silverstripe.org/secure-development#filesystem). * {@link File::$allowed_extensions} provides a good start for a list of "safe" extensions. * - * @todo Allow for non-database uploads */ class Upload extends Controller { diff --git a/tests/php/FileTest.php b/tests/php/FileTest.php index 33726249..4f6c97c8 100644 --- a/tests/php/FileTest.php +++ b/tests/php/FileTest.php @@ -104,15 +104,6 @@ public function testCreateWithFilenameWithSubfolder() $file->getFilename(), '"Filename" property remains unchanged' ); - - // TODO This should be auto-detected, see File->updateFilesystem() - // $this->assertInstanceOf('Folder', $file->Parent(), 'Parent folder is created in database'); - // $this->assertFileExists($file->Parent()->getURL(), 'Parent folder is created on filesystem'); - // $this->assertEquals('FileTest', $file->Parent()->Name); - // $this->assertInstanceOf('Folder', $file->Parent()->Parent(), 'Grandparent folder is created in database'); - // $this->assertFileExists($file->Parent()->Parent()->getURL(), - // 'Grandparent folder is created on filesystem'); - // $this->assertEquals('assets', $file->Parent()->Parent()->Name); } public function testGetExtension() diff --git a/tests/php/PublicAssetAdapterTest.php b/tests/php/PublicAssetAdapterTest.php index e726b092..dacfa3c7 100644 --- a/tests/php/PublicAssetAdapterTest.php +++ b/tests/php/PublicAssetAdapterTest.php @@ -20,8 +20,6 @@ protected function setUp(): void public function testInitBaseURL() { // Test windows paths generate correct url - // TODO Fix Filesystem::makeFolder() to use realpath, otherwise this fails in AssetAdapter::__construct() - // $base = str_replace('/', '\\', BASE_PATH) . '\\assets\\subdir'; $base = ASSETS_PATH . '/subdir'; $adapter = new PublicAssetAdapter($base); diff --git a/tests/php/Shortcodes/FileLinkTrackingTest.php b/tests/php/Shortcodes/FileLinkTrackingTest.php index 1e8dfaaf..b65a7def 100644 --- a/tests/php/Shortcodes/FileLinkTrackingTest.php +++ b/tests/php/Shortcodes/FileLinkTrackingTest.php @@ -205,8 +205,6 @@ public function testTwoFileRenamesInARowWork() $image->Name = 'renamed-test-file.jpg'; $image->write(); - // TODO Workaround for bug in DataObject->getChangedFields(), which returns stale data, - // and influences File->updateFilesystem() $image = Image::get()->byID($image->ID); $image->Name = 'renamed-test-file-second-time.jpg'; $image->write();