parameter 'action' can be set, to run a different method in the view class

This commit is contained in:
Uwe Steinmann 2015-08-18 22:36:55 +02:00
parent 5a1c4768af
commit bf05ef4f95

View File

@ -47,6 +47,12 @@ if(isset($_GET['userid']) && $_GET['userid']) {
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'seluser'=>$seluser, 'allusers'=>$users, 'allgroups'=>$groups, 'passwordstrength'=>$settings->_passwordStrength, 'passwordexpiration'=>$settings->_passwordExpiration, 'httproot'=>$settings->_httpRoot, 'enableuserimage'=>$settings->_enableUserImage, 'undeluserids'=>explode(',', $settings->_undelUserIds), 'workflowmode'=>$settings->_workflowMode, 'quota'=>$settings->_quota));
if($view) {
if(isset($_GET['action']) && $_GET['action']) {
if(method_exists($view, $_GET['action'])) {
$view->{$_GET['action']}();
exit;
}
}
$view->show();
exit;
}