@@ 248-255 (lines=8) @@ | ||
245 | * If the site isn't in maintenance mode, should setup the addon's database |
|
246 | * @return mixed |
|
247 | */ |
|
248 | public function new_install() { |
|
249 | ||
250 | $classname = get_class($this); |
|
251 | do_action("AHEE__{$classname}__new_install"); |
|
252 | do_action("AHEE__EE_Addon__new_install", $this); |
|
253 | EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old(); |
|
254 | add_action( 'AHEE__EE_System__perform_activations_upgrades_and_migrations', array( $this, 'initialize_db_if_no_migrations_required' ) ); |
|
255 | } |
|
256 | ||
257 | ||
258 | ||
@@ 264-270 (lines=7) @@ | ||
261 | * it's good to just check that your data is still intact |
|
262 | * @return void |
|
263 | */ |
|
264 | public function reactivation() { |
|
265 | $classname = get_class($this); |
|
266 | do_action("AHEE__{$classname}__reactivation"); |
|
267 | do_action("AHEE__EE_Addon__reactivation", $this); |
|
268 | EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old(); |
|
269 | add_action( 'AHEE__EE_System__perform_activations_upgrades_and_migrations', array( $this, 'initialize_db_if_no_migrations_required' ) ); |
|
270 | } |
|
271 | ||
272 | public function deactivation(){ |
|
273 | $classname = get_class($this); |
|
@@ 385-392 (lines=8) @@ | ||
382 | * they're ran |
|
383 | * @return mixed |
|
384 | */ |
|
385 | public function upgrade() { |
|
386 | $classname = get_class($this); |
|
387 | do_action("AHEE__{$classname}__upgrade"); |
|
388 | do_action("AHEE__EE_Addon__upgrade", $this); |
|
389 | EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old(); |
|
390 | //also it's possible there is new default data that needs to be added |
|
391 | add_action( 'AHEE__EE_System__perform_activations_upgrades_and_migrations', array( $this, 'initialize_db_if_no_migrations_required' ) ); |
|
392 | } |
|
393 | ||
394 | ||
395 |