From 0a9e017d34c83b0d4db91a9aeefbc8b8c2e99117 Mon Sep 17 00:00:00 2001
From: Fabrixxm <fabrix.xm@gmail.com>
Date: Fri, 13 Nov 2015 10:56:06 +0100
Subject: [PATCH] Installer use static css, fix #2071

---
 mod/install.php                     |   8 ++++
 view/install/green.png              | Bin 0 -> 323 bytes
 view/install/info.png               | Bin 0 -> 2152 bytes
 view/install/red.png                | Bin 0 -> 316 bytes
 view/install/style.css              |  58 ++++++++++++++++++++++++++++
 view/install/yellow.png             | Bin 0 -> 280 bytes
 view/templates/install.tpl          |   2 +-
 view/templates/install_checks.tpl   |  16 ++++++--
 view/templates/install_db.tpl       |   2 +-
 view/templates/install_settings.tpl |   2 +-
 10 files changed, 82 insertions(+), 6 deletions(-)
 create mode 100644 view/install/green.png
 create mode 100644 view/install/info.png
 create mode 100644 view/install/red.png
 create mode 100644 view/install/style.css
 create mode 100644 view/install/yellow.png

diff --git a/mod/install.php b/mod/install.php
index e30c30689..8434b38e3 100755
--- a/mod/install.php
+++ b/mod/install.php
@@ -11,6 +11,14 @@ function install_init(&$a){
 		echo "ok";
 		killme();
 	}
+	
+	// We overwrite current theme css, because during install we could not have a working mod_rewrite
+	// so we could not have a css at all. Here we set a static css file for the install procedure pages
+	$a->config['system']['theme'] = "../install";
+	$a->theme['stylesheet'] = $a->get_baseurl()."/view/install/style.css";
+	
+	
+	
 	global $install_wizard_pass;
 	if (x($_POST,'pass'))
 		$install_wizard_pass = intval($_POST['pass']);
