original_string: static public function disable($license) {
          global $DB, $CFG;
          // Site default license cannot be disabled!
          if ($license == $CFG->sitedefaultlicense) {
              print_error('error');
          }
          if ($license = self::get_license_by_shortname($license)) {
              $license->enabled = 0;
              $DB->update_record('license', $license);
          }
          self::set_active_licenses();
          return true;
      }
code: static public function disable($license) {
          global $DB, $CFG;
          // Site default license cannot be disabled!
          if ($license == $CFG->sitedefaultlicense) {
              print_error('error');
          }
          if ($license = self::get_license_by_shortname($license)) {
              $license->enabled = 0;
              $DB->update_record('license', $license);
          }
          self::set_active_licenses();
          return true;
      }
code_tokens: static public function disable ( $ license ) { global $ DB , $ CFG ; // Site default license cannot be disabled! if ( $ license == $ CFG -> sitedefaultlicense ) { print_error ( 'error' ) ; } if ( $ license = self :: get_license_by_shortname ( $ license ) ) { $ license -> enabled = 0 ; $ DB -> update_record ( 'license' , $ license ) ; } self :: set_active_licenses ( ) ; return true ; }
docstring: Disable a license
  @param string $license the shortname of license
  @return boolean
docstring_tokens: Disable a license