original_string: public function update_references($referencefileid, $lastsync, $lifetime, $contenthash, $filesize, $status, $timemodified = null) {
          global $DB;
          $referencefileid = clean_param($referencefileid, PARAM_INT);
          $lastsync = clean_param($lastsync, PARAM_INT);
          validate_param($contenthash, PARAM_TEXT, NULL_NOT_ALLOWED);
          $filesize = clean_param($filesize, PARAM_INT);
          $status = clean_param($status, PARAM_INT);
          $params = array('contenthash' => $contenthash,
                      'filesize' => $filesize,
                      'status' => $status,
                      'referencefileid' => $referencefileid,
                      'timemodified' => $timemodified);
          $DB->execute('UPDATE {files} SET contenthash = :contenthash, filesize = :filesize,
              status = :status ' . ($timemodified ? ', timemodified = :timemodified' : '') . '
              WHERE referencefileid = :referencefileid', $params);
          $data = array('id' => $referencefileid, 'lastsync' => $lastsync);
          $DB->update_record('files_reference', (object)$data);
      }
code: public function update_references($referencefileid, $lastsync, $lifetime, $contenthash, $filesize, $status, $timemodified = null) {
          global $DB;
          $referencefileid = clean_param($referencefileid, PARAM_INT);
          $lastsync = clean_param($lastsync, PARAM_INT);
          validate_param($contenthash, PARAM_TEXT, NULL_NOT_ALLOWED);
          $filesize = clean_param($filesize, PARAM_INT);
          $status = clean_param($status, PARAM_INT);
          $params = array('contenthash' => $contenthash,
                      'filesize' => $filesize,
                      'status' => $status,
                      'referencefileid' => $referencefileid,
                      'timemodified' => $timemodified);
          $DB->execute('UPDATE {files} SET contenthash = :contenthash, filesize = :filesize,
              status = :status ' . ($timemodified ? ', timemodified = :timemodified' : '') . '
              WHERE referencefileid = :referencefileid', $params);
          $data = array('id' => $referencefileid, 'lastsync' => $lastsync);
          $DB->update_record('files_reference', (object)$data);
      }
code_tokens: public function update_references ( $ referencefileid , $ lastsync , $ lifetime , $ contenthash , $ filesize , $ status , $ timemodified = null ) { global $ DB ; $ referencefileid = clean_param ( $ referencefileid , PARAM_INT ) ; $ lastsync = clean_param ( $ lastsync , PARAM_INT ) ; validate_param ( $ contenthash , PARAM_TEXT , NULL_NOT_ALLOWED ) ; $ filesize = clean_param ( $ filesize , PARAM_INT ) ; $ status = clean_param ( $ status , PARAM_INT ) ; $ params = array ( 'contenthash' => $ contenthash , 'filesize' => $ filesize , 'status' => $ status , 'referencefileid' => $ referencefileid , 'timemodified' => $ timemodified ) ; $ DB -> execute ( 'UPDATE {files} SET contenthash = :contenthash, filesize = :filesize,
              status = :status ' . ( $ timemodified ? ', timemodified = :timemodified' : '' ) . '
              WHERE referencefileid = :referencefileid' , $ params ) ; $ data = array ( 'id' => $ referencefileid , 'lastsync' => $ lastsync ) ; $ DB -> update_record ( 'files_reference' , ( object ) $ data ) ; }
docstring: Updates a reference to the external resource and all files that use it
  
  This function is called after synchronisation of an external file and updates the
  contenthash, filesize and status of all files that reference this external file
  as well as time last synchronised.
  
  @param int $referencefileid
  @param int $lastsync
  @param int $lifetime argument not used any more, liefetime is returned by repository
  @param string $contenthash
  @param int $filesize
  @param int $status 0 if ok or 666 if source is missing
  @param int $timemodified last time modified of the source, if known
docstring_tokens: Updates a reference to the external resource and all files that use it