]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12538 skip to main does not work if page div contains other attributes; merged...
authorskodak <skodak>
Tue, 19 Feb 2008 13:34:31 +0000 (13:34 +0000)
committerskodak <skodak>
Tue, 19 Feb 2008 13:34:31 +0000 (13:34 +0000)
lib/weblib.php

index 8660b4bcc03ea9baca0fedf4c6d52e466119937f..5439caa2f9df77c21039f7fe4539cbfba1309d9e 100644 (file)
@@ -2609,7 +2609,7 @@ function print_header ($title='', $heading='', $navigation='', $focus='',
     // Skip to main content, see skip_main_destination().
     if ($pageid=='course-view' or $pageid=='site-index' or $pageid=='course-index') {
         $skiplink = '<a class="skip" href="#maincontent">'.get_string('tocontent', 'access').'</a>';
-        if (! preg_match('/(.*<div.*?page.>)(.*)/s', $output, $matches)) {
+        if (! preg_match('/(.*<div[^>]+id="page"[^>]*>)(.*)/s', $output, $matches)) {
             preg_match('/(.*<body.*?>)(.*)/s', $output, $matches);
         }
         $output = $matches[1]."\n". $skiplink .$matches[2];