Merge branch 'dev' into 'dev'
Add remove cover photo function See merge request hubzilla/core!1577
This commit is contained in:
commit
f61b898633
@ -48,6 +48,16 @@ class Cover_photo extends \Zotlabs\Web\Controller {
|
|||||||
$channel = \App::get_channel();
|
$channel = \App::get_channel();
|
||||||
|
|
||||||
check_form_security_token_redirectOnErr('/cover_photo', 'cover_photo');
|
check_form_security_token_redirectOnErr('/cover_photo', 'cover_photo');
|
||||||
|
|
||||||
|
// Remove cover photo
|
||||||
|
if(isset($_POST['remove'])) {
|
||||||
|
q("update photo set photo_usage = %d where photo_usage = %d and uid = %d",
|
||||||
|
intval(PHOTO_NORMAL),
|
||||||
|
intval(PHOTO_COVER),
|
||||||
|
intval(local_channel())
|
||||||
|
);
|
||||||
|
goaway(z_root() . '/cover_photo');
|
||||||
|
}
|
||||||
|
|
||||||
if((array_key_exists('cropfinal',$_POST)) && ($_POST['cropfinal'] == 1)) {
|
if((array_key_exists('cropfinal',$_POST)) && ($_POST['cropfinal'] == 1)) {
|
||||||
|
|
||||||
|
@ -102,7 +102,8 @@
|
|||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<div id="profile-photo-submit-wrapper">
|
<div id="profile-photo-submit-wrapper">
|
||||||
<input type="submit" name="submit" id="profile-photo-submit" value="{{$submit}}">
|
<button type="submit" class="btn btn-outline-primary" name="submit" id="profile-photo-submit">{{$submit}}</button>
|
||||||
|
<button type="submit" class="btn btn-outline-danger" name="remove" id="profile-photo-remove">{{$remove}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div id="profile-photo-submit-wrapper">
|
<div id="profile-photo-submit-wrapper">
|
||||||
<input type="submit" name="submit" id="profile-photo-submit" value="{{$submit}}">
|
<button type="submit" class="btn btn-outline-primary" name="submit" id="profile-photo-submit">{{$submit}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user