| @@ -16,8 +16,16 @@ | ||
| 16 | 16 | */ |
| 17 | 17 | class phpBB extends BBP_Converter_Base { |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | + * Main Constructor | |
| 21 | + * | |
| 22 | + */ | |
| 23 | + public function __construct() { | |
| 24 | + parent::__construct(); | |
| 25 | + } | |
| 26 | + | |
| 27 | + /** | |
| 20 | 28 | * Sets up the field mappings |
| 21 | 29 | */ |
| 22 | 30 | public function setup_globals() { |
| 23 | 31 | |
| @@ -132,24 +140,24 @@ | ||
| 132 | 140 | // Forum dates. |
| 133 | 141 | $this->field_map[] = array( |
| 134 | 142 | 'to_type' => 'forum', |
| 135 | 143 | 'to_fieldname' => 'post_date', |
| 136 | - 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore | |
| 144 | + 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date | |
| 137 | 145 | ); |
| 138 | 146 | $this->field_map[] = array( |
| 139 | 147 | 'to_type' => 'forum', |
| 140 | 148 | 'to_fieldname' => 'post_date_gmt', |
| 141 | - 'default' => gmdate( 'Y-m-d H:i:s' ) | |
| 149 | + 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date | |
| 142 | 150 | ); |
| 143 | 151 | $this->field_map[] = array( |
| 144 | 152 | 'to_type' => 'forum', |
| 145 | 153 | 'to_fieldname' => 'post_modified', |
| 146 | - 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore | |
| 154 | + 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date | |
| 147 | 155 | ); |
| 148 | 156 | $this->field_map[] = array( |
| 149 | 157 | 'to_type' => 'forum', |
| 150 | 158 | 'to_fieldname' => 'post_modified_gmt', |
| 151 | - 'default' => gmdate( 'Y-m-d H:i:s' ) | |
| 159 | + 'default' => date( 'Y-m-d H:i:s' ) // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date | |
| 152 | 160 | ); |
| 153 | 161 | |
| 154 | 162 | /** Forum Subscriptions Section ***************************************/ |
| 155 | 163 | |
| @@ -734,9 +742,9 @@ | ||
| 734 | 742 | $pass_array = unserialize( |
| 735 | 743 | $serialized_pass, |
| 736 | 744 | array( |
| 737 | 745 | 'allowed_classes' => false, |
| 738 | - 'max_depth' => 1, | |
| 746 | + 'max_depth' => 1 | |
| 739 | 747 | ) |
| 740 | 748 | ); |
| 741 | 749 | |
| 742 | 750 | // Encrypted |
| @@ -746,9 +754,9 @@ | ||
| 746 | 754 | $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; |
| 747 | 755 | |
| 748 | 756 | // Compare using private crypt |
| 749 | 757 | return hash_equals( |
| 750 | - $this->hash_crypt_private( $password, $pass_array['hash'], $itoa64 ), | |
| 758 | + $this->_hash_crypt_private( $password, $pass_array['hash'], $itoa64 ), | |
| 751 | 759 | $pass_array['hash'] |
| 752 | 760 | ); |
| 753 | 761 | } |
| 754 | 762 | |
| @@ -761,9 +769,9 @@ | ||
| 761 | 769 | |
| 762 | 770 | /** |
| 763 | 771 | * The crypt function/replacement |
| 764 | 772 | */ |
| 765 | - private function hash_crypt_private( $password, $setting, &$itoa64 ) { | |
| 773 | + private function _hash_crypt_private( $password, $setting, &$itoa64 ) { | |
| 766 | 774 | $output = '*'; |
| 767 | 775 | |
| 768 | 776 | // Check for correct hash |
| 769 | 777 | if ( substr( $setting, 0, 3 ) !== '$H$' ) { |
| @@ -803,9 +811,9 @@ | ||
| 803 | 811 | } while ( --$count ); |
| 804 | 812 | } |
| 805 | 813 | |
| 806 | 814 | $output = substr( $setting, 0, 12 ); |
| 807 | - $output .= $this->hash_encode64( $hash, 16, $itoa64 ); | |
| 815 | + $output .= $this->_hash_encode64( $hash, 16, $itoa64 ); | |
| 808 | 816 | |
| 809 | 817 | return $output; |
| 810 | 818 | } |
| 811 | 819 | |
| @@ -811,9 +819,9 @@ | ||
| 811 | 819 | |
| 812 | 820 | /** |
| 813 | 821 | * Encode hash |
| 814 | 822 | */ |
| 815 | - private function hash_encode64( $input, $count, &$itoa64 ) { | |
| 823 | + private function _hash_encode64( $input, $count, &$itoa64 ) { | |
| 816 | 824 | $output = ''; |
| 817 | 825 | $i = 0; |
| 818 | 826 | |
| 819 | 827 | do { |