@@ -42,7 +42,7 @@ public function __construct()
4242 $ this ->conf = $ conf ;
4343 }
4444
45- //TODO uh ?
45+ //: TODO Implement the translation function and langauge files for the installer.
4646 public function lng ($ text )
4747 {
4848 return $ text ;
@@ -100,19 +100,15 @@ public function free_query($query,$default)
100100 return $ answer ;
101101 }
102102
103+ /*
103104 // TODO: this function is not used atmo I think - pedro
104105 function request_language(){
105106
106107 swriteln(lng('Enter your language'));
107108 swriteln(lng('de, en'));
108109
109- /*
110- do {
111- $lang = sread(2);
112- } while (!$this->check_break($lang) or $this->
113- */
114-
115110 }
111+ */
116112
117113 /** Create the database for ISPConfig */
118114 public function configure_database ()
@@ -608,6 +604,31 @@ public function install_ispconfig()
608604 $ content = str_replace ('{server_id} ' , $ this ->conf ['server_id ' ], $ content );
609605 wf ("$ install_dir/server/lib/ $ configfile " , $ content );
610606
607+ //* Enable the server modules and plugins.
608+ // TODO: Implement a selector which modules and plugins shall be enabled.
609+ $ dir = $ install_dir .'/server/mods-available/ ' ;
610+ if (is_dir ($ dir )) {
611+ if ($ dh = opendir ($ dir )) {
612+ while (($ file = readdir ($ dh )) !== false ) {
613+ if ($ file != '. ' && $ file != '.. ' ) {
614+ symlink ($ install_dir .'/server/mods-enabled/ ' .$ file ,$ install_dir .'/server/mods-available/ ' .$ file )
615+ }
616+ }
617+ closedir ($ dh );
618+ }
619+ }
620+
621+ $ dir = $ install_dir .'/server/plugins-available/ ' ;
622+ if (is_dir ($ dir )) {
623+ if ($ dh = opendir ($ dir )) {
624+ while (($ file = readdir ($ dh )) !== false ) {
625+ if ($ file != '. ' && $ file != '.. ' ) {
626+ symlink ($ install_dir .'/server/plugins-enabled/ ' .$ file ,$ install_dir .'/server/plugins-available/ ' .$ file )
627+ }
628+ }
629+ closedir ($ dh );
630+ }
631+ }
611632
612633 //* Chmod the files
613634 $ command = "chmod -R 750 $ install_dir " ;
@@ -632,7 +653,7 @@ public function install_ispconfig()
632653 caselog ($ command .' &> /dev/null ' , __FILE__ , __LINE__ , "EXECUTED: $ command " , "Failed to execute the command $ command " );
633654
634655 //* Copy the ISPConfig vhost for the controlpanel
635- //TODO These are missing! should they be "vhost_dist_*_dir" ?
656+ // TODO: These are missing! should they be "vhost_dist_*_dir" ?
636657 $ vhost_conf_dir = $ this ->conf ['apache ' ]['vhost_conf_dir ' ];
637658 $ vhost_conf_enabled_dir = $ this ->conf ['apache ' ]['vhost_conf_enabled_dir ' ];
638659 copy ('tpl/apache_ispconfig.vhost.master ' , "$ vhost_conf_dir/ispconfig.vhost " );
0 commit comments