From: Mike Rylander <mrylander@gmail.com>
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=96c404dd1ebaae5974669394c6a5e369f1d1ecb3;p=evergreen%2Fmasslnc.git

Shooting 2 obvious thinkos d-e-d dead. Pardon the rogueness.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
---

diff --git a/Open-ILS/src/c-apps/oils_sql.c b/Open-ILS/src/c-apps/oils_sql.c
index 887a2df89e..24795b0ed0 100644
--- a/Open-ILS/src/c-apps/oils_sql.c
+++ b/Open-ILS/src/c-apps/oils_sql.c
@@ -2981,7 +2981,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 );
@@ -5101,7 +5101,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" );