assign('promptElFinder', 'y'); // Determine the current filegal default view $defView = $prefs['fgal_default_view']; if (isset($defView)) { if ($defView == 'finder') { $smarty->assign('useElFinderAsDefault', true); } else { $smarty->assign('useElFinderAsDefault', false); } } } // File Gallery if ($prefs['fgal_use_db'] !== 'y') { $showPage = true; $smarty->assign('promptFileGalleryStorage', 'y'); } // Attachments and not in the file gallery if (($prefs['feature_wiki_attachments'] === 'y') && ($prefs['feature_use_fgal_for_wiki_attachments'] !== 'y')) { $showPage = true; $smarty->assign('promptAttachmentStorage', 'y'); } return $showPage; } public function getTemplate() { $wizardTemplate = 'wizard/admin_files_storage.tpl'; return $wizardTemplate; } public function onContinue($homepageUrl) { global $tikilib; // Run the parent first parent::onContinue($homepageUrl); if (isset($_REQUEST['useElFinderAsDefault']) && $_REQUEST['useElFinderAsDefault'] === 'on') { // Set ElFinder view as the default File Gallery view $tikilib->set_preference('fgal_default_view', 'finder'); } else { // Re-set back default File Gallery view to list $tikilib->set_preference('fgal_default_view', 'list'); } } }