Commit a9bda2b1 authored by Zot's avatar Zot Committed by Mario

sql error photos_albums_list with non-logged-in viewer

parent 5fb7ea8d
......@@ -16,7 +16,7 @@ class Photo_albums {
if((! $channelx) || (! perm_is_allowed(\App::$profile['profile_uid'], get_observer_hash(), 'view_storage')))
return '';
$sortkey = ((array_key_exists('sortkey',$arr)) ? $arr['sortkey'] : 'album');
$sortkey = ((array_key_exists('sortkey',$arr)) ? $arr['sortkey'] : 'display_path');
$direction = ((array_key_exists('direction',$arr)) ? $arr['direction'] : 'asc');
return photos_album_widget($channelx, \App::get_observer(),$sortkey,$direction);
......
......@@ -1826,9 +1826,12 @@ logger('revision: ' . $arr['revision']);
intval($arr['revision'])
);
if($r && count($r)) {
if($r) {
// This will gives us a fresh copy of what's now in the DB and undo the db escaping,
// which really messes up the notifications
$current_post = $r[0]['id'];
$arr = $r[0]; // This will gives us a fresh copy of what's now in the DB and undo the db escaping, which really messes up the notifications
$arr = $r[0];
logger('item_store: created item ' . $current_post, LOGGER_DEBUG);
}
else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment