diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-07-27 13:12:18 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-07-27 13:12:18 -0400 |
commit | 037c35152efc359d0947bff398a56af921afb076 (patch) | |
tree | b6e271640868cf4c0ab9eb6df07fde3a1ef9c6f9 | |
parent | 50a343bcf73d7ced643ce40ad31f479d584cb5c1 (diff) | |
parent | 0c8d003d40fb947d2f79398137c039803e0a5966 (diff) |
Merge branch '0.8.x' of git@gitorious.org:laconica/mainline into 0.8.x
-rw-r--r-- | config.php.sample | 8 | ||||
-rw-r--r-- | install.php | 14 | ||||
-rw-r--r-- | lib/facebookutil.php | 13 | ||||
-rw-r--r-- | lib/mail.php | 8 | ||||
-rw-r--r-- | lib/noticelist.php | 42 | ||||
-rw-r--r-- | lib/util.php | 3 | ||||
-rw-r--r-- | theme/base/css/display.css | 29 | ||||
-rw-r--r-- | theme/cloudy/css/display.css | 21 | ||||
-rw-r--r-- | theme/cloudy/css/ie.css | 24 | ||||
-rw-r--r-- | theme/default/css/display.css | 8 | ||||
-rw-r--r-- | theme/identica/css/display.css | 8 | ||||
-rw-r--r-- | theme/pigeonthoughts/css/base.css | 30 | ||||
-rw-r--r-- | theme/pigeonthoughts/css/display.css | 8 |
13 files changed, 96 insertions, 120 deletions
diff --git a/config.php.sample b/config.php.sample index 57aa6a6c8..36e62f70f 100644 --- a/config.php.sample +++ b/config.php.sample @@ -18,6 +18,14 @@ $config['site']['server'] = 'localhost'; $config['site']['path'] = 'laconica'; // $config['site']['fancy'] = false; // $config['site']['theme'] = 'default'; +// Sets the site's default design values (match it with the values in the theme) +// $config['site']['design']['backgroundcolor'] = '#F0F2F5'; +// $config['site']['design']['contentcolor'] = '#FFFFFF'; +// $config['site']['design']['sidebarcolor'] = '#CEE1E9'; +// $config['site']['design']['textcolor'] = '#000000'; +// $config['site']['design']['linkcolor'] = '#002E6E'; +// $config['site']['design']['backgroundimage'] = null; +// $config['site']['design']['disposition'] = 1; // To enable the built-in mobile style sheet, defaults to false. // $config['site']['mobile'] = true; // For contact email, defaults to $_SERVER["SERVER_ADMIN"] 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/facebookutil.php b/lib/facebookutil.php index 85077c254..b7688f04f 100644 --- a/lib/facebookutil.php +++ b/lib/facebookutil.php @@ -193,14 +193,16 @@ function facebookBroadcastNotice($notice) $facebook->api_client->users_setStatus($status, $fbuid, false, true); } } catch(FacebookRestClientException $e) { - common_log(LOG_ERR, $e->getMessage()); + + $code = $e->getCode(); + + common_log(LOG_ERR, 'Facebook returned error code ' . + $code . ': ' . $e->getMessage()); common_log(LOG_ERR, 'Unable to update Facebook status for ' . "$user->nickname (user id: $user->id)!"); - $code = $e->getCode(); - - if ($code >= 200) { + if ($code == 200 || $code == 250) { // 200 The application does not have permission to operate on the passed in uid parameter. // 250 Updating status requires the extended permission status_update or publish_stream. @@ -216,7 +218,8 @@ function facebookBroadcastNotice($notice) try { updateProfileBox($facebook, $flink, $notice); } catch(FacebookRestClientException $e) { - common_log(LOG_WARNING, $e->getMessage()); + common_log(LOG_ERR, 'Facebook returned error code ' . + $e->getCode() . ': ' . $e->getMessage()); common_log(LOG_WARNING, 'Unable to update Facebook profile box for ' . "$user->nickname (user id: $user->id)."); diff --git a/lib/mail.php b/lib/mail.php index 262f788ee..0050ad810 100644 --- a/lib/mail.php +++ b/lib/mail.php @@ -679,17 +679,17 @@ function mail_facebook_app_removed($user) $site_name = common_config('site', 'name'); $subject = sprintf( - _('Your %s Facebook application access has been disabled.', + _('Your %1\$s Facebook application access has been disabled.', $site_name)); $body = sprintf(_("Hi, %1\$s. We're sorry to inform you that we are " . - 'unable to update your Facebook status from %s, and have disabled ' . + 'unable to update your Facebook status from %2\$s, and have disabled ' . 'the Facebook application for your account. This may be because ' . 'you have removed the Facebook application\'s authorization, or ' . 'have deleted your Facebook account. You can re-enable the ' . 'Facebook application and automatic status updating by ' . - "re-installing the %1\$s Facebook application.\n\nRegards,\n\n%1\$s"), - $site_name); + "re-installing the %2\$s Facebook application.\n\nRegards,\n\n%2\$s"), + $user->nickname, $site_name); common_init_locale(); return mail_to_user($user, $subject, $body); 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/lib/util.php b/lib/util.php index c7c82dba2..d784bb793 100644 --- a/lib/util.php +++ b/lib/util.php @@ -595,7 +595,8 @@ function common_tag_link($tag) function common_canonical_tag($tag) { - return strtolower(str_replace(array('-', '_', '.'), '', $tag)); + $tag = mb_convert_case($tag, MB_CASE_LOWER, "UTF-8"); + return str_replace(array('-', '_', '.'), '', $tag); } function common_valid_profile_tag($str) 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/cloudy/css/display.css b/theme/cloudy/css/display.css index 82a1a1e4e..e3c5c3cc0 100644 --- a/theme/cloudy/css/display.css +++ b/theme/cloudy/css/display.css @@ -414,9 +414,12 @@ width:518px; min-height:322px; padding:20px; float:left; -border-radius-topleft:4px; --moz-border-radius-topleft:4px; --webkit-border-top-left-radius:4px; +border-radius:4px; +-moz-border-radius:4px; +-webkit-border-radius:4px; +border-radius-topright:0; +-moz-border-radius-topright:0; +-webkit-border-top-right-radius:0; border-style:solid; border-width:1px; } @@ -484,7 +487,7 @@ width:16px; height:16px; } #form_notice #notice_data-attach { -left:34.6%; +left:40%; padding:0; height:16px; } @@ -528,9 +531,12 @@ float:left; #form_notice .success { float:left; clear:both; -width:81.5%; +width:83.5%; margin-bottom:0; line-height:1.618; +position:absolute; +top:87px; +left:0; } #form_notice #notice_data-attach_selected code { float:left; @@ -934,7 +940,6 @@ float:left; font-size:0.95em; width:16px; float:right; -display:none; } .notices li:hover div.notice-options { display:block; @@ -984,6 +989,10 @@ text-decoration:none; padding-left:16px; } +.notice-options .notice_reply .notice_id { +display:none; +} + .notice-options form input.submit { width:16px; padding:2px 0; diff --git a/theme/cloudy/css/ie.css b/theme/cloudy/css/ie.css index 94c2093b1..a698676fb 100644 --- a/theme/cloudy/css/ie.css +++ b/theme/cloudy/css/ie.css @@ -8,15 +8,33 @@ color:#fff; background-color:#ddffcc; } +#form_notice { +width:525px; +} +#form_notice .form_note { +top:-5px; +right:0; +} +#form_notice textarea { +width:97.75%; +} #form_notice .form_note + label { position:absolute; -top:25px; -left:83%; +top:87px; +left:77%; text-indent:-9999px; height:16px; width:16px; display:block; } +#form_notice #notice_data-attach { +filter: alpha(opacity = 0); +left:33.5%; +} + +#form_notice #notice_action-submit { +right:0; +} #aside_primary { width:181px; @@ -24,7 +42,7 @@ width:181px; #form_notice, #anon_notice { -top:158px; +top:190px; } #public #content, 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%; } |