rbrindley: branch 2.0 r4512 - /branches/2.0/config/js/index.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Fri Feb 13 09:50:37 CST 2009


Author: rbrindley
Date: Fri Feb 13 09:50:37 2009
New Revision: 4512

URL: http://svn.digium.com/svn-view/asterisk-gui?view=rev&rev=4512
Log:
- optimized an if statement in detectPlatform

Modified:
    branches/2.0/config/js/index.js

Modified: branches/2.0/config/js/index.js
URL: http://svn.digium.com/svn-view/asterisk-gui/branches/2.0/config/js/index.js?view=diff&rev=4512&r1=4511&r2=4512
==============================================================================
--- branches/2.0/config/js/index.js (original)
+++ branches/2.0/config/js/index.js Fri Feb 13 09:50:37 2009
@@ -110,13 +110,10 @@
 			// ??
 		}else{
 			var resp_lower = resp.toLowerCase();
-			if(  resp_lower.contains("branches/1.4")  || resp_lower.contains("asterisk/1.4") ||  resp_lower.contains("svn-branch-1.4") ) {
-				sessionData.PLATFORM.isAST_1_4 = true ;
-				sessionData.PLATFORM.isAST_1_6 = false ;
-			}else if ( resp_lower.contains("branches/1.6")  || resp_lower.contains("asterisk/1.6") ||  resp_lower.contains("svn-branch-1.6") ||  resp_lower.contains("svn-trunk-")  ){
+			if ( resp_lower.contains("branches/1.6")  || resp_lower.contains("asterisk/1.6") ||  resp_lower.contains("svn-branch-1.6") ||  resp_lower.contains("svn-trunk-")  ){
 				sessionData.PLATFORM.isAST_1_4 = false ;
 				sessionData.PLATFORM.isAST_1_6 = true ;
-			}else {
+			} else { /* if system is either 1.4 or unknown */
 				sessionData.PLATFORM.isAST_1_4 = true ;
 				sessionData.PLATFORM.isAST_1_6 = false ;
 			}




More information about the asterisk-gui-commits mailing list