From da1e51cdfbfde85e2d8242b223fe2a07271fbcb7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 16 Apr 2013 21:15:41 +0400 Subject: add some styling to otp form --- utility.css | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'utility.css') diff --git a/utility.css b/utility.css index 308b71fd0..074589f9e 100644 --- a/utility.css +++ b/utility.css @@ -221,3 +221,22 @@ fieldset label { color : gray; } +body.otp { + margin : 1em; + padding : 0px; +} + +form.otpform { + margin : 0px; + padding : 0px; +} + +form.otpform label { + margin : 0px; + padding : 0px; +} + +body.otp div.content { + display : inline-block; + width : auto; +} -- cgit v1.2.3-54-g00ecf From bbffc43e4f4c04e5efeb0edcc9851742c2223b1d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 18 Apr 2013 16:06:03 +0400 Subject: actually check for DB_PORT in installer, add better hints and use mysqli if available --- config.php-dist | 2 +- install/index.php | 36 ++++++++++++++++++++++++------------ utility.css | 5 +++++ 3 files changed, 30 insertions(+), 13 deletions(-) (limited to 'utility.css') diff --git a/config.php-dist b/config.php-dist index 4df299786..7cb9d9397 100644 --- a/config.php-dist +++ b/config.php-dist @@ -8,7 +8,7 @@ define('DB_USER', "fox"); define('DB_NAME', "fox"); define('DB_PASS', "XXXXXX"); - //define('DB_PORT', '5432'); // when neeeded, PG-only + define('DB_PORT', ''); // usually 5432 for PostgreSQL, 3306 for MySQL define('MYSQL_CHARSET', 'UTF8'); // Connection charset for MySQL. If you have a legacy database and/or experience diff --git a/install/index.php b/install/index.php index 99339aca2..9cbab20f1 100644 --- a/install/index.php +++ b/install/index.php @@ -88,7 +88,7 @@ $msg"; } - function db_connect($host, $user, $pass, $db, $type) { + function db_connect($host, $user, $pass, $db, $type, $port) { if ($type == "pgsql") { $string = "dbname=$db user=$user"; @@ -101,8 +101,8 @@ $string .= " host=$host"; } - if (defined('DB_PORT')) { - $string = "$string port=" . DB_PORT; + if ($port) { + $string = "$string port=" . $port; } $link = pg_connect($string); @@ -110,10 +110,15 @@ return $link; } else if ($type == "mysql") { - $link = mysql_connect($host, $user, $pass); - if ($link) { - $result = mysql_select_db($db, $link); - if ($result) return $link; + if (function_exists("mysqli_connect")) { + return mysqli_connect($host, $user, $pass, $db, $port); + + } else { + $link = mysql_connect($host, $user, $pass); + if ($link) { + $result = mysql_select_db($db, $link); + if ($result) return $link; + } } } } @@ -173,7 +178,12 @@ } return $result; } else if ($type == "mysql") { - $result = mysql_query($query, $link); + + if (function_exists("mysqli_connect")) { + $result = mysqli_query($link, $query); + } else { + $result = mysql_query($query, $link); + } if (!$result) { $query = htmlspecialchars($query); if ($die_on_error) { @@ -254,17 +264,19 @@
- +
- + + If needed
- + + Usually 3306 for MySQL or 5432 for PostgreSQL

Other settings

@@ -327,7 +339,7 @@

Checking database

Date: Thu, 18 Apr 2013 16:18:20 +0400 Subject: tweak notice/warning/etc display --- include/functions.php | 6 +++--- tt-rss.css | 2 +- utility.css | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'utility.css') diff --git a/include/functions.php b/include/functions.php index 9f890eba7..e0c102b38 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2925,19 +2925,19 @@ function format_warning($msg, $id = "") { global $link; return "
-
$msg
"; + $msg"; } function format_notice($msg, $id = "") { global $link; return "
-
$msg
"; + $msg"; } function format_error($msg, $id = "") { global $link; return "
-
$msg
"; + $msg"; } function print_notice($msg) { diff --git a/tt-rss.css b/tt-rss.css index 8e87d6598..8bf591326 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -287,8 +287,8 @@ div.error { div.warning img, div.notice img, div.error img { margin-right : 4px; - float : left; vertical-align : middle; + display : table-cell; } ul.nomarks { diff --git a/utility.css b/utility.css index 65dc20b1e..d4b6d0a02 100644 --- a/utility.css +++ b/utility.css @@ -73,7 +73,7 @@ div.error { div.warning img, div.notice img, div.error img { margin-right : 4px; - float : left; + display : table-cell; vertical-align : middle; } -- cgit v1.2.3-54-g00ecf From 3c200461f81250f7e112149bf9b55245943b42c1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 18 Apr 2013 22:27:05 +0400 Subject: more notice css tweaks --- classes/handler/public.php | 2 +- include/functions.php | 6 +++--- install/index.php | 5 +++-- tt-rss.css | 5 +++++ utility.css | 4 ++++ 5 files changed, 16 insertions(+), 6 deletions(-) (limited to 'utility.css') diff --git a/classes/handler/public.php b/classes/handler/public.php index 79ed9d0ae..3b373edf5 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -929,7 +929,7 @@ class Handler_Public extends Handler { } else { - print "

" . "Tiny Tiny RSS database is up to date." . "

"; + print_notice("Tiny Tiny RSS database is up to date."); print "

diff --git a/include/functions.php b/include/functions.php index e0c102b38..0908bf8d3 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2925,19 +2925,19 @@ function format_warning($msg, $id = "") { global $link; return "
- $msg
"; + $msg"; } function format_notice($msg, $id = "") { global $link; return "
- $msg
"; + $msg"; } function format_error($msg, $id = "") { global $link; return "
- $msg
"; + $msg"; } function print_notice($msg) { diff --git a/install/index.php b/install/index.php index 9cbab20f1..416765e8f 100644 --- a/install/index.php +++ b/install/index.php @@ -80,12 +80,13 @@ } function print_error($msg) { - print "
$msg
"; + print "
+ $msg
"; } function print_notice($msg) { print "
- $msg
"; + $msg"; } function db_connect($host, $user, $pass, $db, $type, $port) { diff --git a/tt-rss.css b/tt-rss.css index 8bf591326..454e2ffd1 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -288,7 +288,12 @@ div.error { div.warning img, div.notice img, div.error img { margin-right : 4px; vertical-align : middle; +} + +div.warning span, div.notice span, div.error span { display : table-cell; + vertical-align : middle; + } ul.nomarks { diff --git a/utility.css b/utility.css index d4b6d0a02..50a54e154 100644 --- a/utility.css +++ b/utility.css @@ -73,6 +73,10 @@ div.error { div.warning img, div.notice img, div.error img { margin-right : 4px; + vertical-align : middle; +} + +div.warning span, div.notice span, div.error span { display : table-cell; vertical-align : middle; } -- cgit v1.2.3-54-g00ecf