فهرست منبع

Do not render irrelevant HTML for Ajax calls (#4310)

#fix https://github.com/FreshRSS/FreshRSS/issues/4309
Alexandre Alapetite 4 سال پیش
والد
کامیت
0698c8a0b2
3فایلهای تغییر یافته به همراه13 افزوده شده و 7 حذف شده
  1. 4 2
      app/layout/layout.phtml
  2. 4 2
      app/views/index/normal.phtml
  3. 5 3
      app/views/index/reader.phtml

+ 4 - 2
app/layout/layout.phtml

@@ -47,8 +47,10 @@ if (_t('gen.dir') === 'rtl') {
 	</head>
 	<body class="<?= Minz_Request::actionName() ?>">
 <?php
-	flush();
-	$this->partial('header');
+	if (!Minz_Request::param('ajax')) {
+		flush();
+		$this->partial('header');
+	}
 ?>
 
 <div id="global">

+ 4 - 2
app/views/index/normal.phtml

@@ -1,7 +1,9 @@
 <?php
 /** @var FreshRSS_View $this */
-$this->partial('aside_feed');
-$this->partial('nav_menu');
+if (!Minz_Request::param('ajax')) {
+	$this->partial('aside_feed');
+	$this->partial('nav_menu');
+}
 
 call_user_func($this->callbackBeforeEntries, $this);
 

+ 5 - 3
app/views/index/reader.phtml

@@ -1,7 +1,9 @@
-<?php /** @var FreshRSS_View $this */ ?>
 <?php
-$this->partial('aside_feed');
-$this->partial('nav_menu');
+/** @var FreshRSS_View $this */
+if (!Minz_Request::param('ajax')) {
+	$this->partial('aside_feed');
+	$this->partial('nav_menu');
+}
 
 call_user_func($this->callbackBeforeEntries, $this);