From dd0130670fe3cab4c7e2c1ab4f3bf0d2b2d512b0 Mon Sep 17 00:00:00 2001
From: Denny Bortfeldt <denny@bortfeldt.net>
Date: Mon, 27 Jun 2016 18:02:16 -0400
Subject: [PATCH] When uploading a logo which is smaller than the current ispconfig one, then the logo will be on the left side of the header. In my opinion it will look better when it's centered. You could vote about it ;)

---
 interface/lib/classes/plugin_directive_snippets.inc.php |  142 +++++++++++++++++++++++-----------------------
 1 files changed, 71 insertions(+), 71 deletions(-)

diff --git a/interface/lib/classes/plugin_directive_snippets.inc.php b/interface/lib/classes/plugin_directive_snippets.inc.php
index dbc7d48..41138bc 100644
--- a/interface/lib/classes/plugin_directive_snippets.inc.php
+++ b/interface/lib/classes/plugin_directive_snippets.inc.php
@@ -1,72 +1,72 @@
-<?php
-
-
-class plugin_directive_snippets extends plugin_base
-{
-	var $module;
-	var $form;
-	var $tab;
-	var $record_id;
-	var $formdef;
-	var $options;
-
-	public function onShow()
-	{
-		global $app;
-
-		$listTpl = new tpl;
-		$listTpl->newTemplate('templates/web_directive_snippets.htm');
-
-		//* Loading language file
-		$lng_file = "lib/lang/".$_SESSION["s"]["language"]."_web_directive_snippets.lng";
-
-		include $lng_file;
-		$listTpl->setVar($wb);
-
-		$message = '';
-		$error   = '';
-
-		$server_type = $app->getconf->get_server_config($this->form->dataRecord['server_id'], 'web');
-		$server_type = $server_type['server_type'];
-		$records = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND type = ? ORDER BY name ASC", $server_type);
-
-		for ($i = 0, $c = count($records); $i < $c; $i++)
-		{
-			$records[$i]['is_selected'] = false;
-
-			if ($this->form->dataRecord['directive_snippets_id'] === $records[$i]['directive_snippets_id'])
-				$records[$i]['is_selected'] = true;
-		}
-
-		$listTpl->setLoop('records', $records);
-
-		$list_name = 'directive_snippets_list';
-		$_SESSION["s"]["list"][$list_name]["parent_id"] = $this->form->id;
-		$_SESSION["s"]["list"][$list_name]["parent_name"] = $app->tform->formDef["name"];
-		$_SESSION["s"]["list"][$list_name]["parent_tab"] = $_SESSION["s"]["form"]["tab"];
-		$_SESSION["s"]["list"][$list_name]["parent_script"] = $app->tform->formDef["action"];
-		$_SESSION["s"]["form"]["return_to"] = $list_name;
-
-		return $listTpl->grab();
-	}
-	
-	public function onUpdate()
-	{
-		global $app, $conf;
-
-		if (isset($this->form->dataRecord['directive_snippets_id']) && $this->form->oldDataRecord['directive_snippets_id'] !== $this->form->dataRecord['directive_snippets_id']) {
-			$app->db->query('UPDATE web_domain SET directive_snippets_id = ? WHERE domain_id = ?', $this->form->dataRecord['directive_snippets_id'], $this->form->id);
-		}
-	}
-
-	public function onInsert()
-	{
-		global $app, $conf;
-
-		if (isset($this->form->dataRecord['directive_snippets_id'])) {
-			$app->db->query('UPDATE web_domain SET directive_snippets_id = ? WHERE domain_id = ?', $this->form->dataRecord['directive_snippets_id'], $this->form->id);
-		}
-	}
-
-}
+<?php
+
+
+class plugin_directive_snippets extends plugin_base
+{
+	var $module;
+	var $form;
+	var $tab;
+	var $record_id;
+	var $formdef;
+	var $options;
+
+	public function onShow()
+	{
+		global $app;
+
+		$listTpl = new tpl;
+		$listTpl->newTemplate('templates/web_directive_snippets.htm');
+
+		//* Loading language file
+		$lng_file = "lib/lang/".$_SESSION["s"]["language"]."_web_directive_snippets.lng";
+
+		include $lng_file;
+		$listTpl->setVar($wb);
+
+		$message = '';
+		$error   = '';
+
+		$server_type = $app->getconf->get_server_config($this->form->dataRecord['server_id'], 'web');
+		$server_type = $server_type['server_type'];
+		$records = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND type = ? ORDER BY name ASC", $server_type);
+
+		for ($i = 0, $c = count($records); $i < $c; $i++)
+		{
+			$records[$i]['is_selected'] = false;
+
+			if ($this->form->dataRecord['directive_snippets_id'] === $records[$i]['directive_snippets_id'])
+				$records[$i]['is_selected'] = true;
+		}
+
+		$listTpl->setLoop('records', $records);
+
+		$list_name = 'directive_snippets_list';
+		$_SESSION["s"]["list"][$list_name]["parent_id"] = $this->form->id;
+		$_SESSION["s"]["list"][$list_name]["parent_name"] = $app->tform->formDef["name"];
+		$_SESSION["s"]["list"][$list_name]["parent_tab"] = $_SESSION["s"]["form"]["tab"];
+		$_SESSION["s"]["list"][$list_name]["parent_script"] = $app->tform->formDef["action"];
+		$_SESSION["s"]["form"]["return_to"] = $list_name;
+
+		return $listTpl->grab();
+	}
+	
+	public function onUpdate()
+	{
+		global $app, $conf;
+
+		if (isset($this->form->dataRecord['directive_snippets_id']) && $this->form->oldDataRecord['directive_snippets_id'] !== $this->form->dataRecord['directive_snippets_id']) {
+			$app->db->query('UPDATE web_domain SET directive_snippets_id = ? WHERE domain_id = ?', $this->form->dataRecord['directive_snippets_id'], $this->form->id);
+		}
+	}
+
+	public function onInsert()
+	{
+		global $app, $conf;
+
+		if (isset($this->form->dataRecord['directive_snippets_id'])) {
+			$app->db->query('UPDATE web_domain SET directive_snippets_id = ? WHERE domain_id = ?', $this->form->dataRecord['directive_snippets_id'], $this->form->id);
+		}
+	}
+
+}
 ?>
\ No newline at end of file

--
Gitblit v1.9.1