Forráskód Böngészése

Don't show 'link to calendar' unless you can actually do that (fixes #1190)

Signed-off-by: Michael Eshom <[email protected]>
Michael Eshom 11 éve
szülő
commit
c30b9f7fb0
1 módosított fájl, 3 hozzáadás és 0 törlés
  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'] : '';