This commit is contained in:
friendica 2014-11-03 14:51:28 -08:00
commit fdb9b9d52e
5 changed files with 101 additions and 93 deletions

View File

@ -84,6 +84,7 @@ function ref_session_destroy ($id) {
function ref_session_gc($expire) {
q("DELETE FROM session WHERE expire < %d", dbesc(time()));
if (! get_config('system','innodb'))
q("OPTIMIZE TABLE session");
return true;
}

View File

@ -196,7 +196,7 @@ function photos_post(&$a) {
}
}
goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
goaway($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . $_SESSION['album_return']);
}
if(($a->argc > 2) && ((x($_POST,'desc') !== false) || (x($_POST,'newtag') !== false)) || (x($_POST,'albname') !== false)) {
@ -429,7 +429,10 @@ function photos_post(&$a) {
notice($r['message'] . EOL);
}
goaway($a->get_baseurl() . '/' . $_SESSION['photo_return']);
if($_REQUEST['newalbum'])
goaway($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex($_REQUEST['newalbum']));
else
goaway($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/album/' . bin2hex(datetime_convert('UTC',date_default_timezone_get(),'now', 'Y')));
}
@ -610,6 +613,8 @@ function photos_content(&$a) {
if(count($r)) {
$a->set_pager_total(count($r));
$a->set_pager_itemspage(60);
} else {
goaway($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address']);
}
if($_GET['order'] === 'posted')
@ -918,6 +923,8 @@ function photos_content(&$a) {
$aclselect_e = populate_acl($ph[0]);
$albums = ((array_key_exists('albums', $a->data)) ? $a->data['albums'] : photos_albums_list($a->data['channel'],$a->data['observer']));
$_SESSION['album_return'] = bin2hex($ph[0]['album']);
$edit = array(
'edit' => t('Edit photo'),
'id' => $link_item['id'],

View File

@ -8,6 +8,11 @@
padding: 7px 10px;
}
.photo-like-rotator {
margin-top: 23px;
margin-right: 5px;
}
#photo-photo {
display: table;
margin: 0 auto;

View File

@ -163,26 +163,21 @@
<i class="icon-thumbs-down-alt" title="{{$nolike}}"></i>
</button>
</div>
<div id="like-rotator-{{$id}}" class="like-rotator pull-right"></div>
<div id="like-rotator-{{$id}}" class="photo-like-rotator pull-right"></div>
{{/if}}
<div class="clear"></div>
</div>
</div>
{{$comments}}
{{if $commentbox}}
<div class="wall-item-comment-wrapper{{if $comments}} wall-item-comment-wrapper-wc{{/if}}" >
{{$commentbox}}
</div>
{{/if}}
<div class="clear"></div>
</div>
{{$comments}}
{{if $commentbox}}
<div class="wall-item-comment-wrapper{{if $comments}} wall-item-comment-wrapper-wc{{/if}}" >
{{$commentbox}}
</div>
{{/if}}
<div class="clear"></div>
{{$paginate}}

View File

@ -31,20 +31,20 @@
<div id="photos-upload-new-end" class="clear"></div>
<div class="checkbox">
<div class="checkbox pull-left">
<label class="checkbox-inline" for="photos-upload-noshare" >
<input class="checkbox-inline" id="photos-upload-noshare" type="checkbox" name="not_visible" value="1" />{{$nosharetext}}
</label>
</div>
{{if $uploader}}
<div id="photos-upload-noshare-end"></div>
<div id="photos-upload-perms" class="photos-upload-perms" >
<span id="jot-perms-icon" class="icon-{{$lockstate}}" ></span>
<button class="btn btn-default btn-xs" data-toggle="modal" data-target="#aclModal" onclick="return false;">{{$permissions}}</button>
</div>
<div id="photos-upload-perms-end" class="clear"></div>
<div id="photos-upload-perms" class="pull-right">
<button class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" onclick="return false;">
<i id="jot-perms-icon" class="icon-{{$lockstate}}"></i>
</button>
<div class="pull-right">
{{$uploader}}
</div>
{{/if}}
</form>
</div>