Skip to content

Commit

Permalink
Merge pull request #577 from creative-commoners/pulls/2.1/remove-todo
Browse files Browse the repository at this point in the history
MNT Remove TODO comments
  • Loading branch information
GuySartorelli authored Oct 24, 2023
2 parents 27000f1 + ae8d9ff commit c9903d2
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 17 deletions.
3 changes: 0 additions & 3 deletions src/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/Upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
9 changes: 0 additions & 9 deletions tests/php/FileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 0 additions & 2 deletions tests/php/PublicAssetAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 0 additions & 2 deletions tests/php/Shortcodes/FileLinkTrackingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c9903d2

Please sign in to comment.