forked from GNUsocial/gnu-social
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
This commit is contained in:
commit
753b699916
@ -152,6 +152,11 @@ class NewnoticeAction extends Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
$replyto = $this->trimmed('inreplyto');
|
$replyto = $this->trimmed('inreplyto');
|
||||||
|
#If an ID of 0 is wrongly passed here, it will cause a database error,
|
||||||
|
#so override it...
|
||||||
|
if ($replyto == 0) {
|
||||||
|
$replyto = 'false';
|
||||||
|
}
|
||||||
|
|
||||||
$notice = Notice::saveNew($user->id, $content, 'web', 1,
|
$notice = Notice::saveNew($user->id, $content, 'web', 1,
|
||||||
($replyto == 'false') ? null : $replyto);
|
($replyto == 'false') ? null : $replyto);
|
||||||
|
@ -585,7 +585,7 @@ class Notice extends Memcached_DataObject
|
|||||||
$inbox = new Notice_inbox();
|
$inbox = new Notice_inbox();
|
||||||
$UT = common_config('db','type')=='pgsql'?'"user"':'user';
|
$UT = common_config('db','type')=='pgsql'?'"user"':'user';
|
||||||
$qry = 'INSERT INTO notice_inbox (user_id, notice_id, created) ' .
|
$qry = 'INSERT INTO notice_inbox (user_id, notice_id, created) ' .
|
||||||
"SELECT $UT.id, " . $this->id . ', "' . $this->created . '" ' .
|
"SELECT $UT.id, " . $this->id . ", '" . $this->created . "' " .
|
||||||
"FROM $UT JOIN subscription ON $UT.id = subscription.subscriber " .
|
"FROM $UT JOIN subscription ON $UT.id = subscription.subscriber " .
|
||||||
'WHERE subscription.subscribed = ' . $this->profile_id . ' ' .
|
'WHERE subscription.subscribed = ' . $this->profile_id . ' ' .
|
||||||
'AND NOT EXISTS (SELECT user_id, notice_id ' .
|
'AND NOT EXISTS (SELECT user_id, notice_id ' .
|
||||||
@ -655,7 +655,7 @@ class Notice extends Memcached_DataObject
|
|||||||
$inbox = new Notice_inbox();
|
$inbox = new Notice_inbox();
|
||||||
$UT = common_config('db','type')=='pgsql'?'"user"':'user';
|
$UT = common_config('db','type')=='pgsql'?'"user"':'user';
|
||||||
$qry = 'INSERT INTO notice_inbox (user_id, notice_id, created, source) ' .
|
$qry = 'INSERT INTO notice_inbox (user_id, notice_id, created, source) ' .
|
||||||
"SELECT $UT.id, " . $this->id . ', "' . $this->created . '", 2 ' .
|
"SELECT $UT.id, " . $this->id . ", '" . $this->created . "', 2 " .
|
||||||
"FROM $UT JOIN group_member ON $UT.id = group_member.profile_id " .
|
"FROM $UT JOIN group_member ON $UT.id = group_member.profile_id " .
|
||||||
'WHERE group_member.group_id = ' . $group->id . ' ' .
|
'WHERE group_member.group_id = ' . $group->id . ' ' .
|
||||||
'AND NOT EXISTS (SELECT user_id, notice_id ' .
|
'AND NOT EXISTS (SELECT user_id, notice_id ' .
|
||||||
|
@ -34,6 +34,9 @@ $config['site']['path'] = 'laconica';
|
|||||||
# If you want logging sent to a file instead of syslog
|
# If you want logging sent to a file instead of syslog
|
||||||
#$config['site']['logfile'] = '/tmp/laconica.log';
|
#$config['site']['logfile'] = '/tmp/laconica.log';
|
||||||
|
|
||||||
|
# Enables extra log information, for example full details of PEAR DB errors
|
||||||
|
#$config['site']['logdebug'] = true;
|
||||||
|
|
||||||
# This is a PEAR DB DSN, see http://pear.php.net/manual/en/package.database.db.intro-dsn.php
|
# This is a PEAR DB DSN, see http://pear.php.net/manual/en/package.database.db.intro-dsn.php
|
||||||
# Set it to match your actual database
|
# Set it to match your actual database
|
||||||
|
|
||||||
|
@ -43,7 +43,11 @@ function handleError($error)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
common_log(LOG_ERR, "PEAR error: " . $error->getMessage());
|
$logmsg = "PEAR error: " . $error->getMessage();
|
||||||
|
if(common_config('site', 'logdebug')) {
|
||||||
|
$logmsg .= " : ". $error->getDebugInfo();
|
||||||
|
}
|
||||||
|
common_log(LOG_ERR, $logmsg);
|
||||||
$msg = sprintf(_('The database for %s isn\'t responding correctly, '.
|
$msg = sprintf(_('The database for %s isn\'t responding correctly, '.
|
||||||
'so the site won\'t work properly. '.
|
'so the site won\'t work properly. '.
|
||||||
'The site admins probably know about the problem, '.
|
'The site admins probably know about the problem, '.
|
||||||
|
@ -73,6 +73,7 @@ $config =
|
|||||||
'theme' => 'default',
|
'theme' => 'default',
|
||||||
'path' => $_path,
|
'path' => $_path,
|
||||||
'logfile' => null,
|
'logfile' => null,
|
||||||
|
'logdebug' => false,
|
||||||
'fancy' => false,
|
'fancy' => false,
|
||||||
'locale_path' => INSTALLDIR.'/locale',
|
'locale_path' => INSTALLDIR.'/locale',
|
||||||
'language' => 'en_US',
|
'language' => 'en_US',
|
||||||
|
Loading…
Reference in New Issue
Block a user