forked from GNUsocial/gnu-social
Merge branch '0.8.x' of git@gitorious.org:laconica/mainline into 0.8.x
This commit is contained in:
commit
037c35152e
@ -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"]
|
||||
|
14
install.php
14
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;
|
||||
|
@ -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).");
|
||||
|
@ -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);
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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%;
|
||||
}
|
||||
|
||||
|
@ -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%;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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%;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user