Example #1
0
                $notification->push(_("The uploaded file does not appear " . "to be a valid NeverWinter module."), 'horde.error');
            }
        } else {
            // report the error
            if (!empty($info['module']['error'])) {
                $notification->push(sprintf(_("There was a problem " . "uploading the module: %s"), $info['module']['error']), 'horde.error');
            } elseif (!filesize($info['module']['file'])) {
                $notification->push(_("The uploaded file appears to " . "be empty. It may not exist on your computer."), 'horde.error');
            } else {
                $notification->push(_("General failure, please debug!"), 'horde.error');
            }
        }
    }
}
// get the listing of modules
$moduleList = NWNAdmin::getModuleList($moduleDir);
$moduleDone = empty($moduleList);
if ($moduleDone) {
    $notification->push(_("No modules were found!"), 'horde.warning');
}
$currentModule = $nwndriver->getModule();
// page setup
$title = _("Modules");
require_once NWNADMIN_TEMPLATES . '/common-header.inc';
require_once NWNADMIN_TEMPLATES . '/menu.inc';
// render the available modules
if (!$moduleDone) {
    require NWNADMIN_TEMPLATES . '/module/header.inc';
    $style = 'item1';
    foreach ($moduleList as $module) {
        $currentFlag = false;