Parcourir la source

Fix a bug for mark as read before 1 day/week

Current output was not remembered.
Marien Fressinaud il y a 11 ans
Parent
commit
d30acf4e00
1 fichiers modifiés avec 6 ajouts et 4 suppressions
  1. 6 4
      app/layout/nav_menu.phtml

+ 6 - 4
app/layout/nav_menu.phtml

@@ -208,19 +208,21 @@
 				</li>
 				</li>
 				<li class="separator"></li>
 				<li class="separator"></li>
 <?php
 <?php
-	$today = $this->today;
-	$one_week = $today - 604800;
+	$mark_before_today = $arUrl;
+	$mark_before_today['params']['idMax'] = $this->today . '000000';
+	$mark_before_one_week = $arUrl;
+	$mark_before_one_week['params']['idMax'] = ($this->today - 604800) . '000000';
 ?>
 ?>
 				<li class="item">
 				<li class="item">
 					<button class="as-link <?php echo $confirm; ?>"
 					<button class="as-link <?php echo $confirm; ?>"
 					        form="mark-read"
 					        form="mark-read"
-					        formaction="<?php echo _url('entry', 'read', 'is_read', 1, 'get', $get, 'idMax', $today . '000000'); ?>"
+					        formaction="<?php echo Minz_Url::display($mark_before_today); ?>"
 					        type="submit"><?php echo _t('before_one_day'); ?></button>
 					        type="submit"><?php echo _t('before_one_day'); ?></button>
 				</li>
 				</li>
 				<li class="item">
 				<li class="item">
 					<button class="as-link <?php echo $confirm; ?>"
 					<button class="as-link <?php echo $confirm; ?>"
 					        form="mark-read"
 					        form="mark-read"
-					        formaction="<?php echo _url('entry', 'read', 'is_read', 1, 'get', $get, 'idMax', $one_week . '000000'); ?>"
+					        formaction="<?php echo Minz_Url::display($mark_before_one_week); ?>"
 					        type="submit"><?php echo _t('before_one_week'); ?></button>
 					        type="submit"><?php echo _t('before_one_week'); ?></button>
 				</li>
 				</li>
 			</ul>
 			</ul>