nggWPMU

Main PHP Class for Multisite setup.

Defined (1)

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

/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. static 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. /** 
  21. * Check for site wide options 
  22. *  
  23. * @param string $value 
  24. * @return value 
  25. */ 
  26. function wpmu_enable_function($value) { 
  27. if (is_multisite()) { 
  28. $ngg_options = get_site_option('ngg_options'); 
  29. return $ngg_options[$value]; 
  30. // if this is not WPMU, enable it ! 
  31. return true; 
  32. }