- Timestamp:
- 2012-01-12T15:52:20+13:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/html-to-expeditee/trunk/src/src/cgi-bin/html-to-expeditee.pl.in
r24937 r24944 108 108 docOIDs = []; 109 109 var outstandingURLs = []; 110 var visitedURLs = {}; 111 110 112 outstandingURLs.push(url); 113 visitedURLs[url] = 1; 111 114 112 115 while (outstandingURLs.length>0) { … … 121 124 122 125 123 /* any links with a= d... cl=??? => outstandingURLS */126 /* any links with a=(b|d) ... cl=??? => outstandingURLS */ 124 127 /* any links with a=d ... d=??? => docOIDS */ 125 128 126 129 var actionRE = new RegExp("(\\\\?|&)a=(?:d|b)(&|\$)"); 127 var clRE = new RegExp("(\\\\?|&)cl=" + cl + " \\\\.");130 var clRE = new RegExp("(\\\\?|&)cl=" + cl + "(\\\\.\\\\d+)+(&|\$)"); 128 131 var docRE = new RegExp("(?:\\\\?|&)d=(.*?)(?:&|\$)"); 129 132 … … 133 136 if (href && href.match(actionRE)) { 134 137 if (href.match(clRE)) { 135 outstandingURLs.push(href); 138 if (!visitedURLs[href]) { 139 // console.log("found a new CL line: " + href); 140 outstandingURLs.push(href); 141 visitedURLs[href] = 1; 142 } 136 143 } 137 144 else if (href.match(docRE)) { … … 139 146 var docMatch = docRE.exec(href); 140 147 var docOID = docMatch[1]; 148 149 // console.log("found a new doc line: " + docOID); 141 150 142 151 docOIDs.push(docOID); … … 151 160 152 161 var docOID = docOIDs.shift(); 153 console.log("doc oid = " + docOID);162 //console.log("doc oid = " + docOID); 154 163 155 164 var url;
Note:
See TracChangeset
for help on using the changeset viewer.