Commit 74294ea9 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

🚑 fix(setup) Fix PHP errors in setup related to recent code changes

issue #5919
parent a3ad606d
......@@ -87,8 +87,9 @@ if (isset($_POST['lang_selected']) && $_POST['lang_selected'] != '') {
Language::init($lang);
$smarty->assign("rtl", Language::isRTL($lang));
$smarty->assign("must", '<span class="must">*</span>');
$smarty->assign('lang', preg_replace('/_.*$/', '', $lang));
$smarty->assign('rtl', Language::isRTL($lang));
$smarty->assign('must', '<span class="must">*</span>');
/* Minimal config */
if (!session::global_is_set('config')) {
......
......@@ -71,6 +71,10 @@ class NoManagementClassException extends FusionDirectoryException
{
}
class UnknownClassException extends FusionDirectoryException
{
}
class LDAPFailureException extends FusionDirectoryException
{
}
......@@ -505,6 +505,9 @@ class pluglist {
{
$plist = session::global_get('plist');
if ($plist) {
if (!isset($plist->info[$cname])) {
throw new UnknownClassException($cname);
}
return $plist->info[$cname];
} else {
trigger_error('plist not loaded yet');
......
......@@ -155,7 +155,12 @@ class simplePlugin
$this->parent = $parent;
$this->mainTab = $mainTab;
$plInfo = pluglist::pluginInfos(get_class($this));
try {
$plInfo = pluglist::pluginInfos(get_class($this));
} catch (UnknownClassException $e) {
/* May happen in special cases like setup */
$plInfo = array();
}
if (empty($this->objectclasses) && isset($plInfo['plObjectClass'])) {
$this->objectclasses = $plInfo['plObjectClass'];
......
......@@ -64,7 +64,7 @@ class setup
* but only do this, if user is allowed to use the setup.
* If setupsetupStepWelcome is_completed, we are allowed to view those infos-
*/
if (isset($_GET['info']) && preg_match("/setupStepWelcome/i", get_class($this->o_steps[1])) && $this->o_steps[1]->is_completed()) {
if (isset($_GET['info']) && preg_match('/setupStepWelcome/i', get_class($this->o_steps[0])) && $this->o_steps[0]->is_completed()) {
phpinfo();
exit();
}
......
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