original_string: protected function hasDatabaseHistory($code, $version, $script = null)
      {
          $historyInfo = $this->getDatabaseHistory($code);
          if (!$historyInfo) {
              return false;
          }
  
          foreach ($historyInfo as $history) {
              if ($history->version != $version) {
                  continue;
              }
  
              if ($history->type == self::HISTORY_TYPE_COMMENT && !$script) {
                  return true;
              }
  
              if ($history->type == self::HISTORY_TYPE_SCRIPT && $history->detail == $script) {
                  return true;
              }
          }
  
          return false;
      }
code: protected function hasDatabaseHistory($code, $version, $script = null)
      {
          $historyInfo = $this->getDatabaseHistory($code);
          if (!$historyInfo) {
              return false;
          }
  
          foreach ($historyInfo as $history) {
              if ($history->version != $version) {
                  continue;
              }
  
              if ($history->type == self::HISTORY_TYPE_COMMENT && !$script) {
                  return true;
              }
  
              if ($history->type == self::HISTORY_TYPE_SCRIPT && $history->detail == $script) {
                  return true;
              }
          }
  
          return false;
      }
code_tokens: protected function hasDatabaseHistory ( $ code , $ version , $ script = null ) { $ historyInfo = $ this -> getDatabaseHistory ( $ code ) ; if ( ! $ historyInfo ) { return false ; } foreach ( $ historyInfo as $ history ) { if ( $ history -> version != $ version ) { continue ; } if ( $ history -> type == self :: HISTORY_TYPE_COMMENT && ! $ script ) { return true ; } if ( $ history -> type == self :: HISTORY_TYPE_SCRIPT && $ history -> detail == $ script ) { return true ; } } return false ; }
docstring: Checks if a plugin has an applied update version.
docstring_tokens: Checks if a plugin has an applied update version .