رفتن به مطلب
رونمایی از اولین و قویترین قالب IPS در ایران و در مارکتهای جهانی ×

[BUG 4.7.16] The s3Delete task is not activated correctly when deleting an Amazon S3 container


Bot

پست های پیشنهاد شده

  • تیم مدیریت

In the file /system/File/Amazon.php inside the function deleteContainer() this code is executed when adding a new delete task to delete the files in a bucket folder (container):

			/* Turn on task */
			\IPS\Db::i()->update( 'core_tasks', array( 'enabled' => 1 ), array( '`key`=?', 's3_delete' ) );

The problem is that the task's key is not s3_delete but s3Delete (no space + capitalized). This causes the task to delete the S3 files to not activate correctly.

 

The same issue is also present inside the code of the s3Delete task to disable itself in 2 different locations.

Lines 44-50:

			if ( !( $obj instanceof \IPS\File\Amazon ) )
			{
				/* Class is not Amazon, so just stop here and truncate the table as there's nothing we can really do now. */
				\IPS\Db::i()->delete( 'core_s3_deletions' );
				\IPS\Db::i()->update( 'core_tasks', array( 'enabled' => 0 ), array( '`key`=?', 's3_delete' ) );
				return NULL;
			}

Lines 96-97:

			/* Nothing to do, so switch off the task */
			\IPS\Db::i()->update( 'core_tasks', array( 'enabled' => 0 ), array( '`key`=?', 's3_delete' ) );

 

Again s3_delete is being used instead of s3Delete.

View the full Question

لینک به دیدگاه
به اشتراک گذاری در سایت های دیگر

  • تعداد پاسخ 0
  • زمان ایجاد
  • آخرین پاسخ

بهترین ارسال کنندگان این موضوع

روزهای محبوب

بهترین ارسال کنندگان این موضوع

روزهای محبوب

مهمان
این موضوع برای عدم ارسال قفل گردیده است.
  • کاربران آنلاین در این صفحه   0 کاربر

    • هیچ کاربر عضوی،در حال مشاهده این صفحه نیست.
×
×
  • ایجاد مورد جدید...

اطلاعات مهم

برای تجربه رابط کاربری بهتر و تعامل بهتر شما با انجمن ما از کوکی ها استفاده میکنیم قوانین