try to prevent hint duplication

main
Philip Häusler 10 years ago
parent 30c8b48996
commit 8261933bec

@ -5,7 +5,7 @@ function admin_news() {
if (! isset($_GET["action"])) { if (! isset($_GET["action"])) {
redirect(page_link_to("news")); redirect(page_link_to("news"));
} else { } else {
$html = '<div class="col-md-12"><h1>' . _("Edit news entry") . '</h1>'; $html = '<div class="col-md-12"><h1>' . _("Edit news entry") . '</h1>' . msg();
if (isset($_REQUEST['id']) && preg_match("/^[0-9]{1,11}$/", $_REQUEST['id'])) if (isset($_REQUEST['id']) && preg_match("/^[0-9]{1,11}$/", $_REQUEST['id']))
$id = $_REQUEST['id']; $id = $_REQUEST['id'];
else else

@ -264,6 +264,7 @@ function admin_user() {
} }
} }
} else { } else {
msg();
redirect(page_link_to('users')); redirect(page_link_to('users'));
} }

@ -90,32 +90,30 @@ if (! isset($_REQUEST['p']))
if (isset($_REQUEST['p']) && preg_match("/^[a-z0-9_]*$/i", $_REQUEST['p']) && (in_array($_REQUEST['p'], $free_pages) || in_array($_REQUEST['p'], $privileges))) { if (isset($_REQUEST['p']) && preg_match("/^[a-z0-9_]*$/i", $_REQUEST['p']) && (in_array($_REQUEST['p'], $free_pages) || in_array($_REQUEST['p'], $privileges))) {
$p = $_REQUEST['p']; $p = $_REQUEST['p'];
$title = $p;
$content = "";
if (isset($user)) { if (isset($user)) {
$hints = "";
if (User_is_freeloader($user)) if (User_is_freeloader($user))
error(sprintf(_("You freeloaded at least %s shifts. Shift signup is locked. Please go to heavens desk to be unlocked again."), $max_freeloadable_shifts)); error(sprintf(_("You freeloaded at least %s shifts. Shift signup is locked. Please go to heavens desk to be unlocked again."), $max_freeloadable_shifts));
// Hinweis für Engel, die noch nicht angekommen sind // Hinweis für Engel, die noch nicht angekommen sind
if ($user['Gekommen'] == 0) if ($user['Gekommen'] == 0)
error(_("You are not marked as arrived. Please go to heaven's desk, get your angel badge and/or tell them that you arrived already.")); error(_("You are not marked as arrived. Please go to heaven's desk, get your angel badge and/or tell them that you arrived already."));
if ($enable_tshirt_size && $user['Size'] == "") if ($enable_tshirt_size && $user['Size'] == "")
error(_("You need to specify a tshirt size in your settings!")); error(_("You need to specify a tshirt size in your settings!"));
if ($user['DECT'] == "") if ($user['DECT'] == "")
error(_("You need to specify a DECT phone number in your settings! If you don't have a DECT phone, just enter \"-\".")); error(_("You need to specify a DECT phone number in your settings! If you don't have a DECT phone, just enter \"-\"."));
// Erzengel Hinweis für unbeantwortete Fragen // Erzengel Hinweis für unbeantwortete Fragen
if ($p != "admin_questions") if ($p != "admin_questions")
admin_new_questions(); admin_new_questions();
user_angeltypes_unconfirmed_hint(); user_angeltypes_unconfirmed_hint();
} }
$title = $p;
$content = "";
if ($p == "api") { if ($p == "api") {
require_once realpath(__DIR__ . '/../includes/controller/api.php'); require_once realpath(__DIR__ . '/../includes/controller/api.php');
error("Api disabled temporily."); error("Api disabled temporily.");
@ -240,7 +238,7 @@ echo template_render('../templates/layout.html', array(
'title' => $title, 'title' => $title,
'atom_link' => ($p == 'news' || $p == 'user_meetings') ? '<link href="' . page_link_to('atom') . (($p == 'user_meetings') ? '&amp;meetings=1' : '') . '&amp;key=' . $user['api_key'] . '" type="application/atom+xml" rel="alternate" title="Atom Feed">' : '', 'atom_link' => ($p == 'news' || $p == 'user_meetings') ? '<link href="' . page_link_to('atom') . (($p == 'user_meetings') ? '&amp;meetings=1' : '') . '&amp;key=' . $user['api_key'] . '" type="application/atom+xml" rel="alternate" title="Atom Feed">' : '',
'menu' => make_menu(), 'menu' => make_menu(),
'content' => $content, 'content' => msg() . $content,
'header_toolbar' => header_toolbar(), 'header_toolbar' => header_toolbar(),
'faq_url' => $faq_url, 'faq_url' => $faq_url,
'locale' => $_SESSION['locale'] 'locale' => $_SESSION['locale']

@ -12,7 +12,7 @@
} }
} }
</script> </script>
<form class="form-inline" action="#shifts" method="get"> <form class="form-inline" action="" method="get">
<input type="hidden" name="p" value="user_shifts"> <input type="hidden" name="p" value="user_shifts">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">

Loading…
Cancel
Save