diff options
author | Simon Rettberg | 2014-05-23 20:49:02 +0200 |
---|---|---|
committer | Simon Rettberg | 2014-05-23 20:49:02 +0200 |
commit | fe6ac16498b05d0f0c8ed7fda394273815d3d6da (patch) | |
tree | cadf5f103ef3db7ba1b40d59d85937c998aad22f /modules/sysconfig/addmodule_ad.inc.php | |
parent | Server Setup page (diff) | |
download | slx-admin-fe6ac16498b05d0f0c8ed7fda394273815d3d6da.tar.gz slx-admin-fe6ac16498b05d0f0c8ed7fda394273815d3d6da.tar.xz slx-admin-fe6ac16498b05d0f0c8ed7fda394273815d3d6da.zip |
Stuff (WIP)
Diffstat (limited to 'modules/sysconfig/addmodule_ad.inc.php')
-rw-r--r-- | modules/sysconfig/addmodule_ad.inc.php | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/modules/sysconfig/addmodule_ad.inc.php b/modules/sysconfig/addmodule_ad.inc.php index ab897096..ac820bbc 100644 --- a/modules/sysconfig/addmodule_ad.inc.php +++ b/modules/sysconfig/addmodule_ad.inc.php @@ -86,23 +86,14 @@ class AdModule_Finish extends AddModule_Base protected function preprocessInternal() { - $data = json_encode(array( - 'server' => Request::post('server'), - 'searchbase' => Request::post('searchbase'), - 'binddn' => Request::post('binddn'), - 'bindpw' => Request::post('bindpw'), - )); - Database::exec("INSERT INTO configtgz_module (title, moduletype, filename, contents) " - . " VALUES (:title, 'AD_AUTH', '', :content)", array( - 'title' => 'AD: ' . Request::post('server'), - 'content' => $data)); - $id = Database::lastInsertId(); - $name = CONFIG_TGZ_LIST_DIR . '/modules/AD_AUTH_id_' . $id . '.' . mt_rand() . '.tgz'; - Database::exec("UPDATE configtgz_module SET filename = :filename WHERE moduleid = :id LIMIT 1", array( - 'id' => $id, - 'filename' => $name - )); - $tgz = Taskmanager::submit('DummyTask', array()); + $config = ConfigModule::insertAdConfig('AD: ' . Request::post('server'), + Request::post('server'), + Request::post('searchbase'), + Request::post('binddn'), + Request::post('bindpw') + ); + $config['proxyip'] = Property::getServerIp(); + $tgz = Taskmanager::submit('CreateAdConfig', $config); if (isset($tgz['id'])) { $ldadp = Taskmanager::submit('DummyTask', array('parentTask' => $tgz['id'])); } @@ -111,7 +102,7 @@ class AdModule_Finish extends AddModule_Base return; } $this->taskIds = array( - 'tm-module' => $tgz['id'], + 'tm-config' => $tgz['id'], 'tm-ldadp' => $ldadp['id'] ); } |