@@ 107-137 (lines=31) @@ | ||
104 | } |
|
105 | } |
|
106 | ||
107 | function migrate() { |
|
108 | $migrated = false; |
|
109 | ||
110 | foreach ( $this->getModules() as $module ) { |
|
111 | if ( !defined('OSCOM_APP_PAYPAL_BRAINTREE_' . $module . '_STATUS') ) { |
|
112 | $this->saveParameter('OSCOM_APP_PAYPAL_BRAINTREE_' . $module . '_STATUS', ''); |
|
113 | ||
114 | $class = 'OSCOM_Braintree_' . $module; |
|
115 | ||
116 | if ( !class_exists($class) ) { |
|
117 | $this->loadLanguageFile('modules/' . $module . '/' . $module . '.php'); |
|
118 | ||
119 | include(DIR_FS_CATALOG . 'includes/apps/braintree/modules/' . $module . '/' . $module . '.php'); |
|
120 | } |
|
121 | ||
122 | $m = new $class(); |
|
123 | ||
124 | if ( method_exists($m, 'canMigrate') && $m->canMigrate() ) { |
|
125 | $m->migrate($this); |
|
126 | ||
127 | if ( $migrated === false ) { |
|
128 | $migrated = true; |
|
129 | } |
|
130 | } |
|
131 | } |
|
132 | } |
|
133 | ||
134 | $this->deleteParameter('MODULE_CONTENT_ACCOUNT_BRAINTREE_CARDS_STATUS'); |
|
135 | ||
136 | return $migrated; |
|
137 | } |
|
138 | ||
139 | function getModules() { |
|
140 | static $result; |
@@ 85-113 (lines=29) @@ | ||
82 | tep_db_perform('oscom_app_paypal_log', $data); |
|
83 | } |
|
84 | ||
85 | function migrate() { |
|
86 | $migrated = false; |
|
87 | ||
88 | foreach ( $this->getModules() as $module ) { |
|
89 | if ( !defined('OSCOM_APP_PAYPAL_' . $module . '_STATUS') ) { |
|
90 | $this->saveParameter('OSCOM_APP_PAYPAL_' . $module . '_STATUS', ''); |
|
91 | ||
92 | $class = 'OSCOM_PayPal_' . $module; |
|
93 | ||
94 | if ( !class_exists($class) ) { |
|
95 | $this->loadLanguageFile('modules/' . $module . '/' . $module . '.php'); |
|
96 | ||
97 | include(DIR_FS_CATALOG . 'includes/apps/paypal/modules/' . $module . '/' . $module . '.php'); |
|
98 | } |
|
99 | ||
100 | $m = new $class(); |
|
101 | ||
102 | if ( method_exists($m, 'canMigrate') && $m->canMigrate() ) { |
|
103 | $m->migrate($this); |
|
104 | ||
105 | if ( $migrated === false ) { |
|
106 | $migrated = true; |
|
107 | } |
|
108 | } |
|
109 | } |
|
110 | } |
|
111 | ||
112 | return $migrated; |
|
113 | } |
|
114 | ||
115 | function getModules() { |
|
116 | static $result; |