View the DQSD CVS repository here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/

Update of /cvsroot/dqsd/dqsd
In directory sc8-pr-cvs1:/tmp/cvs-serv25944

Modified Files:
        ChangeLog.txt search.htm version.js 
Log Message:
* versionCheck() in version.js now checks scripting engine version as well, and 
requires 5.6 (Kim Gr�sman)
* Added httpinst command, which installs new searches straight from an URL (Kim 
Gr�sman)

Index: ChangeLog.txt
===================================================================
RCS file: /cvsroot/dqsd/dqsd/ChangeLog.txt,v
retrieving revision 1.234
retrieving revision 1.235
diff -C2 -d -r1.234 -r1.235
*** ChangeLog.txt       13 Jun 2003 21:49:07 -0000      1.234
--- ChangeLog.txt       25 Jun 2003 18:54:56 -0000      1.235
***************
*** 3,6 ****
--- 3,9 ----
  Enhancements
  
+ * versionCheck() in version.js now checks scripting engine version as well, and 
requires 5.6 (Kim Gr�sman)
+ * Added httpinst command, which installs new searches straight from an URL (Kim 
Gr�sman)
+ 
  Bug Fixes
  

Index: search.htm
===================================================================
RCS file: /cvsroot/dqsd/dqsd/search.htm,v
retrieving revision 1.171
retrieving revision 1.172
diff -C2 -d -r1.171 -r1.172
*** search.htm  22 Apr 2003 20:24:28 -0000      1.171
--- search.htm  25 Jun 2003 18:54:56 -0000      1.172
***************
*** 196,199 ****
--- 196,207 ----
    if(t == "refreshicons")   { refreshIcons(); return false; }
  
+   // Handle quick-installation
+   if(t.search("httpinst ") == 0)
+   {
+       var searchUrl = t.substr(9, t.length);
+       httpInstall(searchUrl);
+       return false;
+   }
+ 
    // anything below adds something to the history
    addhist(t);
***************
*** 919,924 ****
  }
  
! </script>
  
  </body>
  </html>
--- 927,981 ----
  }
  
! function httpInstall(searchUrl)
! {
!   try
!   {
!       // Request search xml from provided URL
!         var xmlHttp = new ActiveXObject("Microsoft.XmlHttp")
!         xmlHttp.open("GET", searchUrl, false);
!         xmlHttp.send();
  
+               // Verify well-formed-ness of response
+               var xmlDom = xmlHttp.responseXml;
+         if(xmlDom.parseError.errorCode != 0)
+         {
+           alert("Search retrieved from " + searchUrl + " is not well-formed.\nParse 
error: " + xmlDom.parseError.reason);
+           return false;
+         }
+               
+               // Parse out search filename
+               var searchName = "";
+               for(var p = searchUrl.length - 1; p > 0; --p)
+               {
+                       if(searchUrl.charAt(p) == '/')
+                       {
+                               searchName = searchUrl.substr(p + 1, searchUrl.length 
- p);
+                               break;
+                       }
+               }
+               
+               if(searchName == "")
+               {
+                       alert("Failed to find search filename in URL " + searchUrl);
+                       return false;
+               }
+ 
+               // Save xml file to searches directory
+               writeFile("searches/" + searchName, xmlHttp.responseText);
+                               
+               // Tell the user all went well
+               if(confirm("Successfully installed search " + searchName + ".\nWould 
you like to reload the toolbar?"))
+               {
+                       // Reload
+                       reload();               
+               }
+   }
+   catch(e)
+   {
+               alert("Unable to install search from " + searchUrl + ".\nError 
message: " + e.message);
+   }
+ }
+ 
+ </script>
  </body>
  </html>

Index: version.js
===================================================================
RCS file: /cvsroot/dqsd/dqsd/version.js,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** version.js  16 Dec 2002 04:34:47 -0000      1.24
--- version.js  25 Jun 2003 18:54:56 -0000      1.25
***************
*** 36,39 ****
--- 36,54 ----
    testObject = null;
  
+   // Verify that the scripting engine version is what we need
+   if(bSuccess)
+   {
+       var reqMajor = 5;
+       var reqMinor = 6;
+       
+       var instMajor = ScriptEngineMajorVersion();
+       var instMinor = ScriptEngineMinorVersion();
+       
+       if(instMajor < reqMajor || (instMajor == reqMajor && instMinor < reqMinor))
+       {
+               alert("Your version of the Windows Script Components (" + instMajor + 
"." + instMinor + ") is outdated.\nGet the latest from 
http://msdn.microsoft.com/downloads/list/webdev.asp";);
+               bSuccess = false;
+       }
+   }
  
    return bSuccess;




-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
DQSD-CVS mailing list
https://lists.sourceforge.net/lists/listinfo/dqsd-cvs
DQSD CVS repository:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/

Reply via email to