Get and display list description if you edit a list (Preparation for #6)

This commit is contained in:
2021-10-28 13:40:15 +02:00
parent 82741bc121
commit 2231b80846
2 changed files with 31 additions and 0 deletions

View File

@@ -71,6 +71,20 @@ $prefix = file_get_contents("$lists_path/$domain/$list_name/control/prefix");
// Remove trailing empty symbols
$prefix = trim($prefix);
# Check whether there is a listdescription file
if (file_exists("$lists_path/$domain/$list_name/control/listdescription"))
{
// Get list description
$listdescription = file_get_contents("$lists_path/$domain/$list_name/control/listdescription");
// Remove trailing empty symbols
$listdescription = trim($listdescription);
}
else
{
$listdescription = NULL;
}
// Load page
$smarty->assign("headline", $headline);
$smarty->assign("web_url", $web_url);
@@ -79,6 +93,7 @@ $smarty->assign("list_name", $list_name);
$smarty->assign("domain", $domain);
$smarty->assign("moderators", $moderators);
$smarty->assign("prefix", $prefix);
$smarty->assign("listdescription", $listdescription);
$smarty->assign("username", $_SESSION["username"]);
$smarty->assign("success", $success);
$smarty->display("edit_list.tpl");