Skip to content

Commit 7758c85

Browse files
Updated Readme
1 parent e914c32 commit 7758c85

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Postman/Postman-Email-Log/PostmanEmailLogMigration.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ public function notice() {
179179
&&
180180
$new_logging
181181
): ?>
182-
<p><?php echo _e( 'Great! You have successfully migrated to new logs.', 'post-smtp' ); ?> <a href="<?php echo esc_attr( $this->logging_file_url ) ?>" target="_blank">View Migration Log</a></p>
182+
<p><?php echo _e( 'Great! You have successfully migrated to new logs.', 'post-smtp' ); ?>
183+
<?php echo file_exists( $this->logging_file ) ? '<a href="'.$this->logging_file_url.'" target="_blank">View Migration Log</a>' : ''; ?>
184+
</p>
183185
<a href="<?php echo esc_url( $switch_back ); ?>" class="button button-primary">View old logs</a>
184186
<a href="<?php echo esc_url( $delete_url ); ?>" class="button button-primary">Delete old Logs</a>
185187
<?php endif; ?>
@@ -712,9 +714,10 @@ public function create_log_file() {
712714

713715
$site_url = site_url();
714716
$logging = fopen( $this->logging_file, 'w' );
715-
fwrite( $logging, 'Migration log: ' . $site_url . PHP_EOL );
717+
716718
if( $logging ) {
717719

720+
fwrite( $logging, 'Migration log: ' . $site_url . PHP_EOL );
718721
fwrite( $logging, 'Info, Error' . PHP_EOL );
719722
fclose( $logging );
720723

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ To avoid being flagged as spam, you need to prove your email isn't forged. On a
312312
* Added an option to disable migration notifications for seven days on clicking the cross icon on notice.
313313
* Added a new feature that allows users to revert a migration. This way, they can retry the migration process or switch back to the old logs interface if required.
314314
* Added an option to skip the migration process for those who do not wish to transfer their old logs and want to switch to the new interface.
315+
* Added permission check before creating/writing error log during migration.
315316

316317
= 2.5.1 - 2023-05-10 =
317318
**NEW**

0 commit comments

Comments
 (0)