nggWPMU

Main PHP Class for Multisite setup.

Defined (1)

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

/products/photocrati_nextgen/modules/ngglegacy/lib/multisite.php  
  1. class nggWPMU{ 
  2.  
  3. /** 
  4. * Check the Quota under WPMU. Only needed for this case 
  5. *  
  6. * @class nggWPMU 
  7. * @return bool $result 
  8. */ 
  9. function check_quota() { 
  10. if ( get_site_option( 'upload_space_check_disabled' ) ) 
  11. return false; 
  12.  
  13. if ( (is_multisite()) && nggWPMU::wpmu_enable_function('wpmuQuotaCheck')) 
  14. if( $error = upload_is_user_over_quota( false ) ) { 
  15. nggGallery::show_error( __( 'Sorry, you have used your space allocation. Please delete some files to upload more files.', 'nggallery' ) ); 
  16. return true; 
  17. return false; 
  18.  
  19. /** 
  20. * Check for site admin 
  21. *  
  22. * @return 
  23. */ 
  24. function wpmu_site_admin() { 
  25.  
  26. if ( function_exists('is_super_admin') ) 
  27. if ( is_super_admin() ) 
  28. return true; 
  29.  
  30. return false; 
  31.  
  32. /** 
  33. * Check for site wide options 
  34. *  
  35. * @param string $value 
  36. * @return value 
  37. */ 
  38. function wpmu_enable_function($value) { 
  39. if (is_multisite()) { 
  40. $ngg_options = get_site_option('ngg_options'); 
  41. return $ngg_options[$value]; 
  42. // if this is not WPMU, enable it ! 
  43. return true; 
  44. }