pari: trunk r478 - /trunk/config/scripts/astman.js

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Fri Mar 23 18:51:49 MST 2007


Author: pari
Date: Fri Mar 23 20:51:48 2007
New Revision: 478

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=478
Log:
Fix for toJSON function - return empty object if no contexts are found in the config file. I guess we no longer would be needing this function in future as prototype 1.5.1 is going to have inbuilt JSON support and also now that the Asterisk trunk has inbuilt JSON support for reading config files.

Modified:
    trunk/config/scripts/astman.js

Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=478&r1=477&r2=478
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Fri Mar 23 20:51:48 2007
@@ -201,6 +201,7 @@
 			if( s < a.length - 1 ){ json_data += ' },' ; }else{ json_data += ' }}' ; }
 		}
 	}
+	if(json_data == "{"){ return '{}';}
 	// done building the json string
 	return json_data ;
 }



More information about the asterisk-gui-commits mailing list