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