From 8d2aeb7082cca4a19b3700b62cae77cf50260217 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 24 Jul 2009 15:04:00 +0000 Subject: [PATCH 01/15] Cloudy theme IE (mostly 7/8) fixes --- theme/cloudy/css/display.css | 5 ++++- theme/cloudy/css/ie.css | 23 ++++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/theme/cloudy/css/display.css b/theme/cloudy/css/display.css index 82a1a1e4e0..ecf23fd74f 100644 --- a/theme/cloudy/css/display.css +++ b/theme/cloudy/css/display.css @@ -934,7 +934,6 @@ float:left; font-size:0.95em; width:16px; float:right; -display:none; } .notices li:hover div.notice-options { display:block; @@ -984,6 +983,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 94c2093b19..dabadcd951 100644 --- a/theme/cloudy/css/ie.css +++ b/theme/cloudy/css/ie.css @@ -8,15 +8,32 @@ 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); +} + +#form_notice #notice_action-submit { +right:0; +} #aside_primary { width:181px; @@ -24,7 +41,7 @@ width:181px; #form_notice, #anon_notice { -top:158px; +top:190px; } #public #content, From 932eab074d954b7f9add4a8b625c74a86b3bd8e1 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 24 Jul 2009 15:38:58 +0000 Subject: [PATCH 02/15] More IE fixes for Cloudy theme --- theme/cloudy/css/display.css | 16 +++++++++++----- theme/cloudy/css/ie.css | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/theme/cloudy/css/display.css b/theme/cloudy/css/display.css index ecf23fd74f..e3c5c3cc03 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; diff --git a/theme/cloudy/css/ie.css b/theme/cloudy/css/ie.css index dabadcd951..a698676fbb 100644 --- a/theme/cloudy/css/ie.css +++ b/theme/cloudy/css/ie.css @@ -29,6 +29,7 @@ display:block; } #form_notice #notice_data-attach { filter: alpha(opacity = 0); +left:33.5%; } #form_notice #notice_action-submit { From 70cc09a5c2863f4a9a24f65db8830146becbc72a Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sat, 25 Jul 2009 15:58:42 +1200 Subject: [PATCH 03/15] check the postgresql database is UTF8 before allowing installation to proceed --- install.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install.php b/install.php index 1d3a531c5a..d5e8e8b61f 100644 --- a/install.php +++ b/install.php @@ -243,6 +243,14 @@ function pgsql_db_installer($host, $database, $username, $password, $sitename) { updateStatus("Checking database..."); $conn = pg_connect($connstring); + //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; pg_query($conn, 'BEGIN'); From f86faaf341ee6e6e8cfd264e1d645cc0d964d85b Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Sat, 25 Jul 2009 00:19:12 -0400 Subject: [PATCH 04/15] If cannot connect, then stop the installation --- install.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.php b/install.php index d5e8e8b61f..901e502f1a 100644 --- a/install.php +++ b/install.php @@ -242,6 +242,12 @@ 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')); From e0b877b26c5e93809b2a53b6c46326d5e31fa0e8 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 25 Jul 2009 17:37:37 +0000 Subject: [PATCH 05/15] Removed
structure from NoticeListItem::showDeleteLink. Reason: To speed up DOM load by cutting down 3 nodes in each notice list item. Generally each notice option should be a list item in a
    , however, there is no tangible benefit for the user using this approach. In this case, minimalism is favoured. Similarly, the new approach will make 5 fewer function calls on the server side. --- lib/noticelist.php | 6 +----- theme/base/css/display.css | 6 +----- theme/default/css/display.css | 2 +- theme/identica/css/display.css | 2 +- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/lib/noticelist.php b/lib/noticelist.php index 44726a17b7..d4d4fc7119 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -479,13 +479,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 867dc0ef7c..80ab397ee9 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -937,22 +937,18 @@ display:block; border:0; } .notice-options .notice_reply a, -.notice-options .notice_delete a { +.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 251d6706be..e8df27718f 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -227,7 +227,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 42a4573a74..7dd4256bf5 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -227,7 +227,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%; } From 66a959a7762474e00264ddf942fb7b681bdf2045 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 25 Jul 2009 17:44:19 +0000 Subject: [PATCH 06/15] Removed
    structure from NoticeListItem::showReplyLink. Reason: Same as commit e0b877b26c5e93809b2a53b6c46326d5e31fa0e8. --- lib/noticelist.php | 7 +------ theme/base/css/display.css | 8 +------- theme/default/css/display.css | 6 +----- theme/identica/css/display.css | 6 +----- 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/lib/noticelist.php b/lib/noticelist.php index d4d4fc7119..0bd98fef78 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -453,17 +453,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'); } } diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 80ab397ee9..41fc5c20e7 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -921,22 +921,16 @@ 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_reply, .notice-options .notice_delete { text-decoration:none; padding-left:16px; diff --git a/theme/default/css/display.css b/theme/default/css/display.css index e8df27718f..b7c86ae07b 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 { diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index 7dd4256bf5..6a88204953 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 { From 89f32432bace26feb46299728ce2878fc5df4d20 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 25 Jul 2009 17:53:37 +0000 Subject: [PATCH 07/15] Updated pigeonthoughts theme --- theme/pigeonthoughts/css/base.css | 14 ++------------ theme/pigeonthoughts/css/display.css | 8 ++------ 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/theme/pigeonthoughts/css/base.css b/theme/pigeonthoughts/css/base.css index 5d5eb9896c..f2256b7caa 100644 --- a/theme/pigeonthoughts/css/base.css +++ b/theme/pigeonthoughts/css/base.css @@ -893,38 +893,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 f113225fbf..1bf37bf738 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%; } From 9c09bfe4d721a7a3be907dcba42eb6d31f50020d Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 25 Jul 2009 18:04:45 +0000 Subject: [PATCH 08/15] Removed
    structure from NoticeListItem::showNoticeLink. Reason: Arguably, the earlier structure was unnecessarily verbose. Same as commit e0b877b26c5e93809b2a53b6c46326d5e31fa0e8. --- lib/noticelist.php | 7 +------ theme/base/css/display.css | 3 +-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/noticelist.php b/lib/noticelist.php index 0bd98fef78..a3d20025f6 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'); } /** diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 41fc5c20e7..8b9fcd309d 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -882,11 +882,10 @@ font-size:1.025em; 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 a.timestamp { display:inline-block; } .notice div.entry-content .device dt { From e37834191082a76370525b41ad57ae56f726fc65 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 25 Jul 2009 18:22:05 +0000 Subject: [PATCH 09/15] Removed
    structure from NoticeListItem::showNoticeSource. Same as commit e0b877b26c5e93809b2a53b6c46326d5e31fa0e8. --- lib/noticelist.php | 14 +++++++------- theme/base/css/display.css | 3 --- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/noticelist.php b/lib/noticelist.php index a3d20025f6..7d363a5a24 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -379,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': @@ -389,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'); } } diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 8b9fcd309d..3b3c0e19f1 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -888,9 +888,6 @@ display:none; .notice div.entry-content a.timestamp { display:inline-block; } -.notice div.entry-content .device dt { -text-transform:lowercase; -} .notice-options { position:relative; From 0b47e71e7a693b6bd9230043c6e1078059de16f6 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 25 Jul 2009 18:26:00 +0000 Subject: [PATCH 10/15] Removed
    structure from NoticeListItem::showContext. Same as committ e0b877b26c5e93809b2a53b6c46326d5e31fa0e8. --- lib/noticelist.php | 8 ++------ theme/base/css/display.css | 9 --------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/lib/noticelist.php b/lib/noticelist.php index 7d363a5a24..a8d5059ca4 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -424,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'); } } diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 3b3c0e19f1..1e49374732 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -876,15 +876,6 @@ 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 .response dt { -display:none; -} .notice div.entry-content a.timestamp { display:inline-block; } From cdf6d655b5a1f6378333c9a30aa40ff2f00b92fb Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 25 Jul 2009 18:29:30 +0000 Subject: [PATCH 11/15] Minor change to timestamp selector --- theme/base/css/display.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 1e49374732..364ea0b623 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -876,7 +876,7 @@ float:left; font-size:1.025em; } -.notice div.entry-content a.timestamp { +.notice div.entry-content .timestamp { display:inline-block; } From ef571f731c9a2706f16b969dabf78cae80e0e46d Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 25 Jul 2009 18:30:18 +0000 Subject: [PATCH 12/15] Updated pigeontheme to reflect the changes made to entry-content structure --- theme/pigeonthoughts/css/base.css | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/theme/pigeonthoughts/css/base.css b/theme/pigeonthoughts/css/base.css index f2256b7caa..980d7ddd77 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; From d3a72431bef054217a71a97d3a13fd9b293fb86d Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 26 Jul 2009 16:34:27 +1200 Subject: [PATCH 13/15] lowercase tags using mb_convert_case(), which understands many more alphabets than I do. --- lib/util.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/util.php b/lib/util.php index c7c82dba29..d784bb7933 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) From b9cf19a2ee4b483709f1e964860fcf9209c4ba05 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Mon, 27 Jul 2009 02:54:51 +0000 Subject: [PATCH 14/15] Better error handling when updating Facebook --- lib/facebookutil.php | 13 ++++++++----- lib/mail.php | 8 ++++---- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/facebookutil.php b/lib/facebookutil.php index 85077c254a..b7688f04f0 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 262f788ee5..0050ad8104 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); From 0c8d003d40fb947d2f79398137c039803e0a5966 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 27 Jul 2009 16:57:30 +0000 Subject: [PATCH 15/15] Added config options for site's default design value --- config.php.sample | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config.php.sample b/config.php.sample index 57aa6a6c8c..36e62f70f2 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"]