Commit ea599cad authored by Pablo Rauzy's avatar Pablo Rauzy
Browse files

allow for lang code in file name (e.g., .html.en vs .html.fr) in pro mode

parent e28ff3f3
......@@ -795,7 +795,7 @@ elseif (isset($_GET['newpage'])) {
}
else {
$file = $prefix.str_replace('..', '', $_POST['new_file']);
if ($type == 'page' && (substr($file, -5) != '.html')) { $file .= '.html'; }
if ($type == 'page' && !preg_match('/\.html(\.[a-z]{2})?$/', $file)) { $file .= '.html'; }
}
$status = ($type == 'link') ? 'lnk' : 'new';
$content = ($type == 'link') ? $settings['url'] : $db->escapeString("<h2>$title</h2><p>Nothing here yet.</p>");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment