Commit 6f53cf7c authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Prepend 'public:' to the names of files from the admin public folder in

the logged-in menu editor
parent c778a704
...@@ -38,8 +38,10 @@ $result = array(); ...@@ -38,8 +38,10 @@ $result = array();
if ($adminfiles = ArtefactTypeFile::get_admin_files($public)) { if ($adminfiles = ArtefactTypeFile::get_admin_files($public)) {
foreach ($adminfiles as $adminfile) { foreach ($adminfiles as $adminfile) {
$result['adminfiles'][] = array('name' => $adminfile->title, $result['adminfiles'][] = array(
'id' => $adminfile->id); 'name' => (!$public && $adminfile->parent ? get_string('public','admin').':' : '')
. $adminfile->title,
'id' => $adminfile->id);
} }
} }
else { else {
......
...@@ -429,7 +429,7 @@ class ArtefactTypeFile extends ArtefactTypeFileBase { ...@@ -429,7 +429,7 @@ class ArtefactTypeFile extends ArtefactTypeFileBase {
$prefix = get_config('dbprefix'); $prefix = get_config('dbprefix');
return get_records_sql_array(' return get_records_sql_array('
SELECT SELECT
a.id, a.title a.id, a.title, a.parent
FROM ' . $prefix . 'artefact a FROM ' . $prefix . 'artefact a
INNER JOIN ' . $prefix . 'artefact_file_files f ON f.artefact = a.id INNER JOIN ' . $prefix . 'artefact_file_files f ON f.artefact = a.id
WHERE f.adminfiles = 1 WHERE f.adminfiles = 1
......
...@@ -132,6 +132,7 @@ $string['loadingmenuitems'] = 'Loading menu items'; ...@@ -132,6 +132,7 @@ $string['loadingmenuitems'] = 'Loading menu items';
$string['loadmenuitemsfailed'] = 'Failed to load menu items'; $string['loadmenuitemsfailed'] = 'Failed to load menu items';
$string['loggedinmenu'] = 'Logged in menu'; $string['loggedinmenu'] = 'Logged in menu';
$string['loggedoutmenu'] = 'Public menu'; $string['loggedoutmenu'] = 'Public menu';
$string['public'] = 'public';
// Site content // Site content
$string['about'] = 'About'; $string['about'] = 'About';
......
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