@@ -13,13 +13,13 @@ discard block |
||
| 13 | 13 | //(all other times it gets resurrected from a wordpress option) |
| 14 | 14 | $stages = glob(EE_CORE.'data_migration_scripts/4_8_0_stages/*'); |
| 15 | 15 | $class_to_filepath = array(); |
| 16 | -foreach($stages as $filepath){ |
|
| 16 | +foreach ($stages as $filepath) { |
|
| 17 | 17 | $matches = array(); |
| 18 | - preg_match('~4_8_0_stages/(.*).dmsstage.php~',$filepath,$matches); |
|
| 18 | + preg_match('~4_8_0_stages/(.*).dmsstage.php~', $filepath, $matches); |
|
| 19 | 19 | $class_to_filepath[$matches[1]] = $filepath; |
| 20 | 20 | } |
| 21 | 21 | //give addons a chance to autoload their stages too |
| 22 | -$class_to_filepath = apply_filters('FHEE__EE_DMS_4_8_0__autoloaded_stages',$class_to_filepath); |
|
| 22 | +$class_to_filepath = apply_filters('FHEE__EE_DMS_4_8_0__autoloaded_stages', $class_to_filepath); |
|
| 23 | 23 | EEH_Autoloader::register_autoloader($class_to_filepath); |
| 24 | 24 | |
| 25 | 25 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * @since 4.6.0 |
| 36 | 36 | * |
| 37 | 37 | */ |
| 38 | -class EE_DMS_Core_4_8_0 extends EE_Data_Migration_Script_Base{ |
|
| 38 | +class EE_DMS_Core_4_8_0 extends EE_Data_Migration_Script_Base { |
|
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * return EE_DMS_Core_4_8_0 |
@@ -62,14 +62,14 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function can_migrate_from_version($version_array) { |
| 64 | 64 | $version_string = $version_array['Core']; |
| 65 | - if( $version_string <= '4.8.0' && $version_string >= '4.7.0' ){ |
|
| 65 | + if ($version_string <= '4.8.0' && $version_string >= '4.7.0') { |
|
| 66 | 66 | // echo "$version_string can be migrated from"; |
| 67 | 67 | return true; |
| 68 | - }elseif( ! $version_string ){ |
|
| 68 | + }elseif ( ! $version_string) { |
|
| 69 | 69 | // echo "no version string provided: $version_string"; |
| 70 | 70 | //no version string provided... this must be pre 4.3 |
| 71 | - return false;//changed mind. dont want people thinking they should migrate yet because they cant |
|
| 72 | - }else{ |
|
| 71 | + return false; //changed mind. dont want people thinking they should migrate yet because they cant |
|
| 72 | + } else { |
|
| 73 | 73 | // echo "$version_string doesnt apply"; |
| 74 | 74 | return false; |
| 75 | 75 | } |
@@ -90,19 +90,19 @@ discard block |
||
| 90 | 90 | * @return bool |
| 91 | 91 | */ |
| 92 | 92 | public function schema_changes_before_migration() { |
| 93 | - require_once( EE_HELPERS . 'EEH_Activation.helper.php' ); |
|
| 94 | - $now_in_mysql = current_time( 'mysql', true ); |
|
| 93 | + require_once(EE_HELPERS.'EEH_Activation.helper.php'); |
|
| 94 | + $now_in_mysql = current_time('mysql', true); |
|
| 95 | 95 | |
| 96 | - require_once( EE_HELPERS . 'EEH_Activation.helper.php' ); |
|
| 97 | - $table_name='esp_answer'; |
|
| 98 | - $sql=" ANS_ID int(10) unsigned NOT NULL AUTO_INCREMENT, |
|
| 96 | + require_once(EE_HELPERS.'EEH_Activation.helper.php'); |
|
| 97 | + $table_name = 'esp_answer'; |
|
| 98 | + $sql = " ANS_ID int(10) unsigned NOT NULL AUTO_INCREMENT, |
|
| 99 | 99 | REG_ID int(10) unsigned NOT NULL, |
| 100 | 100 | QST_ID int(10) unsigned NOT NULL, |
| 101 | 101 | ANS_value text NOT NULL, |
| 102 | 102 | PRIMARY KEY (ANS_ID), |
| 103 | 103 | KEY REG_ID (REG_ID), |
| 104 | 104 | KEY QST_ID (QST_ID)"; |
| 105 | - $this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB'); |
|
| 105 | + $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 106 | 106 | |
| 107 | 107 | $table_name = 'esp_attendee_meta'; |
| 108 | 108 | $sql = "ATTM_ID int(10) unsigned NOT NULL AUTO_INCREMENT, |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | CNT_is_EU tinyint(1) DEFAULT '0', |
| 143 | 143 | CNT_active tinyint(1) DEFAULT '0', |
| 144 | 144 | PRIMARY KEY (CNT_ISO)"; |
| 145 | - $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB' ); |
|
| 145 | + $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 146 | 146 | |
| 147 | 147 | $table_name = 'esp_currency'; |
| 148 | 148 | $sql = "CUR_code varchar(6) collate utf8_bin NOT NULL, |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | CUR_dec_plc varchar(1) collate utf8_bin NOT NULL DEFAULT '2', |
| 153 | 153 | CUR_active tinyint(1) DEFAULT '0', |
| 154 | 154 | PRIMARY KEY (CUR_code)"; |
| 155 | - $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB' ); |
|
| 155 | + $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 156 | 156 | |
| 157 | 157 | |
| 158 | 158 | $table_name = 'esp_currency_payment_method'; |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | KEY EVT_ID (EVT_ID), |
| 183 | 183 | KEY DTT_is_primary (DTT_is_primary)"; |
| 184 | 184 | |
| 185 | - $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB' ); |
|
| 185 | + $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 186 | 186 | |
| 187 | 187 | $table_name = 'esp_event_meta'; |
| 188 | 188 | $sql = " |
@@ -201,41 +201,41 @@ discard block |
||
| 201 | 201 | EVT_donations tinyint(1) NULL, |
| 202 | 202 | PRIMARY KEY (EVTM_ID), |
| 203 | 203 | KEY EVT_ID (EVT_ID)"; |
| 204 | - $this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB'); |
|
| 204 | + $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 205 | 205 | |
| 206 | 206 | |
| 207 | 207 | |
| 208 | - $table_name='esp_event_question_group'; |
|
| 209 | - $sql="EQG_ID int(10) unsigned NOT NULL AUTO_INCREMENT, |
|
| 208 | + $table_name = 'esp_event_question_group'; |
|
| 209 | + $sql = "EQG_ID int(10) unsigned NOT NULL AUTO_INCREMENT, |
|
| 210 | 210 | EVT_ID bigint(20) unsigned NOT NULL, |
| 211 | 211 | QSG_ID int(10) unsigned NOT NULL, |
| 212 | 212 | EQG_primary tinyint(1) unsigned NOT NULL DEFAULT 0, |
| 213 | 213 | PRIMARY KEY (EQG_ID), |
| 214 | 214 | KEY EVT_ID (EVT_ID), |
| 215 | 215 | KEY QSG_ID (QSG_ID)"; |
| 216 | - $this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB'); |
|
| 216 | + $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 217 | 217 | |
| 218 | 218 | |
| 219 | 219 | |
| 220 | - $table_name='esp_event_venue'; |
|
| 221 | - $sql="EVV_ID int(11) NOT NULL AUTO_INCREMENT, |
|
| 220 | + $table_name = 'esp_event_venue'; |
|
| 221 | + $sql = "EVV_ID int(11) NOT NULL AUTO_INCREMENT, |
|
| 222 | 222 | EVT_ID bigint(20) unsigned NOT NULL, |
| 223 | 223 | VNU_ID bigint(20) unsigned NOT NULL, |
| 224 | 224 | EVV_primary tinyint(1) unsigned NOT NULL DEFAULT 0, |
| 225 | 225 | PRIMARY KEY (EVV_ID)"; |
| 226 | - $this->_table_has_not_changed_since_previous($table_name,$sql, 'ENGINE=InnoDB'); |
|
| 226 | + $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 227 | 227 | |
| 228 | 228 | |
| 229 | 229 | |
| 230 | - $table_name='esp_extra_meta'; |
|
| 231 | - $sql="EXM_ID int(11) NOT NULL AUTO_INCREMENT, |
|
| 230 | + $table_name = 'esp_extra_meta'; |
|
| 231 | + $sql = "EXM_ID int(11) NOT NULL AUTO_INCREMENT, |
|
| 232 | 232 | OBJ_ID int(11) DEFAULT NULL, |
| 233 | 233 | EXM_type varchar(45) DEFAULT NULL, |
| 234 | 234 | EXM_key varchar(45) DEFAULT NULL, |
| 235 | 235 | EXM_value text, |
| 236 | 236 | PRIMARY KEY (EXM_ID), |
| 237 | 237 | KEY EXM_type (EXM_type,OBJ_ID,EXM_key)"; |
| 238 | - $this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB'); |
|
| 238 | + $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 239 | 239 | |
| 240 | 240 | $table_name = 'esp_extra_join'; |
| 241 | 241 | $sql = "EXJ_ID int(11) NOT NULL AUTO_INCREMENT, |
@@ -248,8 +248,8 @@ discard block |
||
| 248 | 248 | KEY second_model (EXJ_second_model_name,EXJ_second_model_id)"; |
| 249 | 249 | $this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB '); |
| 250 | 250 | |
| 251 | - $table_name='esp_line_item'; |
|
| 252 | - $sql="LIN_ID int(11) NOT NULL AUTO_INCREMENT, |
|
| 251 | + $table_name = 'esp_line_item'; |
|
| 252 | + $sql = "LIN_ID int(11) NOT NULL AUTO_INCREMENT, |
|
| 253 | 253 | LIN_code varchar(245) NOT NULL DEFAULT '', |
| 254 | 254 | TXN_ID int(11) DEFAULT NULL, |
| 255 | 255 | LIN_name varchar(245) NOT NULL DEFAULT '', |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | PRIMARY KEY (LIN_ID), |
| 269 | 269 | KEY LIN_code (LIN_code(191)), |
| 270 | 270 | KEY TXN_ID (TXN_ID)"; |
| 271 | - $this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB' ); |
|
| 271 | + $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 272 | 272 | |
| 273 | 273 | $table_name = 'esp_log'; |
| 274 | 274 | $sql = "LOG_ID int(11) NOT NULL AUTO_INCREMENT, |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | MTP_is_active tinyint(1) NOT NULL DEFAULT '1', |
| 308 | 308 | PRIMARY KEY (GRP_ID), |
| 309 | 309 | KEY MTP_user_id (MTP_user_id)"; |
| 310 | - $this->_table_has_not_changed_since_previous( $table_name, $sql, 'ENGINE=InnoDB'); |
|
| 310 | + $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 311 | 311 | |
| 312 | 312 | $table_name = 'esp_event_message_template'; |
| 313 | 313 | $sql = "EMT_ID bigint(20) unsigned NOT NULL AUTO_INCREMENT, |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | PRIMARY KEY (EMT_ID), |
| 317 | 317 | KEY EVT_ID (EVT_ID), |
| 318 | 318 | KEY GRP_ID (GRP_ID)"; |
| 319 | - $this->_table_has_not_changed_since_previous( $table_name, $sql, 'ENGINE=InnoDB'); |
|
| 319 | + $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 320 | 320 | |
| 321 | 321 | |
| 322 | 322 | $table_name = 'esp_payment'; |
@@ -389,8 +389,8 @@ discard block |
||
| 389 | 389 | PRIMARY KEY (TTM_ID)"; |
| 390 | 390 | $this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB'); |
| 391 | 391 | |
| 392 | - $table_name='esp_question'; |
|
| 393 | - $sql='QST_ID int(10) unsigned NOT NULL AUTO_INCREMENT, |
|
| 392 | + $table_name = 'esp_question'; |
|
| 393 | + $sql = 'QST_ID int(10) unsigned NOT NULL AUTO_INCREMENT, |
|
| 394 | 394 | QST_display_text text NOT NULL, |
| 395 | 395 | QST_admin_label varchar(255) NOT NULL, |
| 396 | 396 | QST_system varchar(25) NOT NULL DEFAULT "", |
@@ -404,22 +404,22 @@ discard block |
||
| 404 | 404 | QST_deleted tinyint(2) unsigned NOT NULL DEFAULT 0, |
| 405 | 405 | PRIMARY KEY (QST_ID), |
| 406 | 406 | KEY QST_order (QST_order)'; |
| 407 | - $this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB'); |
|
| 407 | + $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 408 | 408 | |
| 409 | - $table_name='esp_question_group_question'; |
|
| 410 | - $sql="QGQ_ID int(10) unsigned NOT NULL AUTO_INCREMENT, |
|
| 409 | + $table_name = 'esp_question_group_question'; |
|
| 410 | + $sql = "QGQ_ID int(10) unsigned NOT NULL AUTO_INCREMENT, |
|
| 411 | 411 | QSG_ID int(10) unsigned NOT NULL, |
| 412 | 412 | QST_ID int(10) unsigned NOT NULL, |
| 413 | 413 | QGQ_order int(10) unsigned NOT NULL DEFAULT 0, |
| 414 | 414 | PRIMARY KEY (QGQ_ID), |
| 415 | 415 | KEY QST_ID (QST_ID), |
| 416 | 416 | KEY QSG_ID_order (QSG_ID,QGQ_order)"; |
| 417 | - $this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB'); |
|
| 417 | + $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 418 | 418 | |
| 419 | 419 | |
| 420 | 420 | |
| 421 | - $table_name='esp_question_option'; |
|
| 422 | - $sql="QSO_ID int(10) unsigned NOT NULL AUTO_INCREMENT, |
|
| 421 | + $table_name = 'esp_question_option'; |
|
| 422 | + $sql = "QSO_ID int(10) unsigned NOT NULL AUTO_INCREMENT, |
|
| 423 | 423 | QSO_value varchar(255) NOT NULL, |
| 424 | 424 | QSO_desc text NOT NULL, |
| 425 | 425 | QST_ID int(10) unsigned NOT NULL, |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | PRIMARY KEY (QSO_ID), |
| 430 | 430 | KEY QST_ID (QST_ID), |
| 431 | 431 | KEY QSO_order (QSO_order)"; |
| 432 | - $this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB'); |
|
| 432 | + $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 433 | 433 | |
| 434 | 434 | |
| 435 | 435 | |
@@ -475,8 +475,8 @@ discard block |
||
| 475 | 475 | |
| 476 | 476 | |
| 477 | 477 | |
| 478 | - $table_name='esp_checkin'; |
|
| 479 | - $sql="CHK_ID int(10) unsigned NOT NULL AUTO_INCREMENT, |
|
| 478 | + $table_name = 'esp_checkin'; |
|
| 479 | + $sql = "CHK_ID int(10) unsigned NOT NULL AUTO_INCREMENT, |
|
| 480 | 480 | REG_ID int(10) unsigned NOT NULL, |
| 481 | 481 | DTT_ID int(10) unsigned NOT NULL, |
| 482 | 482 | CHK_in tinyint(1) unsigned NOT NULL DEFAULT 1, |
@@ -571,7 +571,7 @@ discard block |
||
| 571 | 571 | PRC_parent int(10) unsigned DEFAULT 0, |
| 572 | 572 | PRIMARY KEY (PRC_ID), |
| 573 | 573 | KEY PRT_ID (PRT_ID)"; |
| 574 | - $this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB'); |
|
| 574 | + $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 575 | 575 | |
| 576 | 576 | $table_name = "esp_price_type"; |
| 577 | 577 | $sql = "PRT_ID tinyint(3) unsigned NOT NULL AUTO_INCREMENT, |
@@ -609,10 +609,10 @@ discard block |
||
| 609 | 609 | TKT_deleted tinyint(1) NOT NULL DEFAULT '0', |
| 610 | 610 | PRIMARY KEY (TKT_ID), |
| 611 | 611 | KEY TKT_start_date (TKT_start_date)"; |
| 612 | - $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB' ); |
|
| 612 | + $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 613 | 613 | |
| 614 | 614 | $table_name = 'esp_question_group'; |
| 615 | - $sql='QSG_ID int(10) unsigned NOT NULL AUTO_INCREMENT, |
|
| 615 | + $sql = 'QSG_ID int(10) unsigned NOT NULL AUTO_INCREMENT, |
|
| 616 | 616 | QSG_name varchar(255) NOT NULL, |
| 617 | 617 | QSG_identifier varchar(100) NOT NULL, |
| 618 | 618 | QSG_desc text NULL, |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | PRIMARY KEY (QSG_ID), |
| 626 | 626 | UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier), |
| 627 | 627 | KEY QSG_order (QSG_order)'; |
| 628 | - $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB' ); |
|
| 628 | + $this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB'); |
|
| 629 | 629 | |
| 630 | 630 | /** @var EE_DMS_Core_4_1_0 $script_4_1_defaults */ |
| 631 | 631 | $script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0'); |
@@ -661,7 +661,7 @@ discard block |
||
| 661 | 661 | return $script_4_7_defaults->schema_changes_after_migration(); |
| 662 | 662 | } |
| 663 | 663 | |
| 664 | - public function migration_page_hooks(){ |
|
| 664 | + public function migration_page_hooks() { |
|
| 665 | 665 | |
| 666 | 666 | } |
| 667 | 667 | |
@@ -675,19 +675,19 @@ discard block |
||
| 675 | 675 | //CNT_ISO, CNT_ISO3, RGN_ID, CNT_name, CNT_cur_code, CNT_cur_single, CNT_cur_plural, CNT_cur_sign, CNT_cur_sign_b4, CNT_cur_dec_plc, CNT_tel_code, CNT_is_EU, CNT_active |
| 676 | 676 | //('AD', 'AND', 0, 'Andorra', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+376', 0, 0), |
| 677 | 677 | $newer_countries = array( |
| 678 | - array( 'AX', 'ALA', 0, 'Alan Islands', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+358', 1, 0 ), |
|
| 679 | - array( 'BL', 'BLM', 0, 'Saint Barthelemy', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+590', 1, 0 ), |
|
| 680 | - array( 'CW', 'CUW', 0, 'Curacao', 'ANG', 'Guilder', 'Guilders', 'ƒ', 1, 2, '+599', 1, 0 ), |
|
| 681 | - array( 'GG', 'GGY', 0, 'Guernsey', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+44', 0, 0 ), |
|
| 682 | - array( 'IM', 'IMN', 0, 'Isle of Man', 'GBP', 'Pound', 'Pounds', '£', 1, 2, '+44', 0, 0 ), |
|
| 683 | - array( 'JE', 'JEY', 0, 'Jersey', 'GBP', 'Pound', 'Pounds', '£', 1, 2, '+44', 0, 0 ), |
|
| 684 | - array( 'MF', 'MAF', 0, 'Saint Martin', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+590', 1, 0 ), |
|
| 685 | - array( 'ME', 'MNE', 0, 'Montenegro', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+382', 0, 0 ), |
|
| 686 | - array( 'RS', 'SRB', 0, 'Serbia', 'RSD', 'Dinar', 'Dinars', '', 0, 2, '+941', 1, 0 ), |
|
| 687 | - array( 'SS', 'SSD', 0, 'South Sudan', 'SSP', 'Pound', 'Pounds', '£', 1, 2, '+211', 0, 0 ), |
|
| 688 | - array( 'SX', 'SXM', 0, 'Sint Maarten', 'ANG', 'Guilder', 'Guilders', 'ƒ', 1, 2, '+1', 1, 0 ), |
|
| 689 | - array( 'XK', 'XKX', 0, 'Kosovo', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+381', 0, 0 ), |
|
| 690 | - array( 'YT', 'MYT', 0, 'Mayotte', 'EUR', 'Euro', 'Euros', '€', 0, 2, '+262', 1, 0 ), |
|
| 678 | + array('AX', 'ALA', 0, 'Alan Islands', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+358', 1, 0), |
|
| 679 | + array('BL', 'BLM', 0, 'Saint Barthelemy', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+590', 1, 0), |
|
| 680 | + array('CW', 'CUW', 0, 'Curacao', 'ANG', 'Guilder', 'Guilders', 'ƒ', 1, 2, '+599', 1, 0), |
|
| 681 | + array('GG', 'GGY', 0, 'Guernsey', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+44', 0, 0), |
|
| 682 | + array('IM', 'IMN', 0, 'Isle of Man', 'GBP', 'Pound', 'Pounds', '£', 1, 2, '+44', 0, 0), |
|
| 683 | + array('JE', 'JEY', 0, 'Jersey', 'GBP', 'Pound', 'Pounds', '£', 1, 2, '+44', 0, 0), |
|
| 684 | + array('MF', 'MAF', 0, 'Saint Martin', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+590', 1, 0), |
|
| 685 | + array('ME', 'MNE', 0, 'Montenegro', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+382', 0, 0), |
|
| 686 | + array('RS', 'SRB', 0, 'Serbia', 'RSD', 'Dinar', 'Dinars', '', 0, 2, '+941', 1, 0), |
|
| 687 | + array('SS', 'SSD', 0, 'South Sudan', 'SSP', 'Pound', 'Pounds', '£', 1, 2, '+211', 0, 0), |
|
| 688 | + array('SX', 'SXM', 0, 'Sint Maarten', 'ANG', 'Guilder', 'Guilders', 'ƒ', 1, 2, '+1', 1, 0), |
|
| 689 | + array('XK', 'XKX', 0, 'Kosovo', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+381', 0, 0), |
|
| 690 | + array('YT', 'MYT', 0, 'Mayotte', 'EUR', 'Euro', 'Euros', '€', 0, 2, '+262', 1, 0), |
|
| 691 | 691 | ); |
| 692 | 692 | global $wpdb; |
| 693 | 693 | $country_table = $wpdb->prefix."esp_country"; |
@@ -706,14 +706,14 @@ discard block |
||
| 706 | 706 | "CNT_is_EU" => '%d', |
| 707 | 707 | "CNT_active" => '%d', |
| 708 | 708 | ); |
| 709 | - if ( EEH_Activation::table_exists( $country_table ) ) { |
|
| 710 | - foreach( $newer_countries as $country ) { |
|
| 711 | - $SQL = "SELECT COUNT('CNT_ISO') FROM {$country_table} WHERE CNT_ISO='{$country[0]}' LIMIT 1" ; |
|
| 709 | + if (EEH_Activation::table_exists($country_table)) { |
|
| 710 | + foreach ($newer_countries as $country) { |
|
| 711 | + $SQL = "SELECT COUNT('CNT_ISO') FROM {$country_table} WHERE CNT_ISO='{$country[0]}' LIMIT 1"; |
|
| 712 | 712 | $countries = $wpdb->get_var($SQL); |
| 713 | - if ( ! $countries ) { |
|
| 713 | + if ( ! $countries) { |
|
| 714 | 714 | |
| 715 | - $wpdb->insert( $country_table, |
|
| 716 | - array_combine( array_keys( $country_format), $country ), |
|
| 715 | + $wpdb->insert($country_table, |
|
| 716 | + array_combine(array_keys($country_format), $country), |
|
| 717 | 717 | $country_format |
| 718 | 718 | ); |
| 719 | 719 | } |
@@ -731,7 +731,7 @@ discard block |
||
| 731 | 731 | // CUR_code, CUR_single, CUR_plural, CUR_sign, CUR_dec_plc, CUR_active |
| 732 | 732 | //( 'EUR', 'Euro', 'Euros', '€', 2,1), |
| 733 | 733 | $newer_currencies = array( |
| 734 | - array( 'RSD', 'Dinar', 'Dinars', '', 3, 1 ), |
|
| 734 | + array('RSD', 'Dinar', 'Dinars', '', 3, 1), |
|
| 735 | 735 | ); |
| 736 | 736 | global $wpdb; |
| 737 | 737 | $currency_table = $wpdb->prefix."esp_currency"; |
@@ -743,14 +743,14 @@ discard block |
||
| 743 | 743 | "CUR_dec_plc" => '%d', |
| 744 | 744 | "CUR_active" => '%d', |
| 745 | 745 | ); |
| 746 | - if ( EEH_Activation::table_exists( $currency_table ) ) { |
|
| 747 | - foreach( $newer_currencies as $currency ) { |
|
| 748 | - $SQL = "SELECT COUNT('CUR_code') FROM {$currency_table} WHERE CUR_code='{$currency[0]}' LIMIT 1" ; |
|
| 746 | + if (EEH_Activation::table_exists($currency_table)) { |
|
| 747 | + foreach ($newer_currencies as $currency) { |
|
| 748 | + $SQL = "SELECT COUNT('CUR_code') FROM {$currency_table} WHERE CUR_code='{$currency[0]}' LIMIT 1"; |
|
| 749 | 749 | $countries = $wpdb->get_var($SQL); |
| 750 | - if ( ! $countries ) { |
|
| 750 | + if ( ! $countries) { |
|
| 751 | 751 | |
| 752 | - $wpdb->insert( $currency_table, |
|
| 753 | - array_combine( array_keys( $currency_format), $currency ), |
|
| 752 | + $wpdb->insert($currency_table, |
|
| 753 | + array_combine(array_keys($currency_format), $currency), |
|
| 754 | 754 | $currency_format |
| 755 | 755 | ); |
| 756 | 756 | } |
@@ -762,9 +762,9 @@ discard block |
||
| 762 | 762 | * which should just be a temporary issue for folks who installed 4.8.0-4.8.5; |
| 763 | 763 | * we should be able to stop doing this in 4.9 |
| 764 | 764 | */ |
| 765 | - public function fix_non_default_taxes(){ |
|
| 765 | + public function fix_non_default_taxes() { |
|
| 766 | 766 | global $wpdb; |
| 767 | - $query = $wpdb->prepare( "UPDATE |
|
| 767 | + $query = $wpdb->prepare("UPDATE |
|
| 768 | 768 | {$wpdb->prefix}esp_price p INNER JOIN |
| 769 | 769 | {$wpdb->prefix}esp_price_type pt ON p.PRT_ID = pt.PRT_ID |
| 770 | 770 | SET |
@@ -772,7 +772,7 @@ discard block |
||
| 772 | 772 | WHERE |
| 773 | 773 | p.PRC_is_default = 0 AND |
| 774 | 774 | pt.PBT_ID = %d |
| 775 | - ", EEM_Price_Type::base_type_tax ); |
|
| 776 | - $wpdb->query( $query ); |
|
| 775 | + ", EEM_Price_Type::base_type_tax); |
|
| 776 | + $wpdb->query($query); |
|
| 777 | 777 | } |
| 778 | 778 | } |