_genChangeFreq() protected method

protected _genChangeFreq ( $a )
Esempio n. 1
0
 protected function _genChangeFreq($a)
 {
     // calculate the date which is closest to now
     $iDiffMin = PHP_INT_MAX;
     $aDateFields = array('Date', 'EventStart', 'EventEnd');
     foreach ($aDateFields as $sField) {
         $iDiff = abs(time() - $a[$sField]);
         if ($iDiff < $iDiffMin) {
             $iDiffMin = $iDiff;
         }
     }
     if ($iDiffMin != PHP_INT_MAX) {
         $a[$this->_aQueryParts['field_date']] = time() - $iDiffMin;
     }
     return parent::_genChangeFreq($a);
 }