C_NextGen_Data_Installer

The NextGEN Gallery C NextGen Data Installer class.

Defined (1)

The class is defined in the following location(s).

/products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php  
  1. class C_NextGen_Data_Installer extends C_NggLegacy_Installer 
  2. function get_registry() 
  3. return C_Component_Registry::get_instance(); 
  4. function install() 
  5. $this->remove_table_extra_options(); 
  6. function remove_table_extra_options() 
  7. global $wpdb; 
  8. $likes = array("option_name LIKE '%ngg_gallery%'", "option_name LIKE '%ngg_pictures%'", "option_name LIKE '%ngg_album%'"); 
  9. $sql = "DELETE FROM {$wpdb->options} WHERE " . implode(" OR ", $likes); 
  10. $wpdb->query($sql); 
  11. function uninstall($hard = FALSE) 
  12. if ($hard) { 
  13. /** Yes: this is commented twice. 
  14. // TODO for now never delete galleries/albums/content 
  15. # $mappers = array( 
  16. # $this->get_registry()->get_utility('I_Album_Mapper'),  
  17. # $this->get_registry()->get_utility('I_Gallery_Mapper'),  
  18. # $this->get_registry()->get_utility('I_Image_Mapper'),  
  19. # ); 
  20.  
  21. # foreach ($mappers as $mapper) { 
  22. # $mapper->delete()->run_query(); 
  23. # } 
  24.  
  25. # // Remove ngg tags 
  26. # global $wpdb; 
  27. # $wpdb->query("DELETE FROM {$wpdb->terms} WHERE term_id IN (SELECT term_id FROM {$wpdb->term_taxonomy} WHERE taxonomy='ngg_tag')"); 
  28. # $wpdb->query("DELETE FROM {$wpdb->term_taxonomy} WHERE taxonomy='ngg_tag'"); 
  29. */