C_NextGen_Admin_Installer

The NextGEN Gallery C NextGen Admin Installer class.

Defined (1)

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

/products/photocrati_nextgen/modules/nextgen_admin/module.nextgen_admin.php  
  1. class C_NextGen_Admin_Installer 
  2. function install() 
  3. $settings = C_NextGen_Settings::get_instance(); 
  4.  
  5. // In version 0.2 of this module and earlier, the following values 
  6. // were statically set rather than dynamically using a handler. Therefore, we need 
  7. // to delete those static values 
  8. $module_name = 'photocrati-nextgen_admin'; 
  9. $modules = get_option('pope_module_list', array()); 
  10. if (!$modules) { 
  11. $modules = $settings->get('pope_module_list', array()); 
  12.  
  13. $cleanup = FALSE; 
  14. foreach ($modules as $module) { 
  15. if (strpos($module, $module_name) !== FALSE) { 
  16. // Leave $module as-is: inside version_compare() will warn about passing items by reference 
  17. $module = explode('|', $module); 
  18. $val = array_pop($module); 
  19. if (version_compare($val, '0.3') == -1) { 
  20. $cleanup = TRUE; 
  21. break; 
  22.  
  23. if ($cleanup) { 
  24. $keys = array( 
  25. 'jquery_ui_theme',  
  26. 'jquery_ui_theme_version',  
  27. 'jquery_ui_theme_url' 
  28. ); 
  29. foreach ($keys as $key) $settings->delete($key);