]> wagner.pp.ru Git - oss/stilllife.git/commitdiff
Fixed processing of link rel="forum-user-list"
authorVictor Wagner <vitus@wagner.pp.ru>
Mon, 24 Mar 2008 10:32:08 +0000 (10:32 +0000)
committerVictor Wagner <vitus@wagner.pp.ru>
Mon, 24 Mar 2008 10:32:08 +0000 (10:32 +0000)
forum/forum

index c9bb2c6caa4e92a6c173f0a909ea2b86bfc63fe3..ba95dcd7afe29553812e56a91b4b2f4f3abca860 100755 (executable)
@@ -377,6 +377,18 @@ sub fix_forum_links {
                } else {
                        $attr ="src";
                }
+               
+               # Обрабатываем наши специальные link rel=""
+               if ($element->tag eq "link") {
+                       if ($element->attr("rel") eq "forum-user-list") {
+                               $element->attr("href" => $cgi->url(-absolute=>1,
+                                       -path_info=>0,-query_string=>0).$forum->{userurl});
+                               next ELEMENT;   
+                       } elsif ($element->attr("rel") eq "forum-script")  {
+                               $element->attr("href" => $script_with_path);
+                               next ELEMENT;
+                       }       
+               }
                my $link = $element->attr($attr);
                # Абсолютная ссылка - оставляем как есть. 
                next ELEMENT if (! defined $link || $link=~/^\w+:/);