diff --git a/view/install/green.png b/view/install/green.png
new file mode 100644
index 0000000000000000000000000000000000000000..a4de276be9b4d1a08727ec4a52d33e68b0961b2f
GIT binary patch
literal 323
zcmV-J0lfZ+P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0003BNkl<ZILocm
zF-ikL7zN-jyD>`40kVw{u&@y$2wJ9+cmvCndLm=Dmk`A&rB(@8hkzhnAcfHg7PHBQ
z2+3l6FvT$M&CL7%_m?cAQ#(ZmEgWEi5qe0a<L5<sX-Ry8E346!j<0`T(5c;{4U(9{
zE%wUc>~+e^7w_LQ_JeeM0rA4im*9Mdc9o<|H3};!b5vos#Bd7xnw7f2=UplD{4^II
zZ?87cpYZrG+nq&O!NRxKi3yw}o*R#{Y6s6nk#k!S8psP)1Ua`6*$`0{lF+K6$ho5^
zOIYZ0QRLiSgcKnp{mFW9f3g^;G&cBr)2!5SVmJ+9Ny<es(3OsFH;(c@4$~jU`3IQk
VSc&=WwH*Ke002ovPDHLkV1oIcjbH!(

literal 0
HcmV?d00001

diff --git a/view/install/info.png b/view/install/info.png
new file mode 100644
index 0000000000000000000000000000000000000000..760eca5c3cc57dadf129ec990ae55ee7c5c97b72
GIT binary patch
literal 2152
zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBgK_VA>bp6XFWw?mc^D&$%o6&R*Sl
z^1|M8SN5C%axd=z3ZA&J@8ZQhXMpUhd(U0od+zF9pqevRcAf?*zP0!4jlE|s1N9DX
zwEH5^*APF#83-@$Jaq{s3liLO4uuPm0)`~A8aR9RX{h3TpnwIdIfq>(TnmH&j1Exj
zfYDyKjc`MdU5g?Jw*?$)zzD_RFjB>LgOUNnw5z*OY()1CuAm^*M!5P%SArh_Q}D}@
zAirQBjS2Y7a~B<Z{OR|{qYJZ5nY9XcJ>QwH!DP_?@bCQ|J&Bq}{~lC|Guj;Z^Zwk*
zj-vF=RTn<&wPZ>7R%Ip1Dt7#PEPL^<2;r#x@4kq9PGnRMVvVztb-Dh6QDLp*a<(hd
ztM}CI=G<~uQQqiYJgfdBHt%MEK3$=GWuZR=4_d!0WfBq<WHfstwCwz)i`=JKZF6Sv
zEj}f>LgaE@az@L^rEF&lDxUEl-p(5yqg~Q%p?rwN?6x3_)P~?qXP#~hP;#zzba-3-
z<jCvH=tldW>(<}VX;a<GlQR1&x61o(sz9G|7I;J!Gcag(f-vI&%Pkif7?`hkx;Tb-
z9G@DN?kwymuy>>R8v#$Iw!Q@mG$u56xJ^*<ba3Tyd=u*u5)!heL$vy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r*KPT~+QcyJgUu49*`GG8EOPd&``dQyj>)BEtg2n%HK%vk*+ky@
z*Kn1u>h$-wm&#SQ`JVe+YjFSXwA}w6441S_FEva3bNY|){EFhd`pRndZ>##h3Okg3
zD0bZ8BpCNWH9GaLg2nU1<$=waq4So^_O7a#X?J*C81rw_T|VmVuk&g@C$0W>>&LpE
z3w=Z{&YyDmUM%+tznhG8Z2x}cYHIub364s;Sz2)}zS7`7L;mNq=EExSEWk{!TH+c}
zl9E`GYL#4+3Zxi}3=9o*4J>sH%|Z+;t&A<L3=FgljDV!RU-w-U4Y~O#nQ4`{HN*)U
zCjvD{f@}!RPb(=;EJ|f4FE7{2%*!rLPAo{(%P&fw{mw=TsEEPS)z4*}Q$iB}F-fAm

literal 0
HcmV?d00001

diff --git a/view/install/red.png b/view/install/red.png
new file mode 100644
index 0000000000000000000000000000000000000000..fcd655bf65f968a354c656091f275fd0d117b9ed
GIT binary patch
literal 316
zcmV-C0mJ@@P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00034Nkl<ZILocm
zy-or_6b0aKXIn!}2PDS$03;e>45hw-(S{CvBH510H!xZf3ZexS9St--gvGKJ4zgnS
ziF%SLZswf1GiT0Ctf4DCK?iLd;~g^$(9h(rWqz_IzQ?WY=w<S|9|v@$Pq=_OT7sjv
zJyjT4n6D0b&g7SnmO5X-wctjoCUFo~P2x;Y!9)RvO`$qgJSOqYFH7;cu=V~!3lA2{
z@-#%l)Y&N(IrUZ93DIq>J;Y0txb1)jz6{$3C2nK?wi^&)NK8N7-3uk|EX0Hvt(@J7
z5_b^Lhk5*>T^N23R6iXn-kL%c&51$<wGD=@WuTYIvp+}q|Ay(e<NN_21yq^nqeWr>
O0000<MNUMnLSTa5*@DUd

literal 0
HcmV?d00001

diff --git a/view/install/style.css b/view/install/style.css
new file mode 100644
index 000000000..2f995d599
--- /dev/null
+++ b/view/install/style.css
@@ -0,0 +1,58 @@
+/***
+ * Friendica Communcation Server
+ *
+ * This is the static css for the install procedure
+ */
+
+body {
+	background-color: #FFF;
+	max-width: 750px;
+	margin: 0 auto;
+}
+
+section {
+    background-color: rgb(252, 252, 252);
+    padding: 0.5em 2em;
+}
+
+h1 img {
+	vertical-align: sub;
+}
+
+td {
+	padding: 0.2em;
+	border-bottom: 1px solid rgb(238, 238, 238);
+}
+td.help {
+	border-width: 0px 0px 2px 2px;
+	border-style: solid;
+	border-color: #000;
+	background: transparent url("/friendica/view/install/info.png") no-repeat scroll 5px 5px;
+}
+td.help blockquote {
+	margin-left: 60px;
+}
+input[type="submit"] {
+	margin: 2em 0;
+}
+
+tt {
+	background-color: rgb(238, 238, 238);
+	padding: 0.1em 0.2em;
+}
+
+.field {
+	margin-bottom: 0.5em;
+}
+.field label,
+.field input, .field select, .field textarea {
+    width: 100%;
+    display: block;
+}
+.field .field_help {
+	color: #999;
+	text-align: right;
+	width: 100%;
+	display: block;
+	font-size: 0.8em;
+}
diff --git a/view/install/yellow.png b/view/install/yellow.png
new file mode 100644
index 0000000000000000000000000000000000000000..52b31f3d34a06fd896e9c73a997ee5ab7d09c43c
GIT binary patch
literal 280
zcmV+z0q6dSP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0002rNkl<ZILob*
zF%p6>6ht5C7#i%bWNf^FmeT1hDD@7O+(Alip&gcT2!~QSXc))NA{h*dkWseFWOx71
z&wh(Hq<a=X2&{lP@Bnh)3?xBBrt_^g@d4P<k2r|feHf&Bj=&ngvB7h}b>v-DLs3C}
zZ%j@>#HKOOE6=9jO}a}LC0uXqPAv82%aHhs$x^6+$+ic?AUTfR97Ca|jpt$vjk^+n
z53hllK;!y?KOs~|sA_YO#?6IF7)51npmEOvNI-_9C=JAAD^Q70*^WW}Z=Xp=kg{>2
eJjycty3SALnpzFy2)~N}0000<MNUMnLSTYI6L(es

literal 0
HcmV?d00001

diff --git a/view/templates/install.tpl b/view/templates/install.tpl
index 958ee4014..24ae02242 100644
--- a/view/templates/install.tpl
+++ b/view/templates/install.tpl
@@ -1,6 +1,6 @@
 
 
-<h1>{{$title}}</h1>
+<h1><img src="{{$baseurl}}/images/friendica-32.png"> {{$title}}</h1>
 <h2>{{$pass}}</h2>
 
 
diff --git a/view/templates/install_checks.tpl b/view/templates/install_checks.tpl
index ca12425f0..10a197482 100644
--- a/view/templates/install_checks.tpl
+++ b/view/templates/install_checks.tpl
@@ -1,12 +1,22 @@
 
-<h1>{{$title}}</h1>
+<h1><img src="{{$baseurl}}/images/friendica-32.png"> {{$title}}</h1>
 <h2>{{$pass}}</h2>
 <form  action="{{$baseurl}}/index.php?q=install" method="post">
 <table>
 {{foreach $checks as $check}}
-	<tr><td>{{$check.title}} </td><td><span class="icon s22 {{if $check.status}}on{{else}}{{if $check.required}}off{{else}}yellow{{/if}}{{/if}}"></td><td>{{if $check.required}}(required){{/if}}</td></tr>
+	<tr><td>{{$check.title}} </td><td>
+	{{if $check.status}}
+		<img src="{{$baseurl}}/view/install/green.png" alt="Ok">
+	{{else}}
+		{{if $check.required}}
+			<img src="{{$baseurl}}/view/install/red.png" alt="Requirement not satisfied">
+		{{else}}
+			<img src="{{$baseurl}}/view/install/yellow.png" alt="Optional requirement not satisfied">
+		{{/if}}
+	{{/if}}
+	</td><td>{{if $check.required}}(required){{/if}}</td></tr>
 	{{if $check.help}}
-	<tr><td colspan="3"><blockquote>{{$check.help}}</blockquote></td></tr>
+	<tr><td class="help" colspan="3"><blockquote>{{$check.help}}</blockquote></td></tr>
 	{{/if}}
 {{/foreach}}
 </table>
diff --git a/view/templates/install_db.tpl b/view/templates/install_db.tpl
index f66bf119e..6b6c1c1e6 100644
--- a/view/templates/install_db.tpl
+++ b/view/templates/install_db.tpl
@@ -1,6 +1,6 @@
 
 
-<h1>{{$title}}</h1>
+<h1><img src="{{$baseurl}}/images/friendica-32.png"> {{$title}}</h1>
 <h2>{{$pass}}</h2>
 
 
diff --git a/view/templates/install_settings.tpl b/view/templates/install_settings.tpl
index 735672fe6..8d6823f11 100644
--- a/view/templates/install_settings.tpl
+++ b/view/templates/install_settings.tpl
@@ -1,6 +1,6 @@
 
 
-<h1>{{$title}}</h1>
+<h1><img src="{{$baseurl}}/images/friendica-32.png"> {{$title}}</h1>
 <h2>{{$pass}}</h2>