From: Mike Rylander Date: Wed, 21 Mar 2012 16:14:44 +0000 (-0400) Subject: Shooting 2 obvious thinkos d-e-d dead. Pardon the rogueness. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c0e3515dbbf5ac7941b183d6f0f063d1e2b992d0;p=contrib%2FConifer.git Shooting 2 obvious thinkos d-e-d dead. Pardon the rogueness. Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/c-apps/oils_sql.c b/Open-ILS/src/c-apps/oils_sql.c index 3f8157db34..d30f427c2d 100644 --- a/Open-ILS/src/c-apps/oils_sql.c +++ b/Open-ILS/src/c-apps/oils_sql.c @@ -2918,7 +2918,7 @@ static char* searchPredicate( const ClassInfo* class_info, osrfHash* field, buffer_fadd( _p, "\"%s\".%s IS NULL", - class_info->class_name, + class_info->alias, osrfHashGet( field, "name" ) ); pred = buffer_release( _p ); @@ -5018,7 +5018,7 @@ static char* buildOrderByFromArray( osrfMethodContext* ctx, const jsonObject* or const char* direction = jsonObjectGetString( jsonObjectGetKeyConst( order_spec, "direction" ) ); if( direction ) { - if( direction[ 0 ] || 'D' == direction[ 0 ] ) + if( direction[ 0 ] && ( 'd' == direction[ 0 ] || 'D' == direction[ 0 ] ) ) OSRF_BUFFER_ADD( order_buf, " DESC" ); else OSRF_BUFFER_ADD( order_buf, " ASC" );