diff --git a/include/class.timezone.php b/include/class.timezone.php index 10449350c600dc968d543998da1e5e818f8ae03d..7ccd3b3d99bef49a8af8070a6c32a8ca44e8e6d2 100644 --- a/include/class.timezone.php +++ b/include/class.timezone.php @@ -348,7 +348,7 @@ class DbTimezone { } function get_by_dst($preliminary_timezone) { - $rules = []; + $rules = array(); foreach (self::$dst_rules['years'] as $Y) { $rules[] = $this->dst_dates($Y); } diff --git a/scp/js/scp.js b/scp/js/scp.js index e356e825e7810bdf1c92891efa61af38a6f58cde..0c2e7ee7ab3116bdea0ad407c4c81a7a4037f3df 100644 --- a/scp/js/scp.js +++ b/scp/js/scp.js @@ -464,8 +464,15 @@ var scp_prep = function() { onmove(); } + // Drop the sticky bar on PJAX navigation + $(document).on('pjax:click', function() { + placeholder.removeAttr('style'); + $that.stop().removeClass('fixed'); + $(window).off('.sticky'); + }); + $that.find('.content').width($that.width()); - $(window).scroll(function (event) { + $(window).on('scroll.sticky', function (event) { // what the y position of the scroll is var y = $(this).scrollTop();