Merge commit 'refs/merge-requests/19' of https://gitorious.org/social/mainline into merge-requests/19
This commit is contained in:
commit
e7c6c6fc76
|
@ -181,7 +181,10 @@ abstract class QueueManager extends IoManager
|
||||||
|
|
||||||
// If it is a string, we really store a JSON object in there
|
// If it is a string, we really store a JSON object in there
|
||||||
// except if it begins with '<', because then it is XML.
|
// except if it begins with '<', because then it is XML.
|
||||||
if (is_string($object) && substr($object, 0, 1) != '<') {
|
if (is_string($object) &&
|
||||||
|
substr($object, 0, 1) != '<' &&
|
||||||
|
!is_numeric($object))
|
||||||
|
{
|
||||||
$json = json_decode($object);
|
$json = json_decode($object);
|
||||||
if ($json === null) {
|
if ($json === null) {
|
||||||
throw new Exception('Bad frame in queue item');
|
throw new Exception('Bad frame in queue item');
|
||||||
|
|
|
@ -103,7 +103,7 @@ class UserEmailSummaryHandler extends QueueHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
// An InboxNoticeStream for a certain user, scoped to its own view
|
// An InboxNoticeStream for a certain user, scoped to its own view
|
||||||
$stream = new InboxNoticeStream($profile, $profile);
|
$stream = new InboxNoticeStream($profile);
|
||||||
|
|
||||||
$notice = $stream->getNotices(0, self::MAX_NOTICES, $since_id);
|
$notice = $stream->getNotices(0, self::MAX_NOTICES, $since_id);
|
||||||
|
|
||||||
|
@ -117,8 +117,8 @@ class UserEmailSummaryHandler extends QueueHandler
|
||||||
|
|
||||||
$new_top = null;
|
$new_top = null;
|
||||||
|
|
||||||
if ($notice instanceof ArrayWrapper) {
|
if ($notice->fetch()) {
|
||||||
$new_top = $notice->_items[0]->id;
|
$new_top = $notice->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TRANS: Subject for e-mail.
|
// TRANS: Subject for e-mail.
|
||||||
|
@ -145,7 +145,7 @@ class UserEmailSummaryHandler extends QueueHandler
|
||||||
$out->elementStart('table', array('width' => '550px',
|
$out->elementStart('table', array('width' => '550px',
|
||||||
'style' => 'border: none; border-collapse: collapse;', 'cellpadding' => '6'));
|
'style' => 'border: none; border-collapse: collapse;', 'cellpadding' => '6'));
|
||||||
|
|
||||||
while ($notice->fetch()) {
|
do {
|
||||||
$profile = Profile::getKV('id', $notice->profile_id);
|
$profile = Profile::getKV('id', $notice->profile_id);
|
||||||
|
|
||||||
if (empty($profile)) {
|
if (empty($profile)) {
|
||||||
|
@ -173,7 +173,7 @@ class UserEmailSummaryHandler extends QueueHandler
|
||||||
$out->text(' ');
|
$out->text(' ');
|
||||||
$out->raw($notice->rendered);
|
$out->raw($notice->rendered);
|
||||||
$out->elementStart('div', array('style' => 'font-size: 0.8em; padding-top: 4px;'));
|
$out->elementStart('div', array('style' => 'font-size: 0.8em; padding-top: 4px;'));
|
||||||
$noticeurl = $notice->getUrl();
|
$noticeurl = $notice->getLocalUrl();
|
||||||
// above should always return an URL
|
// above should always return an URL
|
||||||
assert(!empty($noticeurl));
|
assert(!empty($noticeurl));
|
||||||
$out->elementStart('a', array('rel' => 'bookmark',
|
$out->elementStart('a', array('rel' => 'bookmark',
|
||||||
|
@ -189,7 +189,7 @@ class UserEmailSummaryHandler extends QueueHandler
|
||||||
$out->elementEnd('div');
|
$out->elementEnd('div');
|
||||||
$out->elementEnd('td');
|
$out->elementEnd('td');
|
||||||
$out->elementEnd('tr');
|
$out->elementEnd('tr');
|
||||||
}
|
} while ($notice->fetch());
|
||||||
|
|
||||||
$out->elementEnd('table');
|
$out->elementEnd('table');
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('INSTALLDIR', realpath(dirname(__FILE__) . '/../..'));
|
define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..'));
|
||||||
|
|
||||||
$shortoptions = 'i:n:au';
|
$shortoptions = 'i:n:au';
|
||||||
$longoptions = array('id=', 'nickname=', 'all', 'universe');
|
$longoptions = array('id=', 'nickname=', 'all', 'universe');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user