when searhcing for urls of next quiz, remove requirement for navigation buttons to have class="NavButton"

This commit is contained in:
gbateson
2009-05-07 23:01:19 +00:00
parent 7171099926
commit ffe7588d45
+1 -1
View File
@@ -699,7 +699,7 @@ function hotpot_get_titles_and_next_ex(&$hotpot, $filepath, $get_next=false) {
if ($get_next) {
if (preg_match('|<div[^>]*class="NavButtonBar"[^>]*>(.*?)</div>|is', $source, $matches)) {
$navbuttonbar = $matches[1];
if (preg_match_all('|<button[^>]*class="NavButton"[^>]*onclick="'."location='([^']*)'".'[^"]*"[^>]*>|is', $navbuttonbar, $matches)) {
if (preg_match_all('|<button[^>]*onclick="'."location='([^']*)'".'[^"]*"[^>]*>|is', $navbuttonbar, $matches)) {
$lastbutton = count($matches[0])-1;
$next = $matches[1][$lastbutton];
}