Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT Remove TODO comments #577

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open ticket: #578

$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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open ticket: #575

$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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open ticket: #576

*/
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