original_string: public function getSegmentHashesByIdSite()
      {
          //Get a list of hashes of all segments that exist now
          $sql = "SELECT DISTINCT definition, enable_only_idsite FROM " . Common::prefixTable('segment')
              . " WHERE deleted = 0";
          $rows = Db::fetchAll($sql);
          $segmentHashes = array();
          foreach ($rows as $row) {
              $idSite = (int)$row['enable_only_idsite'];
              if (! isset($segmentHashes[$idSite])) {
                  $segmentHashes[$idSite] = array();
              }
              $segmentHashes[$idSite][] = Segment::getSegmentHash($row['definition']);
          }
  
          return $segmentHashes;
      }
code: public function getSegmentHashesByIdSite()
      {
          //Get a list of hashes of all segments that exist now
          $sql = "SELECT DISTINCT definition, enable_only_idsite FROM " . Common::prefixTable('segment')
              . " WHERE deleted = 0";
          $rows = Db::fetchAll($sql);
          $segmentHashes = array();
          foreach ($rows as $row) {
              $idSite = (int)$row['enable_only_idsite'];
              if (! isset($segmentHashes[$idSite])) {
                  $segmentHashes[$idSite] = array();
              }
              $segmentHashes[$idSite][] = Segment::getSegmentHash($row['definition']);
          }
  
          return $segmentHashes;
      }
code_tokens: public function getSegmentHashesByIdSite ( ) { //Get a list of hashes of all segments that exist now $ sql = "SELECT DISTINCT definition, enable_only_idsite FROM " . Common :: prefixTable ( 'segment' ) . " WHERE deleted = 0" ; $ rows = Db :: fetchAll ( $ sql ) ; $ segmentHashes = array ( ) ; foreach ( $ rows as $ row ) { $ idSite = ( int ) $ row [ 'enable_only_idsite' ] ; if ( ! isset ( $ segmentHashes [ $ idSite ] ) ) { $ segmentHashes [ $ idSite ] = array ( ) ; } $ segmentHashes [ $ idSite ] [ ] = Segment :: getSegmentHash ( $ row [ 'definition' ] ) ; } return $ segmentHashes ; }
docstring: Get a list of all segment hashes that currently exist, indexed by idSite.
  @return array
docstring_tokens: Get a list of all segment hashes that currently exist indexed by idSite .