Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -1879,14 +1879,18 @@ |
1880 | 1880 | if( $wgUser instanceOf User && $wgUser->isLoggedIn() ) { |
1881 | 1881 | $loggedIn = true; |
1882 | 1882 | $siteNotice = wfGetCachedNotice('sitenotice'); |
1883 | | - if($siteNotice === false) |
| 1883 | + if($siteNotice === false) { |
| 1884 | + wfProfileOut( $fname ); |
1884 | 1885 | return ''; |
| 1886 | + } |
1885 | 1887 | } else { |
1886 | 1888 | $siteNotice = wfGetCachedNotice('anonnotice'); |
1887 | 1889 | if($siteNotice === false) { |
1888 | 1890 | $siteNotice = wfGetCachedNotice('sitenotice'); |
1889 | | - if($siteNotice === false) |
| 1891 | + if($siteNotice === false) { |
| 1892 | + wfProfileOut( $fname ); |
1890 | 1893 | return ''; |
| 1894 | + } |
1891 | 1895 | } |
1892 | 1896 | } |
1893 | 1897 | |
— | — | @@ -1896,8 +1900,10 @@ |
1897 | 1901 | if( wfRunHooks( 'SiteNoticeBefore', array( &$siteNotice ) ) ) { |
1898 | 1902 | if( $loggedIn ) { |
1899 | 1903 | //it is hidden |
1900 | | - if( isset($_COOKIE[$wgCookiePrefix . 'DismissSiteNotice']) && $_COOKIE[$wgCookiePrefix . 'DismissSiteNotice'] == $id ) |
| 1904 | + if( isset($_COOKIE[$wgCookiePrefix . 'DismissSiteNotice']) && $_COOKIE[$wgCookiePrefix . 'DismissSiteNotice'] == $id ) { |
| 1905 | + wfProfileOut( $fname ); |
1901 | 1906 | return ''; |
| 1907 | + } |
1902 | 1908 | $siteNotice = <<<EOT |
1903 | 1909 | <table width="100%" id="mw-dismissable-notice"><tr><td width="80%">$siteNotice</td> |
1904 | 1910 | <td width="20%" align="right">[<a id="dismissLink" href="$spUrl">$msgClose</a>]</td></tr></table> |