Fixed bugs in opensuse config and docs
Fixed a bug that prevented the modification of website settings of a site that the user created.
| | |
| | | mysqladmin -h ispconfig.local -u root password yourrootsqlpassword |
| | | |
| | | |
| | | // Install phpmyadmin |
| | | yast2 -i pwgen |
| | | rpm -i http://download.opensuse.org/repositories/server:/php:/applications/openSUSE_11.1/noarch/phpMyAdmin-3.1.2-1.1.noarch.rpm |
| | | |
| | | |
| | | 2) Install Amavisd-new, Spamassassin and Clamav (1 line!): |
| | | |
| | | yast2 -i amavisd-new clamav clamav-db zoo unzip unrar bzip2 unarj perl-DBD-mysql |
| | |
| | | //* Create the logging directory for the vhost logfiles |
| | | exec('mkdir -p /var/log/ispconfig/httpd'); |
| | | |
| | | if(is_file('/etc/suphp/suphp.conf')) { |
| | | replaceLine('/etc/suphp.conf','php=php:/srv/www/cgi-bin/php5','x-httpd-suphp=php:/srv/www/cgi-bin/php5',0); |
| | | replaceLine('/etc/suphp.conf','docroot=','docroot=/var/clients',0); |
| | | } |
| | | |
| | | // Sites enabled and avaulable dirs |
| | | exec('mkdir -p '.$conf['apache']['vhost_conf_enabled_dir']); |
| | | exec('mkdir -p '.$conf['apache']['vhost_conf_dir']); |
| | |
| | | |
| | | if(is_file('/etc/suphp/suphp.conf')) { |
| | | replaceLine('/etc/suphp/suphp.conf','php=php:/usr/bin','x-httpd-suphp=php:/usr/bin/php-cgi',0); |
| | | replaceLine('/etc/suphp/suphp.conf','docroot=','docroot=/var/clients',0); |
| | | //replaceLine('/etc/suphp/suphp.conf','docroot=','docroot=/var/clients',0); |
| | | } |
| | | |
| | | if(is_file('/etc/apache2/sites-enabled/000-default')) { |
| | |
| | | $sql_insert_val = '';
|
| | | $sql_update = '';
|
| | |
|
| | | if(!is_array($this->formDef)) $app->error("Keine Formulardefinition vorhanden.");
|
| | | if(!is_array($this->formDef['tabs'][$tab])) $app->error("Tab ist leer oder existiert nicht (TAB: $tab).");
|
| | | if(!is_array($this->formDef)) $app->error("Form definition not found."); |
| | | if(!is_array($this->formDef['tabs'][$tab])) $app->error("The tab is empty or does not exist (TAB: $tab)."); |
| | |
|
| | | // gehe durch alle Felder des Tabs
|
| | | // go trough all fields of the tab |
| | | if(is_array($record)) {
|
| | | foreach($this->formDef['tabs'][$tab]['fields'] as $key => $field) {
|
| | | // Wenn es kein leeres Passwortfeld ist
|
| | |
| | | return $_SESSION["s"]["form"]["tab"];
|
| | | }
|
| | |
|
| | | function isReadonlyTab($tab) {
|
| | | if(isset($this->formDef['tabs'][$tab]['readonly']) && $this->formDef['tabs'][$tab]['readonly'] == true) {
|
| | | function isReadonlyTab($tab, $primary_id) { |
| | | global $app, $conf; |
| | | |
| | | // Add backticks for incomplete table names. |
| | | if(stristr($this->formDef['db_table'],'.')) { |
| | | $escape = ''; |
| | | } else { |
| | | $escape = '`'; |
| | | } |
| | | |
| | | $sql = "SELECT sys_userid FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$this->formDef['db_table_idx']." = ".$primary_id; |
| | | $record = $app->db->queryOneRecord($sql); |
| | | |
| | | // return true if the readonly flag of the form is set and the current loggedin user is not the owner of the record. |
| | | if(isset($this->formDef['tabs'][$tab]['readonly']) && $this->formDef['tabs'][$tab]['readonly'] == true && $record['sys_userid'] != $_SESSION["s"]["user"]["userid"]) { |
| | | return true;
|
| | | } else {
|
| | | return false;
|
| | |
| | | |
| | | function onUpdateSave($sql) { |
| | | global $app; |
| | | if(!empty($sql) && !$app->tform->isReadonlyTab($app->tform->getCurrentTab())) { |
| | | if(!empty($sql) && !$app->tform->isReadonlyTab($app->tform->getCurrentTab(),$this->id)) { |
| | | $app->db->query($sql); |
| | | if($app->db->errorMessage != '') die($app->db->errorMessage); |
| | | } |
| | |
| | | ScriptAlias /php5-cgi <tmpl_var name='cgi_starter_path'><tmpl_var name='cgi_starter_script'> |
| | | Action php5-cgi /php5-cgi |
| | | AddHandler php5-cgi .php .php3 .php4 .php5 |
| | | <Directory {tmpl_var name='cgi_starter_path'}> |
| | | Order allow,deny |
| | | Allow from all |
| | | </Directory> |
| | | </tmpl_if> |
| | | <tmpl_if name='php' op='==' value='fast-cgi'> |
| | | # php as fast-cgi enabled |
| | |
| | | ScriptAlias /php5-cgi <tmpl_var name='cgi_starter_path'><tmpl_var name='cgi_starter_script'> |
| | | Action php5-cgi /php5-cgi |
| | | AddHandler php5-cgi .php .php3 .php4 .php5 |
| | | <Directory {tmpl_var name='cgi_starter_path'}> |
| | | Order allow,deny |
| | | Allow from all |
| | | </Directory> |
| | | </tmpl_if> |
| | | <tmpl_if name='php' op='==' value='fast-cgi'> |
| | | # php as fast-cgi enabled |
| | |
| | | |
| | | //* Disable shell user temporarily if we use jailkit |
| | | if($data['new']['chroot'] == 'jailkit') { |
| | | $command = 'usermod --lock '.escapeshellcmd($data['new']['username']); |
| | | $command = 'usermod -L '.escapeshellcmd($data['new']['username']); |
| | | exec($command); |
| | | $app->log("Disabling shelluser temporarily: ".$data['new']['username'],LOGLEVEL_DEBUG); |
| | | $app->log("Disabling shelluser temporarily: ".$command,LOGLEVEL_DEBUG); |
| | | } |
| | | |
| | | } else { |
| | |
| | | |
| | | $this->_setup_jailkit_chroot(); |
| | | |
| | | $command .= 'usermod --unlock '.escapeshellcmd($data['new']['username']); |
| | | $command .= 'usermod -U '.escapeshellcmd($data['new']['username']); |
| | | exec($command); |
| | | |
| | | $this->_add_jailkit_user(); |
| | |
| | | require("lib/app.inc.php"); |
| | | |
| | | set_time_limit(0); |
| | | ini_set('error_reporting','E_ALL & ~E_NOTICE'); |
| | | |
| | | // make sure server_id is always an int |
| | | $conf["server_id"] = intval($conf["server_id"]); |