summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--install.php14
-rw-r--r--lib/noticelist.php42
-rw-r--r--theme/base/css/display.css29
-rw-r--r--theme/default/css/display.css8
-rw-r--r--theme/identica/css/display.css8
-rw-r--r--theme/pigeonthoughts/css/base.css30
-rw-r--r--theme/pigeonthoughts/css/display.css8
7 files changed, 38 insertions, 101 deletions
diff --git a/install.php b/install.php
index 1d3a531c5..901e502f1 100644
--- a/install.php
+++ b/install.php
@@ -242,6 +242,20 @@ function pgsql_db_installer($host, $database, $username, $password, $sitename) {
updateStatus("Starting installation...");
updateStatus("Checking database...");
$conn = pg_connect($connstring);
+
+ if ($conn ===false) {
+ updateStatus("Failed to connect to database: $connstring");
+ showForm();
+ return false;
+ }
+
+ //ensure database encoding is UTF8
+ $record = pg_fetch_object(pg_query($conn, 'SHOW server_encoding'));
+ if ($record->server_encoding != 'UTF8') {
+ updateStatus("Laconica requires UTF8 character encoding. Your database is ". htmlentities($record->server_encoding));
+ showForm();
+ return false;
+ }
updateStatus("Running database script...");
//wrap in transaction;
diff --git a/lib/noticelist.php b/lib/noticelist.php
index 44726a17b..a8d5059ca 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -357,19 +357,14 @@ class NoticeListItem extends Widget
preg_match('/^http/', $this->notice->uri)) {
$noticeurl = $this->notice->uri;
}
- $this->out->elementStart('dl', 'timestamp');
- $this->out->element('dt', null, _('Published'));
- $this->out->elementStart('dd', null);
$this->out->elementStart('a', array('rel' => 'bookmark',
+ 'class' => 'timestamp',
'href' => $noticeurl));
$dt = common_date_iso8601($this->notice->created);
$this->out->element('abbr', array('class' => 'published',
'title' => $dt),
common_date_string($this->notice->created));
-
$this->out->elementEnd('a');
- $this->out->elementEnd('dd');
- $this->out->elementEnd('dl');
}
/**
@@ -384,8 +379,8 @@ class NoticeListItem extends Widget
function showNoticeSource()
{
if ($this->notice->source) {
- $this->out->elementStart('dl', 'device');
- $this->out->element('dt', null, _('From'));
+ $this->out->elementStart('span', 'source');
+ $this->out->text(_('from'));
$source_name = _($this->notice->source);
switch ($this->notice->source) {
case 'web':
@@ -394,22 +389,22 @@ class NoticeListItem extends Widget
case 'omb':
case 'system':
case 'api':
- $this->out->element('dd', null, $source_name);
+ $this->out->element('span', 'device', $source_name);
break;
default:
$ns = Notice_source::staticGet($this->notice->source);
if ($ns) {
- $this->out->elementStart('dd', null);
+ $this->out->elementStart('span', 'device');
$this->out->element('a', array('href' => $ns->url,
'rel' => 'external'),
$ns->name);
- $this->out->elementEnd('dd');
+ $this->out->elementEnd('span');
} else {
- $this->out->element('dd', null, $source_name);
+ $this->out->element('span', 'device', $source_name);
}
break;
}
- $this->out->elementEnd('dl');
+ $this->out->elementEnd('span');
}
}
@@ -429,13 +424,9 @@ class NoticeListItem extends Widget
&& $this->notice->conversation != $this->notice->id) {
$convurl = common_local_url('conversation',
array('id' => $this->notice->conversation));
- $this->out->elementStart('dl', 'response');
- $this->out->element('dt', null, _('To'));
- $this->out->elementStart('dd');
- $this->out->element('a', array('href' => $convurl.'#notice-'.$this->notice->id),
+ $this->out->element('a', array('href' => $convurl.'#notice-'.$this->notice->id,
+ 'class' => 'response'),
_('in context'));
- $this->out->elementEnd('dd');
- $this->out->elementEnd('dl');
}
}
@@ -453,17 +444,12 @@ class NoticeListItem extends Widget
if (common_logged_in()) {
$reply_url = common_local_url('newnotice',
array('replyto' => $this->profile->nickname));
-
- $this->out->elementStart('dl', 'notice_reply');
- $this->out->element('dt', null, _('Reply to this notice'));
- $this->out->elementStart('dd');
$this->out->elementStart('a', array('href' => $reply_url,
+ 'class' => 'notice_reply',
'title' => _('Reply to this notice')));
$this->out->text(_('Reply'));
$this->out->element('span', 'notice_id', $this->notice->id);
$this->out->elementEnd('a');
- $this->out->elementEnd('dd');
- $this->out->elementEnd('dl');
}
}
@@ -479,13 +465,9 @@ class NoticeListItem extends Widget
if ($user && $this->notice->profile_id == $user->id) {
$deleteurl = common_local_url('deletenotice',
array('notice' => $this->notice->id));
- $this->out->elementStart('dl', 'notice_delete');
- $this->out->element('dt', null, _('Delete this notice'));
- $this->out->elementStart('dd');
$this->out->element('a', array('href' => $deleteurl,
+ 'class' => 'notice_delete',
'title' => _('Delete this notice')), _('Delete'));
- $this->out->elementEnd('dd');
- $this->out->elementEnd('dl');
}
}
diff --git a/theme/base/css/display.css b/theme/base/css/display.css
index 867dc0ef7..364ea0b62 100644
--- a/theme/base/css/display.css
+++ b/theme/base/css/display.css
@@ -876,22 +876,9 @@ float:left;
font-size:1.025em;
}
-.notice div.entry-content dl,
-.notice div.entry-content dt,
-.notice div.entry-content dd {
-display:inline;
-}
-
-.notice div.entry-content .timestamp dt,
-.notice div.entry-content .response dt {
-display:none;
-}
-.notice div.entry-content .timestamp a {
+.notice div.entry-content .timestamp {
display:inline-block;
}
-.notice div.entry-content .device dt {
-text-transform:lowercase;
-}
.notice-options {
position:relative;
@@ -921,38 +908,28 @@ left:29px;
.notice-options .notice_delete {
right:0;
}
-.notice-options .notice_reply dt {
-display:none;
-}
-
.notice-options input,
.notice-options a {
text-indent:-9999px;
outline:none;
}
-
-.notice-options .notice_reply a,
.notice-options input.submit {
display:block;
border:0;
}
-.notice-options .notice_reply a,
-.notice-options .notice_delete a {
+.notice-options .notice_reply,
+.notice-options .notice_delete {
text-decoration:none;
padding-left:16px;
}
-
.notice-options form input.submit {
width:16px;
padding:2px 0;
}
-
-.notice-options .notice_delete dt,
.notice-options .form_favor legend,
.notice-options .form_disfavor legend {
display:none;
}
-.notice-options .notice_delete fieldset,
.notice-options .form_favor fieldset,
.notice-options .form_disfavor fieldset {
border:0;
diff --git a/theme/default/css/display.css b/theme/default/css/display.css
index 251d6706b..b7c86ae07 100644
--- a/theme/default/css/display.css
+++ b/theme/default/css/display.css
@@ -214,11 +214,7 @@ background:transparent url(../../base/images/icons/twotone/green/clip-02.gif) no
#attachments .attachment {
background:none;
}
-.notice-options .notice_reply a,
-.notice-options form input.submit {
-background-color:transparent;
-}
-.notice-options .notice_reply a {
+.notice-options .notice_reply {
background:transparent url(../../base/images/icons/twotone/green/reply.gif) no-repeat 0 45%;
}
.notice-options form.form_favor input.submit {
@@ -227,7 +223,7 @@ background:transparent url(../../base/images/icons/twotone/green/favourite.gif)
.notice-options form.form_disfavor input.submit {
background:transparent url(../../base/images/icons/twotone/green/disfavourite.gif) no-repeat 0 45%;
}
-.notice-options .notice_delete a {
+.notice-options .notice_delete {
background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-repeat 0 45%;
}
diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css
index 42a4573a7..6a8820495 100644
--- a/theme/identica/css/display.css
+++ b/theme/identica/css/display.css
@@ -214,11 +214,7 @@ background:transparent url(../../base/images/icons/twotone/green/clip-02.gif) no
#attachments .attachment {
background:none;
}
-.notice-options .notice_reply a,
-.notice-options form input.submit {
-background-color:transparent;
-}
-.notice-options .notice_reply a {
+.notice-options .notice_reply {
background:transparent url(../../base/images/icons/twotone/green/reply.gif) no-repeat 0 45%;
}
.notice-options form.form_favor input.submit {
@@ -227,7 +223,7 @@ background:transparent url(../../base/images/icons/twotone/green/favourite.gif)
.notice-options form.form_disfavor input.submit {
background:transparent url(../../base/images/icons/twotone/green/disfavourite.gif) no-repeat 0 45%;
}
-.notice-options .notice_delete a {
+.notice-options .notice_delete {
background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-repeat 0 45%;
}
diff --git a/theme/pigeonthoughts/css/base.css b/theme/pigeonthoughts/css/base.css
index 5d5eb9896..980d7ddd7 100644
--- a/theme/pigeonthoughts/css/base.css
+++ b/theme/pigeonthoughts/css/base.css
@@ -847,23 +847,9 @@ margin-left:0;
float:left;
font-size:1.025em;
}
-
-.notice div.entry-content dl,
-.notice div.entry-content dt,
-.notice div.entry-content dd {
-display:inline;
-}
-
-.notice div.entry-content .timestamp dt,
-.notice div.entry-content .response dt {
-display:none;
-}
-.notice div.entry-content .timestamp a {
+.notice div.entry-content .timestamp {
display:inline-block;
}
-.notice div.entry-content .device dt {
-text-transform:lowercase;
-}
.notice-options {
position:relative;
@@ -893,38 +879,28 @@ left:29px;
.notice-options .notice_delete {
right:0;
}
-.notice-options .notice_reply dt {
-display:none;
-}
-
.notice-options input,
.notice-options a {
text-indent:-9999px;
outline:none;
}
-
-.notice-options .notice_reply a,
.notice-options input.submit {
display:block;
border:0;
}
-.notice-options .notice_reply a,
-.notice-options .notice_delete a {
+.notice-options .notice_reply,
+.notice-options .notice_delete {
text-decoration:none;
padding-left:16px;
}
-
.notice-options form input.submit {
width:16px;
padding:2px 0;
}
-
-.notice-options .notice_delete dt,
.notice-options .form_favor legend,
.notice-options .form_disfavor legend {
display:none;
}
-.notice-options .notice_delete fieldset,
.notice-options .form_favor fieldset,
.notice-options .form_disfavor fieldset {
border:0;
diff --git a/theme/pigeonthoughts/css/display.css b/theme/pigeonthoughts/css/display.css
index f113225fb..1bf37bf73 100644
--- a/theme/pigeonthoughts/css/display.css
+++ b/theme/pigeonthoughts/css/display.css
@@ -269,11 +269,7 @@ background:transparent url(../../base/images/icons/twotone/green/clip-02.gif) no
#attachments .attachment {
background:none;
}
-.notice-options .notice_reply a,
-.notice-options form input.submit {
-background-color:transparent;
-}
-.notice-options .notice_reply a {
+.notice-options .notice_reply {
background:transparent url(../../base/images/icons/twotone/green/reply.gif) no-repeat 0 45%;
}
.notice-options form.form_favor input.submit {
@@ -282,7 +278,7 @@ background:transparent url(../../base/images/icons/twotone/green/favourite.gif)
.notice-options form.form_disfavor input.submit {
background:transparent url(../../base/images/icons/twotone/green/disfavourite.gif) no-repeat 0 45%;
}
-.notice-options .notice_delete a {
+.notice-options .notice_delete {
background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-repeat 0 45%;
}