original_string: protected function load_current_environment($forcereload=false) {
          global $CFG;
  
          if (!is_null($this->currentversion) and !$forcereload) {
              // Nothing to do.
              return;
          }
  
          $version = null;
          $release = null;
  
          require($CFG->dirroot.'/version.php');
          $this->currentversion = $version;
          $this->currentrelease = $release;
          $this->currentbranch = moodle_major_version(true);
  
          $pluginman = \core_plugin_manager::instance();
          foreach ($pluginman->get_plugins() as $type => $plugins) {
              foreach ($plugins as $plugin) {
                  if (!$plugin->is_standard()) {
                      $this->currentplugins[$plugin->component] = $plugin->versiondisk;
                  }
              }
          }
      }
code: protected function load_current_environment($forcereload=false) {
          global $CFG;
  
          if (!is_null($this->currentversion) and !$forcereload) {
              // Nothing to do.
              return;
          }
  
          $version = null;
          $release = null;
  
          require($CFG->dirroot.'/version.php');
          $this->currentversion = $version;
          $this->currentrelease = $release;
          $this->currentbranch = moodle_major_version(true);
  
          $pluginman = \core_plugin_manager::instance();
          foreach ($pluginman->get_plugins() as $type => $plugins) {
              foreach ($plugins as $plugin) {
                  if (!$plugin->is_standard()) {
                      $this->currentplugins[$plugin->component] = $plugin->versiondisk;
                  }
              }
          }
      }
code_tokens: protected function load_current_environment ( $ forcereload = false ) { global $ CFG ; if ( ! is_null ( $ this -> currentversion ) and ! $ forcereload ) { // Nothing to do. return ; } $ version = null ; $ release = null ; require ( $ CFG -> dirroot . '/version.php' ) ; $ this -> currentversion = $ version ; $ this -> currentrelease = $ release ; $ this -> currentbranch = moodle_major_version ( true ) ; $ pluginman = \ core_plugin_manager :: instance ( ) ; foreach ( $ pluginman -> get_plugins ( ) as $ type => $ plugins ) { foreach ( $ plugins as $ plugin ) { if ( ! $ plugin -> is_standard ( ) ) { $ this -> currentplugins [ $ plugin -> component ] = $ plugin -> versiondisk ; } } } }
docstring: Sets the properties currentversion, currentrelease, currentbranch and currentplugins
  
  @param bool $forcereload
docstring_tokens: Sets the properties currentversion currentrelease currentbranch and currentplugins