Commit 8241d0f3 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add description for admin public folder

parent 5d74d150
......@@ -428,11 +428,13 @@ class ArtefactTypeFolder extends ArtefactTypeFileBase {
AND f.adminfiles = 1
AND a.parent IS NULL', array($name, 'folder'));
if (!$folderid) {
$description = get_string('adminpublicdirdescription', 'admin');
global $USER;
$data = (object) array('title' => $name);
$data = (object) array('title' => $name,
'description' => $description,
'owner' => $USER->get('id'),
'adminfiles' => 1);
$f = new ArtefactTypeFolder(0, $data);
$f->set('owner', $USER->get('id'));
$f->set('adminfiles', 1);
$f->commit();
$folderid = $f->get('id');
}
......
......@@ -109,6 +109,7 @@ $string['viruscheckingdescription'] = 'If checked, virus checking will be enable
//$string['menueditor'] = 'Menu editor';
$string['adminfile'] = 'Admin file';
$string['adminpublicdirname'] = 'public'; // Name of the directory in which to store public admin files
$string['adminpublicdirdescription'] = 'Files accessible by logged out users';
$string['badmenuitemtype'] = 'Unknown menu item type';
$string['externallink'] = 'External link';
$string['type'] = 'Type';
......
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