Version Description
Download this release
Release Info
Developer | boldgrid |
Plugin | Total Upkeep – WordPress Backup Plugin plus Restore & Migrate by BoldGrid |
Version | branch.issue-455.202103301047 |
Comparing to | |
See all releases |
Code changes from version branch.issue-454.202103301008 to branch.issue-455.202103301047
- admin/class-boldgrid-backup-admin-core.php +6 -24
- cli/{verify-c04f1894876dd901b94fbc9af97a41f2.php → verify-0c397a869ef553f58262140e272c7b40.php} +0 -0
- coverage.xml +160 -197
- includes/class-boldgrid-backup-file.php +9 -33
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +4 -4
admin/class-boldgrid-backup-admin-core.php
CHANGED
@@ -2670,19 +2670,12 @@ class Boldgrid_Backup_Admin_Core {
|
|
2670 |
* @see Boldgrid_Backup_File::send_file()
|
2671 |
*/
|
2672 |
public function download_archive_file_callback() {
|
2673 |
-
$log = new Boldgrid_Backup_Admin_Log( $this );
|
2674 |
-
$log->init( 'backup-download.log' );
|
2675 |
-
$log->add_separator();
|
2676 |
-
$log->add( 'Attempting ajax download...' );
|
2677 |
-
|
2678 |
// Verify nonce, or die.
|
2679 |
check_ajax_referer( 'archive_auth', 'wpnonce' );
|
2680 |
|
2681 |
// Check user capabilities.
|
2682 |
if ( ! current_user_can( 'update_plugins' ) ) {
|
2683 |
-
|
2684 |
-
echo esc_html( $error );
|
2685 |
-
$log->add( $error );
|
2686 |
wp_die();
|
2687 |
}
|
2688 |
|
@@ -2690,9 +2683,7 @@ class Boldgrid_Backup_Admin_Core {
|
|
2690 |
if ( isset( $_POST['download_key'] ) && is_numeric( $_POST['download_key'] ) ) {
|
2691 |
$download_key = (int) $_POST['download_key'];
|
2692 |
} else {
|
2693 |
-
|
2694 |
-
echo esc_html( $error );
|
2695 |
-
$log->add( $error );
|
2696 |
wp_die();
|
2697 |
}
|
2698 |
|
@@ -2700,9 +2691,7 @@ class Boldgrid_Backup_Admin_Core {
|
|
2700 |
if ( ! empty( $_POST['download_filename'] ) ) {
|
2701 |
$download_filename = sanitize_file_name( $_POST['download_filename'] );
|
2702 |
} else {
|
2703 |
-
|
2704 |
-
echo esc_html( $error );
|
2705 |
-
$log->add( $error );
|
2706 |
wp_die();
|
2707 |
}
|
2708 |
|
@@ -2711,9 +2700,7 @@ class Boldgrid_Backup_Admin_Core {
|
|
2711 |
|
2712 |
// Check WP_Filesystem method; ensure it is "direct".
|
2713 |
if ( 'direct' !== $access_type ) {
|
2714 |
-
|
2715 |
-
echo esc_html( $error );
|
2716 |
-
$log->add( $error );
|
2717 |
wp_die();
|
2718 |
}
|
2719 |
|
@@ -2722,9 +2709,7 @@ class Boldgrid_Backup_Admin_Core {
|
|
2722 |
|
2723 |
// If no files were found, then abort.
|
2724 |
if ( empty( $archives ) ) {
|
2725 |
-
|
2726 |
-
echo esc_html( $error );
|
2727 |
-
$log->add( $error );
|
2728 |
wp_die();
|
2729 |
}
|
2730 |
|
@@ -2736,9 +2721,7 @@ class Boldgrid_Backup_Admin_Core {
|
|
2736 |
|
2737 |
// Verify filename.
|
2738 |
if ( $download_filename !== $filename ) {
|
2739 |
-
|
2740 |
-
echo esc_html( $error );
|
2741 |
-
$log->add( $error );
|
2742 |
wp_die();
|
2743 |
}
|
2744 |
|
@@ -2751,7 +2734,6 @@ class Boldgrid_Backup_Admin_Core {
|
|
2751 |
}
|
2752 |
|
2753 |
// Send the file and die nicely.
|
2754 |
-
$log->add( 'Request validated successfully. Now on to sending the file...' );
|
2755 |
Boldgrid_Backup_File::send_file( $filepath, $filesize );
|
2756 |
}
|
2757 |
|
2670 |
* @see Boldgrid_Backup_File::send_file()
|
2671 |
*/
|
2672 |
public function download_archive_file_callback() {
|
|
|
|
|
|
|
|
|
|
|
2673 |
// Verify nonce, or die.
|
2674 |
check_ajax_referer( 'archive_auth', 'wpnonce' );
|
2675 |
|
2676 |
// Check user capabilities.
|
2677 |
if ( ! current_user_can( 'update_plugins' ) ) {
|
2678 |
+
esc_html_e( 'Security violation (not authorized).', 'boldgrid-backup' );
|
|
|
|
|
2679 |
wp_die();
|
2680 |
}
|
2681 |
|
2683 |
if ( isset( $_POST['download_key'] ) && is_numeric( $_POST['download_key'] ) ) {
|
2684 |
$download_key = (int) $_POST['download_key'];
|
2685 |
} else {
|
2686 |
+
esc_html_e( 'INVALID DOWNLOAD KEY', 'boldgrid-backup' );
|
|
|
|
|
2687 |
wp_die();
|
2688 |
}
|
2689 |
|
2691 |
if ( ! empty( $_POST['download_filename'] ) ) {
|
2692 |
$download_filename = sanitize_file_name( $_POST['download_filename'] );
|
2693 |
} else {
|
2694 |
+
esc_html_e( 'INVALID DOWNLOAD FILENAME', 'boldgrid-backup' );
|
|
|
|
|
2695 |
wp_die();
|
2696 |
}
|
2697 |
|
2700 |
|
2701 |
// Check WP_Filesystem method; ensure it is "direct".
|
2702 |
if ( 'direct' !== $access_type ) {
|
2703 |
+
esc_html_e( 'WP_Filesystem method is not "direct"', 'boldgrid-backup' );
|
|
|
|
|
2704 |
wp_die();
|
2705 |
}
|
2706 |
|
2709 |
|
2710 |
// If no files were found, then abort.
|
2711 |
if ( empty( $archives ) ) {
|
2712 |
+
esc_html_e( 'NO BACKUP ARCHIVES FOUND', 'boldgrid-backup' );
|
|
|
|
|
2713 |
wp_die();
|
2714 |
}
|
2715 |
|
2721 |
|
2722 |
// Verify filename.
|
2723 |
if ( $download_filename !== $filename ) {
|
2724 |
+
esc_html_e( 'FILE NOT FOUND', 'boldgrid-backup' );
|
|
|
|
|
2725 |
wp_die();
|
2726 |
}
|
2727 |
|
2734 |
}
|
2735 |
|
2736 |
// Send the file and die nicely.
|
|
|
2737 |
Boldgrid_Backup_File::send_file( $filepath, $filesize );
|
2738 |
}
|
2739 |
|
cli/{verify-c04f1894876dd901b94fbc9af97a41f2.php → verify-0c397a869ef553f58262140e272c7b40.php}
RENAMED
File without changes
|
coverage.xml
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<coverage generated="
|
3 |
-
<project timestamp="
|
4 |
<package name="Boldgrid\Backup\Admin\Card">
|
5 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/card/class-amazon-s3.php">
|
6 |
<class name="Amazon_S3" namespace="Boldgrid\Backup\Admin\Card" fullPackage="Amazon">
|
@@ -2724,7 +2724,7 @@
|
|
2724 |
</file>
|
2725 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-core.php">
|
2726 |
<class name="Boldgrid_Backup_Admin_Core" namespace="global" fullPackage="Boldgrid.Backup.Admin">
|
2727 |
-
<metrics complexity="236" methods="29" coveredmethods="4" conditionals="0" coveredconditionals="0" statements="
|
2728 |
</class>
|
2729 |
<line num="600" type="method" name="__construct" visibility="public" complexity="8" crap="8.07" count="29"/>
|
2730 |
<line num="605" type="stmt" count="29"/>
|
@@ -3686,236 +3686,219 @@
|
|
3686 |
<line num="2659" type="stmt" count="0"/>
|
3687 |
<line num="2660" type="stmt" count="0"/>
|
3688 |
<line num="2672" type="method" name="download_archive_file_callback" visibility="public" complexity="10" crap="110" count="0"/>
|
3689 |
-
<line num="2673" type="stmt" count="0"/>
|
3690 |
<line num="2674" type="stmt" count="0"/>
|
3691 |
-
<line num="
|
3692 |
-
<line num="
|
3693 |
<line num="2679" type="stmt" count="0"/>
|
3694 |
-
<line num="
|
3695 |
<line num="2683" type="stmt" count="0"/>
|
3696 |
<line num="2684" type="stmt" count="0"/>
|
3697 |
<line num="2685" type="stmt" count="0"/>
|
3698 |
<line num="2686" type="stmt" count="0"/>
|
3699 |
<line num="2687" type="stmt" count="0"/>
|
3700 |
-
<line num="2690" type="stmt" count="0"/>
|
3701 |
<line num="2691" type="stmt" count="0"/>
|
3702 |
<line num="2692" type="stmt" count="0"/>
|
3703 |
<line num="2693" type="stmt" count="0"/>
|
3704 |
<line num="2694" type="stmt" count="0"/>
|
3705 |
<line num="2695" type="stmt" count="0"/>
|
3706 |
-
<line num="
|
3707 |
-
<line num="2700" type="stmt" count="0"/>
|
3708 |
-
<line num="2701" type="stmt" count="0"/>
|
3709 |
<line num="2702" type="stmt" count="0"/>
|
3710 |
<line num="2703" type="stmt" count="0"/>
|
3711 |
<line num="2704" type="stmt" count="0"/>
|
3712 |
<line num="2705" type="stmt" count="0"/>
|
3713 |
-
<line num="
|
3714 |
-
<line num="
|
|
|
3715 |
<line num="2713" type="stmt" count="0"/>
|
3716 |
<line num="2714" type="stmt" count="0"/>
|
3717 |
-
<line num="2715" type="stmt" count="0"/>
|
3718 |
-
<line num="2716" type="stmt" count="0"/>
|
3719 |
-
<line num="2717" type="stmt" count="0"/>
|
3720 |
<line num="2718" type="stmt" count="0"/>
|
3721 |
-
<line num="
|
|
|
|
|
3722 |
<line num="2724" type="stmt" count="0"/>
|
3723 |
<line num="2725" type="stmt" count="0"/>
|
3724 |
<line num="2726" type="stmt" count="0"/>
|
3725 |
-
<line num="2727" type="stmt" count="0"/>
|
3726 |
<line num="2728" type="stmt" count="0"/>
|
3727 |
-
<line num="
|
|
|
3728 |
<line num="2733" type="stmt" count="0"/>
|
3729 |
<line num="2734" type="stmt" count="0"/>
|
3730 |
-
<line num="
|
3731 |
<line num="2738" type="stmt" count="0"/>
|
3732 |
-
<line num="
|
3733 |
-
<line num="2740" type="stmt" count="0"/>
|
3734 |
-
<line num="2741" type="stmt" count="0"/>
|
3735 |
-
<line num="2742" type="stmt" count="0"/>
|
3736 |
-
<line num="2743" type="stmt" count="0"/>
|
3737 |
-
<line num="2745" type="stmt" count="0"/>
|
3738 |
-
<line num="2747" type="stmt" count="0"/>
|
3739 |
-
<line num="2749" type="stmt" count="0"/>
|
3740 |
<line num="2750" type="stmt" count="0"/>
|
3741 |
-
<line num="
|
3742 |
-
<line num="2754" type="stmt" count="0"/>
|
3743 |
-
<line num="2755" type="stmt" count="0"/>
|
3744 |
<line num="2756" type="stmt" count="0"/>
|
3745 |
-
<line num="
|
3746 |
-
<line num="
|
3747 |
-
<line num="
|
3748 |
-
<line num="
|
3749 |
-
<line num="
|
3750 |
-
<line num="
|
3751 |
-
<line num="
|
3752 |
-
<line num="
|
3753 |
-
<line num="
|
|
|
|
|
3754 |
<line num="2791" type="stmt" count="0"/>
|
3755 |
-
<line num="
|
|
|
|
|
3756 |
<line num="2797" type="stmt" count="0"/>
|
|
|
3757 |
<line num="2799" type="stmt" count="0"/>
|
3758 |
-
<line num="
|
|
|
|
|
|
|
|
|
3759 |
<line num="2808" type="stmt" count="0"/>
|
3760 |
<line num="2809" type="stmt" count="0"/>
|
3761 |
<line num="2810" type="stmt" count="0"/>
|
3762 |
<line num="2811" type="stmt" count="0"/>
|
3763 |
-
<line num="
|
|
|
3764 |
<line num="2815" type="stmt" count="0"/>
|
3765 |
<line num="2816" type="stmt" count="0"/>
|
3766 |
<line num="2817" type="stmt" count="0"/>
|
3767 |
-
<line num="2818" type="stmt" count="0"/>
|
3768 |
<line num="2819" type="stmt" count="0"/>
|
3769 |
<line num="2820" type="stmt" count="0"/>
|
3770 |
<line num="2821" type="stmt" count="0"/>
|
3771 |
<line num="2823" type="stmt" count="0"/>
|
|
|
3772 |
<line num="2826" type="stmt" count="0"/>
|
3773 |
<line num="2827" type="stmt" count="0"/>
|
3774 |
<line num="2828" type="stmt" count="0"/>
|
3775 |
-
<line num="2829" type="stmt" count="0"/>
|
3776 |
-
<line num="2830" type="stmt" count="0"/>
|
3777 |
-
<line num="2831" type="stmt" count="0"/>
|
3778 |
-
<line num="2833" type="stmt" count="0"/>
|
3779 |
-
<line num="2834" type="stmt" count="0"/>
|
3780 |
<line num="2835" type="stmt" count="0"/>
|
3781 |
<line num="2837" type="stmt" count="0"/>
|
3782 |
<line num="2838" type="stmt" count="0"/>
|
3783 |
-
<line num="
|
3784 |
-
<line num="2841" type="stmt" count="0"/>
|
3785 |
-
<line num="2842" type="stmt" count="0"/>
|
3786 |
-
<line num="2844" type="stmt" count="0"/>
|
3787 |
<line num="2845" type="stmt" count="0"/>
|
3788 |
<line num="2846" type="stmt" count="0"/>
|
3789 |
-
<line num="
|
3790 |
-
<line num="
|
3791 |
-
<line num="
|
3792 |
-
<line num="
|
3793 |
-
<line num="
|
3794 |
-
<line num="
|
3795 |
-
<line num="
|
3796 |
-
<line num="
|
3797 |
-
<line num="
|
3798 |
-
<line num="
|
|
|
3799 |
<line num="2886" type="stmt" count="29"/>
|
3800 |
<line num="2887" type="stmt" count="29"/>
|
3801 |
-
<line num="
|
3802 |
-
<line num="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3803 |
<line num="2901" type="stmt" count="29"/>
|
3804 |
<line num="2902" type="stmt" count="29"/>
|
3805 |
-
<line num="2903" type="stmt" count="29"/>
|
3806 |
-
<line num="2904" type="stmt" count="29"/>
|
3807 |
-
<line num="2905" type="stmt" count="29"/>
|
3808 |
-
<line num="2906" type="stmt" count="29"/>
|
3809 |
<line num="2908" type="stmt" count="29"/>
|
3810 |
-
<line num="
|
3811 |
<line num="2911" type="stmt" count="29"/>
|
3812 |
<line num="2912" type="stmt" count="29"/>
|
3813 |
<line num="2913" type="stmt" count="29"/>
|
3814 |
<line num="2914" type="stmt" count="29"/>
|
3815 |
-
<line num="2915" type="stmt" count="29"/>
|
3816 |
<line num="2916" type="stmt" count="29"/>
|
3817 |
-
<line num="2918" type="stmt" count="29"/>
|
3818 |
<line num="2919" type="stmt" count="29"/>
|
3819 |
<line num="2920" type="stmt" count="29"/>
|
3820 |
-
<line num="
|
3821 |
-
<line num="
|
3822 |
-
<line num="
|
3823 |
-
<line num="
|
3824 |
-
<line num="
|
3825 |
-
<line num="
|
3826 |
-
<line num="
|
3827 |
-
<line num="
|
3828 |
-
<line num="
|
3829 |
-
<line num="
|
3830 |
-
<line num="
|
3831 |
-
<line num="2954" type="
|
3832 |
-
<line num="
|
3833 |
-
<line num="2957" type="stmt" count="
|
3834 |
-
<line num="2958" type="stmt" count="
|
3835 |
-
<line num="
|
|
|
|
|
|
|
3836 |
<line num="2966" type="stmt" count="0"/>
|
3837 |
<line num="2967" type="stmt" count="0"/>
|
3838 |
-
<line num="
|
3839 |
-
<line num="
|
3840 |
-
<line num="2972" type="stmt" count="0"/>
|
3841 |
-
<line num="2974" type="stmt" count="0"/>
|
3842 |
-
<line num="2975" type="stmt" count="0"/>
|
3843 |
-
<line num="2976" type="stmt" count="0"/>
|
3844 |
-
<line num="2979" type="stmt" count="0"/>
|
3845 |
-
<line num="2980" type="stmt" count="0"/>
|
3846 |
-
<line num="2981" type="stmt" count="0"/>
|
3847 |
<line num="2983" type="stmt" count="0"/>
|
3848 |
-
<line num="2984" type="stmt" count="0"/>
|
3849 |
<line num="2985" type="stmt" count="0"/>
|
|
|
3850 |
<line num="2987" type="stmt" count="0"/>
|
3851 |
-
<line num="
|
3852 |
-
<line num="
|
3853 |
-
<line num="
|
3854 |
-
<line num="
|
3855 |
-
<line num="
|
3856 |
-
<line num="
|
3857 |
-
<line num="
|
3858 |
-
<line num="
|
3859 |
-
<line num="
|
3860 |
-
<line num="
|
3861 |
-
<line num="3012" type="stmt" count="0"/>
|
3862 |
-
<line num="3014" type="stmt" count="0"/>
|
3863 |
-
<line num="3016" type="stmt" count="0"/>
|
3864 |
<line num="3017" type="stmt" count="0"/>
|
3865 |
-
<line num="
|
3866 |
-
<line num="
|
3867 |
-
<line num="
|
3868 |
-
<line num="
|
3869 |
-
<line num="
|
3870 |
-
<line num="
|
3871 |
-
<line num="
|
3872 |
-
<line num="
|
3873 |
-
<line num="
|
3874 |
-
<line num="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3875 |
<line num="3063" type="stmt" count="4"/>
|
3876 |
<line num="3064" type="stmt" count="4"/>
|
3877 |
<line num="3065" type="stmt" count="4"/>
|
3878 |
-
<line num="3067" type="stmt" count="4"/>
|
3879 |
<line num="3068" type="stmt" count="4"/>
|
3880 |
-
<line num="3070" type="stmt" count="4"/>
|
3881 |
<line num="3071" type="stmt" count="4"/>
|
3882 |
-
<line num="
|
3883 |
-
<line num="
|
3884 |
-
<line num="
|
3885 |
-
<line num="
|
3886 |
-
<line num="
|
3887 |
-
<line num="
|
3888 |
-
<line num="
|
3889 |
-
<line num="
|
3890 |
-
<line num="
|
3891 |
-
<line num="
|
3892 |
-
<line num="
|
3893 |
-
<line num="
|
3894 |
-
<line num="3090" type="stmt" count="4"/>
|
3895 |
-
<line num="3091" type="stmt" count="4"/>
|
3896 |
-
<line num="3095" type="stmt" count="1"/>
|
3897 |
-
<line num="3098" type="stmt" count="1"/>
|
3898 |
-
<line num="3101" type="stmt" count="1"/>
|
3899 |
-
<line num="3102" type="stmt" count="1"/>
|
3900 |
-
<line num="3103" type="stmt" count="1"/>
|
3901 |
<line num="3106" type="stmt" count="1"/>
|
3902 |
-
<line num="
|
|
|
|
|
3903 |
<line num="3112" type="stmt" count="1"/>
|
|
|
3904 |
<line num="3114" type="stmt" count="1"/>
|
3905 |
-
<line num="
|
3906 |
-
<line num="
|
3907 |
-
<line num="
|
3908 |
-
<line num="
|
3909 |
-
<line num="
|
3910 |
-
<
|
3911 |
-
<line num="3131" type="stmt" count="1"/>
|
3912 |
-
<line num="3132" type="stmt" count="1"/>
|
3913 |
-
<line num="3139" type="method" name="add_thickbox" visibility="public" complexity="2" crap="6" count="0"/>
|
3914 |
-
<line num="3140" type="stmt" count="0"/>
|
3915 |
-
<line num="3141" type="stmt" count="0"/>
|
3916 |
-
<line num="3142" type="stmt" count="0"/>
|
3917 |
-
<line num="3143" type="stmt" count="0"/>
|
3918 |
-
<metrics loc="3144" ncloc="1649" classes="1" methods="29" coveredmethods="4" conditionals="0" coveredconditionals="0" statements="1160" coveredstatements="544" elements="1189" coveredelements="548"/>
|
3919 |
</file>
|
3920 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-cron-log.php">
|
3921 |
<class name="Boldgrid_Backup_Admin_Cron_Log" namespace="global" fullPackage="Boldgrid.Backup.Admin.Cron">
|
@@ -15511,60 +15494,40 @@
|
|
15511 |
</file>
|
15512 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-file.php">
|
15513 |
<class name="Boldgrid_Backup_File" namespace="global" fullPackage="Boldgrid.Backup">
|
15514 |
-
<metrics complexity="
|
15515 |
</class>
|
15516 |
-
<line num="32" type="method" name="send_file" visibility="public" complexity="
|
15517 |
<line num="33" type="stmt" count="0"/>
|
15518 |
<line num="34" type="stmt" count="0"/>
|
15519 |
-
<line num="35" type="stmt" count="0"/>
|
15520 |
<line num="36" type="stmt" count="0"/>
|
|
|
15521 |
<line num="38" type="stmt" count="0"/>
|
15522 |
-
<line num="39" type="stmt" count="0"/>
|
15523 |
<line num="40" type="stmt" count="0"/>
|
15524 |
-
<line num="
|
15525 |
<line num="43" type="stmt" count="0"/>
|
15526 |
-
<line num="
|
15527 |
-
<line num="46" type="stmt" count="0"/>
|
15528 |
<line num="47" type="stmt" count="0"/>
|
|
|
|
|
15529 |
<line num="50" type="stmt" count="0"/>
|
15530 |
-
<line num="51" type="stmt" count="0"/>
|
15531 |
-
<line num="52" type="stmt" count="0"/>
|
15532 |
<line num="53" type="stmt" count="0"/>
|
15533 |
<line num="54" type="stmt" count="0"/>
|
15534 |
-
<line num="
|
15535 |
-
<line num="58" type="stmt" count="0"/>
|
15536 |
-
<line num="59" type="stmt" count="0"/>
|
15537 |
<line num="61" type="stmt" count="0"/>
|
15538 |
-
<line num="
|
15539 |
-
<line num="
|
15540 |
-
<line num="
|
15541 |
-
<line num="
|
|
|
|
|
|
|
15542 |
<line num="86" type="stmt" count="0"/>
|
15543 |
<line num="87" type="stmt" count="0"/>
|
15544 |
<line num="88" type="stmt" count="0"/>
|
15545 |
-
<line num="89" type="stmt" count="0"/>
|
15546 |
<line num="90" type="stmt" count="0"/>
|
|
|
15547 |
<line num="93" type="stmt" count="0"/>
|
15548 |
-
<
|
15549 |
-
<line num="95" type="stmt" count="0"/>
|
15550 |
-
<line num="96" type="stmt" count="0"/>
|
15551 |
-
<line num="97" type="stmt" count="0"/>
|
15552 |
-
<line num="98" type="stmt" count="0"/>
|
15553 |
-
<line num="100" type="stmt" count="0"/>
|
15554 |
-
<line num="101" type="stmt" count="0"/>
|
15555 |
-
<line num="102" type="stmt" count="0"/>
|
15556 |
-
<line num="104" type="stmt" count="0"/>
|
15557 |
-
<line num="105" type="stmt" count="0"/>
|
15558 |
-
<line num="106" type="stmt" count="0"/>
|
15559 |
-
<line num="108" type="stmt" count="0"/>
|
15560 |
-
<line num="109" type="stmt" count="0"/>
|
15561 |
-
<line num="110" type="stmt" count="0"/>
|
15562 |
-
<line num="111" type="stmt" count="0"/>
|
15563 |
-
<line num="112" type="stmt" count="0"/>
|
15564 |
-
<line num="115" type="stmt" count="0"/>
|
15565 |
-
<line num="116" type="stmt" count="0"/>
|
15566 |
-
<line num="117" type="stmt" count="0"/>
|
15567 |
-
<metrics loc="118" ncloc="56" classes="1" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="50" coveredstatements="0" elements="51" coveredelements="0"/>
|
15568 |
</file>
|
15569 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-i18n.php">
|
15570 |
<class name="Boldgrid_Backup_I18n" namespace="global" fullPackage="Boldgrid.Backup">
|
@@ -77114,7 +77077,7 @@
|
|
77114 |
<metrics loc="445" ncloc="281" classes="1" methods="21" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="216" coveredstatements="0" elements="237" coveredelements="0"/>
|
77115 |
</file>
|
77116 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/vendor/composer/autoload_static.php">
|
77117 |
-
<class name="
|
77118 |
<metrics complexity="2" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="5" coveredstatements="0" elements="7" coveredelements="0"/>
|
77119 |
</class>
|
77120 |
<line num="91" type="method" name="getInitializer" visibility="public" complexity="1" crap="2" count="0"/>
|
@@ -77206,7 +77169,7 @@
|
|
77206 |
<metrics loc="12" ncloc="10" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="7" coveredstatements="0" elements="7" coveredelements="0"/>
|
77207 |
</file>
|
77208 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/vendor/composer/autoload_real.php">
|
77209 |
-
<class name="
|
77210 |
<metrics complexity="13" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="41" coveredstatements="0" elements="43" coveredelements="0"/>
|
77211 |
</class>
|
77212 |
<line num="9" type="method" name="loadClassLoader" visibility="public" complexity="2" crap="6" count="0"/>
|
@@ -96451,6 +96414,6 @@
|
|
96451 |
<line num="16" type="stmt" count="0"/>
|
96452 |
<metrics loc="16" ncloc="9" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="8" coveredelements="0"/>
|
96453 |
</file>
|
96454 |
-
<metrics files="964" loc="
|
96455 |
</project>
|
96456 |
</coverage>
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<coverage generated="1617116198">
|
3 |
+
<project timestamp="1617116198">
|
4 |
<package name="Boldgrid\Backup\Admin\Card">
|
5 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/card/class-amazon-s3.php">
|
6 |
<class name="Amazon_S3" namespace="Boldgrid\Backup\Admin\Card" fullPackage="Amazon">
|
2724 |
</file>
|
2725 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-core.php">
|
2726 |
<class name="Boldgrid_Backup_Admin_Core" namespace="global" fullPackage="Boldgrid.Backup.Admin">
|
2727 |
+
<metrics complexity="236" methods="29" coveredmethods="4" conditionals="0" coveredconditionals="0" statements="1136" coveredstatements="544" elements="1165" coveredelements="548"/>
|
2728 |
</class>
|
2729 |
<line num="600" type="method" name="__construct" visibility="public" complexity="8" crap="8.07" count="29"/>
|
2730 |
<line num="605" type="stmt" count="29"/>
|
3686 |
<line num="2659" type="stmt" count="0"/>
|
3687 |
<line num="2660" type="stmt" count="0"/>
|
3688 |
<line num="2672" type="method" name="download_archive_file_callback" visibility="public" complexity="10" crap="110" count="0"/>
|
|
|
3689 |
<line num="2674" type="stmt" count="0"/>
|
3690 |
+
<line num="2677" type="stmt" count="0"/>
|
3691 |
+
<line num="2678" type="stmt" count="0"/>
|
3692 |
<line num="2679" type="stmt" count="0"/>
|
3693 |
+
<line num="2680" type="stmt" count="0"/>
|
3694 |
<line num="2683" type="stmt" count="0"/>
|
3695 |
<line num="2684" type="stmt" count="0"/>
|
3696 |
<line num="2685" type="stmt" count="0"/>
|
3697 |
<line num="2686" type="stmt" count="0"/>
|
3698 |
<line num="2687" type="stmt" count="0"/>
|
|
|
3699 |
<line num="2691" type="stmt" count="0"/>
|
3700 |
<line num="2692" type="stmt" count="0"/>
|
3701 |
<line num="2693" type="stmt" count="0"/>
|
3702 |
<line num="2694" type="stmt" count="0"/>
|
3703 |
<line num="2695" type="stmt" count="0"/>
|
3704 |
+
<line num="2699" type="stmt" count="0"/>
|
|
|
|
|
3705 |
<line num="2702" type="stmt" count="0"/>
|
3706 |
<line num="2703" type="stmt" count="0"/>
|
3707 |
<line num="2704" type="stmt" count="0"/>
|
3708 |
<line num="2705" type="stmt" count="0"/>
|
3709 |
+
<line num="2708" type="stmt" count="0"/>
|
3710 |
+
<line num="2711" type="stmt" count="0"/>
|
3711 |
+
<line num="2712" type="stmt" count="0"/>
|
3712 |
<line num="2713" type="stmt" count="0"/>
|
3713 |
<line num="2714" type="stmt" count="0"/>
|
|
|
|
|
|
|
3714 |
<line num="2718" type="stmt" count="0"/>
|
3715 |
+
<line num="2719" type="stmt" count="0"/>
|
3716 |
+
<line num="2720" type="stmt" count="0"/>
|
3717 |
+
<line num="2723" type="stmt" count="0"/>
|
3718 |
<line num="2724" type="stmt" count="0"/>
|
3719 |
<line num="2725" type="stmt" count="0"/>
|
3720 |
<line num="2726" type="stmt" count="0"/>
|
|
|
3721 |
<line num="2728" type="stmt" count="0"/>
|
3722 |
+
<line num="2730" type="stmt" count="0"/>
|
3723 |
+
<line num="2732" type="stmt" count="0"/>
|
3724 |
<line num="2733" type="stmt" count="0"/>
|
3725 |
<line num="2734" type="stmt" count="0"/>
|
3726 |
+
<line num="2737" type="stmt" count="0"/>
|
3727 |
<line num="2738" type="stmt" count="0"/>
|
3728 |
+
<line num="2748" type="method" name="page_backup_test" visibility="public" complexity="6" crap="42" count="0"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3729 |
<line num="2750" type="stmt" count="0"/>
|
3730 |
+
<line num="2753" type="stmt" count="0"/>
|
|
|
|
|
3731 |
<line num="2756" type="stmt" count="0"/>
|
3732 |
+
<line num="2759" type="stmt" count="0"/>
|
3733 |
+
<line num="2762" type="stmt" count="0"/>
|
3734 |
+
<line num="2764" type="stmt" count="0"/>
|
3735 |
+
<line num="2767" type="stmt" count="0"/>
|
3736 |
+
<line num="2770" type="stmt" count="0"/>
|
3737 |
+
<line num="2773" type="stmt" count="0"/>
|
3738 |
+
<line num="2776" type="stmt" count="0"/>
|
3739 |
+
<line num="2779" type="stmt" count="0"/>
|
3740 |
+
<line num="2781" type="stmt" count="0"/>
|
3741 |
+
<line num="2789" type="stmt" count="0"/>
|
3742 |
+
<line num="2790" type="stmt" count="0"/>
|
3743 |
<line num="2791" type="stmt" count="0"/>
|
3744 |
+
<line num="2792" type="stmt" count="0"/>
|
3745 |
+
<line num="2793" type="stmt" count="0"/>
|
3746 |
+
<line num="2796" type="stmt" count="0"/>
|
3747 |
<line num="2797" type="stmt" count="0"/>
|
3748 |
+
<line num="2798" type="stmt" count="0"/>
|
3749 |
<line num="2799" type="stmt" count="0"/>
|
3750 |
+
<line num="2800" type="stmt" count="0"/>
|
3751 |
+
<line num="2801" type="stmt" count="0"/>
|
3752 |
+
<line num="2802" type="stmt" count="0"/>
|
3753 |
+
<line num="2803" type="stmt" count="0"/>
|
3754 |
+
<line num="2805" type="stmt" count="0"/>
|
3755 |
<line num="2808" type="stmt" count="0"/>
|
3756 |
<line num="2809" type="stmt" count="0"/>
|
3757 |
<line num="2810" type="stmt" count="0"/>
|
3758 |
<line num="2811" type="stmt" count="0"/>
|
3759 |
+
<line num="2812" type="stmt" count="0"/>
|
3760 |
+
<line num="2813" type="stmt" count="0"/>
|
3761 |
<line num="2815" type="stmt" count="0"/>
|
3762 |
<line num="2816" type="stmt" count="0"/>
|
3763 |
<line num="2817" type="stmt" count="0"/>
|
|
|
3764 |
<line num="2819" type="stmt" count="0"/>
|
3765 |
<line num="2820" type="stmt" count="0"/>
|
3766 |
<line num="2821" type="stmt" count="0"/>
|
3767 |
<line num="2823" type="stmt" count="0"/>
|
3768 |
+
<line num="2824" type="stmt" count="0"/>
|
3769 |
<line num="2826" type="stmt" count="0"/>
|
3770 |
<line num="2827" type="stmt" count="0"/>
|
3771 |
<line num="2828" type="stmt" count="0"/>
|
|
|
|
|
|
|
|
|
|
|
3772 |
<line num="2835" type="stmt" count="0"/>
|
3773 |
<line num="2837" type="stmt" count="0"/>
|
3774 |
<line num="2838" type="stmt" count="0"/>
|
3775 |
+
<line num="2840" type="stmt" count="0"/>
|
|
|
|
|
|
|
3776 |
<line num="2845" type="stmt" count="0"/>
|
3777 |
<line num="2846" type="stmt" count="0"/>
|
3778 |
+
<line num="2847" type="stmt" count="0"/>
|
3779 |
+
<line num="2851" type="stmt" count="0"/>
|
3780 |
+
<line num="2852" type="stmt" count="0"/>
|
3781 |
+
<line num="2867" type="method" name="set_doing_cron" visibility="public" complexity="3" crap="3" count="29"/>
|
3782 |
+
<line num="2868" type="stmt" count="29"/>
|
3783 |
+
<line num="2869" type="stmt" count="29"/>
|
3784 |
+
<line num="2876" type="method" name="set_lang" visibility="public" complexity="1" crap="1" count="29"/>
|
3785 |
+
<line num="2881" type="stmt" count="29"/>
|
3786 |
+
<line num="2883" type="stmt" count="29"/>
|
3787 |
+
<line num="2884" type="stmt" count="29"/>
|
3788 |
+
<line num="2885" type="stmt" count="29"/>
|
3789 |
<line num="2886" type="stmt" count="29"/>
|
3790 |
<line num="2887" type="stmt" count="29"/>
|
3791 |
+
<line num="2888" type="stmt" count="29"/>
|
3792 |
+
<line num="2890" type="stmt" count="29"/>
|
3793 |
+
<line num="2891" type="stmt" count="29"/>
|
3794 |
+
<line num="2893" type="stmt" count="29"/>
|
3795 |
+
<line num="2894" type="stmt" count="29"/>
|
3796 |
+
<line num="2895" type="stmt" count="29"/>
|
3797 |
+
<line num="2896" type="stmt" count="29"/>
|
3798 |
+
<line num="2897" type="stmt" count="29"/>
|
3799 |
+
<line num="2898" type="stmt" count="29"/>
|
3800 |
+
<line num="2900" type="stmt" count="29"/>
|
3801 |
<line num="2901" type="stmt" count="29"/>
|
3802 |
<line num="2902" type="stmt" count="29"/>
|
|
|
|
|
|
|
|
|
3803 |
<line num="2908" type="stmt" count="29"/>
|
3804 |
+
<line num="2910" type="stmt" count="29"/>
|
3805 |
<line num="2911" type="stmt" count="29"/>
|
3806 |
<line num="2912" type="stmt" count="29"/>
|
3807 |
<line num="2913" type="stmt" count="29"/>
|
3808 |
<line num="2914" type="stmt" count="29"/>
|
|
|
3809 |
<line num="2916" type="stmt" count="29"/>
|
|
|
3810 |
<line num="2919" type="stmt" count="29"/>
|
3811 |
<line num="2920" type="stmt" count="29"/>
|
3812 |
+
<line num="2922" type="stmt" count="29"/>
|
3813 |
+
<line num="2924" type="stmt" count="29"/>
|
3814 |
+
<line num="2936" type="method" name="set_time_limit" visibility="public" complexity="2" crap="2" count="4"/>
|
3815 |
+
<line num="2937" type="stmt" count="4"/>
|
3816 |
+
<line num="2939" type="stmt" count="4"/>
|
3817 |
+
<line num="2940" type="stmt" count="4"/>
|
3818 |
+
<line num="2947" type="method" name="wp_ajax_restore" visibility="public" complexity="6" crap="42" count="0"/>
|
3819 |
+
<line num="2948" type="stmt" count="0"/>
|
3820 |
+
<line num="2949" type="stmt" count="0"/>
|
3821 |
+
<line num="2952" type="stmt" count="0"/>
|
3822 |
+
<line num="2953" type="stmt" count="0"/>
|
3823 |
+
<line num="2954" type="stmt" count="0"/>
|
3824 |
+
<line num="2956" type="stmt" count="0"/>
|
3825 |
+
<line num="2957" type="stmt" count="0"/>
|
3826 |
+
<line num="2958" type="stmt" count="0"/>
|
3827 |
+
<line num="2961" type="stmt" count="0"/>
|
3828 |
+
<line num="2962" type="stmt" count="0"/>
|
3829 |
+
<line num="2963" type="stmt" count="0"/>
|
3830 |
+
<line num="2965" type="stmt" count="0"/>
|
3831 |
<line num="2966" type="stmt" count="0"/>
|
3832 |
<line num="2967" type="stmt" count="0"/>
|
3833 |
+
<line num="2969" type="stmt" count="0"/>
|
3834 |
+
<line num="2982" type="stmt" count="0"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3835 |
<line num="2983" type="stmt" count="0"/>
|
|
|
3836 |
<line num="2985" type="stmt" count="0"/>
|
3837 |
+
<line num="2986" type="stmt" count="0"/>
|
3838 |
<line num="2987" type="stmt" count="0"/>
|
3839 |
+
<line num="2988" type="stmt" count="0"/>
|
3840 |
+
<line num="2989" type="stmt" count="0"/>
|
3841 |
+
<line num="2991" type="stmt" count="0"/>
|
3842 |
+
<line num="2992" type="stmt" count="0"/>
|
3843 |
+
<line num="2993" type="stmt" count="0"/>
|
3844 |
+
<line num="2994" type="stmt" count="0"/>
|
3845 |
+
<line num="2996" type="stmt" count="0"/>
|
3846 |
+
<line num="2998" type="stmt" count="0"/>
|
3847 |
+
<line num="2999" type="stmt" count="0"/>
|
3848 |
+
<line num="3015" type="method" name="boldgrid_backup_now_auto" visibility="public" complexity="4" crap="20" count="0"/>
|
|
|
|
|
|
|
3849 |
<line num="3017" type="stmt" count="0"/>
|
3850 |
+
<line num="3019" type="stmt" count="0"/>
|
3851 |
+
<line num="3020" type="stmt" count="0"/>
|
3852 |
+
<line num="3024" type="stmt" count="0"/>
|
3853 |
+
<line num="3027" type="stmt" count="0"/>
|
3854 |
+
<line num="3028" type="stmt" count="0"/>
|
3855 |
+
<line num="3032" type="stmt" count="0"/>
|
3856 |
+
<line num="3033" type="stmt" count="0"/>
|
3857 |
+
<line num="3044" type="method" name="enforce_retention" visibility="public" complexity="8" crap="8.07" count="4"/>
|
3858 |
+
<line num="3045" type="stmt" count="4"/>
|
3859 |
+
<line num="3046" type="stmt" count="4"/>
|
3860 |
+
<line num="3047" type="stmt" count="4"/>
|
3861 |
+
<line num="3049" type="stmt" count="4"/>
|
3862 |
+
<line num="3050" type="stmt" count="4"/>
|
3863 |
+
<line num="3052" type="stmt" count="4"/>
|
3864 |
+
<line num="3053" type="stmt" count="4"/>
|
3865 |
+
<line num="3056" type="stmt" count="4"/>
|
3866 |
+
<line num="3057" type="stmt" count="4"/>
|
3867 |
+
<line num="3058" type="stmt" count="4"/>
|
3868 |
+
<line num="3059" type="stmt" count="4"/>
|
3869 |
+
<line num="3060" type="stmt" count="0"/>
|
3870 |
+
<line num="3061" type="stmt" count="0"/>
|
3871 |
+
<line num="3062" type="stmt" count="0"/>
|
3872 |
<line num="3063" type="stmt" count="4"/>
|
3873 |
<line num="3064" type="stmt" count="4"/>
|
3874 |
<line num="3065" type="stmt" count="4"/>
|
|
|
3875 |
<line num="3068" type="stmt" count="4"/>
|
|
|
3876 |
<line num="3071" type="stmt" count="4"/>
|
3877 |
+
<line num="3072" type="stmt" count="4"/>
|
3878 |
+
<line num="3073" type="stmt" count="4"/>
|
3879 |
+
<line num="3077" type="stmt" count="1"/>
|
3880 |
+
<line num="3080" type="stmt" count="1"/>
|
3881 |
+
<line num="3083" type="stmt" count="1"/>
|
3882 |
+
<line num="3084" type="stmt" count="1"/>
|
3883 |
+
<line num="3085" type="stmt" count="1"/>
|
3884 |
+
<line num="3088" type="stmt" count="1"/>
|
3885 |
+
<line num="3091" type="stmt" count="1"/>
|
3886 |
+
<line num="3094" type="stmt" count="1"/>
|
3887 |
+
<line num="3096" type="stmt" count="1"/>
|
3888 |
+
<line num="3097" type="stmt" count="1"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3889 |
<line num="3106" type="stmt" count="1"/>
|
3890 |
+
<line num="3107" type="stmt" count="1"/>
|
3891 |
+
<line num="3108" type="stmt" count="0"/>
|
3892 |
+
<line num="3110" type="stmt" count="1"/>
|
3893 |
<line num="3112" type="stmt" count="1"/>
|
3894 |
+
<line num="3113" type="stmt" count="1"/>
|
3895 |
<line num="3114" type="stmt" count="1"/>
|
3896 |
+
<line num="3121" type="method" name="add_thickbox" visibility="public" complexity="2" crap="6" count="0"/>
|
3897 |
+
<line num="3122" type="stmt" count="0"/>
|
3898 |
+
<line num="3123" type="stmt" count="0"/>
|
3899 |
+
<line num="3124" type="stmt" count="0"/>
|
3900 |
+
<line num="3125" type="stmt" count="0"/>
|
3901 |
+
<metrics loc="3126" ncloc="1631" classes="1" methods="29" coveredmethods="4" conditionals="0" coveredconditionals="0" statements="1143" coveredstatements="544" elements="1172" coveredelements="548"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3902 |
</file>
|
3903 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/admin/class-boldgrid-backup-admin-cron-log.php">
|
3904 |
<class name="Boldgrid_Backup_Admin_Cron_Log" namespace="global" fullPackage="Boldgrid.Backup.Admin.Cron">
|
15494 |
</file>
|
15495 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-file.php">
|
15496 |
<class name="Boldgrid_Backup_File" namespace="global" fullPackage="Boldgrid.Backup">
|
15497 |
+
<metrics complexity="7" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="30" coveredstatements="0" elements="31" coveredelements="0"/>
|
15498 |
</class>
|
15499 |
+
<line num="32" type="method" name="send_file" visibility="public" complexity="7" crap="56" count="0"/>
|
15500 |
<line num="33" type="stmt" count="0"/>
|
15501 |
<line num="34" type="stmt" count="0"/>
|
|
|
15502 |
<line num="36" type="stmt" count="0"/>
|
15503 |
+
<line num="37" type="stmt" count="0"/>
|
15504 |
<line num="38" type="stmt" count="0"/>
|
|
|
15505 |
<line num="40" type="stmt" count="0"/>
|
15506 |
+
<line num="42" type="stmt" count="0"/>
|
15507 |
<line num="43" type="stmt" count="0"/>
|
15508 |
+
<line num="44" type="stmt" count="0"/>
|
|
|
15509 |
<line num="47" type="stmt" count="0"/>
|
15510 |
+
<line num="48" type="stmt" count="0"/>
|
15511 |
+
<line num="49" type="stmt" count="0"/>
|
15512 |
<line num="50" type="stmt" count="0"/>
|
|
|
|
|
15513 |
<line num="53" type="stmt" count="0"/>
|
15514 |
<line num="54" type="stmt" count="0"/>
|
15515 |
+
<line num="55" type="stmt" count="0"/>
|
|
|
|
|
15516 |
<line num="61" type="stmt" count="0"/>
|
15517 |
+
<line num="64" type="stmt" count="0"/>
|
15518 |
+
<line num="76" type="stmt" count="0"/>
|
15519 |
+
<line num="79" type="stmt" count="0"/>
|
15520 |
+
<line num="80" type="stmt" count="0"/>
|
15521 |
+
<line num="81" type="stmt" count="0"/>
|
15522 |
+
<line num="82" type="stmt" count="0"/>
|
15523 |
+
<line num="85" type="stmt" count="0"/>
|
15524 |
<line num="86" type="stmt" count="0"/>
|
15525 |
<line num="87" type="stmt" count="0"/>
|
15526 |
<line num="88" type="stmt" count="0"/>
|
|
|
15527 |
<line num="90" type="stmt" count="0"/>
|
15528 |
+
<line num="92" type="stmt" count="0"/>
|
15529 |
<line num="93" type="stmt" count="0"/>
|
15530 |
+
<metrics loc="94" ncloc="34" classes="1" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="30" coveredstatements="0" elements="31" coveredelements="0"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15531 |
</file>
|
15532 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/includes/class-boldgrid-backup-i18n.php">
|
15533 |
<class name="Boldgrid_Backup_I18n" namespace="global" fullPackage="Boldgrid.Backup">
|
77077 |
<metrics loc="445" ncloc="281" classes="1" methods="21" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="216" coveredstatements="0" elements="237" coveredelements="0"/>
|
77078 |
</file>
|
77079 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/vendor/composer/autoload_static.php">
|
77080 |
+
<class name="ComposerStaticInit3efe4958b777ab906d3b3c5c48389844" namespace="Composer\Autoload">
|
77081 |
<metrics complexity="2" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="5" coveredstatements="0" elements="7" coveredelements="0"/>
|
77082 |
</class>
|
77083 |
<line num="91" type="method" name="getInitializer" visibility="public" complexity="1" crap="2" count="0"/>
|
77169 |
<metrics loc="12" ncloc="10" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="7" coveredstatements="0" elements="7" coveredelements="0"/>
|
77170 |
</file>
|
77171 |
<file name="/home/travis/build/BoldGrid/boldgrid-backup/vendor/composer/autoload_real.php">
|
77172 |
+
<class name="ComposerAutoloaderInit3efe4958b777ab906d3b3c5c48389844" namespace="global">
|
77173 |
<metrics complexity="13" methods="2" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="41" coveredstatements="0" elements="43" coveredelements="0"/>
|
77174 |
</class>
|
77175 |
<line num="9" type="method" name="loadClassLoader" visibility="public" complexity="2" crap="6" count="0"/>
|
96414 |
<line num="16" type="stmt" count="0"/>
|
96415 |
<metrics loc="16" ncloc="9" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="8" coveredelements="0"/>
|
96416 |
</file>
|
96417 |
+
<metrics files="964" loc="193774" ncloc="118066" classes="872" methods="3606" coveredmethods="311" conditionals="0" coveredconditionals="0" statements="86885" coveredstatements="4602" elements="90491" coveredelements="4913"/>
|
96418 |
</project>
|
96419 |
</coverage>
|
includes/class-boldgrid-backup-file.php
CHANGED
@@ -30,35 +30,28 @@ class Boldgrid_Backup_File {
|
|
30 |
* @param int $filesize File size (optional).
|
31 |
*/
|
32 |
public static function send_file( $filepath, $filesize = null ) {
|
33 |
-
|
34 |
-
|
35 |
-
$log->init( 'backup-download.log' );
|
36 |
-
$log->add( 'Initializing send_file() method...' );
|
37 |
|
38 |
-
if ( empty( $filepath ) || ! $
|
39 |
-
$log->add( 'Invalid filepath.' );
|
40 |
wp_redirect( get_site_url(), 404 );
|
41 |
}
|
42 |
|
43 |
$filename = basename( $filepath );
|
44 |
|
45 |
if ( empty( $filesize ) ) {
|
46 |
-
$filesize = $
|
47 |
}
|
48 |
|
49 |
// Send header.
|
50 |
-
$log->add( 'Sending headers...' );
|
51 |
header( 'Content-Disposition: attachment; filename="' . $filename . '"' );
|
52 |
header( 'Content-Transfer-Encoding: binary' );
|
53 |
header( 'Content-Type: binary/octet-stream' );
|
54 |
header( 'Content-Length: ' . $filesize );
|
55 |
|
56 |
-
//
|
57 |
-
|
58 |
-
|
59 |
-
$log->add( 'ob level ' . $ob_level . ' contents preview: ' . substr( $buffer_contents, 0, 100 ) );
|
60 |
-
|
61 |
-
$log->add( 'Calling ob_end_clean()... ' . ( ob_end_clean() ? 'Success' : 'Fail' ) );
|
62 |
}
|
63 |
|
64 |
/*
|
@@ -85,34 +78,17 @@ class Boldgrid_Backup_File {
|
|
85 |
// If we can't open the file, abort.
|
86 |
$handle = fopen( $filepath, 'rb' ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fopen
|
87 |
if ( false === $handle ) {
|
88 |
-
$log->add( 'Invalid handle. fopen failed.' );
|
89 |
wp_die();
|
90 |
}
|
91 |
|
92 |
// Loop through the file and send it 1MB at a time.
|
93 |
-
$buffer_size = 1024 * 1024;
|
94 |
-
$log->add( 'Beginnig to send file... Buffer size: ' . size_format( $buffer_size, 2 ) );
|
95 |
while ( ! feof( $handle ) ) {
|
96 |
-
$
|
97 |
-
$buffer = fread( $handle, $buffer_size ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fread
|
98 |
-
$duration_read = microtime( true ) - $time_start_read;
|
99 |
-
|
100 |
-
$time_start_send = microtime( true );
|
101 |
echo $buffer; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
102 |
-
$duration_send = microtime( true ) - $time_start_send;
|
103 |
-
|
104 |
-
$log->add( 'Buffer read in ' . round( $duration_read, 4 ) . ' seconds and sent in ' . round( $duration_send, 4 ) . ' seconds.' );
|
105 |
}
|
106 |
-
$log->add( 'Finished sending file.' );
|
107 |
|
108 |
-
|
109 |
-
if ( fclose( $handle ) ) { // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fclose
|
110 |
-
$log->add( 'File closed successfully.' );
|
111 |
-
} else {
|
112 |
-
$log->add( 'Error closing file.' );
|
113 |
-
}
|
114 |
|
115 |
-
$log->add( 'send_file() method complete. Ending with wp_die().' );
|
116 |
wp_die();
|
117 |
}
|
118 |
}
|
30 |
* @param int $filesize File size (optional).
|
31 |
*/
|
32 |
public static function send_file( $filepath, $filesize = null ) {
|
33 |
+
WP_Filesystem();
|
34 |
+
global $wp_filesystem;
|
|
|
|
|
35 |
|
36 |
+
if ( empty( $filepath ) || ! $wp_filesystem->exists( $filepath ) ) {
|
|
|
37 |
wp_redirect( get_site_url(), 404 );
|
38 |
}
|
39 |
|
40 |
$filename = basename( $filepath );
|
41 |
|
42 |
if ( empty( $filesize ) ) {
|
43 |
+
$filesize = $wp_filesystem->size( $filepath );
|
44 |
}
|
45 |
|
46 |
// Send header.
|
|
|
47 |
header( 'Content-Disposition: attachment; filename="' . $filename . '"' );
|
48 |
header( 'Content-Transfer-Encoding: binary' );
|
49 |
header( 'Content-Type: binary/octet-stream' );
|
50 |
header( 'Content-Length: ' . $filesize );
|
51 |
|
52 |
+
// Check and flush output buffer if needed.
|
53 |
+
if ( 0 !== ob_get_level() ) {
|
54 |
+
ob_end_flush();
|
|
|
|
|
|
|
55 |
}
|
56 |
|
57 |
/*
|
78 |
// If we can't open the file, abort.
|
79 |
$handle = fopen( $filepath, 'rb' ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fopen
|
80 |
if ( false === $handle ) {
|
|
|
81 |
wp_die();
|
82 |
}
|
83 |
|
84 |
// Loop through the file and send it 1MB at a time.
|
|
|
|
|
85 |
while ( ! feof( $handle ) ) {
|
86 |
+
$buffer = fread( $handle, 1024 * 1024 ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fread
|
|
|
|
|
|
|
|
|
87 |
echo $buffer; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
|
|
|
|
|
|
88 |
}
|
|
|
89 |
|
90 |
+
fclose( $handle ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fclose
|
|
|
|
|
|
|
|
|
|
|
91 |
|
|
|
92 |
wp_die();
|
93 |
}
|
94 |
}
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit3efe4958b777ab906d3b3c5c48389844::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInitb4e140382c8f7d1b833aa24902b50159
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
@@ -51,19 +51,19 @@ class ComposerAutoloaderInitb4e140382c8f7d1b833aa24902b50159
|
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
-
$includeFiles = Composer\Autoload\
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
-
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
-
function
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit3efe4958b777ab906d3b3c5c48389844
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit3efe4958b777ab906d3b3c5c48389844', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit3efe4958b777ab906d3b3c5c48389844', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit3efe4958b777ab906d3b3c5c48389844::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit3efe4958b777ab906d3b3c5c48389844::$files;
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
+
composerRequire3efe4958b777ab906d3b3c5c48389844($fileIdentifier, $file);
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
+
function composerRequire3efe4958b777ab906d3b3c5c48389844($fileIdentifier, $file)
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
|
@@ -91,9 +91,9 @@ class ComposerStaticInitb4e140382c8f7d1b833aa24902b50159
|
|
91 |
public static function getInitializer(ClassLoader $loader)
|
92 |
{
|
93 |
return \Closure::bind(function () use ($loader) {
|
94 |
-
$loader->prefixLengthsPsr4 =
|
95 |
-
$loader->prefixDirsPsr4 =
|
96 |
-
$loader->classMap =
|
97 |
|
98 |
}, null, ClassLoader::class);
|
99 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit3efe4958b777ab906d3b3c5c48389844
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
|
91 |
public static function getInitializer(ClassLoader $loader)
|
92 |
{
|
93 |
return \Closure::bind(function () use ($loader) {
|
94 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit3efe4958b777ab906d3b3c5c48389844::$prefixLengthsPsr4;
|
95 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit3efe4958b777ab906d3b3c5c48389844::$prefixDirsPsr4;
|
96 |
+
$loader->classMap = ComposerStaticInit3efe4958b777ab906d3b3c5c48389844::$classMap;
|
97 |
|
98 |
}, null, ClassLoader::class);
|
99 |
}
|