$setup = new $setupclass($AppUI, $config, new w2p_Database_Query()); } } switch ($cmd) { case 'moveup': case 'movedn': case 'movefirst': case 'movelast': $obj->move($cmd); $AppUI->setMsg('Module re-ordered', UI_MSG_OK); break; case 'toggle': // just toggle the active state of the table entry $obj->mod_active = 1 - $obj->mod_active; $obj->mod_ui_active = $obj->mod_active; $obj->store(); $AppUI->setMsg('Module state changed', UI_MSG_OK); break; case 'toggleMenu': // just toggle the active state of the table entry $obj->mod_ui_active = 1 - $obj->mod_ui_active; $obj->store(); $AppUI->setMsg('Module menu state changed', UI_MSG_OK); break; case 'install': $result = $setup->install($config); if (!$result) { $AppUI->setMsg($setup->getErrors(), UI_MSG_ERROR); } else { $obj->bind($config); // add to the installed modules table