From 64f24e4eda19e1b9888f99a19d36ae49586a962b Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Mon, 07 Nov 2011 15:28:26 -0500 Subject: [PATCH] Updated greek translation. --- server/plugins-available/nginx_plugin.inc.php | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 9fd5a8a..b4ba1b7 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -828,7 +828,8 @@ $tpl->setVar('stats_auth_passwd_file', $data['new']['document_root']."/.htpasswd_stats"); // Create basic http auth for other directories - $tpl->setLoop('basic_auth_locations', $this->_create_web_folder_auth_configuration($data['new'])); + $basic_auth_locations = $this->_create_web_folder_auth_configuration($data['new']); + if(is_array($basic_auth_locations) && !empty($basic_auth_locations)) $tpl->setLoop('basic_auth_locations', $basic_auth_locations); $vhost_file = escapeshellcmd($web_config['nginx_vhost_conf_dir'].'/'.$data['new']['domain'].'.vhost'); //* Make a backup copy of vhost file @@ -1104,7 +1105,7 @@ if(substr($folder['path'],0,1) == '/') $folder['path'] = substr($folder['path'],1); if(substr($folder['path'],-1) == '/') $folder['path'] = substr($folder['path'],0,-1); $folder_path = escapeshellcmd($website['document_root'].'/web/'.$folder['path']); - if(substr($folder_path,-1) != '/' && $folder['path'] != '') $folder_path .= '/'; + if(substr($folder_path,-1) != '/') $folder_path .= '/'; //* Check if the resulting path is inside the docroot if(stristr($folder_path,'..') || stristr($folder_path,'./') || stristr($folder_path,'\\')) { @@ -1162,7 +1163,7 @@ $folder_id = $data['old']['web_folder_id']; - $folder = $app->db->queryOneRecord("SELECT * FROM web_folder WHERE web_folder_id = ".intval($folder_id)); + $folder = $data['old']; $website = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($folder['parent_domain_id'])); if(!is_array($folder) or !is_array($website)) { @@ -1174,7 +1175,7 @@ if(substr($folder['path'],0,1) == '/') $folder['path'] = substr($folder['path'],1); if(substr($folder['path'],-1) == '/') $folder['path'] = substr($folder['path'],0,-1); $folder_path = realpath($website['document_root'].'/web/'.$folder['path']); - if(substr($folder_path,-1) != '/' && $folder['path'] != '') $folder_path .= '/'; + if(substr($folder_path,-1) != '/') $folder_path .= '/'; //* Check if the resulting path is inside the docroot if(substr($folder_path,0,strlen($website['document_root'])) != $website['document_root']) { @@ -1208,12 +1209,12 @@ if(substr($data['old']['path'],0,1) == '/') $data['old']['path'] = substr($data['old']['path'],1); if(substr($data['old']['path'],-1) == '/') $data['old']['path'] = substr($data['old']['path'],0,-1); $old_folder_path = realpath($website['document_root'].'/web/'.$data['old']['path']); - if(substr($old_folder_path,-1) != '/' && $data['old']['path'] != '') $old_folder_path .= '/'; + if(substr($old_folder_path,-1) != '/') $old_folder_path .= '/'; if(substr($data['new']['path'],0,1) == '/') $data['new']['path'] = substr($data['new']['path'],1); if(substr($data['new']['path'],-1) == '/') $data['new']['path'] = substr($data['new']['path'],0,-1); $new_folder_path = escapeshellcmd($website['document_root'].'/web/'.$data['new']['path']); - if(substr($new_folder_path,-1) != '/' && $data['new']['path'] != '') $new_folder_path .= '/'; + if(substr($new_folder_path,-1) != '/') $new_folder_path .= '/'; //* Check if the resulting path is inside the docroot if(stristr($new_folder_path,'..') || stristr($new_folder_path,'./') || stristr($new_folder_path,'\\')) { -- Gitblit v1.9.1