@@ 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; |
@@ 87-115 (lines=29) @@ | ||
84 | tep_db_perform('oscom_app_paypal_log', $data); |
|
85 | } |
|
86 | ||
87 | function migrate() { |
|
88 | $migrated = false; |
|
89 | ||
90 | foreach ( $this->getModules() as $module ) { |
|
91 | if ( !defined('OSCOM_APP_PAYPAL_' . $module . '_STATUS') ) { |
|
92 | $this->saveParameter('OSCOM_APP_PAYPAL_' . $module . '_STATUS', ''); |
|
93 | ||
94 | $class = 'OSCOM_PayPal_' . $module; |
|
95 | ||
96 | if ( !class_exists($class) ) { |
|
97 | $this->loadLanguageFile('modules/' . $module . '/' . $module . '.php'); |
|
98 | ||
99 | include(DIR_FS_CATALOG . 'includes/apps/paypal/modules/' . $module . '/' . $module . '.php'); |
|
100 | } |
|
101 | ||
102 | $m = new $class(); |
|
103 | ||
104 | if ( method_exists($m, 'canMigrate') && $m->canMigrate() ) { |
|
105 | $m->migrate($this); |
|
106 | ||
107 | if ( $migrated === false ) { |
|
108 | $migrated = true; |
|
109 | } |
|
110 | } |
|
111 | } |
|
112 | } |
|
113 | ||
114 | return $migrated; |
|
115 | } |
|
116 | ||
117 | function getModules() { |
|
118 | static $result; |