• rencontre/inc/rencontre_widget.php
    Change location region selector options generator method to following:
    2008:

    static function f_regionBDD( $region='', $iso=0 ) {
    
      global $rencOpt, $rencCustom, $wpdb;
    
      echo '<option value="">- ' . __( 'Immaterial', 'rencontre' ) . ' -</option>';
    
      if( $iso == 'i' ) {
        return;
      }
    
      $region = ltrim( (string) $region, '_' );
    
      if( ! empty( $rencCustom['country'] ) || ! $iso ) {
        $iso = ( ! empty( $rencOpt['pays'] )? $rencOpt['pays']: 'FR' ); // default : FR
      }
    
      $query =
        "SELECT
          id AS _key,
          c_liste_valeur AS _value
        FROM
          {$wpdb->prefix}rencontre_liste
        WHERE
          c_liste_iso='{$iso}'
        AND
          c_liste_categ='r'
        ORDER BY c_liste_valeur";
    
      if( function_exists( 'wpGeonames_shortcode' ) ) {
        $query =
          "SELECT
            admin1_code AS _key,
            name AS _value
          FROM
            {$wpdb->base_prefix}geonames
          WHERE
            country_code='{$iso}'
          AND
            feature_code='ADM1'
          AND
            feature_class='A'
          ORDER BY name";
      }
    
      $results = $wpdb->get_results( $query );
    
      if( $results ) {
    
        foreach( $results as $result ) {
          $selected = ( $result->_key == $region || $result->_value == $region );
          printf(
            '<option value="%s" %s>%s</option>',
            $result->_key,
            selected( $selected, true, false ),
            $result->_value
          );
        }
      }
    }

    When sending a smile, instead of bounce message, just update a smile date.
    function f_sourire…
    3013:

    if( $c ) {
      foreach( $action['sourireOut'] as $a => $r ) {
      if( $r['i'] == $f ) {
        $c = $a;
        break;
      }
    }

    In visit registration method, instead of early return, update visit date.
    function f_visite…
    3177:

    if( $c ) {
      foreach( $action['visite'] as $i => $r ) {
        if( $r['i'] == $current_user->ID ) {
          $action['visite'][$i]['d'] = current_time( "Y-m-d" );
          $out = json_encode( $action );
          $wpdb->update( $wpdb->prefix . 'rencontre_users_profil', array( 't_action' => $out ), array( 'user_id' => $f ) );
          return;
        }
      }
    }
    • This topic was modified 5 years, 11 months ago by tolumba.

The topic ‘Proposal of some functional changes’ is closed to new replies.