Commit 6035953b authored by Nigel McNie's avatar Nigel McNie
Browse files

More use of text_to_path to standardise generation of folder names for views.

parent 36701054
......@@ -172,7 +172,7 @@ class PluginExportHtml extends PluginExport {
array('text' => $view->get('title'), 'path' => 'index.html'),
));
$directory = $this->exportdir . '/' . $this->rootdir . '/views/' . preg_replace('#[^a-zA-Z0-9_-]+#', '-', $view->get('title'));
$directory = $this->exportdir . '/' . $this->rootdir . '/views/' . self::text_to_path($view->get('title'));
if (!check_dir_exists($directory)) {
throw new SystemException("Could not create directory for view $viewid");
}
......@@ -194,7 +194,7 @@ class PluginExportHtml extends PluginExport {
if ($view->get('type') != 'profile') {
$views[] = array(
'title' => $view->get('title'),
'folder' => preg_replace('#[^a-zA-Z0-9_-]+#', '-', $view->get('title')),
'folder' => self::text_to_path($view->get('title')),
);
}
}
......
Markdown is supported
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