From de9ea816cf055ce8f69809a6c1acb9ada7da248d Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Tue, 29 Sep 2020 10:40:09 +0200 Subject: [PATCH 1/9] - remove entries customer_viewable != y from select box for admins - move all updates to onAfterUpdate - remove server parts that are not needed --- .../web/admin/directive_snippets_edit.php | 77 +++++++++---------- .../templates/directive_snippets_edit.htm | 2 + interface/web/sites/web_vhost_domain_edit.php | 7 +- server/mods-available/web_module.inc.php | 21 ++--- .../plugins-available/apache2_plugin.inc.php | 28 ------- server/plugins-available/nginx_plugin.inc.php | 29 ------- 6 files changed, 51 insertions(+), 113 deletions(-) diff --git a/interface/web/admin/directive_snippets_edit.php b/interface/web/admin/directive_snippets_edit.php index e22a7cf42a..3f183844bc 100644 --- a/interface/web/admin/directive_snippets_edit.php +++ b/interface/web/admin/directive_snippets_edit.php @@ -51,7 +51,7 @@ class page_action extends tform_actions { function onShow() { global $app, $conf; - + if($this->id > 0){ $record = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ?", $this->id); if($record['master_directive_snippets_id'] > 0){ @@ -59,13 +59,13 @@ class page_action extends tform_actions { } unset($record); } - + parent::onShow(); } - + function onShowEnd() { - global $app, $conf; - + global $app; + $is_master = false; if($this->id > 0){ if($this->dataRecord['master_directive_snippets_id'] > 0){ @@ -77,53 +77,52 @@ class page_action extends tform_actions { } $app->tpl->setVar("is_master", $is_master); - + parent::onShowEnd(); } - - function onSubmit() { + + public function onAfterUpdate() { global $app, $conf; + if(isset($this->dataRecord['update_sites']) && $this->dataRecord['update_sites'] === 'y') { + if($this->dataRecord['active'] == 'y' && $this->dataRecord['update_sites'] == 'y') { + if($this->dataRecord['type'] == 'php') { + $rlike = $this->dataRecord['directive_snippets_id'].'|,'.$this->dataRecord['directive_snippets_id'].'|'.$this->dataRecord['directive_snippets_id'].','; + $affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets RLIKE(?) AND type = ?', $rlike, 'apache'); + if(is_array($affected_snippets) && !empty($affected_snippets)) { + foreach($affected_snippets as $snippet) { + $sql_in[] = $snippet['directive_snippets_id']; + } + $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id IN ?', $conf['server_id'], $sql_in); + } + } elseif($this->dataRecord['type'] == 'apache') { + $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id = ?', $conf['server_id'], $this->dataRecord['directive_snippets_id']); + } + + if(is_array($affected_sites) && !empty($affected_sites)) { + foreach($affected_sites as $site) { + $website = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = ?', $site['domain_id']); + $app->db->datalogUpdate('web_domain', $website, 'domain_id', $site['domain_id'], true); + } + } + } + } + } + + public function onSubmit() { + global $app; + if($this->id > 0){ $record = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ?", $this->id); if($record['master_directive_snippets_id'] > 0){ unset($app->tform->formDef["tabs"]['directive_snippets']['fields']['name'], $app->tform->formDef["tabs"]['directive_snippets']['fields']['type'], $app->tform->formDef["tabs"]['directive_snippets']['fields']['snippet'], $app->tform->formDef["tabs"]['directive_snippets']['fields']['required_php_snippets']); } - - if(isset($this->dataRecord['update_sites'])) { - parent::onSubmit(); - } else { - $app->db->query('UPDATE directive_snippets SET name = ?, type = ?, snippet = ?, customer_viewable = ?, required_php_snippets = ?, active = ? WHERE directive_snippets_id = ?', $this->dataRecord['name'], $this->dataRecord['type'], $this->dataRecord['snippet'], $this->dataRecord['customer_viewable'], implode(',', $this->dataRecord['required_php_snippets']), $this->dataRecord['active'], $this->id); - - if($_REQUEST["next_tab"] == '') { - $list_name = $_SESSION["s"]["form"]["return_to"]; - if($list_name != '' && $_SESSION["s"]["list"][$list_name]["parent_name"] != $app->tform->formDef["name"]) { - $redirect = "Location: ".$_SESSION["s"]["list"][$list_name]["parent_script"]."?id=".$_SESSION["s"]["list"][$list_name]["parent_id"]."&next_tab=".$_SESSION["s"]["list"][$list_name]["parent_tab"]; - $_SESSION["s"]["form"]["return_to"] = ''; - session_write_close(); - header($redirect); - } elseif (isset($_SESSION["s"]["form"]["return_to_url"]) && $_SESSION["s"]["form"]["return_to_url"] != '') { - $redirect = $_SESSION["s"]["form"]["return_to_url"]; - $_SESSION["s"]["form"]["return_to_url"] = ''; - session_write_close(); - header("Location: ".$redirect); - exit; - } else { - header("Location: ".$app->tform->formDef['list_default']); - } - exit; - } - } - - unset($record); } parent::onSubmit(); } - + } $page = new page_action; -$page->onLoad(); - -?> +$page->onLoad(); \ No newline at end of file diff --git a/interface/web/admin/templates/directive_snippets_edit.htm b/interface/web/admin/templates/directive_snippets_edit.htm index b01e7e255c..d96ea724ae 100644 --- a/interface/web/admin/templates/directive_snippets_edit.htm +++ b/interface/web/admin/templates/directive_snippets_edit.htm @@ -17,12 +17,14 @@ +
{tmpl_var name='required_php_snippets'}
+
diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index a718ae8a87..69526f8da9 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -854,11 +854,12 @@ class page_action extends tform_actions { $directive_snippets_id_select .= ''; } - if($is_admin) { + // it does not make sense to display those for admins as they are NOT applied to vhosts anyway! + /*if($is_admin) { $directive_snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE active = 'y' AND master_directive_snippets_id = 0 AND type = ? ORDER BY name ASC", $server_type); - } else { + } else {*/ $directive_snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND active = 'y' AND master_directive_snippets_id = 0 AND type = ? ORDER BY name ASC", $server_type); - } + //} if(is_array($directive_snippets) && !empty($directive_snippets)){ $directive_snippets_id_select .= ''; foreach($directive_snippets as $directive_snippet){ diff --git a/server/mods-available/web_module.inc.php b/server/mods-available/web_module.inc.php index 609e9212dc..12ad81ef9c 100644 --- a/server/mods-available/web_module.inc.php +++ b/server/mods-available/web_module.inc.php @@ -65,8 +65,7 @@ class web_module { 'aps_package_delete', 'aps_setting_insert', 'aps_setting_update', - 'aps_setting_delete', - 'directive_snippets_update' + 'aps_setting_delete' ); //* This function is called during ispconfig installation to determine @@ -117,7 +116,6 @@ class web_module { $app->modules->registerTableHook('aps_instances_settings', 'web_module', 'process'); $app->modules->registerTableHook('aps_packages', 'web_module', 'process'); $app->modules->registerTableHook('aps_settings', 'web_module', 'process'); - $app->modules->registerTableHook('directive_snippets', 'web_module', 'process'); // Register service $app->services->registerService('httpd', 'web_module', 'restartHttpd'); @@ -189,11 +187,6 @@ class web_module { if($action == 'u') $app->plugins->raiseEvent('aps_setting_update', $data); if($action == 'd') $app->plugins->raiseEvent('aps_setting_delete', $data); break; - case 'directive_snippets': - if($action == 'i') $app->plugins->raiseEvent('directive_snippets_insert', $data); - if($action == 'u') $app->plugins->raiseEvent('directive_snippets_update', $data); - if($action == 'd') $app->plugins->raiseEvent('directive_snippets_delete', $data); - break; } // end switch } // end function @@ -229,7 +222,7 @@ class web_module { } else { $cmd = $app->system->getinitcommand($daemon, 'reload'); } - + if($web_config['server_type'] == 'nginx'){ $app->log("Checking nginx configuration...", LOGLEVEL_DEBUG); exec('nginx -t 2>&1', $retval['output'], $retval['retval']); @@ -240,16 +233,16 @@ class web_module { return $retval; } } - + exec($cmd.' 2>&1', $retval['output'], $retval['retval']); - + // if restart failed despite successful syntax check => try again if($web_config['server_type'] == 'nginx' && $retval['retval'] > 0){ sleep(2); exec($cmd.' 2>&1', $retval['output'], $retval['retval']); } $app->log("Restarting httpd: $cmd", LOGLEVEL_DEBUG); - + // nginx: do a syntax check because on some distributions, the init script always returns 0 - even if the syntax is not ok (how stupid is that?) //if($web_config['server_type'] == 'nginx' && $retval['retval'] == 0){ //exec('nginx -t 2>&1', $retval['output'], $retval['retval']); @@ -272,7 +265,7 @@ class web_module { } else { $path_parts = pathinfo($init_script); $initcommand = $app->system->getinitcommand($path_parts['basename'], $action, $path_parts['dirname']); - + if($action == 'reload' && $init_script == $conf['init_scripts'].'/'.$web_config['php_fpm_init_script']) { // we have to do a workaround because of buggy ubuntu fpm reload handling // @see: https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1242376 @@ -289,7 +282,7 @@ class web_module { } */ unset($tmp); - } + } } /* if($action == 'reload') { diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index c9ed6508e0..76ab4f7c4f 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -95,34 +95,6 @@ class apache2_plugin { $app->plugins->registerEvent('ftp_user_delete', $this->plugin_name, 'ftp_user_delete'); $app->plugins->registerAction('php_ini_changed', $this->plugin_name, 'php_ini_changed'); - - $app->plugins->registerEvent('directive_snippets_update', $this->plugin_name, 'directive_snippets'); - } - - function directive_snippets($event_name, $data) { - global $app, $conf; - - $snippet = $data['new']; - if($snippet['active'] == 'y' && $snippet['update_sites'] == 'y') { - if($snippet['type'] == 'php') { - $rlike = $snippet['directive_snippets_id'].'|,'.$snippet['directive_snippets_id'].'|'.$snippet['directive_snippets_id'].','; - $affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets RLIKE(?) AND type = ?', $rlike, 'apache'); - if(is_array($affected_snippets) && !empty($affected_snippets)) { - foreach($affected_snippets as $snippet) $sql_in[] = $snippet['directive_snippets_id']; - $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id IN ?', $conf['server_id'], $sql_in); - } - } - if($snippet['type'] == 'apache') $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id = ?', $conf['server_id'], $snippet['directive_snippets_id']); - - if(is_array($affected_sites) && !empty($affected_sites)) { - foreach($affected_sites as $site) { - $website = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = ?', $site['domain_id']); - $new_data['old'] = $website; - $new_data['new'] = $website; - $this->update('web_domain_update', $new_data); - } - } - } } private function get_master_php_ini_content($web_data) { diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index a2673b62a2..b1d2f773b0 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -90,35 +90,6 @@ class nginx_plugin { $app->plugins->registerEvent('web_folder_update', $this->plugin_name, 'web_folder_update'); $app->plugins->registerEvent('web_folder_delete', $this->plugin_name, 'web_folder_delete'); - - $app->plugins->registerEvent('directive_snippets_update', $this->plugin_name, 'directive_snippets'); - } - - function directive_snippets($event_name, $data) { - global $app, $conf; - - $snippet = $data['new']; - - if($snippet['active'] == 'y' && $snippet['update_sites'] == 'y') { - if($snippet['type'] == 'php') { - $rlike = $snippet['directive_snippets_id'].'|,'.$snippet['directive_snippets_id'].'|'.$snippet['directive_snippets_id'].','; - $affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets RLIKE(?) AND type = ?', $rlike, 'nginx'); - if(is_array($affected_snippets) && !empty($affected_snippets)) { - foreach($affected_snippets as $snippet) $sql_in[] = $snippet['directive_snippets_id']; - $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id IN ?', $conf['server_id'], $sql_in); - } - } - if($snippet['type'] == 'nginx') $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id = ?', $conf['server_id'], $snippet['directive_snippets_id']); - - if(is_array($affected_sites) && !empty($affected_sites)) { - foreach($affected_sites as $site) { - $website = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = ?', $site['domain_id']); - $new_data['old'] = $website; - $new_data['new'] = $website; - $this->update('web_domain_update', $new_data); - } - } - } } // Handle the creation of SSL certificates -- GitLab From cde00ffeb7f92b157ddb4173e3af2056d7d0d1df Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Tue, 29 Sep 2020 10:43:44 +0200 Subject: [PATCH 2/9] - change == to === --- interface/web/admin/directive_snippets_edit.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/web/admin/directive_snippets_edit.php b/interface/web/admin/directive_snippets_edit.php index 3f183844bc..900d631f72 100644 --- a/interface/web/admin/directive_snippets_edit.php +++ b/interface/web/admin/directive_snippets_edit.php @@ -85,8 +85,8 @@ class page_action extends tform_actions { global $app, $conf; if(isset($this->dataRecord['update_sites']) && $this->dataRecord['update_sites'] === 'y') { - if($this->dataRecord['active'] == 'y' && $this->dataRecord['update_sites'] == 'y') { - if($this->dataRecord['type'] == 'php') { + if($this->dataRecord['active'] === 'y' && $this->dataRecord['update_sites'] === 'y') { + if($this->dataRecord['type'] === 'php') { $rlike = $this->dataRecord['directive_snippets_id'].'|,'.$this->dataRecord['directive_snippets_id'].'|'.$this->dataRecord['directive_snippets_id'].','; $affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets RLIKE(?) AND type = ?', $rlike, 'apache'); if(is_array($affected_snippets) && !empty($affected_snippets)) { @@ -95,7 +95,7 @@ class page_action extends tform_actions { } $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id IN ?', $conf['server_id'], $sql_in); } - } elseif($this->dataRecord['type'] == 'apache') { + } elseif($this->dataRecord['type'] === 'apache') { $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id = ?', $conf['server_id'], $this->dataRecord['directive_snippets_id']); } -- GitLab From ba9b60f3ede780aae7e56beaf436e7acfecaf61b Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Tue, 29 Sep 2020 10:45:59 +0200 Subject: [PATCH 3/9] - use REGEXP instead of RLIKE (which is a synonym) --- interface/web/admin/directive_snippets_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/admin/directive_snippets_edit.php b/interface/web/admin/directive_snippets_edit.php index 900d631f72..4face39cb9 100644 --- a/interface/web/admin/directive_snippets_edit.php +++ b/interface/web/admin/directive_snippets_edit.php @@ -88,7 +88,7 @@ class page_action extends tform_actions { if($this->dataRecord['active'] === 'y' && $this->dataRecord['update_sites'] === 'y') { if($this->dataRecord['type'] === 'php') { $rlike = $this->dataRecord['directive_snippets_id'].'|,'.$this->dataRecord['directive_snippets_id'].'|'.$this->dataRecord['directive_snippets_id'].','; - $affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets RLIKE(?) AND type = ?', $rlike, 'apache'); + $affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets REGEXP (?) AND type = ?', $rlike, 'apache'); if(is_array($affected_snippets) && !empty($affected_snippets)) { foreach($affected_snippets as $snippet) { $sql_in[] = $snippet['directive_snippets_id']; -- GitLab From 3c53b6b7b583be9df8d0a4b0492625701a4dc5cc Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Tue, 29 Sep 2020 10:46:58 +0200 Subject: [PATCH 4/9] - remove () from regexp --- interface/web/admin/directive_snippets_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/admin/directive_snippets_edit.php b/interface/web/admin/directive_snippets_edit.php index 4face39cb9..40805dc43a 100644 --- a/interface/web/admin/directive_snippets_edit.php +++ b/interface/web/admin/directive_snippets_edit.php @@ -88,7 +88,7 @@ class page_action extends tform_actions { if($this->dataRecord['active'] === 'y' && $this->dataRecord['update_sites'] === 'y') { if($this->dataRecord['type'] === 'php') { $rlike = $this->dataRecord['directive_snippets_id'].'|,'.$this->dataRecord['directive_snippets_id'].'|'.$this->dataRecord['directive_snippets_id'].','; - $affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets REGEXP (?) AND type = ?', $rlike, 'apache'); + $affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets REGEXP ? AND type = ?', $rlike, 'apache'); if(is_array($affected_snippets) && !empty($affected_snippets)) { foreach($affected_snippets as $snippet) { $sql_in[] = $snippet['directive_snippets_id']; -- GitLab From ec9634d2155a5b6b9b279052044cedba59e624f9 Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Tue, 29 Sep 2020 11:17:51 +0200 Subject: [PATCH 5/9] - removed master_directive_snippet code that was (in 2016) accidently backported from master but never used --- .../web/admin/directive_snippets_edit.php | 77 +++-------- .../web/admin/directive_snippets_list.php | 11 +- .../admin/form/directive_snippets.tform.php | 4 +- .../admin/list/directive_snippets.list.php | 13 +- .../templates/directive_snippets_edit.htm | 18 +-- .../templates/directive_snippets_list.htm | 9 +- interface/web/sites/ajax_get_json.php | 8 +- .../sites/templates/web_vhost_domain_edit.htm | 12 -- interface/web/sites/web_vhost_domain_edit.php | 127 ++---------------- .../plugins-available/apache2_plugin.inc.php | 4 +- server/plugins-available/nginx_plugin.inc.php | 4 +- 11 files changed, 47 insertions(+), 240 deletions(-) diff --git a/interface/web/admin/directive_snippets_edit.php b/interface/web/admin/directive_snippets_edit.php index 40805dc43a..f6edf5cab1 100644 --- a/interface/web/admin/directive_snippets_edit.php +++ b/interface/web/admin/directive_snippets_edit.php @@ -49,79 +49,32 @@ $app->uses('tpl,tform,tform_actions'); class page_action extends tform_actions { - function onShow() { - global $app, $conf; - - if($this->id > 0){ - $record = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ?", $this->id); - if($record['master_directive_snippets_id'] > 0){ - unset($app->tform->formDef["tabs"]['directive_snippets']['fields']['name'], $app->tform->formDef["tabs"]['directive_snippets']['fields']['type'], $app->tform->formDef["tabs"]['directive_snippets']['fields']['snippet'], $app->tform->formDef["tabs"]['directive_snippets']['fields']['required_php_snippets']); - } - unset($record); - } - - parent::onShow(); - } - - function onShowEnd() { - global $app; - - $is_master = false; - if($this->id > 0){ - if($this->dataRecord['master_directive_snippets_id'] > 0){ - $is_master = true; - $app->tpl->setVar("name", $this->dataRecord['name'], true); - $app->tpl->setVar("type", $this->dataRecord['type'], true); - $app->tpl->setVar("snippet", $this->dataRecord['snippet'], true); - } - } - - $app->tpl->setVar("is_master", $is_master); - - parent::onShowEnd(); - } public function onAfterUpdate() { global $app, $conf; - if(isset($this->dataRecord['update_sites']) && $this->dataRecord['update_sites'] === 'y') { - if($this->dataRecord['active'] === 'y' && $this->dataRecord['update_sites'] === 'y') { - if($this->dataRecord['type'] === 'php') { - $rlike = $this->dataRecord['directive_snippets_id'].'|,'.$this->dataRecord['directive_snippets_id'].'|'.$this->dataRecord['directive_snippets_id'].','; - $affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets REGEXP ? AND type = ?', $rlike, 'apache'); - if(is_array($affected_snippets) && !empty($affected_snippets)) { - foreach($affected_snippets as $snippet) { - $sql_in[] = $snippet['directive_snippets_id']; - } - $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id IN ?', $conf['server_id'], $sql_in); - } - } elseif($this->dataRecord['type'] === 'apache') { - $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id = ?', $conf['server_id'], $this->dataRecord['directive_snippets_id']); - } - - if(is_array($affected_sites) && !empty($affected_sites)) { - foreach($affected_sites as $site) { - $website = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = ?', $site['domain_id']); - $app->db->datalogUpdate('web_domain', $website, 'domain_id', $site['domain_id'], true); + if(isset($this->dataRecord['update_sites']) && $this->dataRecord['update_sites'] === 'y' && $this->dataRecord['active'] === 'y') { + if($this->dataRecord['type'] === 'php') { + $rlike = $this->dataRecord['directive_snippets_id'].'|,'.$this->dataRecord['directive_snippets_id'].'|'.$this->dataRecord['directive_snippets_id'].','; + $affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets REGEXP ? AND type = ?', $rlike, 'apache'); + if(is_array($affected_snippets) && !empty($affected_snippets)) { + foreach($affected_snippets as $snippet) { + $sql_in[] = $snippet['directive_snippets_id']; } + $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id IN ?', $conf['server_id'], $sql_in); } + } elseif($this->dataRecord['type'] === 'apache' || $this->dataRecord['type'] === 'nginx') { + $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id = ?', $conf['server_id'], $this->dataRecord['directive_snippets_id']); } - } - } - - public function onSubmit() { - global $app; - if($this->id > 0){ - $record = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ?", $this->id); - if($record['master_directive_snippets_id'] > 0){ - unset($app->tform->formDef["tabs"]['directive_snippets']['fields']['name'], $app->tform->formDef["tabs"]['directive_snippets']['fields']['type'], $app->tform->formDef["tabs"]['directive_snippets']['fields']['snippet'], $app->tform->formDef["tabs"]['directive_snippets']['fields']['required_php_snippets']); + if(is_array($affected_sites) && !empty($affected_sites)) { + foreach($affected_sites as $site) { + $website = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = ?', $site['domain_id']); + $app->db->datalogUpdate('web_domain', $website, 'domain_id', $site['domain_id'], true); + } } } - - parent::onSubmit(); } - } $page = new page_action; diff --git a/interface/web/admin/directive_snippets_list.php b/interface/web/admin/directive_snippets_list.php index 1376ef02f6..97cdc449a7 100644 --- a/interface/web/admin/directive_snippets_list.php +++ b/interface/web/admin/directive_snippets_list.php @@ -57,8 +57,6 @@ class list_action extends listform_actions { //* Alternating datarow colors $this->DataRowColor = ($this->DataRowColor == '#FFFFFF') ? '#EEEEEE' : '#FFFFFF'; $rec['bgcolor'] = $this->DataRowColor; - - $rec['is_master'] = $rec['master_directive_snippets_id']; //* substitute value for select fields if(is_array($app->listform->listDef['item']) && count($app->listform->listDef['item']) > 0) { @@ -79,15 +77,8 @@ class list_action extends listform_actions { $rec['id'] = $rec[$this->idx_key]; return $rec; } - + } $list = new list_action; $list->SQLOrderBy = 'ORDER BY directive_snippets.name'; $list->onLoad(); - -//$app->listform_actions->SQLExtWhere = 'master_directive_snippets_id = 0'; -/* -$app->listform_actions->SQLOrderBy = 'ORDER BY directive_snippets.name'; -$app->listform_actions->onLoad(); -*/ -?> diff --git a/interface/web/admin/form/directive_snippets.tform.php b/interface/web/admin/form/directive_snippets.tform.php index bf7f2b7fe5..bf4463d2b7 100644 --- a/interface/web/admin/form/directive_snippets.tform.php +++ b/interface/web/admin/form/directive_snippets.tform.php @@ -66,7 +66,7 @@ $form["tabs"]['directive_snippets'] = array ( 'name' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', - 'validators' => array ( + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'directive_snippets_name_empty'), 1 => array ( 'type' => 'CUSTOM', 'class' => 'validate_server_directive_snippets', 'function' => 'validate_snippet'), ), @@ -121,7 +121,7 @@ $form["tabs"]['directive_snippets'] = array ( 'formtype' => 'CHECKBOXARRAY', 'default' => '', 'datasource' => array ( 'type' => 'SQL', - 'querystring' => "SELECT directive_snippets_id,name FROM directive_snippets WHERE type = 'php' AND active = 'y' AND master_directive_snippets_id = 0 ORDER BY name", + 'querystring' => "SELECT directive_snippets_id,name FROM directive_snippets WHERE type = 'php' AND active = 'y' ORDER BY name", 'keyfield' => 'directive_snippets_id', 'valuefield' => 'name' ), diff --git a/interface/web/admin/list/directive_snippets.list.php b/interface/web/admin/list/directive_snippets.list.php index 31332e5ecf..0faaf08964 100644 --- a/interface/web/admin/list/directive_snippets.list.php +++ b/interface/web/admin/list/directive_snippets.list.php @@ -74,7 +74,7 @@ $liste["item"][] = array( 'field' => "type", 'suffix' => "", 'width' => "", 'value' => array('apache' => 'Apache', 'nginx' => 'nginx', 'php' => 'PHP', 'proxy' => 'Proxy')); - + $liste["item"][] = array( 'field' => "customer_viewable", 'datatype' => "VARCHAR", 'formtype' => "SELECT", @@ -83,14 +83,3 @@ $liste["item"][] = array( 'field' => "customer_viewable", 'suffix' => "", 'width' => "", 'value' => array('y' => $app->lng('yes_txt'), 'n' => $app->lng('no_txt'))); - -$liste["item"][] = array( 'field' => "master_directive_snippets_id", - 'datatype' => "BOOLEAN", - 'formtype' => "SELECT", - 'op' => "IS", - 'prefix' => "", - 'suffix' => "", - 'width' => "", - 'value' => array(0 => $app->lng('select_directive_snippet_txt'), 1 => $app->lng('select_master_directive_snippet_txt'))); - -?> diff --git a/interface/web/admin/templates/directive_snippets_edit.htm b/interface/web/admin/templates/directive_snippets_edit.htm index d96ea724ae..4f8adfa164 100644 --- a/interface/web/admin/templates/directive_snippets_edit.htm +++ b/interface/web/admin/templates/directive_snippets_edit.htm @@ -1,32 +1,28 @@
-
{tmpl_var name='name'}
+
-
{tmpl_var name='type'}
{tmpl_var name='type'} -
+
-
{tmpl_var name='snippet'}
+
  Nginx {tmpl_var name='variables_txt'}: {DOCROOT}, {DOMAIN}, {FASTCGIPASS}, {PHPFALLBACKFASTCGIPASS}
  Apache {tmpl_var name='variables_txt'}: {DOCROOT}, {DOCROOT_CLIENT}, {DOMAIN}
  PHP {tmpl_var name='variables_txt'}: {WEBROOT} -
+
- - -
+
{tmpl_var name='required_php_snippets'}
- - -
+
{tmpl_var name='customer_viewable'} diff --git a/interface/web/admin/templates/directive_snippets_list.htm b/interface/web/admin/templates/directive_snippets_list.htm index 8433282496..c1cfc64cee 100644 --- a/interface/web/admin/templates/directive_snippets_list.htm +++ b/interface/web/admin/templates/directive_snippets_list.htm @@ -17,7 +17,6 @@ - {tmpl_var name='search_limit'} @@ -25,7 +24,6 @@ - @@ -38,22 +36,21 @@ {tmpl_var name="name"} {tmpl_var name="type"} {tmpl_var name="customer_viewable"} - {tmpl_var name="master_directive_snippets_id"} - + - {tmpl_var name='globalsearch_noresults_text_txt'} + {tmpl_var name='globalsearch_noresults_text_txt'} - + diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php index 2988e03219..936a584f20 100644 --- a/interface/web/sites/ajax_get_json.php +++ b/interface/web/sites/ajax_get_json.php @@ -203,11 +203,9 @@ if ($type == 'getdirectivesnippet') { $web_config = $app->getconf->get_server_config($server_id, 'web'); if (!empty($web_config['server_type'])) $server_type = $web_config['server_type']; - $m_snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND active = 'y' AND master_directive_snippets_id > 0 AND type = ? ORDER BY name ASC", $server_type); - - $snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND active = 'y' AND master_directive_snippets_id = 0 AND type = ? ORDER BY name ASC", $server_type); + $snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND active = 'y' AND type = ? ORDER BY name ASC", $server_type); - $json = json_encode(array('m_snippets' => $m_snippets, 'snippets' => $snippets)); + $json = json_encode(array('snippets' => $snippets)); } if($type == 'getclientssldata'){ @@ -216,7 +214,7 @@ if($type == 'getclientssldata'){ $client = $app->db->queryOneRecord("SELECT company_name,contact_firstname, contact_name, street, zip, city, telephone, mobile,fax, country, state, email FROM client WHERE client_id = ?",$sys_group['client_id']); if(is_array($client) && !empty($client)){ if($client['telephone'] == '' && $client['mobile'] != '') $client['telephone'] = $client['mobile']; - + $fname = ''; $lname = ''; $parts = preg_split("/\s+/", $client['contact_name']); diff --git a/interface/web/sites/templates/web_vhost_domain_edit.htm b/interface/web/sites/templates/web_vhost_domain_edit.htm index 843c0e564c..d8c7d11939 100644 --- a/interface/web/sites/templates/web_vhost_domain_edit.htm +++ b/interface/web/sites/templates/web_vhost_domain_edit.htm @@ -420,18 +420,6 @@ function reloadDirectiveSnippets() { jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, type : "getdirectivesnippet"}, function(data) { var options = ''; - options += ""; - for (var i = 0, len = data['m_snippets'].length; i < len; i++) { - var isSelected = ''; - - if ($('#directive_snippets_id').val() == i + 1) { - isSelected = 'selected="selected"'; - } - - options += ''; - } - options += ''; - options += ""; for (var i = 0, len = data['snippets'].length; i < len; i++) { var isSelected = ''; diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index 69526f8da9..9e65f91062 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -419,17 +419,8 @@ class page_action extends tform_actions { if($sites_config['reseller_can_use_options']) { // Directive Snippets $php_directive_snippets_txt = ''; - $php_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'php' AND active = 'y' AND master_directive_snippets_id > 0 ORDER BY name"); - if(is_array($php_directive_snippets) && !empty($php_directive_snippets)){ - $php_directive_snippets_txt .= $app->tform->wordbook["select_master_directive_snippet_txt"].'
'; - foreach($php_directive_snippets as $php_directive_snippet){ - $php_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $php_directive_snippet['snippet'] . PHP_EOL; - $php_directive_snippets_txt .= '['.$php_directive_snippet['name'].']     '; - } - $php_directive_snippets_txt .= '

'; - } - $php_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'php' AND active = 'y' AND master_directive_snippets_id = 0 ORDER BY name"); + $php_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'php' AND active = 'y' ORDER BY name"); if(is_array($php_directive_snippets) && !empty($php_directive_snippets)){ $php_directive_snippets_txt .= $app->tform->wordbook["select_directive_snippet_txt"].'
'; foreach($php_directive_snippets as $php_directive_snippet){ @@ -442,17 +433,7 @@ class page_action extends tform_actions { if($server_type == 'apache'){ $apache_directive_snippets_txt = ''; - $apache_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'apache' AND active = 'y' AND master_directive_snippets_id > 0 ORDER BY name"); - if(is_array($apache_directive_snippets) && !empty($apache_directive_snippets)){ - $apache_directive_snippets_txt .= $app->tform->wordbook["select_master_directive_snippet_txt"].'
'; - foreach($apache_directive_snippets as $apache_directive_snippet){ - $apache_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $apache_directive_snippet['snippet'] . PHP_EOL; - $apache_directive_snippets_txt .= '['.$apache_directive_snippet['name'].']     '; - } - $apache_directive_snippets_txt .= '

'; - } - - $apache_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'apache' AND active = 'y' AND master_directive_snippets_id = 0 ORDER BY name"); + $apache_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'apache' AND active = 'y' ORDER BY name"); if(is_array($apache_directive_snippets) && !empty($apache_directive_snippets)){ $apache_directive_snippets_txt .= $app->tform->wordbook["select_directive_snippet_txt"].'
'; foreach($apache_directive_snippets as $apache_directive_snippet){ @@ -466,17 +447,7 @@ class page_action extends tform_actions { if($server_type == 'nginx'){ $nginx_directive_snippets_txt = ''; - $nginx_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'nginx' AND active = 'y' AND master_directive_snippets_id > 0 ORDER BY name"); - if(is_array($nginx_directive_snippets) && !empty($nginx_directive_snippets)){ - $nginx_directive_snippets_txt .= $app->tform->wordbook["select_master_directive_snippet_txt"].'
'; - foreach($nginx_directive_snippets as $nginx_directive_snippet){ - $nginx_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $nginx_directive_snippet['snippet'] . PHP_EOL; - $nginx_directive_snippets_txt .= '['.$app->functions->htmlentities($nginx_directive_snippet['name']).']     '; - } - $nginx_directive_snippets_txt .= '

'; - } - - $nginx_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'nginx' AND active = 'y' AND master_directive_snippets_id = 0 ORDER BY name"); + $nginx_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'nginx' AND active = 'y' ORDER BY name"); if(is_array($nginx_directive_snippets) && !empty($nginx_directive_snippets)){ $nginx_directive_snippets_txt .= $app->tform->wordbook["select_directive_snippet_txt"].'
'; foreach($nginx_directive_snippets as $nginx_directive_snippet){ @@ -489,17 +460,7 @@ class page_action extends tform_actions { } $proxy_directive_snippets_txt = ''; - $proxy_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'proxy' AND active = 'y' AND master_directive_snippets_id > 0 ORDER BY name"); - if(is_array($proxy_directive_snippets) && !empty($proxy_directive_snippets)){ - $proxy_directive_snippets_txt .= $app->tform->wordbook["select_master_directive_snippet_txt"].'
'; - foreach($proxy_directive_snippets as $proxy_directive_snippet){ - $proxy_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $proxy_directive_snippet['snippet'] . PHP_EOL; - $proxy_directive_snippets_txt .= '['.$app->functions->htmlentities($proxy_directive_snippet['name']).']     '; - } - $proxy_directive_snippets_txt .= '

'; - } - - $proxy_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'proxy' AND active = 'y' AND master_directive_snippets_id = 0 ORDER BY name"); + $proxy_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'proxy' AND active = 'y' ORDER BY name"); if(is_array($proxy_directive_snippets) && !empty($proxy_directive_snippets)){ $proxy_directive_snippets_txt .= $app->tform->wordbook["select_directive_snippet_txt"].'
'; foreach($proxy_directive_snippets as $proxy_directive_snippet){ @@ -633,17 +594,7 @@ class page_action extends tform_actions { // Directive Snippets $php_directive_snippets_txt = ''; - $php_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'php' AND active = 'y' AND master_directive_snippets_id > 0 ORDER BY name"); - if(is_array($php_directive_snippets) && !empty($php_directive_snippets)){ - $php_directive_snippets_txt .= $app->tform->wordbook["select_master_directive_snippet_txt"].'
'; - foreach($php_directive_snippets as $php_directive_snippet){ - $php_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $php_directive_snippet['snippet'] . PHP_EOL; - $php_directive_snippets_txt .= '['.$app->functions->htmlentities($php_directive_snippet['name']).']     '; - } - $php_directive_snippets_txt .= '

'; - } - - $php_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'php' AND active = 'y' AND master_directive_snippets_id = 0 ORDER BY name"); + $php_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'php' AND active = 'y' ORDER BY name"); if(is_array($php_directive_snippets) && !empty($php_directive_snippets)){ $php_directive_snippets_txt .= $app->tform->wordbook["select_directive_snippet_txt"].'
'; foreach($php_directive_snippets as $php_directive_snippet){ @@ -656,17 +607,7 @@ class page_action extends tform_actions { if($server_type == 'apache'){ $apache_directive_snippets_txt = ''; - $apache_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'apache' AND active = 'y' AND master_directive_snippets_id > 0 ORDER BY name"); - if(is_array($apache_directive_snippets) && !empty($apache_directive_snippets)){ - $apache_directive_snippets_txt .= $app->tform->wordbook["select_master_directive_snippet_txt"].'
'; - foreach($apache_directive_snippets as $apache_directive_snippet){ - $apache_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $apache_directive_snippet['snippet'] . PHP_EOL; - $apache_directive_snippets_txt .= '['.$app->functions->htmlentities($apache_directive_snippet['name']).']     '; - } - $apache_directive_snippets_txt .= '

'; - } - - $apache_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'apache' AND active = 'y' AND master_directive_snippets_id = 0 ORDER BY name"); + $apache_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'apache' AND active = 'y' ORDER BY name"); if(is_array($apache_directive_snippets) && !empty($apache_directive_snippets)){ $apache_directive_snippets_txt .= $app->tform->wordbook["select_directive_snippet_txt"].'
'; foreach($apache_directive_snippets as $apache_directive_snippet){ @@ -680,17 +621,7 @@ class page_action extends tform_actions { if($server_type == 'nginx'){ $nginx_directive_snippets_txt = ''; - $nginx_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'nginx' AND active = 'y' AND master_directive_snippets_id > 0 ORDER BY name"); - if(is_array($nginx_directive_snippets) && !empty($nginx_directive_snippets)){ - $nginx_directive_snippets_txt .= $app->tform->wordbook["select_master_directive_snippet_txt"].'
'; - foreach($nginx_directive_snippets as $nginx_directive_snippet){ - $nginx_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $nginx_directive_snippet['snippet'] . PHP_EOL; - $nginx_directive_snippets_txt .= '['.$app->functions->htmlentities($nginx_directive_snippet['name']).']     '; - } - $nginx_directive_snippets_txt .= '

'; - } - - $nginx_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'nginx' AND active = 'y' AND master_directive_snippets_id = 0 ORDER BY name"); + $nginx_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'nginx' AND active = 'y' ORDER BY name"); if(is_array($nginx_directive_snippets) && !empty($nginx_directive_snippets)){ $nginx_directive_snippets_txt .= $app->tform->wordbook["select_directive_snippet_txt"].'
'; foreach($nginx_directive_snippets as $nginx_directive_snippet){ @@ -703,17 +634,7 @@ class page_action extends tform_actions { } $proxy_directive_snippets_txt = ''; - $proxy_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'proxy' AND active = 'y' AND master_directive_snippets_id > 0 ORDER BY name"); - if(is_array($proxy_directive_snippets) && !empty($proxy_directive_snippets)){ - $proxy_directive_snippets_txt .= $app->tform->wordbook["select_master_directive_snippet_txt"].'
'; - foreach($proxy_directive_snippets as $proxy_directive_snippet){ - $proxy_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $proxy_directive_snippet['snippet'] . PHP_EOL; - $proxy_directive_snippets_txt .= '['.$app->functions->htmlentities($proxy_directive_snippet['name']).']     '; - } - $proxy_directive_snippets_txt .= '

'; - } - - $proxy_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'proxy' AND active = 'y' AND master_directive_snippets_id = 0 ORDER BY name"); + $proxy_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'proxy' AND active = 'y' ORDER BY name"); if(is_array($proxy_directive_snippets) && !empty($proxy_directive_snippets)){ $proxy_directive_snippets_txt .= $app->tform->wordbook["select_directive_snippet_txt"].'
'; foreach($proxy_directive_snippets as $proxy_directive_snippet){ @@ -845,20 +766,11 @@ class page_action extends tform_actions { $server_type = $app->getconf->get_server_config($server_id, 'web'); $server_type = $server_type['server_type']; - $m_directive_snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND active = 'y' AND master_directive_snippets_id > 0 AND type = ? ORDER BY name ASC", $server_type); - if(is_array($m_directive_snippets) && !empty($m_directive_snippets)){ - $directive_snippets_id_select .= ''; - foreach($m_directive_snippets as $m_directive_snippet){ - $directive_snippets_id_select .= ''; - } - $directive_snippets_id_select .= ''; - } - // it does not make sense to display those for admins as they are NOT applied to vhosts anyway! /*if($is_admin) { - $directive_snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE active = 'y' AND master_directive_snippets_id = 0 AND type = ? ORDER BY name ASC", $server_type); + $directive_snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE active = 'y' AND type = ? ORDER BY name ASC", $server_type); } else {*/ - $directive_snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND active = 'y' AND master_directive_snippets_id = 0 AND type = ? ORDER BY name ASC", $server_type); + $directive_snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND active = 'y' AND type = ? ORDER BY name ASC", $server_type); //} if(is_array($directive_snippets) && !empty($directive_snippets)){ $directive_snippets_id_select .= ''; @@ -880,8 +792,7 @@ class page_action extends tform_actions { $this->dataRecord['folder_directive_snippets'] = trim($this->dataRecord['folder_directive_snippets']); } - $master_directive_snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND active = 'y' AND snippet LIKE '%{FOLDER}%' AND master_directive_snippets_id > 0 AND type = ? ORDER BY name ASC", $server_type); - $c_directive_snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND active = 'y' AND snippet LIKE '%{FOLDER}%' AND master_directive_snippets_id = 0 AND type = ? ORDER BY name ASC", $server_type); + $c_directive_snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND active = 'y' AND snippet LIKE '%{FOLDER}%' AND type = ? ORDER BY name ASC", $server_type); $folder_directive_snippets = array(); $this->dataRecord['folder_directive_snippets'] = str_replace("\r\n", "\n", $this->dataRecord['folder_directive_snippets']); @@ -898,14 +809,6 @@ class page_action extends tform_actions { if(trim($folder_directive_snippets_lines[$i]) != ''){ list($folder_directive_snippets[$i]['folder_directive_snippets_folder'], $selected_snippet) = explode(':', trim($folder_directive_snippets_lines[$i])); $folder_directive_snippets[$i]['folder_directive_snippets_id'] = ''; - if(is_array($master_directive_snippets) && !empty($master_directive_snippets)){ - $folder_directive_snippets[$i]['folder_directive_snippets_id'] .= ''; - foreach($master_directive_snippets as $master_directive_snippet){ - $folder_directive_snippets[$i]['folder_directive_snippets_id'] .= ''; - } - $folder_directive_snippets[$i]['folder_directive_snippets_id'] .= ''; - } - if(is_array($c_directive_snippets) && !empty($c_directive_snippets)){ $folder_directive_snippets[$i]['folder_directive_snippets_id'] .= ''; foreach($c_directive_snippets as $c_directive_snippet){ @@ -916,14 +819,6 @@ class page_action extends tform_actions { } else { $folder_directive_snippets[$i]['folder_directive_snippets_folder'] = ''; $folder_directive_snippets[$i]['folder_directive_snippets_id'] = ''; - if(is_array($master_directive_snippets) && !empty($master_directive_snippets)){ - $folder_directive_snippets[$i]['folder_directive_snippets_id'] .= ''; - foreach($master_directive_snippets as $master_directive_snippet){ - $folder_directive_snippets[$i]['folder_directive_snippets_id'] .= ''; - } - $folder_directive_snippets[$i]['folder_directive_snippets_id'] .= ''; - } - if(is_array($c_directive_snippets) && !empty($c_directive_snippets)){ $folder_directive_snippets[$i]['folder_directive_snippets_id'] .= ''; foreach($c_directive_snippets as $c_directive_snippet){ diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 76ab4f7c4f..a7c6357781 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -3236,7 +3236,7 @@ class apache2_plugin { foreach($required_php_snippets as $required_php_snippet){ $required_php_snippet = intval($required_php_snippet); if($required_php_snippet > 0){ - $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE ".($snippet['master_directive_snippets_id'] > 0 ? 'master_' : '')."directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); + $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); $php_snippet['snippet'] = trim($php_snippet['snippet']); if($php_snippet['snippet'] != ''){ $custom_php_ini_settings .= "\n".$php_snippet['snippet']; @@ -3409,7 +3409,7 @@ class apache2_plugin { foreach($required_php_snippets as $required_php_snippet){ $required_php_snippet = intval($required_php_snippet); if($required_php_snippet > 0){ - $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE ".($snippet['master_directive_snippets_id'] > 0 ? 'master_' : '')."directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); + $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); $php_snippet['snippet'] = trim($php_snippet['snippet']); if($php_snippet['snippet'] != ''){ $custom_php_ini_settings .= "\n".$php_snippet['snippet']; diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index b1d2f773b0..c361d3f62f 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -2800,7 +2800,7 @@ class nginx_plugin { foreach($required_php_snippets as $required_php_snippet){ $required_php_snippet = intval($required_php_snippet); if($required_php_snippet > 0){ - $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE ".($snippet['master_directive_snippets_id'] > 0 ? 'master_' : '')."directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); + $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); $php_snippet['snippet'] = trim($php_snippet['snippet']); if($php_snippet['snippet'] != ''){ $custom_php_ini_settings .= "\n".$php_snippet['snippet']; @@ -2987,7 +2987,7 @@ class nginx_plugin { foreach($required_php_snippets as $required_php_snippet){ $required_php_snippet = intval($required_php_snippet); if($required_php_snippet > 0){ - $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE ".($snippet['master_directive_snippets_id'] > 0 ? 'master_' : '')."directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); + $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); $php_snippet['snippet'] = trim($php_snippet['snippet']); if($php_snippet['snippet'] != ''){ $custom_php_ini_settings .= "\n".$php_snippet['snippet']; -- GitLab From 0ae4c0ac1ec1aa461c2a36165393bf0a440d6133 Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Tue, 29 Sep 2020 11:21:06 +0200 Subject: [PATCH 6/9] - this->dataRecord uses id instead of directive_snippets_id --- interface/web/admin/directive_snippets_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/admin/directive_snippets_edit.php b/interface/web/admin/directive_snippets_edit.php index f6edf5cab1..4a02071047 100644 --- a/interface/web/admin/directive_snippets_edit.php +++ b/interface/web/admin/directive_snippets_edit.php @@ -55,7 +55,7 @@ class page_action extends tform_actions { if(isset($this->dataRecord['update_sites']) && $this->dataRecord['update_sites'] === 'y' && $this->dataRecord['active'] === 'y') { if($this->dataRecord['type'] === 'php') { - $rlike = $this->dataRecord['directive_snippets_id'].'|,'.$this->dataRecord['directive_snippets_id'].'|'.$this->dataRecord['directive_snippets_id'].','; + $rlike = $this->dataRecord['id'].'|,'.$this->dataRecord['id'].'|'.$this->dataRecord['id'].','; $affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets REGEXP ? AND type = ?', $rlike, 'apache'); if(is_array($affected_snippets) && !empty($affected_snippets)) { foreach($affected_snippets as $snippet) { @@ -64,7 +64,7 @@ class page_action extends tform_actions { $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id IN ?', $conf['server_id'], $sql_in); } } elseif($this->dataRecord['type'] === 'apache' || $this->dataRecord['type'] === 'nginx') { - $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id = ?', $conf['server_id'], $this->dataRecord['directive_snippets_id']); + $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id = ?', $conf['server_id'], $this->dataRecord['id']); } if(is_array($affected_sites) && !empty($affected_sites)) { -- GitLab From 175d36900f7a5bd0d00ceb2e1b8eed74290fa0c9 Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Tue, 29 Sep 2020 11:51:39 +0200 Subject: [PATCH 7/9] - prevent snippets from being hidden, disabled or deleted if used by at least one website --- .../web/admin/directive_snippets_del.php | 30 +++++++++-- .../web/admin/directive_snippets_edit.php | 51 ++++++++++++++----- .../admin/lib/lang/ar_directive_snippets.lng | 4 +- .../admin/lib/lang/bg_directive_snippets.lng | 4 +- .../admin/lib/lang/br_directive_snippets.lng | 4 +- .../admin/lib/lang/ca_directive_snippets.lng | 4 +- .../admin/lib/lang/cz_directive_snippets.lng | 4 +- .../admin/lib/lang/de_directive_snippets.lng | 4 +- .../admin/lib/lang/dk_directive_snippets.lng | 4 +- .../admin/lib/lang/el_directive_snippets.lng | 4 +- .../admin/lib/lang/en_directive_snippets.lng | 4 +- .../admin/lib/lang/es_directive_snippets.lng | 4 +- .../admin/lib/lang/fi_directive_snippets.lng | 4 +- .../admin/lib/lang/fr_directive_snippets.lng | 4 +- .../admin/lib/lang/hr_directive_snippets.lng | 4 +- .../admin/lib/lang/hu_directive_snippets.lng | 4 +- .../admin/lib/lang/id_directive_snippets.lng | 4 +- .../admin/lib/lang/it_directive_snippets.lng | 4 +- .../admin/lib/lang/ja_directive_snippets.lng | 4 +- .../admin/lib/lang/nl_directive_snippets.lng | 4 +- .../admin/lib/lang/pl_directive_snippets.lng | 4 +- .../admin/lib/lang/pt_directive_snippets.lng | 4 +- .../admin/lib/lang/ro_directive_snippets.lng | 4 +- .../admin/lib/lang/ru_directive_snippets.lng | 4 +- .../admin/lib/lang/se_directive_snippets.lng | 4 +- .../admin/lib/lang/sk_directive_snippets.lng | 4 +- .../admin/lib/lang/tr_directive_snippets.lng | 4 +- 27 files changed, 140 insertions(+), 41 deletions(-) diff --git a/interface/web/admin/directive_snippets_del.php b/interface/web/admin/directive_snippets_del.php index 551634f0a8..e4bda4c2a1 100644 --- a/interface/web/admin/directive_snippets_del.php +++ b/interface/web/admin/directive_snippets_del.php @@ -45,7 +45,31 @@ require_once '../../lib/app.inc.php'; //* Check permissions for module $app->auth->check_module_permissions('admin'); -$app->uses("tform_actions"); -$app->tform_actions->onDelete(); +$app->load("tform_actions"); + +class page_action extends tform_actions { + function onBeforeDelete() { + global $app, $conf; + + if($this->dataRecord['type'] === 'php') { + $rlike = $this->dataRecord['directive_snippets_id'].'|,'.$this->dataRecord['directive_snippets_id'].'|'.$this->dataRecord['directive_snippets_id'].','; + $affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets REGEXP ? AND type = ?', $rlike, 'apache'); + if(is_array($affected_snippets) && !empty($affected_snippets)) { + foreach($affected_snippets as $snippet) { + $sql_in[] = $snippet['directive_snippets_id']; + } + $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id IN ?', $conf['server_id'], $sql_in); + } + } elseif($this->dataRecord['type'] === 'apache' || $this->dataRecord['type'] === 'nginx') { + $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id = ?', $conf['server_id'], $this->dataRecord['directive_snippets_id']); + } + + if(!empty($affected_sites)) { + $app->error($app->lng('error_delete_snippet_active_sites')); + } + } +} + +$page = new page_action(); +$page->onDelete(); -?> diff --git a/interface/web/admin/directive_snippets_edit.php b/interface/web/admin/directive_snippets_edit.php index 4a02071047..bfaf0ba1f9 100644 --- a/interface/web/admin/directive_snippets_edit.php +++ b/interface/web/admin/directive_snippets_edit.php @@ -49,23 +49,48 @@ $app->uses('tpl,tform,tform_actions'); class page_action extends tform_actions { - - public function onAfterUpdate() { + private function getAffectedSites() { global $app, $conf; - if(isset($this->dataRecord['update_sites']) && $this->dataRecord['update_sites'] === 'y' && $this->dataRecord['active'] === 'y') { - if($this->dataRecord['type'] === 'php') { - $rlike = $this->dataRecord['id'].'|,'.$this->dataRecord['id'].'|'.$this->dataRecord['id'].','; - $affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets REGEXP ? AND type = ?', $rlike, 'apache'); - if(is_array($affected_snippets) && !empty($affected_snippets)) { - foreach($affected_snippets as $snippet) { - $sql_in[] = $snippet['directive_snippets_id']; - } - $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id IN ?', $conf['server_id'], $sql_in); + if($this->dataRecord['type'] === 'php') { + $rlike = $this->dataRecord['id'].'|,'.$this->dataRecord['id'].'|'.$this->dataRecord['id'].','; + $affected_snippets = $app->db->queryAllRecords('SELECT directive_snippets_id FROM directive_snippets WHERE required_php_snippets REGEXP ? AND type = ?', $rlike, 'apache'); + if(is_array($affected_snippets) && !empty($affected_snippets)) { + foreach($affected_snippets as $snippet) { + $sql_in[] = $snippet['directive_snippets_id']; } - } elseif($this->dataRecord['type'] === 'apache' || $this->dataRecord['type'] === 'nginx') { - $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id = ?', $conf['server_id'], $this->dataRecord['id']); + $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id IN ?', $conf['server_id'], $sql_in); } + } elseif($this->dataRecord['type'] === 'apache' || $this->dataRecord['type'] === 'nginx') { + $affected_sites = $app->db->queryAllRecords('SELECT domain_id FROM web_domain WHERE server_id = ? AND directive_snippets_id = ?', $conf['server_id'], $this->dataRecord['id']); + } + + return $affected_sites; + } + + public function onBeforeUpdate() { + global $app; + + $oldRecord = $app->tform->getDataRecord($this->id); + + if($this->dataRecord['active'] !== 'y' && $oldRecord['active'] === 'y') { + $affected_sites = $this->getAffectedSites(); + if(!empty($affected_sites)) { + $app->tform->errorMessage .= $app->lng('error_disable_snippet_active_sites'); + } + } elseif($this->dataRecord['customer_viewable'] !== 'y' && $oldRecord['customer_viewable'] === 'y') { + $affected_sites = $this->getAffectedSites(); + if(!empty($affected_sites)) { + $app->tform->errorMessage .= $app->lng('error_hide_snippet_active_sites'); + } + } + } + + public function onAfterUpdate() { + global $app; + + if(isset($this->dataRecord['update_sites']) && $this->dataRecord['update_sites'] === 'y' && $this->dataRecord['active'] === 'y') { + $affected_sites = $this->getAffectedSites(); if(is_array($affected_sites) && !empty($affected_sites)) { foreach($affected_sites as $site) { diff --git a/interface/web/admin/lib/lang/ar_directive_snippets.lng b/interface/web/admin/lib/lang/ar_directive_snippets.lng index 6e7c1ac3c6..542cedcf67 100644 --- a/interface/web/admin/lib/lang/ar_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ar_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/bg_directive_snippets.lng b/interface/web/admin/lib/lang/bg_directive_snippets.lng index 6e7c1ac3c6..542cedcf67 100644 --- a/interface/web/admin/lib/lang/bg_directive_snippets.lng +++ b/interface/web/admin/lib/lang/bg_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/br_directive_snippets.lng b/interface/web/admin/lib/lang/br_directive_snippets.lng index bc94b85b7d..edd8416f7a 100644 --- a/interface/web/admin/lib/lang/br_directive_snippets.lng +++ b/interface/web/admin/lib/lang/br_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variáveis'; $wb['customer_viewable_txt'] = 'Visualização personalizada'; $wb['required_php_snippets_txt'] = 'Trecho de código exige php'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/ca_directive_snippets.lng b/interface/web/admin/lib/lang/ca_directive_snippets.lng index 6e7c1ac3c6..542cedcf67 100644 --- a/interface/web/admin/lib/lang/ca_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ca_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/cz_directive_snippets.lng b/interface/web/admin/lib/lang/cz_directive_snippets.lng index d627dcebeb..787fe6d7fe 100644 --- a/interface/web/admin/lib/lang/cz_directive_snippets.lng +++ b/interface/web/admin/lib/lang/cz_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Proměnné'; $wb['customer_viewable_txt'] = 'Dostupná volba pro klienta'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/de_directive_snippets.lng b/interface/web/admin/lib/lang/de_directive_snippets.lng index 0351f73df6..940f7baf22 100644 --- a/interface/web/admin/lib/lang/de_directive_snippets.lng +++ b/interface/web/admin/lib/lang/de_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variablen'; $wb['customer_viewable_txt'] = 'Sichtbar für Kunden'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/dk_directive_snippets.lng b/interface/web/admin/lib/lang/dk_directive_snippets.lng index 154d83a48c..45cbf088b1 100644 --- a/interface/web/admin/lib/lang/dk_directive_snippets.lng +++ b/interface/web/admin/lib/lang/dk_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variabler'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/el_directive_snippets.lng b/interface/web/admin/lib/lang/el_directive_snippets.lng index 6e7c1ac3c6..542cedcf67 100644 --- a/interface/web/admin/lib/lang/el_directive_snippets.lng +++ b/interface/web/admin/lib/lang/el_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/en_directive_snippets.lng b/interface/web/admin/lib/lang/en_directive_snippets.lng index 43ded16299..542cedcf67 100644 --- a/interface/web/admin/lib/lang/en_directive_snippets.lng +++ b/interface/web/admin/lib/lang/en_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/es_directive_snippets.lng b/interface/web/admin/lib/lang/es_directive_snippets.lng index a637f5f6fe..fc0ce3c931 100644 --- a/interface/web/admin/lib/lang/es_directive_snippets.lng +++ b/interface/web/admin/lib/lang/es_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['type_txt'] = 'Tipo'; $wb['variables_txt'] = 'Variables'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/fi_directive_snippets.lng b/interface/web/admin/lib/lang/fi_directive_snippets.lng index 6e7c1ac3c6..542cedcf67 100644 --- a/interface/web/admin/lib/lang/fi_directive_snippets.lng +++ b/interface/web/admin/lib/lang/fi_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/fr_directive_snippets.lng b/interface/web/admin/lib/lang/fr_directive_snippets.lng index 6e7c1ac3c6..542cedcf67 100644 --- a/interface/web/admin/lib/lang/fr_directive_snippets.lng +++ b/interface/web/admin/lib/lang/fr_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/hr_directive_snippets.lng b/interface/web/admin/lib/lang/hr_directive_snippets.lng index 0fe357d9fc..971fcc289a 100644 --- a/interface/web/admin/lib/lang/hr_directive_snippets.lng +++ b/interface/web/admin/lib/lang/hr_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Varijable'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/hu_directive_snippets.lng b/interface/web/admin/lib/lang/hu_directive_snippets.lng index 6e7c1ac3c6..542cedcf67 100644 --- a/interface/web/admin/lib/lang/hu_directive_snippets.lng +++ b/interface/web/admin/lib/lang/hu_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/id_directive_snippets.lng b/interface/web/admin/lib/lang/id_directive_snippets.lng index 6e7c1ac3c6..542cedcf67 100644 --- a/interface/web/admin/lib/lang/id_directive_snippets.lng +++ b/interface/web/admin/lib/lang/id_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/it_directive_snippets.lng b/interface/web/admin/lib/lang/it_directive_snippets.lng index 8205305e36..b62dc1cacf 100644 --- a/interface/web/admin/lib/lang/it_directive_snippets.lng +++ b/interface/web/admin/lib/lang/it_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variabili'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/ja_directive_snippets.lng b/interface/web/admin/lib/lang/ja_directive_snippets.lng index 6e7c1ac3c6..542cedcf67 100644 --- a/interface/web/admin/lib/lang/ja_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ja_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/nl_directive_snippets.lng b/interface/web/admin/lib/lang/nl_directive_snippets.lng index d216622c6f..b9207f3f3f 100644 --- a/interface/web/admin/lib/lang/nl_directive_snippets.lng +++ b/interface/web/admin/lib/lang/nl_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variabelen'; $wb['customer_viewable_txt'] = 'Zichtbaar voor klanten'; $wb['required_php_snippets_txt'] = 'Vereiste PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/pl_directive_snippets.lng b/interface/web/admin/lib/lang/pl_directive_snippets.lng index 6c55460d5a..3b644ac960 100644 --- a/interface/web/admin/lib/lang/pl_directive_snippets.lng +++ b/interface/web/admin/lib/lang/pl_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/pt_directive_snippets.lng b/interface/web/admin/lib/lang/pt_directive_snippets.lng index 6e7c1ac3c6..542cedcf67 100644 --- a/interface/web/admin/lib/lang/pt_directive_snippets.lng +++ b/interface/web/admin/lib/lang/pt_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/ro_directive_snippets.lng b/interface/web/admin/lib/lang/ro_directive_snippets.lng index 6e7c1ac3c6..542cedcf67 100644 --- a/interface/web/admin/lib/lang/ro_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ro_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/ru_directive_snippets.lng b/interface/web/admin/lib/lang/ru_directive_snippets.lng index 120a962d7f..d1d30a1d73 100644 --- a/interface/web/admin/lib/lang/ru_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ru_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Переменные:'; $wb['customer_viewable_txt'] = 'Видимый клиентам'; $wb['required_php_snippets_txt'] = 'Обязательная PHP-заготовка'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/se_directive_snippets.lng b/interface/web/admin/lib/lang/se_directive_snippets.lng index 6e7c1ac3c6..542cedcf67 100644 --- a/interface/web/admin/lib/lang/se_directive_snippets.lng +++ b/interface/web/admin/lib/lang/se_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/sk_directive_snippets.lng b/interface/web/admin/lib/lang/sk_directive_snippets.lng index 6e7c1ac3c6..542cedcf67 100644 --- a/interface/web/admin/lib/lang/sk_directive_snippets.lng +++ b/interface/web/admin/lib/lang/sk_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/tr_directive_snippets.lng b/interface/web/admin/lib/lang/tr_directive_snippets.lng index 4c1cebea4e..e5c58b7953 100644 --- a/interface/web/admin/lib/lang/tr_directive_snippets.lng +++ b/interface/web/admin/lib/lang/tr_directive_snippets.lng @@ -10,4 +10,6 @@ $wb['variables_txt'] = 'Değişkenler'; $wb['customer_viewable_txt'] = 'Müşteri görebilir'; $wb['required_php_snippets_txt'] = 'Gerekli PHP Parçası'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -?> +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file -- GitLab From 53b163898139c5d338f3a3fea29e911e293ba9c6 Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Tue, 29 Sep 2020 11:56:31 +0200 Subject: [PATCH 8/9] - use app->tform->lng instead of app->lng --- interface/web/admin/directive_snippets_del.php | 2 +- interface/web/admin/directive_snippets_edit.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/web/admin/directive_snippets_del.php b/interface/web/admin/directive_snippets_del.php index e4bda4c2a1..fd56b39eb7 100644 --- a/interface/web/admin/directive_snippets_del.php +++ b/interface/web/admin/directive_snippets_del.php @@ -65,7 +65,7 @@ class page_action extends tform_actions { } if(!empty($affected_sites)) { - $app->error($app->lng('error_delete_snippet_active_sites')); + $app->error($app->tform->lng('error_delete_snippet_active_sites')); } } } diff --git a/interface/web/admin/directive_snippets_edit.php b/interface/web/admin/directive_snippets_edit.php index bfaf0ba1f9..0ea7141273 100644 --- a/interface/web/admin/directive_snippets_edit.php +++ b/interface/web/admin/directive_snippets_edit.php @@ -76,12 +76,12 @@ class page_action extends tform_actions { if($this->dataRecord['active'] !== 'y' && $oldRecord['active'] === 'y') { $affected_sites = $this->getAffectedSites(); if(!empty($affected_sites)) { - $app->tform->errorMessage .= $app->lng('error_disable_snippet_active_sites'); + $app->tform->errorMessage .= $app->tform->lng('error_disable_snippet_active_sites'); } } elseif($this->dataRecord['customer_viewable'] !== 'y' && $oldRecord['customer_viewable'] === 'y') { $affected_sites = $this->getAffectedSites(); if(!empty($affected_sites)) { - $app->tform->errorMessage .= $app->lng('error_hide_snippet_active_sites'); + $app->tform->errorMessage .= $app->tform->lng('error_hide_snippet_active_sites'); } } } -- GitLab From b886fe2472af7f1b040cfcbd12cb42b4e6fc7412 Mon Sep 17 00:00:00 2001 From: Marius Burkard Date: Tue, 29 Sep 2020 12:02:33 +0200 Subject: [PATCH 9/9] - fixed typo --- interface/web/admin/lib/lang/ar_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/bg_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/br_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/ca_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/cz_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/de_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/dk_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/el_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/en_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/es_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/fi_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/fr_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/hr_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/hu_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/id_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/it_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/ja_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/nl_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/pl_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/pt_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/ro_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/ru_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/se_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/sk_directive_snippets.lng | 6 +++--- interface/web/admin/lib/lang/tr_directive_snippets.lng | 6 +++--- 25 files changed, 75 insertions(+), 75 deletions(-) diff --git a/interface/web/admin/lib/lang/ar_directive_snippets.lng b/interface/web/admin/lib/lang/ar_directive_snippets.lng index 542cedcf67..0f83e94159 100644 --- a/interface/web/admin/lib/lang/ar_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ar_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/bg_directive_snippets.lng b/interface/web/admin/lib/lang/bg_directive_snippets.lng index 542cedcf67..0f83e94159 100644 --- a/interface/web/admin/lib/lang/bg_directive_snippets.lng +++ b/interface/web/admin/lib/lang/bg_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/br_directive_snippets.lng b/interface/web/admin/lib/lang/br_directive_snippets.lng index edd8416f7a..3179f5fa56 100644 --- a/interface/web/admin/lib/lang/br_directive_snippets.lng +++ b/interface/web/admin/lib/lang/br_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variáveis'; $wb['customer_viewable_txt'] = 'Visualização personalizada'; $wb['required_php_snippets_txt'] = 'Trecho de código exige php'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/ca_directive_snippets.lng b/interface/web/admin/lib/lang/ca_directive_snippets.lng index 542cedcf67..0f83e94159 100644 --- a/interface/web/admin/lib/lang/ca_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ca_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/cz_directive_snippets.lng b/interface/web/admin/lib/lang/cz_directive_snippets.lng index 787fe6d7fe..48a3280cd1 100644 --- a/interface/web/admin/lib/lang/cz_directive_snippets.lng +++ b/interface/web/admin/lib/lang/cz_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Proměnné'; $wb['customer_viewable_txt'] = 'Dostupná volba pro klienta'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/de_directive_snippets.lng b/interface/web/admin/lib/lang/de_directive_snippets.lng index 940f7baf22..0f7fb8dfb7 100644 --- a/interface/web/admin/lib/lang/de_directive_snippets.lng +++ b/interface/web/admin/lib/lang/de_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variablen'; $wb['customer_viewable_txt'] = 'Sichtbar für Kunden'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/dk_directive_snippets.lng b/interface/web/admin/lib/lang/dk_directive_snippets.lng index 45cbf088b1..3b86e8cd95 100644 --- a/interface/web/admin/lib/lang/dk_directive_snippets.lng +++ b/interface/web/admin/lib/lang/dk_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variabler'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/el_directive_snippets.lng b/interface/web/admin/lib/lang/el_directive_snippets.lng index 542cedcf67..0f83e94159 100644 --- a/interface/web/admin/lib/lang/el_directive_snippets.lng +++ b/interface/web/admin/lib/lang/el_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/en_directive_snippets.lng b/interface/web/admin/lib/lang/en_directive_snippets.lng index 542cedcf67..0f83e94159 100644 --- a/interface/web/admin/lib/lang/en_directive_snippets.lng +++ b/interface/web/admin/lib/lang/en_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/es_directive_snippets.lng b/interface/web/admin/lib/lang/es_directive_snippets.lng index fc0ce3c931..99d695aa73 100644 --- a/interface/web/admin/lib/lang/es_directive_snippets.lng +++ b/interface/web/admin/lib/lang/es_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['type_txt'] = 'Tipo'; $wb['variables_txt'] = 'Variables'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/fi_directive_snippets.lng b/interface/web/admin/lib/lang/fi_directive_snippets.lng index 542cedcf67..0f83e94159 100644 --- a/interface/web/admin/lib/lang/fi_directive_snippets.lng +++ b/interface/web/admin/lib/lang/fi_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/fr_directive_snippets.lng b/interface/web/admin/lib/lang/fr_directive_snippets.lng index 542cedcf67..0f83e94159 100644 --- a/interface/web/admin/lib/lang/fr_directive_snippets.lng +++ b/interface/web/admin/lib/lang/fr_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/hr_directive_snippets.lng b/interface/web/admin/lib/lang/hr_directive_snippets.lng index 971fcc289a..350e60d43f 100644 --- a/interface/web/admin/lib/lang/hr_directive_snippets.lng +++ b/interface/web/admin/lib/lang/hr_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Varijable'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/hu_directive_snippets.lng b/interface/web/admin/lib/lang/hu_directive_snippets.lng index 542cedcf67..0f83e94159 100644 --- a/interface/web/admin/lib/lang/hu_directive_snippets.lng +++ b/interface/web/admin/lib/lang/hu_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/id_directive_snippets.lng b/interface/web/admin/lib/lang/id_directive_snippets.lng index 542cedcf67..0f83e94159 100644 --- a/interface/web/admin/lib/lang/id_directive_snippets.lng +++ b/interface/web/admin/lib/lang/id_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/it_directive_snippets.lng b/interface/web/admin/lib/lang/it_directive_snippets.lng index b62dc1cacf..35e17caaff 100644 --- a/interface/web/admin/lib/lang/it_directive_snippets.lng +++ b/interface/web/admin/lib/lang/it_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variabili'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/ja_directive_snippets.lng b/interface/web/admin/lib/lang/ja_directive_snippets.lng index 542cedcf67..0f83e94159 100644 --- a/interface/web/admin/lib/lang/ja_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ja_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/nl_directive_snippets.lng b/interface/web/admin/lib/lang/nl_directive_snippets.lng index b9207f3f3f..dcd0e14f1c 100644 --- a/interface/web/admin/lib/lang/nl_directive_snippets.lng +++ b/interface/web/admin/lib/lang/nl_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variabelen'; $wb['customer_viewable_txt'] = 'Zichtbaar voor klanten'; $wb['required_php_snippets_txt'] = 'Vereiste PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/pl_directive_snippets.lng b/interface/web/admin/lib/lang/pl_directive_snippets.lng index 3b644ac960..f28620333d 100644 --- a/interface/web/admin/lib/lang/pl_directive_snippets.lng +++ b/interface/web/admin/lib/lang/pl_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/pt_directive_snippets.lng b/interface/web/admin/lib/lang/pt_directive_snippets.lng index 542cedcf67..0f83e94159 100644 --- a/interface/web/admin/lib/lang/pt_directive_snippets.lng +++ b/interface/web/admin/lib/lang/pt_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/ro_directive_snippets.lng b/interface/web/admin/lib/lang/ro_directive_snippets.lng index 542cedcf67..0f83e94159 100644 --- a/interface/web/admin/lib/lang/ro_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ro_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/ru_directive_snippets.lng b/interface/web/admin/lib/lang/ru_directive_snippets.lng index d1d30a1d73..eb1b8c884c 100644 --- a/interface/web/admin/lib/lang/ru_directive_snippets.lng +++ b/interface/web/admin/lib/lang/ru_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Переменные:'; $wb['customer_viewable_txt'] = 'Видимый клиентам'; $wb['required_php_snippets_txt'] = 'Обязательная PHP-заготовка'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/se_directive_snippets.lng b/interface/web/admin/lib/lang/se_directive_snippets.lng index 542cedcf67..0f83e94159 100644 --- a/interface/web/admin/lib/lang/se_directive_snippets.lng +++ b/interface/web/admin/lib/lang/se_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/sk_directive_snippets.lng b/interface/web/admin/lib/lang/sk_directive_snippets.lng index 542cedcf67..0f83e94159 100644 --- a/interface/web/admin/lib/lang/sk_directive_snippets.lng +++ b/interface/web/admin/lib/lang/sk_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Variables'; $wb['customer_viewable_txt'] = 'Customer viewable'; $wb['required_php_snippets_txt'] = 'Required PHP Snippet'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file diff --git a/interface/web/admin/lib/lang/tr_directive_snippets.lng b/interface/web/admin/lib/lang/tr_directive_snippets.lng index e5c58b7953..d9efa8031b 100644 --- a/interface/web/admin/lib/lang/tr_directive_snippets.lng +++ b/interface/web/admin/lib/lang/tr_directive_snippets.lng @@ -10,6 +10,6 @@ $wb['variables_txt'] = 'Değişkenler'; $wb['customer_viewable_txt'] = 'Müşteri görebilir'; $wb['required_php_snippets_txt'] = 'Gerekli PHP Parçası'; $wb['update_sites_txt'] = 'Update sites using this snippet'; -$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currencly used by existing websites.'; -$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currencly used by existing websites.'; -$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currencly used by existing websites.'; \ No newline at end of file +$wb['error_hide_snippet_active_sites'] = 'You cannot hide this snippet from customers as it is currently used by existing websites.'; +$wb['error_disable_snippet_active_sites'] = 'You cannot disable this snippet as it is currently used by existing websites.'; +$wb['error_delete_snippet_active_sites'] = 'You cannot delete this snippet as it is currently used by existing websites.'; \ No newline at end of file -- GitLab