Bladeren bron

Merge pull request #1192 from Oldiesmann/release-2.1

Don't show 'link to calendar' unless you can actually do that (fixes #1190)
Michael Eshom 11 jaren geleden
bovenliggende
commit
a7604eb4f4
1 gewijzigde bestanden met toevoegingen van 3 en 0 verwijderingen
  1. 3 0
      Sources/Display.php

+ 3 - 0
Sources/Display.php

@@ -1136,6 +1136,9 @@ function Display()
 		$context['wireless_moderate'] = isset($_GET['moderate']) ? ';moderate' : '';
 	}
 
+	// You can't link an existing topoic to the calendar unless you can modify the first post...
+	$context['calendar_post'] &= allowedTo('modify_any') || (allowedTo('modify_own') && $context['user']['started']);
+
 	// Load up the "double post" sequencing magic.
 	checkSubmitOnce('register');
 	$context['name'] = isset($_SESSION['guest_name']) ? $_SESSION['guest_name'] : '';